CRBasic Example 2: CR300 program using the M1! command
'This program runs the M1! command that completes the NOAA ports and tides
'calculation. The length of time to respond to this command will depend on
'the number of measurements the user configures the sensor to collect. The
'default is 360 measurements based on the NOAA specification. The sensor can
'be set to collect up to 360 measurements. The command then returns the
'average stage, standard deviation of the stage measurements, number of
'outliers, number of good readings, battery voltage at the sensor, and error
'code.
Public
CS475A(6)
Alias
CS475A(1) = Avg_Stage
'Average stage based on number of measurements
'configured in sensor
Alias
CS475A(2) = st_dev_stage
'Standard deviation of the stage measurements
Alias
CS475A(3) = outliers
'This is the voltage seen at the sensor
Alias
CS475A(4) = good_meas
'The number of good measurements collected during
'the configured time period
Alias
CS475A(5) = Batt_volt_sensor
'The voltage seen at the sensor
Alias
CS475A(6) = Error_Code
'Error code returned by the sensor
Units
Avg_Stage = ft
'Could be meters based on settings in sensor
Units
st_dev_stage = ft
'Could be meters based on settings in sensor
Units
outliers = count
Units
good_meas = count
Units
Batt_volt_sensor = V
Units
Error_Code = NA
'unitless
DataTable
(CS475A,1,-1)
Sample
(6,CS475A(),FP2)
EndTable
BeginProg
Scan
(5,Sec,0,0)
SDI12Recorder
(CS475A,C1,0,
"M1!"
,1.0,0,-1)
CallTable
CS475A
NextScan
EndProg
CS475A Radar Water Level Sensor
45