background image

7.4 Programming

Short Cut

is the best source for up-to-date programming code for Campbell Scientific data

loggers. 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.

 

17).

 

Programming

 

basics

 

for

 

CRBasic

 

data

 

loggers

 

are

 

provided

 

in

 

the

 

following

 

section.

 

Downloadable

 

example

 

programs

 

are

 

available

 

at

www.campbellsci.

eu

/downloads/cs225-example-programs

.

7.4.1

 

SDI12Recorder()

instruction

The

 

SDI12Recorder()

instruction

 

is

 

used

 

to

 

measure

 

the

 

temperature

 

sensors

 

in

 

the

 

CS225.

 

This

 

instruction

 

sends

 

a

 

request

 

to

 

the

 

sensor

 

to

 

make

 

a

 

measurement

 

and

 

then

 

retrieves

 

the

 

measurement

 

from

 

the

 

sensor.

 

See

 

Sensor

 

measurements

 

(p.

 

11)

 

for

 

more

 

information.

For

 

most

 

data

 

loggers,

 

the

 

SDI12Recorder()

instruction

 

has

 

the

 

following

 

syntax:

SDI12Recorder

(Destination, SDIPort, SDIAddress, “SDICommand”, Multiplier, Offset,

FillNAN, WaitonTimeout)

Each temperature sensor in the CS225 needs a unique SDI-12 address. For the

SDIAddress

,

alphabetical characters need to be enclosed in quotes (for example, “A”). Also enclose the

SDICommand

in quotes as shown. The

Destination

parameter must be an array. The required

number of values in the array depends on the command (

Table 8-1

(p. 11)).

FillNAN

and

WaitonTimeout

are optional parameters (refer to

CRBasic Help

for more

information).

7.4.2 Slow sequence program instructions

Use the slow sequence program instructions when the CS225 measurements will exceed the
program scan interval of the additional instruments included in the station. For example, if a
CS225 consists of 17 or more temperature sensors, the time required to poll all sensors and
receive data can be greater than 5 seconds based on the 300 ms execution time for the

aR0!

command. For more details on the use of the slow sequence program instructions, reference the

CS225 Temperature String

10

Summary of Contents for CS225

Page 1: ...Revision 08 2021 Copyright 2016 2021 Campbell Scientific CSL I D 1136 ...

Page 2: ...s 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 given on request It is the policy of Campbell Scientific to protect the health of its employees and provide a safe working environment in support of this policy a Declaration of Hazardous Material and De...

Page 3: ... 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 market in some cases alternatives are offered Details of the alternatives will be covered in separate manuals Part numbers prefixed with a symbol are special order parts for use with non EU variants or for special...

Page 4: ...e 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 climbing by other persons Take reasonable precautions to secure tripod and tower sites from trespassers Use only manufacturer recommended parts materials and tools Utility and Electrical You can be kil...

Page 5: ...ram instructions 10 8 Operation 11 8 1 Sensor measurements 11 8 1 1 SDI 12 addressing 12 8 1 2 Metadata 14 8 2 Long cables 14 8 3 Power conservation 15 8 Maintenance calibration and troubleshooting 15 Appendix A Importing Short Cut code into CRBasic Editor 17 Appendix B SDI 12 sensor support 18 B 1 SDI 12 command basics 18 B 1 1 Acknowledge active command a 19 B 1 2 Send identification command al ...

Page 6: ...surement commands aM 20 B 1 7 Stopping a measurement command 21 B 1 8 Send data command aD0 aD9 21 B 1 9 Continuous measurement command aR0 aR9 22 B 2 SDI 12 transparent mode 22 B 2 1 Changing an SDI 12 address 22 B 3 References 25 Table of Contents ii ...

Page 7: ... at the front of this manual l Although the CS225 is designed to be a rugged and reliable device for field use care should be taken when handling or moving it to avoid damage l There are no user serviceable parts and disassembling the device will void the warranty l The black outer jacket of the cable is Santoprene rubber This compound was chosen for its resistance to temperature extremes moisture...

Page 8: ...deo that describes data logger programming using Short Cut is available at www campbellsci eu videos cr1000x data logger getting started program part 3 Short Cut is an easy way to program your data logger to measure the sensor and assign data logger wiring terminals Short Cut is available as a download on www campbellsci eu It is included in installations of LoggerNet RTDAQ and PC400 The following...

Page 9: ...225 or locate the sensor in the Sensors Temperature folder Double click CS225 SDI 12 Temperature Profiler Type the correct Starting SDI 12 Address for the first sensor SDI 12 addressing p 12 Type the Number of Result Sensors CS225 Temperature String 3 ...

Page 10: ...4 Click the Wiring tab to see how the sensor is to be wired to the data logger Click OK after wiring the sensor 5 Repeat steps 3 and 4 for other sensors CS225 Temperature String 4 ...

Page 11: ...6 In Output Setup type the scan rate meaningful table names and Data Output Storage Interval 7 Select the measurement and its associated output option CS225 Temperature String 5 ...

Page 12: ...equirements The CS225 is suited to a wide variety of applications and environments that require temperature profiling The completely sealed cable assembly permits the CS225 to be buried submerged or integrated directly into structures Examples of applications include temperature profiling in boreholes soils water and frost and permafrost monitoring The SGB3 provides surge protection for the CS225 ...

Page 13: ...urrent Consumption Quiescent sensors 1 0 mA max Active during SDI 12 communications 20 mA sensors 1 0 mA Temperature point diameter Maximum cable length Minimum sensor spacing EU Declaration of Conformity 2 22 cm 0 88 in 152 m 500 ft 5 cm 1 97 in View at www campbellsci eu cs225 l 6 1 SGB3 3 line surge protector Operating range 55 to 85 C Maximum voltage 28 VDC 20 VAC L1 L2 L3 with respect to G te...

Page 14: ...erenced from the first sensor position at the end of the sensor array This information is needed for the sensor configuration process 7 2 Mounting Orient and secure the CS225 in the measurement medium Keep materials removed during installation and use that material as backfill If a burial depth is required for each temperature sensor you need to know the length of the sensor array the measurement ...

Page 15: ...ogger connection terminal1 Red Power L1 12V Green SDI 12 Signal L2 C or U2 terminal configured for SDI 12 Black Power Ground G G Clear Shield G G 1 The SGB3 connects to the data logger using the 2 ft cable shipped with the CS225 2 U terminals are automatically configured by the measurement instruction If multiple SDI 12 sensors are connected to a data logger Campbell Scientific recommends using se...

Page 16: ...nds a request to the sensor to make a measurement and then retrieves the measurement from the sensor See Sensor measurements p 11 for more information For most data loggers the SDI12Recorder instruction has the following syntax SDI12Recorder Destination SDIPort SDIAddress SDICommand Multiplier Offset FillNAN WaitonTimeout Each temperature sensor in the CS225 needs a unique SDI 12 address For the S...

Page 17: ...aken in comparison to the aM0 to obtain a reading via the SDI 12 protocol Outputs of both lifetime and user resettable minimum and maximum temperatures are also available during powered operation from each temperature point in the CS225 The user resettable minimum and maximum temperatures can be used to monitor specific seasons or periods of measure without having to review the entire data set The...

Page 18: ...h the address change can correct units that have conflicting addresses aI SDI 12 Identification command X13CAMPBELLCS225 1 0 SN XXXXX 8 1 1 SDI 12 addressing Each temperature sensor has a different default SDI 12 address The starting addresses is 1 and coincides with the top temperature point The last address coincides with the bottom sensor If multiple SDI 12 sensors are connected to the data log...

Page 19: ...affected sensors to their factory configured address value Table 8 2 SDI 12 addresses and positions Numeric set Uppercase set Lowercase set 1 1 A 10 a 36 2 2 B 11 b 37 3 3 C 12 c 38 4 4 D 13 d 39 5 5 E 14 e 40 6 6 F 15 f 41 7 7 G 16 g 42 8 8 H 17 h 43 9 9 I 18 i 44 J 19 j 45 K 20 k 46 L 21 l 47 M 22 m 48 N 23 n 49 O 24 o 50 P 25 p 51 Q 26 q 52 R 27 r 53 S 28 s 54 T 29 t 55 U 30 u 56 V 31 v 57 CS22...

Page 20: ...1 Depth Value 0 to 65535 cm The distance values in centimetres cm These are intended to reflect the profile distances Typically the top most temperature point would be designated as 0 cm and if the next temperature point below was 10 cm away then its distance value would be 10 cm Users may designate other starting values These can be configured at the time of ordering 8 2 Long cables As the measur...

Page 21: ...the type and model of your data logger If available the switched 12 V output of the data logger can be used 8 Maintenance calibration and troubleshooting The CS225 probe requires no maintenance nor calibration The following are symptoms and possible corrections Symptom 9999 or NAN for temperature 1 Verify the green wire is connected to the control terminal specified by the SDI 12 measurement instr...

Page 22: ...rs the same address If this does occur you will no longer be able to communicate with these sensors Use the aA command where a is the affected address This will reset the affected sensors to their factory configured address value For example if two sensors have address 2 sending 2A will reset both sensors to the original addresses CS225 Temperature String 16 ...

Page 23: ...ted for additional refinement 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 DEF file located in the C campbellsci SCWin folder and copy the wiring information which is at the beginning of the DEF file 3 Go into the CRBasic program and paste the wiring in...

Page 24: ...Sniffer Mode videos B 1 SDI 12 command basics SDI 12 commands have three components l Sensor address a a single character and the first character of the command Use the default address of zero 0 unless multiple sensors are connected to the same port l Command body an upper case letter the command optionally followed by one or more alphanumeric qualifiers l Command termination an exclamation mark A...

Page 25: ...ed by the sensor manufacturer but usually includes the sensor address SDI 12 version manufacturer s name and sensor model information Serial number or other sensor specific information may also be included aI allccccccccmmmmmmvvvxxx xx CR LF a Sensor SDI 12 address ll SDI 12 version number indicates compatibility cccccccc 8 character vendor identification mmmmmm 6 characters specifying the sensor ...

Page 26: ...a data logger Each device on a single terminal must have a unique address A sensor address is changed with command aAb where a is the current address and b is the new address For example to change an address from 0 to 2 the command is 0A2 The sensor responds with the new address b which in this case is 2 NOTE Only one sensor should be connected to a particular terminal at a time when changing addr...

Page 27: ...y the data logger before most commands A concurrent measurement command C is aborted when another valid command is sent to the sensor before the measurement time has elapsed B 1 8 Send data command aD0 aD9 The Send Data command requests data from the sensor It is issued automatically with every type of measurement command aM aMC aC aCC When the measurement command is aM or aMC the data logger issu...

Page 28: ...ng the transparent mode Transparent mode is entered while the computer is communicating with the data logger through a terminal emulator program It is accessed through Campbell Scientific data logger support software or other terminal emulator programs Data logger keyboards and displays cannot be used The terminal emulator is accessed by navigating to the Tools list in PC400 or the Datalogger list...

Page 29: ...der Device Type type the data logger model and double click on the model type This example uses a CR1000X directly connected to the computer USB port 4 Select the correct Communication Port and click Connect 5 Click the Terminal tab 6 Select All Caps Mode CS225 Temperature String 23 ...

Page 30: ...ds with its SDI 12 address If no characters are typed within 60 seconds the mode is exited In that case simply type SDI12 again press Enter and type the correct control port number when prompted 11 To change the SDI 12 address type aAb where a is the current address from the previous step and b is the new address Press Enter The sensor changes its address and responds with the new address In the f...

Page 31: ...es SDI 12 Support Group SDI 12 A Serial Digital Interface Standard for Microprocessor Based Sensors Version 1 4 River Heights UT SDI 12 Support Group 2017 https sdi 12 org specification CS225 Temperature String 25 ...

Page 32: ...info 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 91 11 46500481 482 info campbellsci in www campbellsci in South Africa Location Phone Email Website Stellenbosch South Africa 27 21 8809960 sales campbellsci co za www campbellsci co za Spain Locati...

Reviews: