Is it possible to log SDI12 messages on a CR1000 similar to watching the SDI12 port through the terminal and saving the output? I need to watch over several days, and staying connected and watching/logging/saving the watched terminal output is not feasible as the pakbus network contains several nodes, and the station in question is several hops along a RF401 radio link.
James,
If you have a free COM port (C1/C2) on the data logger you can jumper the SDI-12 channecl (C1 for example) to the RX channel of another COM port (C4 for example).
If the program below I am using a CR1000 to measure a CS451 SDI-12 pressure transducer. If for some reason the logger doesn't see the response that it expects from the sensor, it logs the 'traffic' to a table. In this example, all you need to do is jumper C1 to C4 with a short length of wire.
Public PTemp, BVolt
Public CS451(2)
Public CS451_Capture As String * 64
DataTable (CS451_14010751,1,-1) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,2,Min,10)
Sample (1,BVolt,FP2)
Sample (1,PTemp,IEEE4)
Sample (2,CS451(),IEEE4)
EndTable
DataTable (CS451_Snoop,True,500)
Sample (1,CS451_Capture,String)
EndTable
BeginProg
SerialOpen (Com2,1200,10,0,1000)
Scan (120,Sec,0,0)
Battery (BVolt)
Delay (0,2000,mSec)
SDI12Recorder (CS451(),1,0,"M!",1.0,0)
If CS451(1) = NAN Then
SerialIn (CS451_Capture,Com2,100,0,100)
CallTable CS451_Snoop
Else
SerialFlush (Com2)
EndIf
CallTable CS451_14010751
NextScan
EndProg
That is perfect. Thanks.