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.

SDI12 & Lambrecht rain[e]H3 precipitation sensor - no response to commands


Darwyn72 Sep 14, 2020 03:15 PM

Hello, 

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

 Thank you, 

Paul


Maff1 Sep 29, 2020 10:04 PM

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


Darwyn72 Oct 7, 2020 06:40 PM

Hello Maff1,

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
SDI12Recorder(SDI12(),C1,"0","M!"+CHR(10),1,0,-1)
Delay(1,3,Sec)
'sending command to request Lambrecht mass precipitation data
SDI12Recorder(SDI12(),C1,"0","D1!"+CHR(22),1,0,-1)

It now works OK!


Esther Gao Nov 4, 2022 03:51 AM

This post is under review.

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