5 cr1000 with multiplexer sample program, 6 cr10x with multiplexer sample program, Cr1000 with multiplexer sample program – Campbell Scientific CS11-L Current Transformer User Manual
Page 24: Example cr1000 program reading 32 cs11-l current, Tranformers, Cr10x with multiplexer sample program

CS11-L Current Transformer
6.5 CR1000 with Multiplexer Sample Program
This program uses the CR1000 and an AM16/32-series multiplexer to read 32
CS11-L Current Transformers.
6.5.1 Example CR1000 program reading 32 CS11-L Current Tranformers
'CR1000 program to measure rms current
PipeLineMode
'must be pipeline mode
Const num_samples = 100
'6 waveforms for 60 Hz, 5 waveforms for 50 Hz
Const NumSensors=32
'Number of Sensors on the Mux MUX in 2X32 Mode *****
'Sensor wired to Low on each of the 32 channels.
'Odd Low on Mux wired to SE2 on Datalogger
Public Amps(NumSensors), i, Batt_Volt 'the line current
Public Amp_mult, TempAmps
Dim i_sig (num_samples)
'to hold the burst measurements, each 100 samples long
PreserveVariables
'to store values between power cycles
DataTable (AmpTable,True,-1)
DataInterval
(0,1,Min,10)
Maximum
(NumSensors,Amps,IEEE4,False,False)
Average
(NumSensors,Amps,FP2,False)
EndTable
BeginProg
Amp_mult = 0.2
'0.2 multiplier for the CS11-L
Scan
(10,Sec,0,0)
Battery
(Batt_volt)
'Turn
AM16/32
Multiplexor
On
PortSet(4,1)
i=0
SubScan(0,uSec,NumSensors)
'Switch
to
next
AM16/32
Multiplexer
Channel
PulsePort(5,10000)
i=i+1
VoltSe (i_sig (1), num_samples, mV2500,-2, True, 1000, 0, 1.0, 0)
StdDevSpa (Amps(i), num_samples, i_sig (1))
Amps(i) = Amps(i) * Amp_mult
'put in amps
If Amps(i) <= 0.15 Then Amps(i) = 0
NextSubScan
'Turn
AM16/32
Multiplexer
Off
PortSet(4,0)
CallTable
(AmpTable)
NextScan
EndProg
6.6 CR10X with Multiplexer Sample Program
This program uses the CR10X and an AM16/32-series multiplexer to read 32
CS11-L current transformers.
18