Appendix B. Example Programs
B-2
TABLE B-1. Wiring for Single-Ended Voltage Measurements CRBasic Example
CR1000X
CR300
AM16/32B in 4X16 Mode
Sensors
Control and
COM Terminals
Measurement
Terminals
⏚
(
Signal
Ground
)
⏚
(
Signal
Ground
)
COM ODD H
Odd-numbered
H
terminal Sensor 1, 2, and 3 grounds
1H
1H
COM ODD L
Odd-numbered
L
terminal
Sensor 1 signal
1L
1L
COM EVEN H
Even-numbered
H
terminal
Sensor 2 signal
2H
2H
COM EVEN L
Even-numbered
L
terminal
Sensor 3 signal
⏚
⏚
COM
Sensor 1, 2, and 3 shields
12V
SW12V
12V
G
G
G
C1
C1
CLK
C2
C2
RES
is a CR300-series program. With minor adjustments,
this program can be used with the CR1000X series, CR6 series, CR800 series,
CR1000, or CR3000. The AM16/32B must be in 4x16 mode.
CRBasic Example B-1. Single Ended Voltage Measurements Using MuxSelect()
'Multiplexer in 4X16 Mode
'Declare Variables and Units
Public
SEVolt(9)
Units
SEVolt=mV
'Define Data Tables
DataTable
(Hourly,True,-1)
DataInterval
(0,60,Min,10)
Sample
(9,SEVolt(),FP2)
EndTable
DataTable
(Daily,True,-1)
DataInterval
(0,1440,Min,10)
Average
(9,SEVolt(),FP2,False)
EndTable
'Main Program'
BeginProg
SW12
(1 )
'provide power to AM16/32B
'Main Scan
Scan
(30,Sec,1,0)
'>>>>>> Set 1
'Turn AM16/32B Multiplexer On, start measurements on mux channel 1
MuxSelect
(C1,C2 ,20,1,1)
'3 repetitions, writing to SEVolt(1), SEVolt(2) and SEVolt(3)
'3 repetitions, measuring 1H, 1L, 2H on mux
VoltSe
(SEVolt(1),3,mv2500,1,True,0,60,1,0)
'>>>>>> Set 2
PulsePort
(C1 ,10000)
'to move to Set 2
'start measurements on mux channel 3
'3 repetitions, writing to SEVolt(4), SEVolt(5) and SEVolt(6)
'3 repetitions, measuring 3H, 3L, 4H on mux
VoltSe
(SEVolt(4),3,mv2500,1,True,0,60,1,0)
'>>>>>> Set 3
PulsePort
(C1 ,10000)
'to move to Set 3