Appendix B. Example Programs
B-3
TABLE B-3. CR1000X Wiring For Multiplexer Example Program
CR1000X
AM16/32B (2x32 mode)
CS650
12V
12V
G
GND
C2
RES
C3
CLK
SW12
COM ODD H
C1
COM ODD L
G
COM Ground
High Terminals 1H – 12H
Red
Low Terminals 1L – 12L
Green
Ground Terminals to Left of
Low Terminals
Black, Orange, Clear
CRBasic Example B-3. CR1000X with 12 CS650 Sensors on Multiplexer
Dim
LCount
Public
CS650(12,6)
DataTable
(DatoutCS650,1,-1)
DataInterval
(0,60,Min,2)
Average
(72,CS650(),IEEE4,False)
EndTable
BeginProg
Scan
(15,Min,0,0)
PortSet
(C2,1)
'Turn AM16/32 Multiplexer On
Delay
(0,150,mSec)
LCount=1
SubScan
(0,uSec,12)
PulsePort
(C3,10000)
'Switch to next AM16/32 terminal
SW12
(SW12_1,1)
'Apply power to CS650
Delay
(0,3,Sec)
'Wait three seconds for sensor to warm up
SDI12Recorder
(CS650(LCount,1),C1,0,"M4!",1.0,0)
LCount=1
SW12
(SW12_1,0)
'Remove power from CS650
NextSubScan
PortSet
(C2,0)
'Turn AM16/32 Multiplexer Off
Delay
(0,150,mSec)
CallTable
DatoutCS650
'Call Data Table
NextScan
EndProg