The FieldCal Instruction

If you wish to make measurements that will be calibrated as discussed above, you should use the FieldCal() instruction within the CRBasic program. When the program is running in the datalogger, you can use the LoggerNet Calibration Wizard to perform the actual calibrations (in real-time) on the sensors that were previously designated for calibration. You can also perform a manual calibration against a running program using the LoggerNet Numeric Display (see Using the Calibration Wizard with Running Programs) or from a keyboard display connected directly to the datalogger.

The FieldCal() instruction works together with other related CRBasic instructions to complete the calibration task. These instructions are shown in the following table.

The FieldCal Instruction Family

Instruction Description
FieldCal This is the main calibration instruction. The CRBasic program should contain one FieldCal() instruction per measurement requiring calibration. This instruction is placed after the measurement instruction to which it applies.
LoadFieldCal (optional) This instruction loads values into program variables from the calibration file (*.cal), if it exists. It will also indicate whether the attempt to load those values was successful or not by returning a Boolean (true/false) result.
SampleFieldCal (optional) This is a table output instruction. It writes the latest calibration values for all calibrated measurements to a data table (separate from the *.cal file).
NewFieldCal (optional) This is a Boolean system value indicating when a calibration has succeeded. During one scan cycle after a calibration has occurred this value will be true. Its value is then set to false until another calibration occurs. The value of this variable cannot be set within a CRBasic Program, but only evaluated. The main purpose for this variable is to be used together with the SampleFieldCal() instruction to output one table record per calibration to a specified table.

To set up a measurement for calibration in CRBasic, first insert the instruction(s) that make the measurement, using variables for the multiplier and/or offset. Then add a FieldCal() instruction after the measurement instruction and refer back to the measurement being calibrated using the variable containing the measured output. Provide the FieldCal() instruction with the variables holding the multiplier and the offset of the measured sensor. If you need to retrieve a calibration value into multipliers and offsets upon program start or under other conditions, use the LoadFieldCal() instruction. To store calibration values to a data table (in addition to the values stored in the *.cal file), use the SampleFieldCal() table output instruction with the NewFieldCal() system variable as the trigger.

For more information about how to use these instructions, refer to the FieldCal() instruction topic of your datalogger manual, or use the online help topic for FieldCal() within the CRBasic Editor.