Campbell Scientific CR6 CR6 Measurement and Control System - Page 220
Declare Multiplier And Offset Result Variables And Set Initial Magnitudes
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 220 highlights
Section 7. Installation 'For the simulation, the value of the calibration standard and the initial 'sensor' signal 'are set automatically. Start the multiplier-and-offset routine by setting variable 'CalMode = 1. The value in CalMode will increment automatically. When CalMode = 3, set 'variables SimulatedFlowSignal = 550 and KnownFlow = 10, then set CalMode = 4. CalMode 'will again increment automatically. When CalMode = 6 (occurs automatically after 10 'measurements), the routine is complete. Note the new values in variables FlowMultiplier and 'FlowOffest. Now enter a new value in the simulated sensor signal as follows and note 'how the new multiplier and offset scale the measurement: ' SimulatedFlowSignal = 1000 'NOTE: This program places a .cal file on the CPU: drive of the CR6. The .cal file must 'be erased to reset the demonstration. 'DECLARE SIMULATED SIGNAL VARIABLE AND SET INITIAL MAGNITUDE Public SimulatedFlowSignal = 300 'Excitation mV, second setting is 550 'DECLARE CALIBRATION STANDARD VARIABLE AND SET MAGNITUDE Public KnownFlow = 30 'Known flow, second setting is 10 'DECLARE MEASUREMENT RESULT VARIABLE. Public Flow 'DECLARE MULTIPLIER AND OFFSET RESULT VARIABLES AND SET INITIAL MAGNITUDES Public FlowMultiplier = 1 Public FlowOffset = 0 'DECLARE VARIABLE FOR FieldCal() CONTROL Public CalMode 'DECLARE DATA TABLE FOR RETRIEVABLE CALIBRATION RESULTS DataTable(CalHist,NewFieldCal,200) SampleFieldCal EndTable BeginProg 'LOAD CALIBRATION CONSTANTS FROM FILE CPU:CALHIST.CAL 'Effective after the zero calibration procedure (when variable CalMode = 6) LoadFieldCal(true) Scan(100,mSec,0,0) 'SIMULATE SIGNAL THEN MAKE THE MEASUREMENT 'Multiplier calibration is applied when variable CalMode = 6 ExciteV(U11,SimulatedFlowSignal,0) VoltSE(Flow,1,mV5000,U1,1,0,15000,FlowMultiplier,FlowOffset) 'PERFORM A MULTIPLIER CALIBRATION. 'Start by setting variable CalMode = 1. Finished when variable CalMode = 6. 'FieldCal(Function, MeasureVar, Reps, MultVar, OffsetVar, Mode, KnownVar, Index, Avg) FieldCal(2,Flow,1,FlowMultiplier,FlowOffset,CalMode,KnownFlow,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 220