I'm trying to setup a CR850 to log SDI12 level data. I've got a shaft encoder wired to a radio TX that sends the SDI12 level and battery data to a RX hooked up to the CR850. The level and voltage from the remote device is displayed on the RX, so no issues with the radio link. If I interrogate the RX with a laptop via SDI12:
0M! returns 00006
0D0! returns 0+12.3+0.000+0.000+0.000
0D1! returns 0+000001+3.878
TX battery voltage is available on address 0, data point 1, the level value is available on address 0, data point 6.
Programming is not my forte, how do I log the level on 0/6? This is what I've got so far, the logger displays level as 0.000.
Any help greatly appreciated.
Mick.
-----------------------------------------------------------
Public Measure As Boolean
Public SDI12Data(2)
Public Batt_volt
Alias SDI12Data(1)=remote_voltage
Alias SDI12Data(2)=remote_level
Units remote_voltage=Vdc
Units remote_level=m
DataTable (sdi12data,true,-1)
DataInterval (0,5,Min,10)
Sample(1,remote_voltage,FP2)
Sample(1,remote_level,IEEE4)
EndTable
DataTable (Battery,True,-1)
DataInterval (0,20,Min,10)
Sample (1,Batt_volt,FP2)
EndTable
BeginProg
Scan (10,Sec,3,0)
If TimeIntoInterval(0,5,min) Then
Measure = TRUE
EndIf
If Measure = TRUE Then
SDI12Recorder (SDI12Data(),3,0,"M!",1,0)
Measure = FALSE
EndIf
Battery (Batt_volt)
CallTable (SDI12Data)
CallTable (Battery)
NextScan
EndProg
Public Measure As Boolean
Public SDI12Data(6)
Public Batt_volt
Alias SDI12Data(1)=remote_voltage
Alias SDI12Data(6)=remote_level
Units remote_voltage=Vdc
Units remote_level=m
DataTable (SDI12Data,true,-1)
DataInterval (0,5,Min,10)
Sample(1,remote_voltage,FP2)
Sample(1,remote_level,IEEE4)
EndTable
DataTable (Batt,True,-1)
DataInterval (0,20,Min,10)
Sample (1,Batt_volt,FP2)
EndTable
BeginProg
Scan (10,Sec,3,0)
If TimeIntoInterval(0,5,min) Then
Measure = TRUE
EndIf
If Measure = TRUE Then
SDI12Recorder (SDI12Data(),3,0,"M!",1,0)
Measure = FALSE
EndIf
Battery (Batt_volt)
CallTable (SDI12Data)
CallTable (Batt)
NextScan
EndProg
Thanks heaps Sam, I'll give it a go and see what happens.
Mick.
Works a treat, thanks Sam.