beautypg.com

Example cr10x program reading 32 cs11-l current, Transformers – Campbell Scientific CS11-L Current Transformer User Manual

Page 25

background image

CS11-L Current Transformer

6.6.1 Example CR10X program reading 32 CS11-L Current Transformers

;{CR10X}
; Example program for CS11-L
;
; Program to test the CS11-L sensor on a CR10X datalogger
; and AM1632 Multiplexer.
;
*Table 1 Program
01: 30

Execution

Interval

(seconds)


; Turn on the multiplexer

1: Do (P86)
1: 41

Set

Port

1

High


2: Excitation with Delay (P22)
1: 1

Ex

Channel

2: 0

Delay W/Ex (0.01 sec units)

3: 15

Delay After Ex (0.01 sec units)

4: 0

mV

Excitation


3: Beginning of Loop (P87)
1: 0000

Delay

2: 32

Loop

Count


; Clock multiplexer to next channel

4: Do (P86)

1: 72

Pulse

Port

2


5: Excitation with Delay (P22)

1: 1

Ex

Channel

2: 0

Delay W/Ex (0.01 sec units)

3: 1

Delay After Ex (0.01 sec units)

4: 0

mV

Excitation


6: Do (P86)

1: 1

Call

Subroutine

1


; This part of the program will calculate the rms Amperage
; Standard Deviation in this part of the code works mathematically the same
; as rms calculation, and it is easier to program this way. The rms
; value is calculated and stored back into an input location for further
; processing if needed.

7: Do (P86)

1: 2

Call

Subroutine

2


8: Step Loop Index (P90)

1: 2

Step


9: Z=X (P31)

1: 2

X Loc [ BurstAmps ]

2: 4

-- Z Loc [ CS11_1 ]

19