Campbell CS240 Product Manual Download Page 17

7.4 Data logger programming

Short Cut is the best source for up-to-date data logger programming code. If your data
acquisition requirements are simple, you can probably create and maintain a data logger
program exclusively with Short Cut. If your data acquisition needs are more complex, the files
that Short Cut creates are a great source for programming code to start a new program or add to
an existing custom program.

NOTE:
Short Cut cannot edit programs after they are imported and edited in CRBasic Editor.

A Short Cut tutorial is available in

QuickStart

(p. 2). If you wish to import Short Cut code into

CRBasic Editor to create or add to a customized program, follow the procedure in

Importing

Short Cut code into CRBasic Editor

(p. 22). Programming basics for CRBasic data loggers are

provided in the following section. Complete program examples for select CRBasic data loggers
can be found in

Example programs

(p. 23)..

If applicable, please read

Electrical noisy environments

(p. 16) and

Long cable lengths

(p. 16) prior

to programming your data logger.

7.4.1 CS240 programming

The CS240 program needs to measure the resistance of the CS240 then convert that resistance
measurement to temperature.

7.4.1.1 Resistance measurement

CRBasic instructions used to measure resistance are the

BrHalf4W

(4-wire configuration) or

BrHalf

(2-wire configuration). The

BrHalf4W()

instruction reduces cable errors, and the

BrHalf()

instruction uses the fewest input terminals.

A typical

BrHalf4W()

instruction is:

BrHalf4W

(CS240X,1,mV200,mV200,U1,U5,1,350,True,True,0,60,1,0)

A typical

BrHalf()

instruction is:

BrHalf

(CS240X,1,mV200,U7,U3,1,350,True,0,60,1,0)

Use a multiplier of 1.0 and offset of 0.0 in the instructions.

CS240 and CS240DM PT-1000 Class A, Back-of-Module Temperature Sensors

14

Summary of Contents for CS240

Page 1: ...Revision 08 2020 Copyright 2017 2020 Campbell Scientific Inc...

Page 2: ...1 CS240 to data logger wiring 12 7 3 2 CS240DM wiring 13 7 4 Data logger programming 14 7 4 1 CS240 programming 14 7 4 1 1 Resistance measurement 14 7 4 1 2 Converting resistance measurement to tempe...

Page 3: ...into CRBasic Editor 22 Appendix B Example programs 23 B 1 CS240 two wire configuration programs 24 B 2 CS240 four wire configuration programs 28 B 3 CS240DM program 31 Appendix C Sensor material prop...

Page 4: ...support contact Campbell Scientific Support for Edlog data loggers is no longer free see www campbellsci com news edlog retiring for more information 2 Precautions l READ AND UNDERSTAND the Safety se...

Page 5: ...sensor and assign data logger wiring terminals Short Cut is available as a download on www campbellsci com It is included in installations of LoggerNet RTDAQ PC400 or PC200W The following procedure a...

Page 6: ...how the sensor is to be wired to the data logger Click OK after wiring the sensor 5 Repeat steps three and four for other sensors you want to measure Click Next CS240 and CS240DM PT 1000 Class A Back...

Page 7: ...ogram Send the program just created to the data logger if the data logger is connected to the computer 9 If the sensor is connected to the data logger check the output of the sensor in the data logger...

Page 8: ...70 C extreme sealing tape is also required to secure the sensor The CS240DM includes a Campbell Scientific precision analog to digital smart sensor module for making the measurements The module desig...

Page 9: ...th MD485 l CS240DM easily interfaces with the MeteoPV Platform without coding l CS240DM can connect directly with Modbus RTU RS 485 Networks l Calibration services with certification available 6 Speci...

Page 10: ...e View compliance documents at www campbellsci com cs240 or www campbellsci com cs240dm Compliant with IEC 60751 DIN EN 60751 Industrial Design IEC Class 4 according to IEC 751 CS240 cable Jacket mate...

Page 11: ...the following 7 1 Placement on a photovoltaic PV module 8 7 2 Mounting cable strain relief 8 7 3 Wiring 11 7 4 Data logger programming 14 7 1 Placement on a photovoltaic PV module The PV module may o...

Page 12: ...ace the first strip of tape across the cable just below the yellow heat shrink FIGURE 7 2 p 10 and rub the tape surface to remove bubbles 2 Place the other strips of tape perpendicular and on top of t...

Page 13: ...FIGURE 7 1 Strain relief label on the cable FIGURE 7 2 Proper tape usage CS240 and CS240DM PT 1000 Class A Back of Module Temperature Sensors 10...

Page 14: ...ide of PV module Use two cable tie tabs and cable ties to do this 7 3 Wiring FIGURE 7 3 p 11 provides the circuit diagrams for the CS240 2 wire configuration FIGURE 7 4 p 12 provides the circuit diagr...

Page 15: ...for the 2 wire configuration The wires used only for the 4 wire configuration are taped to the side of the cable Table 7 1 Wire color function and data logger connection for the CS240 2 wire configura...

Page 16: ...input Black Ground analog ground Clear shield Shield analog ground 1 First differential terminal in the BrHalf4W instruction 2 U terminals are automatically configured by the measurement instruction 3...

Page 17: ...ers are provided in the following section Complete program examples for select CRBasic data loggers can be found in Example programs p 23 If applicable please read Electrical noisy environments p 16 a...

Page 18: ...r can retrieve the values stored in the CS240DM Input Registers Modbus register map p 18 To do this the CRBasic program requires a SerialOpen instruction followed by the ModbusMaster instruction The S...

Page 19: ...ors can be the source of electrical noise If the CS240 sensor or data logger is located in an electrically noisy environment the CS240 sensor should be measured with the 60 or 50 Hz rejection option 8...

Page 20: ...the delay before the measurement is made The 60 and 50 Hz integration options include a 3 ms settling time longer settling times can be typed into the Settling Time parameter in the BrHalf4W or BrHalf...

Page 21: ...holding register map functions 3 6 and 16 Table 8 1 Input register map Input register Value Modbus data type Description 30001 Serial number Float1 Specifies the sensor serial number assigned by the f...

Page 22: ...Configuration Utility Device Configuration Utility DevConfig is bundled in Campbell Scientific s data logger support software and can also be acquired at no cost from www campbellsci com downloads Dev...

Page 23: ...are changed in the Holding Registers tab Except for the Modbus Address the default values are typical for most Modbus systems and therefore rarely need to be changed The values stored are shown in th...

Page 24: ...s of damage and possible moisture intrusion 9 2 Troubleshooting Symptom Temperature is NAN INF 9999 273 Verify wiring of sensor to the data logger cross reference data logger program or the measuremen...

Page 25: ...nement NOTE 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 the new CRBasic program open the D...

Page 26: ...xcitation input VX1 U1 VX1 White Analog voltage output SE1 U2 SE1 Red Reference analog ground analog ground analog ground Table B 2 Wiring for CS240 4 wire configuration example programs Wire color Wi...

Page 27: ...iguration for measuring the CS240 CR300 Series Declare Variables and Units Dim CS240X Dim CS240Rs Public CS240T_C Units CS240T_C Deg C Define Data Tables DataTable Hourly True 1 DataInterval 0 60 Min...

Page 28: ...ion for measuring the CS240 Calculate temperature from resistance PRTCalc CS240T_C 1 CS240Rs 1000 1 1 0 Call Data Tables and Store Data CallTable Hourly NextScan EndProg CS240 and CS240DM PT 1000 Clas...

Page 29: ...ram BeginProg Main Scan Scan 5 Sec 1 0 CS240 2 wire Class A RTD Back of PV Module Temperature Sensor measurement CS240T_C BrHalf CS240X 1 mV200 U2 U1 1 350 True 0 60 1 0 Convert ratio to ohms and remo...

Page 30: ...Program BeginProg Main Scan Scan 5 Sec 1 0 CS240 2 wire Class A RTD Back of PV Module Temperature Sensor measurement CS240T_C BrHalf CS240X 1 mV200 1 Vx1 1 350 True 0 60 1 0 Convert ratio to ohms and...

Page 31: ...Sample 1 CS240T_C FP2 EndTable Main Program BeginProg Main Scan Scan 5 Sec 1 0 CS240 4 wire Class A RTD Back of PV Module Temperature Sensor measurement CS240T_C BrHalf4W CS240X 1 mV2500 mV2500 1 Vx1...

Page 32: ...EndTable Main Program BeginProg Main Scan Scan 5 Sec 1 0 CS240 4 wire Class A RTD Back of PV Module Temperature Sensor measurement CS240T_C BrHalf4W CS240X 1 mV200 mV200 U3 U1 1 350 True True 0 60 1 0...

Page 33: ...FP2 EndTable Main Program BeginProg Main Scan Scan 5 Sec 1 0 CS240 4 wire Class A RTD Back of PV Module Temperature Sensor measurement CS240T_C BrHalf4W CS240X 1 mV200 mV200 1 Vx1 1 350 True True 0 60...

Page 34: ...as CS240DM 6 CS240DM_2_SN Alias CS240DM 7 CS240DM_2_Temperature Alias CS240DM 8 CS240DM_2_Counter Alias CS240DM 9 CS240DM_2_SensorStatus Alias CS240DM 10 CS240DM_2_RangeCheck Alias CS240DM 11 CS240DM_...

Page 35: ...C1 19200 2 4 CS240DM 6 1 5 3 100 2 ModbusMaster ResultCode 3 ComC1 19200 3 4 CS240DM 11 1 5 3 100 2 ModbusMaster ResultCode 4 ComC1 19200 4 4 CS240DM 16 1 5 3 100 2 AveTemp 1 CS240DM 2 AveTemp 2 CS240...

Page 36: ...peratures 40 C the bond strength decreases Solvent resistance No apparent degradation when exposed to splash testing of many common solvents and fluids including gasoline JP 4 fuel mineral spirits mot...

Page 37: ...ther manufacturer s products that are resold by Campbell Scientific are warranted only to the limits extended by the original manufacturer Refer to www campbellsci com terms warranty for more informat...

Page 38: ...ion or Repair Reference number contact your CAMPBELL SCIENTIFIC regional office Please write the issued number clearly on the outside of the shipping container and ship as directed For all returns the...

Page 39: ...rohibit climbing by other persons Take reasonable precautions to secure tripod and tower sites from trespassers l Use only manufacturer recommended parts materials and tools Utility and Electrical l Y...

Page 40: ...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: