Slowsequence example, Subscan/nextsubscan – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 352

Section 9. Program Control Instructions
interval should be increased. If removing the SlowSequence scan alleviates
the skipped scan problem, add the SlowSequence scan back into the code and
increase the TimeSlice parameter incrementally by the value of the Primary
Scan Rate in microseconds divided by 10 up to 0.2 times the Primary Scan
interval (200 for our example). If skipped scans are still occurring when the
Time Slice parameter is set at 0.2 times the Primary Scan interval, then either
the Slow Sequence program will need to be removed or the Primary Scan
interval will need to be increase.
THE FOLLOWING INSTRUCTIONS CANNOT BE USED IN A
SLOWSEQUENCE SCAN:
AM25T
Excite
FFTFilt
PortSet
PortGet
PulseCount
PulseCountReset ReadIO
SubScan
VoltFilt
TimerIO
WaitDigTrig
WriteIO
VoltDiff or TCDiff when used with a CR9058E
SlowSequence Example
The example uses SlowSequence to calibrate the CR9000X every ten seconds.
Public Temp1
DataTable(Table1,1,600)
DataInterval(0,0,0,1)
'20 mSec interval with 1 lapse
Sample(1,Temp1,FP2)
'1 rep, sample temp1, low resolution
EndTable
BeginProg
Scan(20,mSec,0,0)
'20 mSec scan, Non-burst, Infinite looping
ModuleTemp (TRef(),1,5,20)
'1 Rep, Sample Temp1, Low Resolution
CallTable Table1
Next scan
SlowSequence
'Start of Slow Sequence program
Scan (10,Sec,0,0)
'SlowSequence scan
Calibrate
'Perform background calibration
Next scan
EndProg
SubScan/NextSubScan
The SubScan instruction is used to perform measurements and/or processing
at a different rate than that of the main program scan rate.
Syntax
SubScan(SubInterval, Units, SubRatio)
Measurement Instructions
Processing
Instructions
NextSubScan
Remarks
The SubScan instruction cannot be used in a SlowSequence Scan, nor can
they be nested inside another SubScan.
There are, basically, three types of SubScans available for the CR9000X:
9-22