Campbell Scientific CR9000X Measurement and Control System User Manual
Page 271

Section 7. Measurement Instructions
7-47
The following program uses the SubScan to combine 2.5 kHz filtermodule measurements with 10 Hz
measurements on a CR9050 card.
' CR9052 example program #2
'
' Measure 2 channels on the CR9050 at 10 Hz on the +/- 5000 mV range.
' Measure six channels on the CR9052DC at 2.5 kHz on +/- 5000 mV range with 5-Volt excitation.
' Sample ratio is 2.5: top of pass band is 2.5 kHz / 2.5 = 1 kHz.
' CR9052 is in slot 8.
' Turn on flag 1 on to save instantaneous data to output table.
const stats_interval = 2
' time period over which to compute stats, in seconds
Public Flt_in (6)
units Flt_in = mV
Public Alg_in (2)
units Alg_in = mV
Public flag (1)
'Filter Module Filter Option
const SmplRat_2_5 = 2
'Fpass = Fsr/2.5 = 1/(T_scan*2.5)
'------------------- Data Tables -------------
DataTable (FiltData, flag (1), -1)
' save to final storage if flag (1) = True
Sample (6, Flt_in(1),IEEE4)
EndTable
DataTable (AlgData, flag (1), -1)
' save to final storage if flag (1) = True
Sample (2, Alg_in(1),IEEE4)
EndTable
'------------------- Program------------------
BeginProg
Scan (100, msec, 0, 0)
VoltDiff (Alg_in(1), 2, mV5000, 6, 1, False, 0, 0, 1.0, 0.0)
CallTable AlgData
SubScan (400, usec, 250)
'
VoltFilt (Destination, Reps, Range, FSlot, Chan, FiltOption, Excitation, Mult, Offset)
VOLTFILT
(Flt_in(1), 6, mV5000, 8, 1, SmplRat_2_5, 5, 1.0, 0.0)
CallTable FiltData
Next SubScan
Next Scan
SlowSequence
Scan (1, Sec, 0, 0)
Calibrate
' run calibrations for cr9050 measurements
BiasComp
Next Scan
EndProg