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.

CR 1000 : NAN values appear with CS476 sensor


audrey May 10, 2012 11:55 AM

Hi

Since last days I work on a CR1000 datalogger for my internship and It's the first time which I use this type of material.

I do connect 2 sensors on the CR100 : I have a radar water level sensor (CS476) and a pressure sensor (CS455).
When I collect values files, I have NAN values for some fields of the CS476 sensor. Why this values?

My program :

'CR1000

'Declare Variables and Units
Public BattV
Public Results(9)
Public CS450Data(2)

Alias Results(1)=level
Alias Results(2)=level1
Alias Results(3)=level2
Alias Results(4)=level3
Alias Results(5)=level5
Alias Results(6)=Result6
Alias Results(7)=Result7
Alias Results(8)=Result8
Alias Results(9)=Result9
Alias CS450Data(1)=Lvl
Alias CS450Data(2)=Temp_C

Units BattV=Volts
Units level=cm
Units level1=cm
Units level2=cm
Units level3=cm
Units level5=cm
Units Result6=Units
Units Result7=Units
Units Result8=Units
Units Result9=Units
Units Lvl=cm
Units Temp_C=deg C

'Define Data Tables
DataTable(sensors,True,-1)
DataInterval(0,1,Sec,10)
Sample(1,level,FP2)
Maximum(1,level1,FP2,False,False)
Minimum(1,level2,FP2,False,False)
StdDev(1,level3,FP2,False)
Average(1,level5,FP2,False)
Sample(1,Lvl,FP2)
Maximum(1,Temp_C,FP2,False,False)
EndTable

'Main Program
BeginProg
Scan(1,Sec,1,0)
'Default Datalogger Battery Voltage measurement BattV
Battery(BattV)
'Generic SDI-12 Sensor measurements level, level1, level2,
'level3, level5, Result6, Result7, Result8, and Result9
SDI12Recorder(CS476(),7,"A","M!",1,0)
'CS450/CS455 Pressure Transducer measurements Lvl and Temp_C
SDI12Recorder(CS455,7,"0","M1!",1,0)
Lvl=Lvl*70.307
'Call Data Tables and Store Data
CallTable(sensors)
NextScan
EndProg


Grant May 14, 2012 09:01 AM

The variables you are placing the SDI12 data into are not declared

Try adding

Public CS476(3) and CS455(2) to your public declarations.

I think that the CS476 only outputs two or three pieces of information, distance, stage (if the sensor is programmed to output this) and error code

The CS455 would be similar


audrey May 15, 2012 07:09 AM

Thanks for your help. Now, I don't have NAN values.

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