Hello!
I have a problem regarding sending parameters to a SDI-12 sensor. from the sensor manual there is a command for setting initial value on the sensor like this: aX0+123.45! If I use the terminal window from connect screen in LoggerNet this command works fine, but I want to set this value from the program running in CR200X I have a variabel wich holds the initial value. From the help menu there is a tip of how to use variables in SDI-12 commands and I have therefore tried this command: SDI12Recorder(SensorResponse,"0X0+%Variable%!",1.0,0). Unfortunately the sensor response to this is fail or NAN.
Any tip of how to use this command? If I use the command with an static value ex: SDI12Recorder(SensorResponse,"0X0+123.45!",1.0,0). it works fine.
Try this:
dimension the variable as a string.
Public SDIcmd$ as string * 15
Public SDIvalue as float
SDIcmd$ = "0X0+" + SDIvalue + "!"
SDI12Recorder(SensorResponse,"SDIcmd$",1.0,0)
Sadly there is no support for defining data types in CR200x and I get a compiler error when I use the AS word.
@#*%## Sorry about that.
The help example has "0XD%variable_name%!"
You have "0X0+%Variable%!". Note, the 0 and the D.
Could that be the problem?