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.

Best Practices for SDI-12 NaN


Terrapin Nov 30, 2016 05:08 PM

I have several WXT520 sensors and I'm wondering about the best practices for getting NaN data from all parameters in this sensor.  The manual for this sensor sets all the parameters to NaN prior to making any measurement as follows

'Reset WXT520 Sensor measurements

Move(WXT(),7,NaN,1)

The other option would be to set the FILLNAN option in the SDI12Recorder command as follows

SDI12Recorder(WXT(),1,"0","R!",1,0,-1)

I'm wondering about the Pros and Cons of each method and why the CSI folks who provided the information for the WXT520 sensor seem to prefer moving NaN into the measurement array prior to the measurement being obtained versus filling the array with NaN within the SDI12 command.  Any thoughts on this would be very appreciated.


smile Nov 30, 2016 07:16 PM

Hi

I have always thought so, since it is the same logic used in other SDI-12 sensors:
If, for some reasons or problems, the probe does not respond to the command, for requesting measures, or some fields do not get, I could run the risk of using the previous measure, without realizing, so only an adequate measurement will overwrite the NAN .

Smile


jra Dec 1, 2016 05:01 PM

The optional FillNAN parameter was added in OS28. That is the recommended method for dataloggers with that option. The WXT520 manual and its example program use the Move() option because it works regardless of the OS.

As with most CRBasic programs, there are several ways to do something. If it works in your application and makes sense to you (and you document it in your program so it makes sense to someone else later) that that is the preferred option :)


Terrapin Dec 2, 2016 04:43 PM

Thanks Janet for the reply. Nice to know why the two options exist and that the preferred option is the FillNAN option is preferred. 

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