Scan(100,mSec,0,0)
'SIMULATE SIGNAL THEN MAKE THE MEASUREMENT
'Zero calibration is applied when variable CalMode = 6
ExciteV(Vx1,SimulatedRHSignal,0)
VoltSE(RH,1,mV2500,1,1,0,250,0.05,RHOffset)
'PERFORM A ZERO CALIBRATION.
'Start by setting variable CalMode = 1. Finished when variable CalMode = 6.
'FieldCal(Function, MeasureVar, Reps, MultVar, OffsetVar, Mode, KnownVar, Index, Avg)
FieldCal(0,RH,1,0,RHOffset,CalMode,KnownRH,1,30)
'If there was a calibration, store calibration values into data table CalHist
CallTable(CalHist)
NextScan
7.9.12.5.2 FieldCal() Offset (Opt 1) Example
Most CRBasic measurement instructions have a multiplier and offset parameter.
FieldCal() Option 1 adjusts the offset argument such that the output of the sensor
being calibrated is set to the magnitude of the FieldCal() KnownVar parameter.
Subsequent measurements have the same offset added. Option 0 does not affect
the multiplier argument. Option 0 does not affect the multiplier argument.
Example Case: A sensor measures the salinity of water. Multiplier is known to be
stable, but sensor offset drifts and requires regular offset correction using a
standard solution. The following procedure offsets the measurement to obtain the
calibration report shown.
Table 30. Calibration Report for Salinity Sensor
CRBasic Variable At Deployment At Seven-Day Service
SimulatedSalinitySignal output 1350 mV 1345 mV
KnownSalintiy (standard
solution)
30 mg/l 30 mg/l
SalinityMultiplier
0.05 mg/l/mV 0.05 mg/l/mV
SalinityOffset
-37.50 mg/l -37.23 mg/l
Salinity reading 30 mg/l 30 mg/l
1. Send CRBasic example FieldCal() Offset (p. 217) to the CR1000. A terminal
configured for excitation has been programmed to simulate a sensor output.
2. To simulate the salinity sensor in a simulated-calibration condition, (in the field
it would be placed in a 30 mg/l standard solution), place a jumper wire
between terminals VX1 and SE1. The following variables are preset by the
program: SimulatedSalinitySignal = 1350, KnownSalinity = 30.
3. To start a simulated calibration, set variable CalMode = 1. When CalMode
increments to 6, offset calibration is complete. The calibrated offset will equal
-37.48 mg/l.
4. To continue this example and simulate an offset-drift condition, set variable
SimulatedSalinitySignal = 1345.
216