I'm using a CR1000X connected via C1 to a Lambrecht rain[e]H3 precipitation sensor, using SDI12. I configured a program using ShortCut. I only get NAN's from the sensor, and have tried 'sniffing' the port using the Terminal Emulator, I could not see any response to the CR1000X's commands. I then tried using the Terminal to send my own commands to the SDI12 sensor (e.g. !?, 0!, 0I! etc) but the response was 'No answer from sensor'.
I am wondering what is the standard setup of SDI12Recorder instruction is? The Lambrecht manual states that the byte format has to be 1 start bit, 7 data bits, 1 parity bit, 1 stop bit. Could this be the problem with the SDI12 returning NAN ? Should I use SerialOpen to specify the setup of the port? Any suggestions welcomed!
The code is below,
'CR1000X Series 'Created by Short Cut (4.3) 'Declare Variables and Units Public BattV Public PTemp_C Public SDI12(3) Alias SDI12(1)=Precip_intensity Alias SDI12(2)=Precip_amount Alias SDI12(3)=Precip_total Units BattV=Volts Units PTemp_C=Deg C Units Precip_intensity=mm/h Units Precip_amount=mm/m2 Units Precip_total=mm/m2 'Define Data Tables DataTable(Table1,True,-1) DataInterval(0,1,Min,10) Minimum(1,BattV,FP2,False,False) Average(1,PTemp_C,FP2,False) Average(1,Precip_intensity,FP2,False) Average(1,Precip_amount,FP2,False) Average(1,Precip_total,FP2,False) EndTable DataTable(Table2,True,-1) DataInterval(0,30,Min,10) Minimum(1,BattV,FP2,False,False) Average(1,PTemp_C,FP2,False) Average(1,Precip_intensity,FP2,False) Average(1,Precip_amount,FP2,False) Average(1,Precip_total,FP2,False) EndTable 'Main Program BeginProg 'Main Scan Scan(5,Sec,1,0) 'Default CR1000X Datalogger Battery Voltage measurement 'BattV' Battery(BattV) 'Default CR1000X Datalogger Wiring Panel Temperature measurement 'PTemp_C' PanelTemp(PTemp_C,50) 'Generic SDI-12 Sensor measurements 'Precip_intensity', 'Precip_amount', and 'Precip_total' SDI12Recorder(SDI12(),C1,"0","M!",1,0,-1) 'Call Data Tables and Store Data CallTable Table1 CallTable Table2 NextScan EndProg
hi, I have a Lambrecth SDI12 sensor too, the rain [e] model without heater, and the same CR1000x datalogger, and I had the same problem, I only read NAN, and I discovered that the problem is the ground connection. And I discovered it by chance after several days, at the time I also thought it was the datalogger but in the end that was not the problem, I hope my experience will help you
Thanks for your reply. I got my code working in the end by changing scan to 10 sec and incorporating a delay:
'Sending command to measure Lambrecht mass precipitation
'sending command to request Lambrecht mass precipitation data
It now works OK!
This post is under review.