![background image](http://html1.mh-extra.com/html/campbell/am16-32b/am16-32b_product-manual_3755840020.webp)
AM16/32B Relay Multiplexer 17
'Turn AM16/32B Multiplexer on
PortSet
(C2,1)
'Delay command inserted by Short Cut.
'Not required by AM16/32B and may be removed to increase program speed.
Delay
(0,150,mSec)
'Reset counter
LCount=1
'Begin measurement loop
SubScan
(0,uSec,5)
'measures 5 sets
'Switch to next AM16/32B Multiplexer channel
PulsePort
(C1,10000)
'Make measurements
'Increment counter according to measurement mode
LCount=1
NextSubScan
'Turn AM16/32 Multiplexer off
PortSet
(C2,0)
The
SubScan()
instruction is used to create a measurement loop for the multiplexer. The third
parameter in the
SubScan()
instruction,
Count
, is the number of sets on the multiplexer that
will be used. For example, if the instruction is
SubScan
(0,
μ
Sec,7)
and the multiplexer is in
2x32 mode, the first seven terminal pairs (numbers in white) on the multiplexer will be used.
When in 4x16 mode, this instruction will use the first seven groups of four (numbers in blue) on
the multiplexer.
It may be desirable to use the repetition parameter,
Reps
, of the measurement instructions
between
SubScan()
and
NextSubScan
. The repetitions parameter is the number of sensors
per instruction that will be measured. See the examples below:
Example 1
'Example 1
LCount = 1
SubScan
(0,uSec,7)
PulsePort
(C1,10000)
VoltDiff
(Dest(LCount),1,mV5000,1,True ,0,60,1.0,0)
LCount = 1
NextSubScan
In this example, one measurement is made per
VoltDiff()
instruction because the instruction
has a repetition parameter of 1 (the second parameter in the
VoltDiff()
instruction). With the
multiplexer in 2x32 mode, differential voltage measurements will be made on the first seven 2x32
terminal pairs because the
Count
parameter of the
SubScan()
instruction is 7.