Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

TDR100 ERROR


rolis Feb 27, 2011 04:09 PM

I write some program with cr3000,but get NAN back,if sb know what error with this program?

I use the same com interface with TDR100 for PCTDR,it work well.

The follow is my program,

'TDR100 in Florida Field
'To create a different opening program template, type in new
'instructions and select Template | Save as Default Template
'date:01-12-2010
'program author:Steven

'Declare Public Variables
'Example:
Public PTemp, batt_volt
Public LaL(100),LaL2(100),ToppVWC(100)
Public Flag

'Declare Other Variables
'Example:
'Dim Counter
Alias ToppVWC(1)= CK1_10cm
Alias ToppVWC(2)= CK1_20cm
Alias ToppVWC(3)= CK1_30cm
Alias ToppVWC(4)= CK1_50cm
Alias ToppVWC(5)= CK1_70cm
Alias ToppVWC(6)= CK1_100cm
Alias ToppVWC(7)= CK1_130cm
Alias ToppVWC(8)= CK1_160cm
Alias ToppVWC(9)= CK1_190cm
Alias ToppVWC(10)= CK1_220cm
Alias ToppVWC(11)= CK2_10cm
Alias ToppVWC(12)= CK2_20cm
Alias ToppVWC(13)= CK2_30cm
Alias ToppVWC(14)= CK2_50cm
Alias ToppVWC(15)= CK2_70cm
Alias ToppVWC(16)= CK2_100cm
Alias ToppVWC(17)= CK2_130cm
Alias ToppVWC(18)= CK2_160cm
Alias ToppVWC(19)= CK2_190cm
Alias ToppVWC(20)= CK2_220cm
Alias ToppVWC(21)= CK3_10cm
Alias ToppVWC(22)= CK3_30cm
Alias ToppVWC(23)= CK3_20cm
Alias ToppVWC(24)= CK3_50cm
Alias ToppVWC(25)= CK3_70cm
Alias ToppVWC(26)= CK3_100cm
Alias ToppVWC(27)= CK3_130cm
Alias ToppVWC(28)= CK3_160cm
Alias ToppVWC(29)= CK3_190cm
Alias ToppVWC(30)= CK3_220cm
Alias ToppVWC(31)= CK4_10cm
Alias ToppVWC(32)= CK4_20cm
Alias ToppVWC(33)= CK4_30cm
Alias ToppVWC(34)= CK4_50cm
Alias ToppVWC(35)= CK4_70cm
Alias ToppVWC(36)= CK4_100cm
Alias ToppVWC(37)= CK4_130cm
Alias ToppVWC(38)= CK4_160cm
Alias ToppVWC(39)= CK4_190cm
Alias ToppVWC(40)= CK4_220cm
Alias ToppVWC(41)= CK5_10cm
Alias ToppVWC(42)= CK5_20cm
Alias ToppVWC(43)= CK5_30cm
Alias ToppVWC(44)= CK5_50cm
Alias ToppVWC(45)= CK5_70cm
Alias ToppVWC(46)= CK5_100cm
Alias ToppVWC(47)= CK5_130cm
Alias ToppVWC(48)= CK5_160cm
Alias ToppVWC(49)= CK5_190cm
Alias ToppVWC(50)= CK5_220cm
Alias ToppVWC(51)= CK6_10cm
Alias ToppVWC(52)= CK6_20cm
Alias ToppVWC(53)= CK6_30cm
Alias ToppVWC(54)= CK6_50cm
Alias ToppVWC(55)= CK6_70cm
Alias ToppVWC(56)= CK6_100cm
Alias ToppVWC(57)= CK6_130cm
Alias ToppVWC(58)= CK6_160cm
Alias ToppVWC(59)= CK6_190cm
Alias ToppVWC(60)= CK6_220cm
Alias ToppVWC(61)= CK7_130cm
Alias ToppVWC(62)= CK7_160cm
Alias ToppVWC(63)= CK7_190cm
Alias ToppVWC(64)= CK7_220cm
Alias ToppVWC(65)= CK7_10cm
Alias ToppVWC(66)= CK7_20cm
Alias ToppVWC(67)= CK7_30cm
Alias ToppVWC(68)= CK7_50cm
Alias ToppVWC(69)= CK7_70cm
Alias ToppVWC(70)= CK7_100cm
Alias ToppVWC(71)= CK8_20cm
Alias ToppVWC(72)= CK8_50cm
Alias ToppVWC(73)= CK8_70cm
Alias ToppVWC(74)= CK8_100cm
Alias ToppVWC(75)= CK8_130cm
Alias ToppVWC(76)= CK8_160cm
Alias ToppVWC(77)= CK8_190cm
Alias ToppVWC(78)= CK8_220cm
Alias ToppVWC(79)= CK8_10cm
Alias ToppVWC(80)= CK8_30cm
Alias ToppVWC(81)= CK9_100cm
Alias ToppVWC(82)= CK9_130cm
Alias ToppVWC(83)= CK9_160cm
Alias ToppVWC(84)= CK9_190cm
Alias ToppVWC(85)= CK9_220cm
Alias ToppVWC(86)= CK10_190cm
Alias ToppVWC(87)= CK10_220cm
Alias ToppVWC(88)= CK9_10cm
Alias ToppVWC(89)= CK9_20cm
Alias ToppVWC(90)= CK9_30cm
Alias ToppVWC(91)= CK9_50cm
Alias ToppVWC(92)= CK9_70cm
Alias ToppVWC(93)= CK10_10cm
Alias ToppVWC(94)= CK10_20cm
Alias ToppVWC(95)= CK10_30cm
Alias ToppVWC(96)= CK10_50cm
Alias ToppVWC(97)= CK10_70cm
Alias ToppVWC(98)= CK10_100cm
Alias ToppVWC(99)= CK10_130cm
Alias ToppVWC(100)= CK10_160cm
Dim I
'Declare Constants
'Topp Equation Dielectric Constants
Const a0=-0.053
Const a1=0.0292
Const a2=-0.00055
Const a3=0.0000043
Const High=True
Const Low=False

'Define Data Tables
DataTable (SysInfo,1,-1)
DataInterval(0,15,Min,10)
Minimum (1,batt_volt,IEEE4,0,False)
Average (1,PTemp,IEEE4,False)
EndTable

DataTable (SoilTDR,True,-1)
DataInterval (0,2,hr,10)
Minimum (1,batt_volt,IEEE4,0,False)
Average (1,PTemp,IEEE4,False)
Sample (100,LaL(),IEEE4)
Sample (100,LaL2(),IEEE4)
Sample (100,ToppVWC(),FP2)
EndTable


'Define Subroutines
'Sub
'EnterSub instructions here
'EndSub

'Main Program
BeginProg
SDMSpeed (50)
Scan (5,Sec,0,0)
PanelTemp (PTemp,250)
Battery (Batt_volt)
CallTable (SysInfo)
If TimeIntoInterval (0,2,hr) Then Flag=High
If Flag=High Then
SW12(1,1)
Delay(1,2,Sec)
TDR100 (LaL(1),3,0,5818,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(9),3,0,6817,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(16),3,0,1817,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(23),2,0,5017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(30),2,0,6017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(37),2,0,1017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(44),2,0,2017,4,1.0,251,9,9,0.15,0.085,1.0,0)
'
TDR100 (LaL(51),2,0,3017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(58),2,0,4017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(65),2,0,7017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(72),2,0,8017,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(79),3,0,3817,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(86),3,0,8817,4,1.0,251,9,9,0.15,0.085,1.0,0)
TDR100 (LaL(93),3,0,7818,4,1.0,251,9,9,0.15,0.085,1.0,0)
For I=1 To 100
LaL2(I)=LaL(I)^2
Next I
For I=1 To 100
ToppVWC(I)=a0+a1*LaL2(I)+a2*LaL2(I)^2+a3*LaL2(I)^3
Next I
CallTable SoilTDR
Flag=0
SW12(1,0)
EndIf
PortsConfig (&B00000111,&B00000000)
NextScan
EndProg


aps Feb 28, 2011 03:42 PM

Please check the SDM address of your TDR100. The address is not consistent in your program between different calls of the instructions. Perhaps you have two of them?

Log in or register to post/reply in the forum.