Campbell Scientific SDM-CVO4 4-Channel Current/Voltage Output Module User Manual
Page 25

SDM-CVO4 4-Channel Current/Voltage Output Module
; Then apply the scaling with one instruction P53
; The readings are scaled -3000 to +5000, i.e. to
; cover the range which would equate to
; 4-20 mA in current mode.
; Windspeed to cover the range 0-100 m/s
; Wind direction to cover 0-360 degrees
; Temperature -25 to +50 degrees C
; Radiation 0 - 1000 m^2/s
10: Scaling Array (A*Loc+B) (P53)
1: 5
Start Loc [ ScldOut_1 ]
2: 80
A1 ; WS multiplier
3: -3000
B1 ; WS Offset
4: 22.2222 A2
5: -3000
B2
6: 106.667 A3
7: -333.32 B3
8: 8
A4
9: -3000
B4
; Now limit the lowest scaled value to -3000 (4 mA)
; As we have four 4-20 mA current outputs, a loop
; construct is the easiest way to do this.
11: Beginning of Loop (P87)
1: 0000
Delay
2: 4
Loop
Count
; If the scaled value is less the –3000
12: If (X<=>F) (P89)
1: 5
-- X Loc [ ScldOut_1 ]
2:
4
<
3:
-3000 F
4: 30
Then Do
; then set the value to –3000
13: Z=F (P30)
1:
-3000
F
2: 00
Exponent of 10
3: 5
-- Z Loc [ ScldOut_1 ]
14: End (P95)
15: End (P95)
21