background image

B-1

Appendix B.  Example Program 

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.  

CRBasic Example B-1.  CR1000X Program Using an SDM-CV04 to Output to a SCADA 

System 

Public

 WS_ms 

Public

 WD_0_360 

Public

 Temp_C 

Public

 RH 

Public

 WD_0_540 

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 03002 wind measurements, WS_ms & WD_0_360:

 

 

PulseCount

(WS_ms,1,P1,5,1,0.75,0.2) 

 

BrHalf

(WD_0_360,1,mV1000,1,Vx1,1,1000,True,2000,60,355,0) 

 

'Code for HMP60 measurement, AirTC and RH:

 

 

VoltSe

(Temp_C,1,mV1000,3,0,0,60,0.1,-40.0) 

 

VoltSe

(RH,1,mV1000,2,0,0,60,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 360 
 

Else

 

 WD_0_540 = WD_0_360 

 

EndIf

 

 

'Scale the measurements for the SDM-CVO4 to output 0-10000 mV

 

 WSOut = WS_ms*200  

'WS: 0-50 m/s = 0-10000 mV

 

 WDOut = WD_0_540 *18.59  

'WD: 0-540 deg = 0-10000mV

 

 TempOut= 100*(40)  

'Temp: -40-60 deg C = 0-10000 mV

 

 RHOut = RH *100  

'RH: 0-100 % RH = 0-10000 mV

 

 

'Send mV outputs to SDM-CVO4 using the option to override the switch settings

 

 

SDMCVO4

 (CVO4Output(),4,0,10) 

  

NextScan

 

EndProg 

Summary of Contents for SDM-CVO4

Page 1: ...i SDM CVO4 4 Channel Current and Voltage Output Module Revision 06 2020 Copyright 2001 2020 Campbell Scientific CSL I D 436...

Page 2: ......

Page 3: ...under guarantee or not Please state the faults as clearly as possible and if the product is out of the guarantee period it should be accompanied by a purchase order Quotations for repairs can be give...

Page 4: ......

Page 5: ...digital cell phones and aerials may also not be applicable according to your locality Some brackets shields and enclosure options including wiring are not sold as standard items in the European marke...

Page 6: ......

Page 7: ...beginning work Wear a hardhat and eye protection and take other appropriate safety precautions while working on or around tripods and towers Do not climb tripods or towers at any time and prohibit cl...

Page 8: ......

Page 9: ...n 8 7 Installation 8 7 1 Connection to a Data Logger 9 7 2 Output Device Connections 10 7 2 1 Voltage Output Mode 11 7 2 2 Current Output Mode 11 7 2 3 Shield and Ground Connections 12 7 2 4 Output Te...

Page 10: ...Front Position 10 7 3 Closeup of Channel 4 Terminals 10 7 4 Location of Jumpers on Circuit Board 13 7 5 Address Selection Switch 14 Tables 7 1 Data Logger to SDM CVO4 Connections 9 7 2 Switch Position...

Page 11: ...re the lowest resistance path to ground When the SDM CVO4 is used in applications where the potential difference between the data logger and the output terminals exceeds 50 V RMS AC 74 VDC careful con...

Page 12: ...sh test of 1500 V RMS AC for two seconds However the following design aspects can influence the test results To help suppress emissions of electromagnetic interference the isolation barrier is bridged...

Page 13: ...he model name set the Properties and wire the sensor to the data logger according to the Wiring tab Refer to the sensor manuals for more information 4 In the Available Sensors and Devices box type SDM...

Page 14: ...oltage Output Module 4 5 Click the Wiring tab to see how the device is to be wired to the data logger Click OK after wiring the device 6 In Output Setup type the scan rate meaningful table names and D...

Page 15: ...current or high voltage inputs sending control signals to valve controllers and providing excitation voltages or currents to external sensors Each output is isolated both from the data logger and the...

Page 16: ...products especially when driving significant loads Care must be taken to ensure that the power supply can cope with this higher demand Alkaline batteries are not recommended for long term application...

Page 17: ...ng temperature 25 to 50 C standard 40 to 80 C optional Size 176 mm wide x 111 mm high x 24 mm deep 234 mm wide x 111 mm high x 24 mm deep when fitted with brackets for mounting in enclosure Mounting b...

Page 18: ...und connection and between individual output channels Protection components are built in which will break down at voltages close to this limit see Section 2 Precautions p 1 Tested isolation Each chann...

Page 19: ...he total cable length connecting SDM CVO4s to SDM CVO4s other SDMs and the data logger exceeds 6 m the SDM baud rate may need to be reduced to ensure reliable operation Please contact Campbell Scienti...

Page 20: ...t one solid core wire into one terminal unless the wires are soldered or clamped together When inserting more than one stranded wire twist the bare ends together before insertion 7 2 Output Device Con...

Page 21: ...ut for the current being controlled In current output mode arrange to sink current into the terminal with a positive current flowing relative to the ground terminals In voltage output mode this termin...

Page 22: ...m before the supply voltage started to limit the current flowing 7 2 3 Shield and Ground Connections Use shielded screened cable when connecting the output to any remote system to reduce noise The sh...

Page 23: ...uit board FIGURE 7 4 shows the jumper blocks that control the output mode To operate in current mode install the channel jumper between the two jumper pins as shown If operating in voltage mode the ju...

Page 24: ...9 9 A 10 B 11 C 12 D 13 E 14 F 15 FIGURE 7 5 Address Selection Switch The address switch has a hexadecimal setting position 0 to F CRBasic data loggers use base 10 when addressing SDM devices The reti...

Page 25: ...ering whether to use the SDM CVO4 to supply voltage or current excitation remember that some sensors may accept a lower excitation voltage or current than their specifications recommend For example pr...

Page 26: ...g data loggers are provided at www campbellsci com old manuals The SDMCVO4 CRBasic instruction controls the device Other aspects of the CRBasic program depends on the application Refer to Section 8 Op...

Page 27: ...Additionally subsequent programs sent to the data logger 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 wi...

Page 28: ......

Page 29: ...can now be edited for additional refinement Once the file is edited with CRBasic Editor Short Cut can no longer be used to edit the program it created 2 To add the Short Cut wiring information into t...

Page 30: ......

Page 31: ...erage 1 Temp_C IEEE4 0 Sample 1 RH IEEE4 EndTable BeginProg Scan 1 Sec 1 0 Code for 03002 wind measurements WS_ms WD_0_360 PulseCount WS_ms 1 P1 5 1 0 75 0 2 BrHalf WD_0_360 1 mV1000 1 Vx1 1 1000 True...

Page 32: ...nfo campbellsci fr www campbellsci fr Germany Location Phone Email Website Bremen Germany 49 0 421 460974 0 info campbellsci de www campbellsci de India Location Phone Email Website New Delhi DL India...

Reviews: