beautypg.com

Loadfieldcal, Syntax, Remarks – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 373

background image

Section 9. Program Control Instructions

Public PTemp, TCTemp, ITimes(20) AS LONG

InstructionTimes

(ITimes())


DataTable (TempTbl,1,-1)
DataInterval (0,1,Min,10)
Sample

(1,PTemp,FP2)

Sample

(1,TCTemp,FP2)

EndTable

BeginProg
Scan (1,Sec,3,0)
ModuleTemp (PTemp,1,4,0)
TCDiff (TCTemp,1,mV50,5,1,TypeT,PTemp,True ,0,250,1.0,0)
CallTable TempTbl
NextScan
EndProg

LoadFieldCal

Used to load calibration values from the FieldCal (*.cal) file into the
corresponding measurement variable's multipliers and offsets when used in
conjunction with the FieldCal or FieldCalStrain instructions. See either topic
for an example program.

Syntax

TestCalLoad = LoadFieldCal(

CheckSig

)

Remarks
The LoadFieldCal instruction is normally placed right before the Scan
instruction (after any calibration variable values have been initialized). When
the Logger encounters the LoadFieldCal instruction, it looks for a *.cal file
that has the same name as the running program (example: Program.cal).
Included in the header of this *.cal file, is the Program Signature of the
program that created it. If the CheckSig parameter is set to True, this stored
program signature must match the program signature of the running program
or the calibration constant loading process will be aborted. If the CheckSig
parameter is set False (0), the loading process can continue even if the
program signatures do not match. If the Running program does not declare the
calibration variables that are included in the *.cal file's header, then the
LoadFieldCal process will fail.

LoadFieldCal can be set equal to a variable to monitor whether or not the
loading of values is successful. If the values are successfully loaded, the
variable will be set True, otherwise it will be set False.

LoadFieldCal Example
This example program line sets up the loading of the Calibration constants into
their perspective variables even if the Program signatures do not match. At the
same time, the TestCalLoad variable will be set True if the loading process is
successful, or False if unsuccessful. See FieldCal for a full example Program.

TestCalLoad = LoadFieldCal(0)

9-43