
AM16/32B Relay Multiplexer 18
Example 2
'Example 2
LCount = 1
SubScan
(0,uSec,7)
PulsePort
(C1,10000)
VoltDiff
(Dest(LCount),2,mV5000,1,True ,0,60,1.0,0)
LCount = 2
NextSubScan
With the multiplexer in 4x16 mode, differential voltage measurements will be made on the first
seven 4x16 terminal groups because the
Count
parameter of the
SubScan()
instruction is 7.
Two differential sensors are measured per terminal group because the
VoltDiff()
instruction
has a repetition parameter of 2. Thus, a total of 14 differential voltage measurements will be made
(2 measurement per subscan × 7 subscans = 14).
8.1.2
Using CRBasic MuxSelect() instruction
The CRBasic
MuxSelect()
instruction is used to enable the multiplexer and select a specific
channel to begin measurements. This can simplify the data logger program by making one set of
measurements at a time. Use the
PulsePort()
instruction to advance the multiplexer and the
PortSet()
instruction to disable it. The generalized programming sequence follows:
'Turn AM16/32B Multiplexer on, C1-CLK, C2-RES
'Advance to first measurement channel in SET 1
MuxSelect
(C1, C2 ,20,1,1)
'Make SET 1 measurements
'<insert measurement instruction(s)>
'Advance to first measurement channel in SET 2
PulsePort
(C1 ,10000) 'move to Set 2
'Make SET 2 measurements
'<insert measurement instruction(s)>
'Advance to first measurement channel in SET 3
PulsePort
(C1 ,10000) 'move to Set 3
'Make SET 3 measurements
'<insert measurement instruction(s)>
'Turn AM16/32 Multiplexer off
PortSet
(C2,0)
For measurement and program examples, see
Example measurements and programs
(p. 21).
8.1.3
General programming considerations
Excitation voltage, integration time, and delay time associated with measuring the signal, and the
speed at which the channels are advanced, can be varied within the data logger program. In
general, longer delay times are necessary when sensors and data logger are separated by longer
cable lengths. Consult the data logger or sensor manual for additional information on these
topics.