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.

SDI12Recorder


Asulv Sep 24, 2010 01:12 PM

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.


IslandMan Sep 25, 2010 11:06 AM

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)


Asulv Sep 27, 2010 02:53 PM

Sadly there is no support for defining data types in CR200x and I get a compiler error when I use the AS word.


IslandMan Sep 28, 2010 10:59 AM

@#*%## 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?

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