beautypg.com

5 cr1000 with multiplexer sample program – Campbell Scientific CS10-L and CS15-L Current Transformers User Manual

Page 16

background image

CS10-L and CS15-L Current Transformers

5.5 CR1000 with Multiplexer Sample Program

This program uses the CR1000 and an AM16/32-series multiplexer to read 32
CS10-L current transformers.

'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 CS10-L/CS15-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

10