2 sdmcvo4 instruction example – Campbell Scientific SDM-CVO4 4-Channel Current/Voltage Output Module User Manual

Page 19

Advertising
background image

SDM-CVO4 4-Channel Current/Voltage Output Module

in the device. Use of this mode takes approximately 2
milliseconds additional time per device. When either of these
options is used you lose the flexibility of setting the output
mode for each channel individually. Additionally, subsequent
programs sent to the datalogger must also use an override
mode or the power must be cycled on the device to return it to
its default state. Otherwise, if 0 or 1 is entered it will be
ignored and the device will remain in its last override state.

Current output requires an external resistor from Id to +V.

NOTE

6.2 SDMCVO4 Instruction Example

This program example is for a weather station measuring wind speed, wind
direction, temperature, and relative humidity. Each parameter is scaled to 0 to
10000 mVDC, and output to a SCADA system through the SDM-CVO4.

Public WS_ms
Public WD_0_360
Public Temp_C
Public RH
Public WD_0_540
Public Flag
Public CVO4Output(4)
Alias CVO4Output(1) = WSOut
Alias CVO4Output(2) = WDOut
Alias CVO4Output(3) = TempOut
Alias CVO4Output(4) = RHOut

'Code for DataTable OneMin
DataTable(OneMin,1,-1)
DataInterval(0,1,Min,0)

WindVector (1, WS_ms,WD_0_360, IEEE4, 0, 0, 0, 0)

Average(1,Temp_C,IEEE4,0)
Sample(1,RH,

IEEE4)

EndTable

BeginProg
Scan(1,Sec,1,0)

' Code for 03001 wind measurements, WS_ms & WD_0_360:


PulseCount(WS_ms, 1, 1, 1, 1, 0.75, 0.2)

BrHalf(WD_0_360, 1,mV1000, 1, 1, 1, 1000, True, 1000, 250, 355, 0)

' Code for CS500 measurement, AirTC and RH:

VoltSE(Temp_C,1,mV1000,3,0,

0,

_60Hz,0.1,-40.0)

VoltSE(RH,1,mV1000,2,0, 0, _60Hz,0.1, 0)

' Call Data Table

CallTable(OneMin)

' Convert 0-360 WD to 0-540:

If WD_0_540 >= 270 and WD_0_360 <180 Then

WD_0_540 = WD_0_360 + 360

15

Advertising