2 cr9058e isolation module subscan or superscan – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 155

Section 4. CRBasic – Native Language Programming
4.2.9.2.2 CR9058E Isolation Module SubScan or SuperScan
This type of SubScan was created for the Isolation module so that Isolation
measurements could be performed at a slower rate than the main Scan rate. The
measurement instructions set-up for a CR9058E will be run in parallel to the
other measurement instructions within the Scan (CR9058E includes it own
processor and data buffer area). Any SubScan that has a negative number for
the SubScan SubRatio parameter is a considered a SuperScan (SubScan
that has an Interval greater than the main Scan interval). Only VoltDiff
and TCDiff instructions are supported by the CR9058E Isolation module. You
cannot run measurements for a single CR9058E module both inside and outside
of a SubScan, as all measurements for a given module must have the same Scan
Interval.
The syntax for this type of SubScan would be SubScan(0,0,-j), where j is the
ratio of the SubScan Interval to the main Scan Interval. The parameters for the
CR9052 Subscan:
SubInterval: Enter
0
Units: Enter
0.
SubRatio
Must be a negative number and is the integral ratio of the
SubScan interval to the main Scan interval.
Only one Superscan can exist in each main Scan structure.
NOTE
You can run analog voltage measurements using the CR9050/CR9051E inside
of a SuperScan frame. Because of this, and the fact that the CR9058E isolation
module's measurement instructions (VoltDiff & TCDiff) are also used for the
CR9050/ CR9051E modules, it is advised to use the SlotConfigure instruction
so that the CRBasic pre-compiler can catch syntax errors associated with the
module type.
See example 4.2.9-3 for an example program using a CR9058E and a CR9050
in the same SuperScan construct. Note that we can also measure another
channel on the CR9050 outside of the SuperScan, although it is not allowed to
measure CR9058E module channels both inside and outside of a SuperScan
construct.
Example Program 4.2.9-3: SubScan with CR9058E Measurements
SlotConfigure (9050,9058)
'
Public V9050(2), V9058(8)
DataTable (Main1,1,1000)
DataInterval (0,0,0,100)
'Synch the output rate to the SubScan rate
Sample (8,V9058,IEEE4)
Sample (2,V9050,IEEE4)
EndTable
BeginProg
Scan (1,mSec,10,0)
'Scan once a mSec, 10 Scan buffers
SubScan (0,0,-100)
'100/1 Scan ratio/SubScan
VoltDiff (V9058(),1,V2,5,1,True ,0,-5,1.0,0)
VoltDiff (V9050(1),1,mV50,4,1,-1,0,0,1.0,0)
NextSubScan
VoltDiff (V9050(2),1,mV50,4,2,-1,0,0,1.0,0)
'
Measure next channel on
9050
CallTable Main1
'Call Table from main Scan to output at its rate.
NextScan
EndProg
4-27