Page 1
CR800/CR850 Measurement and Control System Operator’s Manual Issued: 16.7.13 Copyright 2000-2013 Campbell Scientific Inc. Printed under Licence by Campbell Scientific Ltd. CSL 632...
Page 3
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 Decontamination”...
PLEASE READ FIRST About this manual Please note that this manual was originally produced by Campbell Scientific Inc. primarily for the North American market. Some spellings, weights and measures may reflect this origin. Some useful conversion factors: Area: 1 in...
Page 8
Table of Contents Section 5. System Overview ..........57 5.1 CR800 Datalogger................... 58 5.1.1 Clock....................59 5.1.2 Sensor Support................59 5.1.3 CR800 Wiring Panel..............60 5.1.3.1 Measurement Inputs ............. 60 5.1.3.2 Voltage Outputs ..............61 5.1.3.3 Grounding Terminals ............62 5.1.3.4 Power Terminals ..............62 5.1.3.4.1 Power In..............
Page 9
Table of Contents 7.2 Temperature Range ................. 81 7.3 Enclosures ....................81 7.4 Power Sources..................82 7.4.1 CR800 Power Requirement ............83 7.4.2 Calculating Power Consumption ........... 83 7.4.3 Power Supplies ................83 7.4.3.1 External Batteries..............83 7.4.4 Vehicle Power Connections............83 7.4.5 Powering Sensors and Devices............
Page 16
Table of Contents 10.4.1 RS-232 ..................411 10.4.2 Communicating with Multiple PCs ........... 411 10.4.3 Comms Memory Errors ............. 411 10.4.3.1 CommsMemFree(1) ............411 10.4.3.2 CommsMemFree(2) ............413 10.4.3.3 CommsMemFree(3) ............413 10.5 Power Supplies..................414 10.5.1 Overview ................... 414 10.5.2 Troubleshooting Power at a Glance...........
Page 17
C.2.1 Pin-Out..................527 C.2.2 Power States................528 Appendix D. ASCII / ANSI Table ........531 Appendix E. FP2 Data Format........535 Appendix F. Other Campbell Scientific Products ..537 F.1 Sensors....................537 F.1.1 Wired Sensors Types..............537 F.1.2 Wireless Sensor Network ............538 F.2 Sensor Input Modules ................
Page 18
Table of Contents F.2.5 Passive Signal Conditioners ............539 F.2.5.1 Resistive Bridge TIM Modules.......... 539 F.2.5.2 Voltage Dividers ..............540 F.2.5.3 Current-Shunt Modules............540 F.2.6 Terminal-Strip Covers ..............540 F.3 Cameras....................540 F.4 Control Output Modules ............... 541 F.4.1 Digital I/O (Control Port) Expansion .......... 541 F.4.2 Continuous Analog Output (CAO) Modules .......
Page 19
Table of Contents Figure 19: PC200W Connect button ............. 51 Figure 20: PC200W Monitor Data tab – Public table ........52 Figure 21: PC200W Monitor Data tab – Public table ........52 Figure 22: PC200W Monitor Data tab – Public and OneMin Tables.... 53 Figure 23: PC200W Collect Data tab............
Page 20
Table of Contents Figure 75: Data from TrigVar program............224 Figure 76: Alarms toggled in bit-shift example .......... 229 Figure 77: Bool8 data from bit-shift example (numeric monitor) ....229 Figure 78: Bool8 data from bit-shift example (PC data file)....... 230 Figure 79: PT100 in four-wire half-bridge..........
Page 21
Table of Contents Figure 130: Accuracy, Precision, and Resolution ........449 List of Tables Table 1. Single-Ended and Differential Input Channels ....... 37 Table 2. Pulse-Input Channels and Measurements........39 Table 3. PC200W EZSetup Wizard Example Selections ......45 Table 4. Current Source and Sink Limits ............84 Table 5.
Page 22
Table 82. PakBus-LAN Example Datalogger-Communications Settings ... 344 Table 83. DNP3 Implementation — Data Types Required to Store Data in Public Tables for Object Groups............348 Table 84. Modbus to Campbell Scientific Equivalents ....... 351 Table 85. CRBasic Ports, Flags, Variables, and, Modbus Registers....................352 Table 86.
Table of Contents Table 156. LoggerNet Adjuncts and Clients ..........5 48 1 2 5 8 H T able 157. Software Tools ................5 48 2 8 6 H 1 2 5 9 H T able 158. Software Development Kits ............5 49 2 8 7 H 1 2 6 0 H...
Page 25
Table of Contents CRBasic Example 49. Formatting Strings ..........241 CRBasic Example 50. Two Data Intervals in One Data Table ....241 CRBasic Example 51. Program Signatures..........243 CRBasic Example 52. Miscellaneous Features ........... 244 CRBasic Example 53. Running Average and Running Total of Rain..247 CRBasic Example 54.
For more demanding applications, the remainder (p. 57). of the manual and other Campbell Scientific publications are available. If you are programming with CRBasic, you will need the extensive help available with the CRBasic Editor software. Formal CR800 training is also available from Campbell Scientific.
Page 28
Section 1. Introduction Italic — titles of publications, software, sections, tables, figures, and examples. Bold italic — CRBasic instruction parameters and arguments within the body text. Blue — CRBasic instructions when set on a dedicated line. Italic teal — CRBasic program comments Lucida Sans Typewriter font —...
Section 2. Cautionary Statements The CR800 is a rugged instrument and will give years of reliable service if a few precautions are observed: • Protect from over-voltage • Protect from water • Protect from ESD Disuse accelerates depletion of the internal battery, which backs up several functions.
On cables, the number is often found at the end of the cable that connects to the measurement device. Ensure that the expected lengths of cables were received. Contact Campbell Scientific immediately if there are any discrepancies.
Section 4. Quickstart Tutorial This tutorial presents an introduction to CR800 data acquisition. 4.1 Primer – CR800 Data-Acquisition Data acquisition with the CR800 is the result of a step-wise procedure involving the use of electronic sensor technology, the CR800, a telecommunications link, and datalogger support software (p.
Section 4. Quickstart Tutorial modems, radios, satellite transceivers, and TCP/IP network modems are available for the most demanding applications. Figure 1: Data-acquisition system components 4.1.2 CR800 Module and Power Supply 4.1.2.1 Wiring Panel As shown in figure CR800 Wiring Panel the wiring panel provides terminals (p.
See Internal Battery (p. 76). 4.1.3 Sensors Most electronic sensors, whether or not manufactured or sold by Campbell Scientific, can be interfaced to the CR800. Check for on-line content concerning interfacing sensors at www.campbellsci.com, or contact a Campbell Scientific applications engineer for assistance.
Section 4. Quickstart Tutorial Figure 4: Analog sensor wired to differential channel #1 Table 1. Single-Ended and Differential Input Channels Differential Channel Single-Ended Channel 4.1.3.2 Bridge Sensors Many sensors use a resistive bridge to measure phenomena. Pressure sensors and position sensors commonly use a resistive bridge.
Section 4. Quickstart Tutorial Figure 5: Half-bridge wiring -- wind vane potentiometer Figure 6: Full-bridge wiring -- pressure transducer 4.1.3.3 Pulse Sensors Pulse sensors are measured on CR800 pulse-measurement channels. The output signal generated by a pulse sensor is a series of voltage waves. The sensor couples its output signal to the measured phenomenon by modulating wave frequency.
Section 4. Quickstart Tutorial Note A period-averaging sensor has a frequency output, but it is connected to a single-ended analog input channel and measured with the PeriodAverage() instruction (see Period Averaging (p. 307) 4.1.3.3.1 Pulses Measured Figure Pulse Sensor Output Signal Types illustrates three pulse sensor output (p.
Section 4. Quickstart Tutorial 4.1.3.3.3 Pulse Sensor Wiring Wiring a pulse sensor to a CR800 is straight forward, as shown in figure Pulse- Input Wiring -- Anemometer Switch Pulse sensors have two active wires, (p. 40). one of which is always ground. Connect the ground wire to a (ground) channel.
These devices connect to the CR800 through digital I/O ports C1, C2, and C3 C3. 4.1.6 Input Expansion Modules Modules are available from Campbell Scientific to expand the number of input and digital I/O ports on the CR800. The appendix Digital I/O (Control Port) Expansion lists available modules.
ResourceDVD or at www.campbellsci.com. Note If the PC is to be connected to the RS-232 port for an extended period, use the Campbell Scientific SC32B interface to provide optical isolation. This protects low level analog measurements from outside interference. 4.2.2 Hardware Setup Note The thermocouple is attached to the CR800 later.
Section 4. Quickstart Tutorial 6. After confirming the correct polarity on the wire connections, insert the green power connector into its receptacle on the CR800. 7. Connect the RS-232 cable between the RS-232 port on the CR800 and the RS- 232 port on the PC (or to the USB-to-RS-232 cable).
Section 4. Quickstart Tutorial Figure 13: PC200W main window Table 3. PC200W EZSetup Wizard Example Selections Start the wizard to follow table entries. Screen Name Information Needed Provides and introduction to the EZSetup Wizard along with Introduction instructions on how to navigate through the wizard. Select the CR800 from the scroll window.
5. A second prompt lists sensor support options. You should probably click Campbell Scientific, Inc. if you are outside of Europe. 6. Under Available Sensors and Devices, expand the Sensors folder by clicking on the + symbol. This shows several sub-folders. Expand the Temperature folder to view the available sensors.
Section 4. Quickstart Tutorial Figure 14: Short Cut temperature sensor folder 4.2.4.2 Procedure: (Short Cut Steps 7 to 9) 7. Double-click Wiring Panel Temperature to add it to Selected. Alternatively, single-click Wiring Panel Temperature, then click on 8. Double-click Type T Thermocouple to add it to Selected. A prompt appears requesting the number of sensors.
This value was then looked up on the appropriate table in the reference book to determine the temperature. Then along came Eric and Evan Campbell. Campbell Scientific designed the first CR7 datalogger to make thermocouple measurements without the need for vacuum flasks, third junctions, or reference books.
Section 4. Quickstart Tutorial 11. Outputs displays the list Selected Sensors on the left and data storage tables, under Selected Outputs, on the right. Figure 16: Short Cut outputs tab 4.2.4.4 Procedure: (Short Cut Steps 12 to 16) 12. By default, there are two tables initially available. Both tables have a Store Every field and a along with a drop-down list from which to select the time units.
Section 4. Quickstart Tutorial Figure 17: Short Cut output table definition 4.2.4.5 Procedure: (Short Cut Step 17 to 18) 17. Click Finish to compile the program. Give the program the name QuickStart. A summary screen will appear showing the compiler results. Any errors during compiling will also be displayed.
Section 4. Quickstart Tutorial 18. Close this window by clicking on X in the upper right corner. 4.2.5 Send Program and Collect Data PC200W Support Software Objectives: This portion of the tutorial will use PC200W to send the program to the CR800, collect data from the CR800, and store the data on the PC.
Section 4. Quickstart Tutorial CR800. To view the OneMin table, select an empty cell in the display area, then click Add. Figure 20: PC200W Monitor Data tab – Public table Figure 21: PC200W Monitor Data tab – Public table 52 ...
Section 4. Quickstart Tutorial 4.2.5.3 Procedure: (PC200W Step 5) 5. In the Add Selection window Tables field, click on OneMin, then click Paste. The OneMin table is now displayed. Figure 22: PC200W Monitor Data tab – Public and OneMin Tables ...
Section 4. Quickstart Tutorial 4.2.5.4 Procedure: (PC200W Step 6) 6. Click on the Collect Data tab. From this window, data are chosen to be collected as well as the location where the collected data will be stored. Figure 23: PC200W Collect Data tab 4.2.5.5 Procedure: (PC200W Steps 7 to 9) 7.
Section 4. Quickstart Tutorial 4.2.5.6 Procedure: (PC200W Steps 10 to 11) 10. Click on to open a file for viewing. In the dialog box, select the CR800_OneMin.dat file and click Open. 11. The collected data are now shown. Figure 25: PC200W View data table 4.2.5.7 Procedure: (PC200W Steps 12 to 13) 12.
Section 5. System Overview A Campbell Scientific data-acquisition system is made up of the following basic components: • Sensors • Datalogger Clock Measurement and control circuitry Telecommunications circuitry User-entered CRBasic program • Telecommunications device • Datalogger support software (computer or mobile) (p.
The user program is written in CRBasic, a programming language that includes data processing and analysis routines and a standard BASIC instruction set. Campbell Scientific datalogger support software facilitates program generation, editing, data retrieval, and real-time data monitoring (see Support Software (p.
Midnight on Monday morning. 5.1.2 Sensor Support Read More! See Measurements (p. 269). The following sensor types are supported by the CR800 datalogger. Refer to the appendix Sensors for information on sensors available from Campbell (p. 537) Scientific. • Analog voltage •...
Section 5. System Overview A library of sensor manuals and application notes are available at www.campbellsci.com to assist in measuring many sensor types. Consult with a Campbell Scientific applications engineer for assistance in measuring unfamiliar sensors. 5.1.3 CR800 Wiring Panel The wiring panel of the CR800 is the interface to many CR800 functions.
Section 5. System Overview as compared to pulse-count measurements. The frequency resolution of pulse- count measurements can be improved by extending the measurement interval by increasing the scan interval and by averaging. For information on frequency resolution, see Frequency Resolution Pulse —...
Section 5. System Overview 5.1.3.3 Grounding Terminals Read More! See Grounding (p. 86). Proper grounding will lend stability and protection to a data acquisition system. It is the easiest and least expensive insurance against data loss-and the most neglected. The following terminals are provided for connection of sensor and datalogger grounding: •...
Serial Input / Output Peripherals for model information. (p. 539) • 9-pin CS I/O port: 1 port for communicating through Campbell Scientific telecommunications peripherals. Approved CS I/O telecommunication interfaces are listed in the appendix Serial Input / Output Peripherals (p. 539).
Applications with higher current requirements, such as satellite or cellular phone communications, should be evaluated by means of a power budget with a knowledge of the factors required by a robust power system. Contact a Campbell Scientific applications engineer if assistance is required in evaluating power supply requirements.
Section 5. System Overview • Charge sources Solar panels Wind generators Vac / Vac or Vac / Vdc wall adapters Refer to the appendix Power Supplies for specific model numbers of (p. 542) approved power supplies. NOTE While the CR800 has an input voltage range of 9.6 to 16 Vdc, peripherals (telecommunications devices, sensors, etc.) connected to and powered by the CR800 may not have the same input voltage limits.
Section 5. System Overview program is active at a given time. Two Campbell Scientific software applications, Short Cut and CRBasic Editor, are used to create CR800 programs. • Short Cut creates a datalogger program and wiring diagram in four easy steps.
Caution When removing a CS mass storage device (thumb drive) from the CR800, do so only when the LED is not lit or flashing. Removing a Campbell Scientific mass storage device from the CR800 while the device is active can cause data corruption.
5.1.9.1 PakBus Read More! See PakBus Overview (p. 334). The CR800 communicates with Campbell Scientific support software, telecommunication peripherals, and other dataloggers via PakBus, a proprietary network communications protocol. PakBus is a protocol similar in concept to IP (Internet protocol). By using signatured data packets, PakBus increases the number of communications and networking options available to the CR800.
Section 5. System Overview 5.1.9.2 Modbus Read More! See Modbus (p. 350). The CR800 supports Modbus master and Modbus slave communication for inclusion in Modbus SCADA networks. 5.1.9.3 DNP3 Communication Read More! See DNP3 (p. 347). The CR800 supports DNP3 slave communication for inclusion in DNP3 SCADA networks.
HTTP services, all of which give high level access to CR800 data and programs, are enabled without password protection. Campbell Scientific encourages CR800 users who are concerned about security, especially those with exposure to IP threats, to send the latest operating system to the CR800 (available at www.campbellsci.com) and to disable un-used services...
Keyboard display security bypass does not allow telecommunications access without first correcting the security code. • Note These features are not operable in CR1000KDs with serial numbers less than 1263. Contact Campbell Scientific for information on upgrading the CR1000KD operating system. LoggerNet: •...
5.1.10.2 Pass-code Lockout Pass-code lockouts (historically known simply as "security codes") are the oldest method of securing a Campbell Scientific datalogger. Pass-code lockouts can effectively lock out innocent tinkering and discourage wannabe hackers on non-IP based telecommunications links. However, any serious hacker with physical access to the datalogger or to the telecommunications hardware can, with only minimal trouble, overcome the five-digit pass-codes blocking access.
Keyboard display security bypass does not allow telecommunications access without first correcting the security code. Note This feature is not operable in CR1000KDs with serial numbers less than 1263. Contact Campbell Scientific for information on upgrading the CR1000KD operating system. 5.1.10.3 Passwords Passwords are used to secure IP based communications.
Section 5. System Overview 5.1.10.3.2 PakBus Instructions The following CRBasic PakBus instructions have provisions for password protection: • ModemCallBack() • SendVariable() • SendGetVariables() • SendFile() • GetVariables() • GetFile() • GetDataRecord() 5.1.10.3.3 IS Instructions The following CRBasic instructions that service CR800 IP capabilities have provisions for password protection: •...
Section 5. System Overview One use of file encryption may be to secure proprietary code but make it available for copying. 5.1.10.5 Communications Encryption PakBus is the CR800 root communication protocol. By encrypting certain portions of PakBus communications, a high level of security is given to datalogger communications.
Read More! See Self-Calibration (p. 285). The CR800 uses an internal voltage reference to routinely calibrate itself. Campbell Scientific recommends factory recalibration every two years. If calibration services are required, refer to the section entitled Assistance at the (p. 5) front of this manual.
Page 77
LoggerNet Remote are run on a separate computer, and are used to manage the LoggerNet Linux server. • VISUALWEATHER Weather Station Software supports Campbell Scientific weather stations. Version 3.0 or higher supports custom weather stations or the ET107, ET106, and MetData1 pre-configured weather stations. The software allows you to initialize the setup, interrogate the station, display data, and generate reports from one or more weather stations.
Section 6. CR800 Specifications 1.1 CR800 specifications are valid from ─25° to 50°C in non‐condensing environments unless otherwise specified. Recalibration is recommended every two years. Critical specifications and system configurations should be confirmed with a Campbell Scientific applications engineer before purchase. 2.0 3.5.0 7.0 PROGRAM EXECUTION RATE PERIOD AVERAGE DIGITAL I/O PORTS (C 1‐4) 2.1 3.5.0a 7.0.1 10 ms to one day at 10 ms increments Any of the 6 SE analog inputs can be used for period averaging. Four ports software selectable as binary inputs or control 3.0 Accuracy is ±(0.01% of reading + resolution), where resolution outputs. Provide on/off, pulse width modulation, edge timing, ANALOG INPUTS (SE 1–6, DIFF 1–3) 3.0.1 is 136 ns divided by the specified number of cycles to be subroutine interrupts / wake up, switch‐closure pulse counting, Three differential (DIFF) or six single‐ended (SE) individually measured. high‐frequency pulse counting, asynchronous communications configured input channels. Channel expansion provided by INPUT AMPLITUDE AND FREQUENCY: (UARTs), and SDI‐12 communications. SDM communications are optional analog multiplexers. 3.5.1 ‐‐ 8 10 also supported. 3.1.0 Input ...
The desiccant is replaced whenever the CR800 is repaired at Campbell Scientific. The module should not be opened by the user except to replace the lithium coin cell providing back up power to the clock and SRAM.
Section 7. Installation Figure 29: Enclosure 7.4 Power Sources Note Reliable power is the foundation of a reliable data-acquisition system. When designing a power supply, consideration should be made regarding worst- case power requirements and environmental extremes. For example, the power requirement of a weather station may be substantially higher during extreme cold, while at the same time, the extreme cold constricts the power available from the power supply.
Section 7. Installation Power supplies available from Campbell Scientific can be reviewed in the appendix Power Supplies or at www.campbellsci.com. Contact a Campbell (p. 542), Scientific application engineer if assistance in selecting a power supply is needed, particularly with applications in extreme environments.
Section 7. Installation should be connected to the CR800. The diode OR connection causes the supply with the largest voltage to power the CR800 and prevents the second backup supply from attempting to power the vehicle. Figure 30: Connecting to vehicle power supply 7.4.5 Powering Sensors and Devices Read More! See Power Sources (p.
Section 7. Installation Table 4. Current Source and Sink Limits Terminal Limit < 1.80 A @ 70°C < 1.50 A @ 85°C < 200 mA 5V + CS I/O (combined) "Source" is positive amperage; "sink" is negative amperage (-). Exceeding current limits limits will cause voltage output to become unstable. Voltage should stabilize once current is again reduced to within stated limits.
A 12-Vdc switching circuit, designed to be driven by a digital I/O port, is available from Campbell Scientific and is listed in the appendix Relay Drivers 541). Note The SW12 terminal supply is unregulated and can supply up to 900 mA at 20°C.
Page 87
A good earth (chassis) ground will minimize damage to the datalogger and sensors by providing a low-resistance path around the system to a point of low potential. Campbell Scientific recommends that all dataloggers be earth (chassis) grounded. All components of the system (dataloggers, sensors, external power supplies, mounts, housings, etc.) should be referenced to one common earth...
While elaborate, expensive, and nearly infallible lightning protection systems are on the market, Campbell Scientific, for many years, has employed a simple and inexpensive design that protects most systems in most circumstances. It is, however, not infallible.
Section 7. Installation In addition to protections discussed in ESD Protection use of a simple (p. 86), lightning rod and low-resistance path to earth ground is adequate protection in many installations. A lightning rod serves two purposes. Primarily, it serves as a preferred strike point.
Section 7. Installation 7.5.2 Single-Ended Measurement Reference Low-level, single-ended voltage measurements are sensitive to ground potential fluctuations. The grounding scheme in the CR800 has been designed to eliminate ground potential fluctuations due to changing return currents from 12V, SW12, 5V, and C1 – C4 terminals. This is accomplished by utilizing separate signal grounds ( ) and power grounds (G).
Note that the geometry of the electrodes has a great effect on the magnitude of this error. The Delmhorst gypsum block used in the Campbell Scientific 227 probe has two concentric cylindrical electrodes. The center electrode is used for excitation;...
Section 7. Installation Figure 33: Model of a ground loop with a resistive sensor 7.6 CR800 Configuration The CR800 ships from Campbell Scientific to communicate with Campbell Scientific datalogger support software via RS-232. Some applications, (p. 76) however, require changes to the factory defaults. Most settings address telecommunication variations between the CR800 and a network or PC.
Section 7. Installation • Provide a terminal emulator useful in configuring devices not directly supported by DevConfig graphical user interface. • Show Help as prompts and explanations. Help for the appropriate settings for a particular device can also be found in the user manual for that device. •...
Section 7. Installation 7.6.2 Sending the Operating System The CR800 is shipped with the operating system pre-loaded. However, OS updates are made available at www.campbellsci.com and can be sent to the CR800. Note Beginning with OS 25, the OS has become large enough that a CR800 with serial number ≤...
CR3000 9 / 11-10-08 Campbell Scientific recommends upgrading operating systems only via a direct- hardwire link. However, the Send button in the datalogger support software allows the OS to be sent over all software supported telecommunications 382, p. 429) systems.
Section 7. Installation Configuration ) that gives the user a chance to save and print the settings for (p. 98) the device. Clicking the Factory Defaults button on the settings editor will send a command to the device to revert to its factory default settings. The reverted values will not take effect until the final changes have been applied.
Section 7. Installation Figure 38: Summary of CR800 configuration 7.6.3.1.1 Deployment Tab Illustrated in figure DevConfig Deployment Tab the Deployment tab allows (p. 98), the user to configure the datalogger prior to deploying it. Deployment tab settings can also be accessed through the Setting Editor tab and the Status table. Figure 39: DevConfig Deployment tab 98 ...
Page 99
The allowable range is between 1 and 4094. Each PakBus® device should have a unique PakBus® address. Addresses >3999 force other PakBus® devices to respond regardless of their respective PakBus® settings. See the PakBus® Networking Guide (available from Campbell Scientific) for more information. •...
Section 7. Installation Selected Port. This control is disabled if the end range value is less than the begin range value. • Remove Range will remove the range specified by the values of the Begin and End controls from the list of neighbors to the datalogger on the port specified by Selected Port.
Section 7. Installation • USR: Drive Size specifies the size in bytes allocated for the "USR:" ram disk drive. • RS-232 Power/Handshake | Port Always On controls whether the RS-232 port will remain active even when communication is not taking place. Note If RS-232 handshaking is enabled (handshaking buffer size is non-zero), RS-232 Power/Handshake | Port Always On setting must be checked.
Section 7. Installation • Current Program displays the current program known to be running in the datalogger. This value is empty if there is no current program. • The Last Compiled field displays the time when the currently running program was last compiled by the datalogger. As with the Current Program field, this value is read from the datalogger if it is available.
SW12 control, the cell modem is switched off and the remote CR800 drops out of telecommunications. Campbell Scientific recommends implementing one or both of the provisions described in "Include" File and Default.cr8 File to help preserve (p.
Section 7. Installation CRBasic Example 1. Using an "Include File" to Control SW12 'Assumes that the Include file in CRBasic example "Include File" to Control SW12 (p. 105) 'is loaded onto the CR800 CPU: Drive. 'The Include file will control power to the cellular phone modem. Public PTemp, batt_volt DataTable(Test,1,-1) DataInterval(0,15,Sec,10) Minimum(1,batt_volt,FP2,0,False)
7.6.3.4 Program Run Priorities 1. When the CR800 starts, it executes commands in the powerup.ini file (on Campbell Scientific mass-storage media (USB: drive)), including commands to set program file (i.e., .cr8 files) attributes to Run Now or Run On Power 2.
Section 7. Installation 7.6.3.5 Network Planner Figure 45: Network Planner Setup 7.6.3.5.1 Overview Network Planner allows the user to: • create a graphical representation of a network, as shown in figure Network Planner Setup (p. 107). • determine settings for devices and LoggerNet. •...
Section 7. Installation For more detailed information on Network Planner, please consult the LoggerNet manual, which is available at www.campbellsci.com. 7.6.3.5.2 Basics PakBus Settings • Device addresses are automatically allocated but can be changed. • Device connections are used to determine whether neighbor lists should be specified.
7.7.1.2 CRBasic Editor CR800 application programs are written in a variation of BASIC (Beginner's All- purpose Symbolic Instruction Code) computer language, CRBasic (Campbell Recorder BASIC). CRBasic Editor is a text editor that facilitates creation and modification of the ASCII text file that constitutes the CR800 application program.
Power-up, and Preserve data if no table changed before pressing Send Program. Note To retain data, Preserve data if no table changed must be selected whether or not Campbell Scientific mass-storage media (USB: drive) be connected. Regardless of the program-upload tool used, if any change occurs to data table...
Section 7. Installation Table 6. Program Send Options that Reset Memory* LoggerNet | Connect | Program Send PC400 | Clock/Program | Send Program PC200W | Clock/Program | Send Program RTDAQ | Clock/Program | Send Program DevConfig | Logger Control | Send Program *Reset memory and set program attributes to Run Always ...
Scientific notation, binary, and hexadecimal formats may also be used, as shown in table Formats for Entering Numbers in CRBasic Only (p. 112). standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 8. Formats for Entering Numbers in CRBasic Format...
Table size Set the size of a data table. Send data to a Campbell Scientific mass-storage Other on-line storage devices media (USB: drive) if available. List data to be stored in the data table, e.g. samples, averages, maxima, minima, etc.
Page 114
Section 7. Installation CRBasic Example 6. Proper Program Structure 'Declarations 'Define Constants Const RevDiff = 1 Const Del = 0 'default Const Integ = 250 Declare constants Const Mult = 1 Const Offset = 0 'Define public variables Public RefTemp Public TC(6) 'Define Units Declare public variables, Declarations Units...
Section 7. Installation 7.7.3.3 Command Line CRBasic programs are made up of a series of statements. Each statement normally occupies one line of text in the program file. Statements are made up of instructions, variables, constants, expressions, or a combination of these. "Instructions"...
Section 7. Installation 7.7.3.4 Single-Line Declarations Public, Dim, and ReadOnly variables are declared at the beginning of a CRBasic program, as are Constants, Units, Aliases, StationNames, DataTables, and Subroutines. Table Rules for Names lists declaration names and allowed (p. 140) lengths.
Page 117
Section 7. Installation simply declare a variable array as shown below: Public TempC(4), This creates in memory the four variables TempC(1), TempC(2), TempC(3), and TempC(4). A variable array is useful in program operations that affect many variables in the same way. CRBasic example Using a variable array in calculations shows (p.
Page 118
Section 7. Installation CRBasic Example 8. Using Variable Array Dimension Indices As Long As Long As Long Public VariableName(4,4,4) As Float BeginProg Scan() aaa = 3 bbb = 2 ccc = 4 VariableName(aaa,bbb,ccc) = 2.718 NextScan EndProg Dimensioning Strings Strings can be declared to a maximum of two dimensions. The third "dimension" is used for accessing characters within a string.
Resolution / Range Word Size Argument Zero Minimum Maximum 0.000 ±0.001 ±7999. Campbell Absolute Value Decimal Location Default final storage data type. Use Scientific floating for stored data requiring 3 or 4 point / Final data storage 0 -- 7.999 X.XXX significant digits.
Page 120
Section 7. Installation Table 10. Data Types Name: Command Description / Where Used Notes Resolution / Range Word Size Argument Use to store TRUE or FALSE states, such as with flags and control ports. 0 is Dim & Public always false. -1 is always true. Signed Integer / As Boolean variables...
Page 121
Section 7. Installation DataTable(TableName,True,-1) 'FP2 Data Storage Example Sample(1,Z,FP2) 'IEEE4 / Float Data Storage Example Sample(1,X,IEEE4) 'UINT2 Data Storage Example Sample(1,PosCounter,UINT2) 'LONG Data Storage Example Sample(1,PosNegCounter,Long) 'STRING Data Storage Example Sample(1,FirstName,String) 'BOOLEAN Data Storage Example Sample(8,Switches(),Boolean) 'BOOL8 Data Storage Example Sample(2,FLAGS(),Bool8) 'NSEC Data Storage Example Sample(1,CR800Time,Nsec)
Section 7. Installation Variable Initialization By default, variables are set equal to zero at the time the datalogger program compiles. Variables can be initialized to non-zero values in the declaration. Examples of syntax are shown in CRBasic example Initializing Variables (p.
Section 7. Installation CRBasic Example 12. Using the Const Declaration Public PTempC, PTempF Const CtoF_Mult = 1.8 Const CtoF_Offset = 32 BeginProg Scan(1,Sec,0,0) PanelTemp(PTempC,250) PTempF = PTempC * CtoF_Mult + CtoF_Offset NextScan EndProg Predefined Contants Several words are reserved for use by CRBasic. These words cannot be used as variable or table names in a program.
Section 7. Installation Table 11. Predefined Constants and Reserved Words mv50cR mv500c mv7_5 mv7_5c mvX10500 mv50R NSEC PROG SCAN mvX1500 Select STRING TABLE TRUE TypeB SUBSCAN TypeJ TypeK TypeN TypeE TypeS TypeT UINT2 TypeR usec Until vX15 vX105 While 7.7.3.4.3 Alias and Unit Declarations A variable can be assigned a second name, or alias, by which it can be called throughout the program.
Section 7. Installation CRBasic Example 13. Foreign‐Language Support ‘Declare a constant to concatenate six non-English characters Const PTempUnits = CHR(HexToDec ("C9"))+ CHR(HexToDec ("E3"))+ CHR(HexToDec("CA")) _ + CHR(HexToDec ("CF")) + CHR(HexToDec("B6")) + CHR(HexToDec ("C8")) ‘Declare a constant to concatenate four non-English characters Const PTempAlias = CHR(HexToDec ("CE"))+ CHR(HexToDec ("C2")) + CHR(HexToDec("B6")) _ + CHR(HexToDec ("C8")) ‘Declare as Alias and Units non-English words concatenated above Alias...
Section 7. Installation • name of the CRBasic program running in the datalogger • name of the data table (limited to 20 characters) • alphanumeric field names to attach at the head of data columns This information is referred to as "table definitions." Table Typical Data Table shows a data file as it appears after the associated (p.
Section 7. Installation Table 13. Typical Data Table TOA5 CR800 CR800 1048 CR800.Std.13.06 CPU:Data.cr8 35723 OneMin TIMESTAMP RECORD BattVolt_Avg PTempC_Avg TempC_Avg(1) TempC_Avg(2) Volts Deg C Deg C Deg C 7/11/2007 16:10 13.18 23.5 23.54 25.12 7/11/2007 16:20 13.18 23.5 23.54 25.51 7/11/2007 16:30 13.19...
Page 128
Section 7. Installation 'Define Data Tables DataTable(OneMin,True,-1) DataInterval(0,1,Min,10) Average(1,Batt_Volt,FP2,False) Average(1,PTemp_C,FP2,False) Average(2,Temp_C(1),FP2,False) EndTable DataTable(Table1,True,-1) DataInterval(0,1440,Min,0) Minimum(1,Batt_Volt,FP2,False,False) EndTable 'Main Program BeginProg Scan(5,Sec,1,0) 'Default Datalogger Battery Voltage measurement Batt_Volt: Battery(Batt_Volt) 'Wiring Panel Temperature measurement PTemp_C: PanelTemp(PTemp_C,_60Hz) 'Type T (copper-constantan) Thermocouple measurements Temp_C: TCDiff(Temp_C(),2,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1,0) 'Call Data Tables and Store Data CallTable(OneMin) CallTable(Table1)
Page 129
Section 7. Installation • Size-Table size is the number of records to store in a table before new data begins overwriting old data. If "10" is entered, 10 records are stored in the table -- the eleventh record will overwrite the first record. If "-1" is entered, memory for the table is automatically allocated at the time the program compiles.
Section 7. Installation If a program is planned to experience multiple lapses, and if telecommunications Lapses bandwidth is not a consideration, the parameter should be set to ensure the CR800 allocates adequate memory for each data table. Table 14. DataInterval() Lapse Parameter Options Lapse DataInterval() Argument...
Temp_C() (an array of 2) are used. • DataType — Data type for the stored average (the example uses data type FP2, which is the Campbell Scientific two-byte floating point data type). Read More! See Data Types for more information on available data types. (p. 118) •...
Section 7. Installation the order calls are received. This may cause unexpected pauses in the conflicting program sequences. 7.7.3.5.3 Incidental Sequences Data table sequences are essential features of nearly all programs. Although used less frequently, subroutine sequences also have a general purpose nature. The following incidental sequences, however, are used only in applications to which they specifically apply.
Section 7. Installation datalogger, which is displayed by the support software. The CRBasic Editor pre- compiler returns a similar message. Note A program can be forced to run in sequential or pipeline modes by placing the SequentialMode or PipelineMode instruction in the declarations section of the program.
Note The exact time at which measurements are made in sequential mode may vary if other measurements or processing are made conditionally, if there is heavy communications activity, or if other interrupts, such as engaging Campbell Scientific mass-storage media (USB: drive), occur.
Section 7. Installation A similar concern is the reuse of the same variable in multiple tasks. Without some sort of messaging between the two tasks placed into the CRBasic program, unpredictable results are likely to occur. The SemaphoreGet() and SemaphoreRelease() instruction pair provide a tool to prevent unwanted access of an object (variable, COM port, etc.) by another task while the object is in use.
Section 7. Installation CR800 clock. Scan() parameters allow modification of the period in 10- ms increments. As shown in CRBasic example BeginProg / Scan() / NextScan / EndProg Syntax (p. 136), aside from declarations, the CRBasic program may be relatively short. CRBasic Example 15.
Section 7. Installation splicing, measurements in a slow sequence may span across multiple-scan intervals in the main program. When no measurements need to be spliced, the slow-sequence scan will run independent of the main scan, so slow sequences with no measurements can run at intervals ≤ main-scan interval (still in 10-ms increments) without skipping scans.
Page 138
Section 7. Installation semaphore before measurements in a calibration or slow-sequence scan. The semaphore is taken by the main scan at its beginning if there are measurements included in the scan. The semaphore is released only after the last instruction in the main scan is executed.
Section 7. Installation Figure 47: Sequential-mode scan priority flow diagrams 7.7.3.8 Instructions In addition to BASIC syntax, additional instructions are included in CRBasic to facilitate measurements and store data. CRBasic Programming Instructions (p. 451) contains a comprehensive list of these instructions. 7.7.3.8.1 Measurement and Data-Storage Processing CRBasic instructions have been created for making measurements and storing data.
Section 7. Installation PanelTemp is the keyword. Two parameters follow: Dest, a destination variable name in which the temperature value is stored; and Integ, a length of time to integrate the measurement. To place the panel temperature measurement in the variable RefTemp, using a 250-µs integration time, the syntax is as shown in CRBasic example Measurement Instruction Syntax (p.
Section 7. Installation Table 18. Rules for Names Maximum Length Name (number of characters) Allowed characters Category and other names. Data-table name Field name Field-name description Variables, constants, units, aliases, station names, field names, data table names, and file names can share identical names;...
Section 7. Installation CRBasic Example 19. Use of Arrays as Multipliers and Offsets Public Pressure(3), Mult(3), Offset(3) DataTable(AvgPress,1,-1) DataInterval(0,60,Min,10) Average(3,Pressure(),IEEE4,0) EndTable BeginProg 'Calibration Factors: Mult(1)=0.123 : Offset(1)=0.23 Mult(2)=0.115 : Offset(2)=0.234 Mult(3)=0.114 : Offset(3)=0.224 Scan(1,Sec,10,0) 'VoltSe instruction using array of multipliers and offsets: VoltSe(Pressure(),3,mV5000,1,True,0,_60Hz,Mult(),Offset()) CallTable AvgPress NextScan EndProg 7.7.3.9 Expressions An expression is a series of words, operators, or numbers that produce a value or result.
Section 7. Installation 7.7.3.9.1 Floating-Point Arithmetic Variables and calculations are performed internally in single precision IEEE four- byte floating point with some operations calculated in double precision. Note Single-precision float has 24 bits of mantissa. Double precision has a 32-bit extension of the mantissa, resulting in 56 bits of precision.
Page 144
Section 7. Installation CRBasic Example 20. Conversion of FLOAT / LONG to Boolean Public As Float Public As Float Public As Long Public As Boolean Public As Boolean Public As Boolean BeginProg Fa = 0 Fb = 0.125 L = 126 Ba = Fa 'This will set Ba = False (0) Bb = Fb 'This will Set Bb = True (-1) Bc = L...
Section 7. Installation Constants Conversion Constants are not declared with a data type, so the CR800 assigns the data type as needed. If a constant (either entered as a number or declared with CONST) can be expressed correctly as an integer, the compiler will use the type that is most efficient in each expression.
Section 7. Installation The CR800 is able to translate the conditions listed in table Binary Conditions of TRUE and FALSE to binary form (-1 or 0), using the listed instructions and (p. 146) saving the binary form in the memory location indicated. Table Logical Expression Examples explains some logical expressions.
Section 7. Installation Table 20. Logical Expression Examples If X >= 5 then Y = 0 Sets the variable Y to 0 if the expression "X >= 5" is true, i.e. if X is greater than or equal to 5. The CR800 evaluates the expression (X >= 5) and registers in system memory a -1 if the expression is true, or a 0 if the expression is false.
Section 7. Installation CRBasic Example 23. String and Variable Concatenation 'Declare Variables Wrd(8) As String * 10 Public Phrase(2) As String * 80 Public PhraseNum(2) As Long 'Declare Data Table DataTable(Test,1,-1) DataInterval(0,15,Sec,10) 'Write phrases to data table "Test" Sample(2,Phrase,String) EndTable 'Program BeginProg Scan(1,Sec,0,0) 'Assign strings to String variables Wrd(1) = "...
Section 7. Installation • Prc is the abbreviation of the name of the data process used. See table Abbreviations of Names of Data Processes for a complete list of these (p. 149) abbreviations. This is not needed for values from Status or Public tables. •...
Section 7. Installation Seven special variable names are used to access information about a table: • EventCount • EventEnd • Output • Record • TableFull • TableSize • TimeStamp Consult CRBasic Editor Help index topic DataTable access for complete information. 7.7.3.11 System Signatures Signatures help assure system integrity and security.
7.8 Programming Resource Library This library of notes and CRBasic code addresses a narrow selection of CR800 applications. Consult a Campbell Scientific applications engineer if other resources are needed. 7.8.1 Calibration Using FieldCal() and FieldCalStrain() Calibration increases accuracy of a sensor by adjusting or correcting its output to match independently verified quantities.
Section 7. Installation calibration with new multiplier and offset factors. Only if the user creates a data- storage output table with the SampleFieldCal() instruction will a calibration history be recorded. Note CAL files created by FieldCal() and FieldCalStrain() differ from files created by the CalFile() instruction (File Management (p.
Section 7. Installation topics. The most comprehensive resource to date covering use of FieldCal() and FieldCalStrain() is RTDAQ software documentation. Be aware that, • the CR800 does not check for out-of-bounds values in mode variables. • valid mode variable entries are "1" or "4". 7.8.1.4.1 Single-Point Calibrations (zero, offset, or zero basis) Use this single-point calibration procedure to adjust an offset (y-intercept).
Section 7. Installation 8. Set Mode = 4 to start second part of calibration. Mode = 5 (automatic) during second point calibration. Mode = 6 (automatic) when calibration is complete. 7.8.1.5 FieldCal() Demonstration Programs FieldCal() has the following calibration options: •...
Section 7. Installation 1. Send CRBasic example FieldCal Zeroing Demonstration Program to the (p. 155) CR800. An excitation channel has been programmed to simulate a sensor output. 2. To place the simulated RH sensor in a simulated-calibration condition (in the field it would be placed in a desiccated chamber), place a jumper wire between channels VX1/EX1 and SE6 (3L).
Section 7. Installation Scan(100,mSec,0,0) 'Simulate measurement by exciting channel VX1/EX1 ExciteV(Vx1,mV,0) 'Make the calibrated measurement VoltSE(RH,1,mV2500,6,1,0,250,Multiplier,Offset) 'Perform a calibration if CalMode = 1 FieldCal(0,RH,1,Multiplier,Offset,CalMode,KnownRH,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 7.8.1.5.2 Offset (Option 1) Case: A sensor measures the salinity of water.
Section 7. Installation CRBasic Example 27. FieldCal() Offset Demo Program 'Jumper VX1/EX1 to SE6(3L) to simulate a sensor Public 'Excitation mV output Public KnownSalt 'Known salt concentration Public CalMode 'Calibration trigger Public Multiplier 'Multiplier (starts at .05 mg / liter / mV, 'does not change) Public Offset 'Offset (starts at zero, not changed)
Page 158
Section 7. Installation K = temperature correction coefficient (‐0.04 PSI / C° is typical) = r temperature at the zero state = temperature measurement = barometric pressure at the zero state = barometric pressure measurement. The following procedure determines zero offset of the pressure transducer, water temperature, and barometric pressure readings. Use the external keyboard / display or support software numeric monitor to change variable values as directed. Calibration Report for Pressure Transducer Measurement Measurement...
Section 7. Installation Public Offset(3) Alias Offset(1) = Digits_Offset Alias Offset(2) = Temp_Offset Alias Offset(3) = BP_Offset Public LoadResult, CalMode Public AVWRC Const GageFactor = 0.01664 Const Temp_K = -0.00517 BeginProg 'Load the calibration constants stored in the CAL file after a zero is performed LoadResult = LoadFieldCal(False) Scan(1,Sec,1,0) 'AVW200(AVWRC,Com1,0,200,VW(1,1),1,1,1,1000,4000,1,_60Hz,1,0) '<<actual measurement...
Page 160
Section 7. Installation 1. Send the program in CRBasic example FieldCal Multiplier and Offset Demonstration Program to the CR800. (p. 160) 2. To simulate the flow sensor, place a jumper wire between channels VX1/EX1 and SE6 (3L). 3. Simulate deployment-calibration conditions (output @ 30 l/s = 300 mV, output @ 10 l/s = 550 mV) in two stages.
Section 7. Installation Scan(100,mSec,0,0) 'Simulate measurement by exciting channel VX1/EX1 ExciteV(Vx1,SignalmV,0) 'Make the calibrated measurement VoltSE(WaterFlow,1,mV2500,6,1,0,250,Multiplier,Offset) 'Perform a calibration if CalMode = 1 FieldCal(2,WaterFlow,1,Multiplier,Offset,CalMode,KnownFlow,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 7.8.1.5.5 Two-Point Slope Only (Option 3) Some measurement applications do not require determination of offset.
This section is not intended to be a primer on shunt-calibration theory, but only to introduce use of the technique with the CR800 datalogger. Campbell Scientific strongly urges users to study shunt-calibration theory from other sources. A...
Page 163
Section 7. Installation FieldCalStrain() uses the known value of the shunt resistor to adjust the gain (multiplier / span) to compensate. The gain adjustment (S) is incorporated by FieldCalStrain() with the manufacturer's gage factor (GF), becoming the adjusted gage factor (GF ), which is then used as the gage factor in StrainCalc().
Section 7. Installation Figure 49: Quarter-bridge strain-gage schematic with RC-resistor shunt CRBasic Example 31. FieldCalStrain() Calibration Demonstration 'Program to measure quarter bridge strain gage 'Measurements Public Raw_mVperV Public MicroStrain 'Variables that are arguments in the Zero Function Public Zero_Mode Public Zero_mVperV 'Variables that are arguments in the Shunt Function Public Shunt_Mode Public...
Section 7. Installation '//////////////////////////// PROGRAM //////////////////////////// BeginProg 'Set Gage Factors GF_Raw = 2.1 GF_Adj = GF_Raw 'The adj Gage factors are used in the calculation of uStrain 'If a calibration has been done, the following will load the zero or 'Adjusted GF from the Calibration file LoadFieldCal(True) Scan(100,mSec,100,0)
Section 7. Installation Figure 50: Strain-gage shunt calibration started Figure 51: Strain-gage shunt calibration finished 7.8.1.6.2 Quarter-Bridge Zero (Option 10) Continuing from Quarter-Bridge Shunt (Option 13) keep the 249-kΩ (p. 165), resistor in place to simulate a strain. Using the external keyboard / display or software numeric monitor, change the value in variable Zero_Mode to 1 to start the zero calibration as shown in figure Starting Zero Procedure (p.
IS services is contained in CRBasic Editor Help. Read More! Specific information concerning the use of digital-cellular modems for information services can be found in Campbell Scientific manuals for those modems. When used in conjunction with a network-link interface that uses the CR800 IP...
Section 7. Installation • DHCP client to obtain an IP address • DNS client to query a DNS server to map a name into an IP address • SMTP to send email messages 7.8.2.1 PakBus Over TCP/IP and Callback ® Once the hardware has been configured, basic PakBus communication over TCP/IP is possible.
Created Using WebPageBegin() Instruction (p. 170) The Campbell Scientific logo in the web page comes from a file called SHIELDWEB2.JPG. That file must be transferred to the CR800 CPU: drive using File Control. The CR800 can then access the graphic for display on the web page.
The CR800 can act as an FTP Client to send a file or get a file from an FTP server, such as another datalogger or web camera. This is done using the CRBasic FTPClient() instruction. Refer to a manual for a Campbell Scientific network link (see the appendix Network Links ), available at www.campbellsci.com, or...
SDI-12 standard v 1.3 sensors accept addresses 0 - 9, a - z, and A - Z. For a CRBasic programming example demonstrating the changing of a sensor SDI-12 address on the fly, see Campbell Scientific publication PS200/CH200 12 V Charging Regulators, which is available at www.campbellsci.com.
Transparent mode is entered while the PC is in telecommunications with the CR800 through a terminal emulator program. It is easily accessed through Campbell Scientific datalogger support software but may also be accessible (p. 76), with terminal emulator programs such as Windows Hyperterminal.
013CampbellCS1234003STD.03.01 means address = 0, SDI-12 protocol Send Identification version number = 1.3, manufacturer is Campbell Scientific, CS1234 is the sensor model number (fictitious in this example), 003 is the sensor version number, STD.03.01 indicates the sensor revision number is .01.
Page 176
Section 7. Installation Table 25. Standard SDI-12 Command and Response Set Command Name Command Syntax Response Start Concurrent Measurement atttnn<CR><LF> aC1! atttnn<CR><LF> atttnn<CR><LF> Additional Concurrent atttnn<CR><LF> Measurements atttnn<CR><LF> aC9! atttnn<CR><LF> Additional Concurrent aCC1! ... aCC9! atttnn<CR><LF> Measurements and Request CRC Continuous Measurements aR0! ...
Page 177
Section 7. Installation Serial number = 101 Start Measurement Commands (aM! & aC!) A measurement is initiated with M! or C! commands. The response to each command has the form atttnn, where • a = sensor address • ttt = time, in seconds, until measurement data are available •...
Section 7. Installation Send Data Commands (aD0! to aD9!) These commands requests data from the sensor. They are normally issued automatically by the CR800 after measurement commands aMv! or aCv!. In transparent mode, the user asserts these commands in series to obtain data. If the expected number of data values are not returned in response to a aD0! command, the data logger issues aD1!, aD2!, etc., until all data are received.
Section 7. Installation instruction parameter), the CR800 issues the aM! AND aD0! commands with proper elapsed time between the two. The CR800 automatically issues retries and performs other services that make the SDI-12 measurement work as trouble free as possible. Table SDI-12Recorder() Commands summarizes CR800 (p.
Page 180
Section 7. Installation Alternate Start Measurement Command (Cv) The SDIRecorder() aCv (not C!) command facilitates using the SDI-12 standard Start Concurrent command (aCv!) without the back-to-back measurement sequence normal to the CR800 implementation of aCv!. Consider an application wherein four SDI-12 temperature sensors need to be near- simultaneously measured at a 5 minute interval within a program that scans every 5 seconds.
Page 181
Section 7. Installation SDI12Recorder(Temp(3),1,2,"M!",1.0,0) SDI12Recorder(Temp(4),1,3,"M!",1.0,0) NextScan EndSequence EndProg However, problems 2 and 3 still are not resolved. These can be resolved by using the concurrent measurement command, C!. All measurements will be made at about the same time and execution time will be about 95 seconds, well within the 5-minute scan rate requirement, as follows: Public BatteryVolt...
Page 182
Section 7. Installation CRBasic Example 33. Using Alternate Concurrent Command (aC) 'Code to use when back to back SDI-12 concurrent measurement commands not desired 'Main Program BeginProg 'Preset first measurement command to C! X = 1 cmd(X) = "C!" Next 'Set 5 s scan rate Scan(5,Sec,0,0) 'Other measurements here 'Set 5 minute measurement rate TimeIntoInterval(0,5,Min)
Page 183
Section 7. Installation Else 'C!/C command sequence complete Move(Temp_Meas(X),1,Temp_Tmp(X),1) 'Copy measurements to SDI_Val(10) cmd(X) = "C!" 'Start next measurement with "C!" IndDone(X) = -1 EndIf Next 'Summarize Measurement Event Success X = 1 GroupDone = GroupDone + IndDone(X) Next 'Stop current measurement event, reset controls GroupDone = -4 Then RunSDI12 = False...
CR800 to behave as an SDI-12 sensor. A common use of this feature is the transfer of data from the CR800 to other Campbell Scientific dataloggers over a single-wire interface (SDI-12 port to SDI-12 port), or to transfer data to a third- party SDI-12 recorder.
Section 7. Installation Example: Probe: Water Content Power Usage: • Quiescent: 0.25 mA • Measurement: 120 mA • Measurement Time: 15 s • Active: 66 mA • Timeout: 15 s Probes 1, 2, 3, and 4 are connected to SDI-12 / Control Port 1. The time line in table Example Power Usage Profile for a Network of SDI-12 Probes shows a 35-second power-usage profile example.
Section 7. Installation 7.8.4 Subroutines A subroutine is a group of programming instructions that is called by, but runs outside of, the main program. Subroutines are used for the following reasons: • To reduce program length. Subroutine code can be executed multiple times in a program scan.
Section 7. Installation CRBasic Example 37. Subroutine with Global and Local Variables 'Global variables are those declared anywhere in the program as Public or Dim. 'Local variables are those declared in the Sub() instruction. 'Program Purpose: Demonstrates use of global and local variables with subroutines 'Program Function: Passes 2 variables to subroutine. Subroutine increments each 'variable once per second, multiplies each by pi, then passes results back to 'the main program for storage in a data table.
WVc(3): Resultant mean wind direction (Θu) WVc(4): Standard deviation of wind direction σ(Θu). This standard deviation is calculated using Campbell Scientific's wind speed weighted algorithm. Use of the resultant mean horizontal wind direction is not recommended for straight-line Gaussian dispersion models, but may be used to model transport direction in a variable-trajectory model.
Section 7. Installation often included to zero the measurement when it equals the offset so that WindVector() can reject measurements when wind speed is zero. Standard deviation can be processed one of two ways: 1) using every sample taken during the data storage interval (enter for the Subinterval parameter), or 2)
Resultant mean wind direction, Θu: Standard deviation of wind direction, σ (Θu), using Campbell Scientific algorithm: The algorithm for σ (Θu) is developed by noting (FIGURE. Standard Deviation of...
0 if the deviations in speed are not correlated with the deviation in direction. This assumption has been verified in tests on wind data by Campbell Scientific; the Air Resources Laboratory, NOAA, Idaho Falls, ID; and MERDI, Butte, MT.
Section 7. Installation have never been greater than a few degrees. The final form is arrived at by converting from radians to degrees (57.296 degrees/radian). 7.8.6 Custom Menus Read More! More information concerning use of the keyboard is found in sections Using the Keyboard Display and Custom Keyboard and Display (p.
Section 7. Installation SubMenu() / EndSubMenu Defines the beginning and end of a second‐level menu. Note SubMenu() label must be at least 6 characters long to mask default display clock. CRBasic example Custom Menus lists CRBasic programming for a custom (p. 197) menu that facilitates viewing data, entering notes, and controlling a device. figure Custom Menu Example —...
Section 7. Installation Figure 63: Custom menu example — Predefined-notes pick list Figure 64: Custom menu example — Free-Entry notes window Figure 65: Custom menu example — Accept / Clear notes window Figure 66: Custom menu example — Control sub menu 196 ...
Section 7. Installation Figure 67: Custom menu example — control-LED pick list Figure 68: Custom menu example — control-LED Boolean pick list Note See figures Custom Menu Example — Home Screen through Custom (p. 195) Menu Example — Control LED Boolean Pick List in reference to the (p.
Page 198
Section 7. Installation Const Off = false 'Assign "Off" as Boolean False Public StartFlag As Boolean 'LED Control Process Variable Public CountDown As Long 'LED Count Down Variable Public ToggleLED As Boolean 'LED Control Variable 'Define Note DataTable 'Set up Notes data table, written DataTable(Notes,1,-1) 'to when a note is accepted Sample(1,SelectNote,String)
Section 7. Installation 'Measure Two Thermocouples TCDiff(TCTemp(),2,mV2500C,1,TypeT,RefTemp,True,0,250,1.0,0) CallTable TempC 'Call data table 'Menu Item "Make Notes" Support Code CycleNotes = "Accept" Then CallTable Notes 'Write data to Notes data table CycleNotes = "Accepted" 'Write "Accepted" after written Delay(1,500,mSec) 'Pause so user can read "Accepted" SelectNote = ""...
Page 200
Section 7. Installation Note Do not confuse CRBasic files with .DLD extensions with files of .DLD type used by legacy Campbell Scientific dataloggers. As an example, pseudo code using this feature might be written as: #Const Destination = "CR800" #If Destination = "CR3000" Then <code specific to the CR3000>...
Section 7. Installation 7.8.8.1 Introduction Serial denotes transmission of bits (1s and 0s) sequentially, or "serially." A byte is a packet of sequential bits. RS-232 and TTL standards use bytes containing eight bits each. Imagine that an instrument transmits the byte "11001010" to the CR800.
7.8.8.3 Protocols PakBus is the protocol native to the CR800 and transparently handles routine point-to-point and network communications among PCs and Campbell Scientific dataloggers. Modbus and DNP3 are industry-standard networking SCADA protocols that optionally operate in the CR800 with minimal configuration by the user.
Section 7. Installation addressing systems that allow multiplexing of several sensors on a single communications port, which makes for more efficient use of resources. 7.8.8.4 Glossary of Terms Asynchronous Indicates the sending and receiving devices are not synchronized using a clock signal. Baud rate The rate at which data are transmitted. Big Endian "Big end first." Placing the most significant integer at the beginning of a numeric word, reading left to right. cr Carriage return Data bits Number of bits used to describe the data, and fit between the start and stop bits. Sensors typically use 7 or 8 data bits. ...
Section 7. Installation +3 to +25 with ‐3 to + 3 defined as the transition range that contains no information. A mark is a logic 1 and negative voltage. A space is a logic 0 and positive voltage. MSB Most significant bit (the leading bit). RS‐232C Refers to the standard used to define the hardware signals and voltage levels. The CR800 supports several options of serial logic and voltage levels including RS‐232 logic at TTL levels and TTL logic at TTL levels. RX Receive SP Space Start bit Is the bit used to indicate the beginning of data. Is the end of the data bits. The stop bit can be 1, 1.5 or 2. TX Transmit 7.8.8.5 CRBasic Programming To transmit or receive RS-232 or TTL signals, a serial port (see table CR800 Serial Ports ) must be opened and configured through CRBasic with the (p.
Section 7. Installation useful when using the CS I/O and RS-232 ports since it allows ports to be simultaneously used for sensor and PC telecommunications. • ® Format — Determines data type and if PakBus communications can occur on the COM port. If the port is expected to read sensor data and support normal PakBus ®...
Section 7. Installation SerialOutBlock() • Binary • Can run in pipeline mode inside the digital measurement task (along with SDM instructions) if the COMPort parameter is set to a constant argument such as , and the number of bytes is also entered as constant. COM1 COM2 SerialOut()
Section 7. Installation • Will the sensor be sending multiple data strings? Multiple strings usually require filtering before parsing. • How fast will data be sent to the CR800? • Is power consumption critical? • Does the sensor compute a checksum? Which type? A checksum is useful to test for data corruption.
Section 7. Installation 1. Open a serial port (SerialOpen() command) to configure it for communications. • Parameters are set according to the requirements of the communications link and the serial device. • Example: SerialOpen(Com1,9600,0,0,10000) • Designate the correct port in CRBasic. •...
Section 7. Installation 17889 ppmV pw=17.81 hPa pws 29.43 hPa h= 52.3 kJ/kg 8.1 °C" • Hex Pairs: Bytes are translated to hex pairs, consisting of digits 0 - 9 and letters a - f. Each pair describes a hexadecimal ASCII / ANSI code. Some codes translate to alpha-numeric values, others to symbols or non-printable control characters.
Section 7. Installation the sensor sends multiple strings at once, consider declaring a single string variable and read incoming strings one at a time. The CR800 adjusts the declared size of strings. One byte is always added to the declared length, which is then increased by up to another three bytes to make length divisible by four. Declared string length, not number of characters, determines the memory consumed when strings are written to memory. Consequently, large strings not filled with characters waste significant memory. 7.8.8.5.6 Demonstration Program CRBasic example Receiving an RS-232 String is provided as an exercise in (p.
Section 7. Installation Scan(5,Sec, 3, 0) 'Serial Out Code 'Transmits string "*27.435,56.789#" out COM1 SerialOpen(Com1,9600,0,0,10000) 'Open a serial port 'Build the output string SerialOutString = "*" & TempOut & "," & RhOut & "#" 'Output string via the serial port SerialOut(Com1,SerialOutString,"",0,100) 'Serial In Code 'Receives string "27.435,56.789"...
Printable ASCII format, which satisfies requirements of the customer's data- acquisition system. The network administrator also prefers to synchronize the CR510 clocks from a central computer using the legacy Campbell Scientific C command. The CR510 datalogger is hard-coded to output Printable ASCII and recognize the C command.
Page 216
(p. 216) and exports serial data via the CR800 RS-232 port. Imported data are expected to have the form of the legacy Campbell Scientific time set C command. Exported data has the form of the legacy Campbell Scientific Printable ASCII format.
Page 217
Section 7. Installation 'One Minute Data Table DataTable(OneMinTable,true,-1) OpenInterval 'sets interval same as found in CR510 DataInterval(0,1,Min,10) Totalize(1, KWHH,FP2,0) Sample(1, KWHHold,FP2) Totalize(1, KvarH,FP2,0) Sample(1, KVarHold,FP2) Sample(1, StationID,FP2) EndTable 'Clock Set Record Data Table DataTable(ClockSetRecord,True,-1) Sample(7,ClkSet(),FP2) EndTable 'Subroutine to convert date formats (day-of-year to month and date) DOY2MODAY 'Store Year, DOY, Hour, Minute and Second to Input Locations.
Page 218
Section 7. Installation 'If it is a leap year, use this section. (LeapYear = True) Then Select Case Case Is < 32 Month = 1 Date = DOY Case Is < 61 Month = 2 Date = DOY + -31 Case Is <...
Page 219
Section 7. Installation Case Is < 121 Month = 4 Date = DOY + -90 Case Is < 152 Month = 5 Date = DOY + -120 Case Is < 182 Month = 6 Date = DOY + -151 Case Is <...
Page 220
'Note: ClkSet array requires year, month, date, hour, min, sec, msec ClockSet(ClkSet()) CallTable(ClockSetRecord) EndIf '/////////////////Serial Output Section///////////////////// 'Construct old Campbell Scientific Printable ASCII data format and output to COM1 'Read datalogger clock RealTime(rTime) TimeIntoInterval(0,5,Sec) Then 'Load OneMinData table data for processing into printable ASCII...
Section 7. Installation 7.8.8.7 Q & A Q: I am writing a CR800 program to transmit a serial command that contains a null character. The string to transmit is: CHR(02)+CHR(01)+"CWGT0"+CHR(03)+CHR(00)+CHR(13)+CHR(10) How does the logger handle the null character? Is there a way that we can get the logger to send this? A: Strings created with CRBasic are NULL terminated.
Page 222
Section 7. Installation then TempData(1,1,2) = "TOP", TempData(1,1,3) = "OP", _ TempData(1,1,1) = "STOP" To handle single-character manipulations, declare the string with a size of 1. That single-character string can be used to search for specific characters. In the following example, the first character of a larger string is determined: Public TempData As String...
Section 7. Installation A: A common caution is, “The destination variable should not be used in more than one sequence to avoid using the variable when it contains old data.” However, there are more elegant ways to handle the root problem. There is nothing unique about SerialIn() with regard to understanding how to correctly write to and read from global variables using multiple sequences.
Section 7. Installation Figure 75: Data from TrigVar program CRBasic Example 42. Using TrigVar to Trigger Data Storage 'In this example, the variable "counter" is incremented by 1 each scan. The data table 'is called every scan, which includes the Sample(), Average(), and Totalize() 'instructions. TrigVar is true when counter = 2 or counter = 3. Data are stored when 'TrigVar is true.
Section 7. Installation • Placing a time stamp in a second position in a record. • Accessing a time stamp from a data table and subsequently storing it as part of a larger data table. Maximum(), Minimum(), and FileTime() instructions produce a time stamp that may be accessed from the program after being written to a data table.
Page 226
Section 7. Installation 'Program BeginProg Scan(1,Sec,0,0) TimeVar = FirstTable.TimeStamp CallTable FirstTable CallTable SecondTable NextScan EndProg CRBasic Example 44. NSEC — Two Element Time Array 'TimeStamp is retrieved into variables TimeOfMaxVar(1) and TimeOfMaxVar(2). Because 'the variable is dimensioned to 2, NSEC assumes, '1) TimeOfMaxVar(1) = seconds since 00:00:00 1 January 1990, and '2) TimeOfMaxVar(2) = μsec into a second.
Page 227
Section 7. Installation 'Declarations Public rTime(9) As Long '(or Float) Public rTime2(7) As Long '(or Float) DataTable(SecondTable,True,-1) DataInterval(0,5,Sec,10) Sample(1,rTime,NSEC) Sample(1,rTime2,NSEC) EndTable 'Program BeginProg Scan(1,Sec,0,0) RealTime(rTime) x = 1 rTime2(x) = rTime(x) Next CallTable SecondTable NextScan EndProg CRBasic Example 46. NSEC —Convert Timestamp to Universal Time 'Application: the CR800 needs to display Universal Time (UT) in human readable 'string forms.
Section 7. Installation Variable aliasing can be employed in the CRBasic program to make the (p. 124) data more understandable. Figure 76: Alarms toggled in bit-shift example Figure 77: Bool8 data from bit-shift example (numeric monitor) ...
Section 7. Installation Figure 78: Bool8 data from bit-shift example (PC data file) CRBasic Example 47. Programming with Bool8 and a bit‐shift operator Public Alarm(32) Public Flags As Long Public FlagsBool8(4) As Long DataTable(Bool8Data,True,-1) DataInterval(0,1,Sec,10) 'store bits 1 through 16 in columns 1 through 16 of data file Sample(2,FlagsBool8(1),Bool8) 'store bits 17 through 32 in columns 17 through 32 of data file Sample(2,FlagsBool8(3),Bool8)
Page 231
Section 7. Installation 'If bit in OR bit in The result 'Flags Is Bin/Hex Is '---------- ---------- ---------- 'Binary equivalent of Hex: Alarm(1) Then Flags = Flags &h1 &b10 Alarm(3) Then Flags = Flags &h4 &b100 Alarm(4) Then Flags = Flags &h8 &b1000 Alarm(5)
Section 7. Installation Table 32. TABLE. Summary of Analog Voltage Measurement Rates Maximum 100 Hz 600 Hz 2000 Hz Rate Number of Simultaneous Multiple channels Fewer channels One channel Channels Maximum 100% < 100% < 100% Duty Cycle Maximum Measaurements Variable 65535 Per Burst...
Section 7. Installation BeginProg Scan(1,Sec,0,0)'<<<<Measurement rate is determined by Interval and Units VoltSe(FastSE(),1,mV2_5,1,False,100,250,1.0,0) CallTable FastSETable NextScan EndProg By modifying the Interval, Units, and Buffers arguments, VoltSE() can be executed at 100 Hz at 100% duty cycle. The following program measures 16 analog input channels at 100 Hz.
Section 7. Installation Many variations of this 200-Hz measurement program are possible to achieve other burst rates and duty cycles. The SubScan() / NextSubScan instruction pair introduce added complexities. The SubScan() / NextSubScan Details introduces some of these. Caution dictates that a specific configuration be thoroughly tested before deployment.
Section 7. Installation • One more way to view sub-scans is that they are a convenient (and only) way to put a loop around a set of measurements. SubScan() / NextSubScan specifies a timed loop for so many times around a set of measurements that can be driven by the task sequencer.
Section 7. Installation Table 37. Parameters for Analog Burst Mode (601 to 2000 Hz) CRBasic Analog Voltage Description when in Burst Mode Input Parameters A variable array dimensioned to store all measurements from a single channel. For example, the command, FastTemp(500) Destination FastTemp()
Section 7. Installation 7.8.13.1 String Operators The table String Operators list and describes available string operators. (p. 238) String operators are case sensitive. Table 38. String Operators Operator Description Concatenates strings. Forces numeric values to strings before concatenation. & Example 1 &...
Section 7. Installation 7.8.13.2 String Concatenation Concatenation is the building of strings from other strings ("abc123"), characters ("a" or chr()), numbers, or variables. Table 39. String Concatenation Examples Expression Comments Result Str(1) = 5.4 + 3 + " Volts" Add floats, concatenate strings "8.4 Volts"...
Section 7. Installation Some smart sensors send strings containing NULL characters. To manipulate a string that has NULL characters within it (in addition to being terminated with another NULL), use MoveBytes() instruction. 7.8.13.4 Inserting String Characters CRBasic Example 48. Inserting String Characters Objective: Use MoveBytes() to change "123456789" to "123A56789" Given: StringVar(7) = "123456789"...
Section 7. Installation 'Data Tables 'Table output on two intervals depending on condition. 'note the parenthesis around the TriggerVariable AND statements 'Status table datafilldays field is low DataTable(TwoInt,(int_fast TimeIntoInterval(0,5,Sec)) (int_slow TimeIntoInterval(0,15,sec)),-1) Minimum(1,batt_volt,FP2,0,False) Sample(1,PTemp,FP2) Maximum(1,counter(1),Long,False,False) Minimum(1,counter(1),Long,False,False) Maximum(1,deltaT,FP2,False,False) Minimum(1,deltaT,FP2,False,False) Average(1,deltaT,IEEE4,false) EndTable 'Main Program BeginProg Scan(1,Sec,0,0) PanelTemp(PTemp,250)
Section 7. Installation scan times, two separate scans can be used with logic to jump between them. If a PulseCount() is used in both scans, then a PulseCountReset is used prior to entering each scan. 7.8.16 Program Signatures A program signature is a unique integer calculated from all characters in a given set of code.
Section 7. Installation 'function Scan(1,Sec,0,0) ProgSig = Status.ProgSignature 'Set variable to Status table entry '"ProgSignature" RunSig = Status.RunSignature 'Set variable to Status table entry '"RunSignature" x = 24 ExeSig(1) = Signature 'signature includes code since initial 'Signature instruction y = 43 ExeSig(2) = Signature 'Signature includes all code since 'ExeSig(1) = Signature...
Page 245
Section 7. Installation 'Declare Public (viewable) Variables Public Batt_Volt As FLOAT 'Declared as Float Public PTemp_C 'Float by default Public AirTemp_C 'Float by default Public AirTemp_F 'Float by default Public AirTemp2_F 'Float by default Public DeltaT_C 'Float by default Public HowMany 'Float by default Public...
Page 246
Section 7. Installation Minimum(1,AirTemp_C,FP2,0,False) 'Stores temperature minimum in low 'resolution format Sample(1,DeltaT_C, FP2) 'Stores temp difference sample in low 'resolution format Sample(1,HowMany, FP2) 'Stores how many data events in low 'resolution format EndTable BeginProg 'A second way of naming a station is to load the name into a string variable. The is 'place here so it is executed only once, which saves a small amount of program 'execution time.
Section 7. Installation 'Count how many times the DataEvent “DeltaT_C>=3” has occurred. 'TableName.EventCount syntax is used to return the number of data storage events 'that have occurred for an event driven table. This example looks in the data 'table “Event”, which is declared above, and reports the event count. The (1,1) 'after EventCount just needs to be included.
Section 7. Installation 'Main Program BeginProg 'Begin executable section of program Scan(1,Sec,0,0) 'Begin main scan PanelTemp(PTemp,250) Counter1 = Counter1 + 1 NextScan 'End main scan SlowSequence 'Begin slow sequence 'Declare Public Variables for Secondary Scan (can be declared at head of program) Public Batt_Volt Public...
Page 249
Section 7. Installation 'Declare Variables Public PTemp, Batt_Volt, Level, TimeIntoTest Public Counter(10) Public Flag(8) As Boolean 'Define Data Tables DataTable(LogTable,1,-1) Minimum(1,Batt_Volt,FP2,0,False) Sample(1,PTemp,FP2) Sample(1,Level,FP2) Sample(1,TimeIntoTest, FP2) EndTable 'Main Program BeginProg Scan(1,Sec,0,0) TimeIntoInterval(0,1,Min) Then Flag(1) = True Flag(1) = True Then ExitScan NextScan '10 Second Data Interval Flag(1) = True...
Section 7. Installation 'Declare Units Units PTemp_C = deg C Units AirTemp_C = deg C Units DeltaT_C = deg C 'Declare Output Table -- Output Conditional on Delta T >=3 'Table stores data at the Scan rate (once per second) when condition met 'because DataInterval instruction is not included in table declaration.
Section 7. Installation non-standard types. Measured temperatures are compared against the ITS-90 scale, a temperature instrumentation-calibration standard. PRTCalc() follows the principles and equations given in the US ASTM E1137-04 standard for conversion of resistance to temperature. For temperature range 0 to 650 °C, a direct solution to the CVD equation results in errors <...
Section 7. Installation Table 45. PRTCalc() Type-Code-1 Sensor IEC 60751:2008 (IEC 751), alpha = 0.00385. Now internationally adopted and written into standards ASTM E1137-04, JIS 1604:1997, EN 60751 and others. This type code is also used with probes compliant with older standards DIN43760, BS1904, and others. (Reference: IEC 60751.
Section 7. Installation Table 50. PRTCalc() Type-Code-6 Sensor Standard ITS-90 SPRT, alpha = 0.003926 (Reference: Minco / Instrunet) Constant Coefficient 3.9848000E-03 -2.3480000E-06 1.8226630E-05 -1.1740000E-06 1.6319630E+00 -2.4709290E+00 8.8283240E+00 2.5091300E+02 7.8.18.2 Measuring PT100s (100-Ohm PRTs) PT100s (100-ohm PRTs) are readily available. The CR800 can measure PT100s in several configurations, each with its own advantages.
Page 259
Section 7. Installation Figure PT100 in Four-Wire Half-Bridge shows the circuit used to measure a (p. 260) 100-Ω PRT. The 10-kΩ resistor allows the use of a high excitation voltage and a low input range. This ensures that noise in the excitation does not have an effect on signal noise.
Section 7. Installation A terminal-input module (TIM) can be used to complete the circuit shown in figure PT100 in Four-Wire Half-Bridge Refer to the appendix Signal (p. 260). Conditioners for information concerning available TIM modules. (p. 539) Figure 79: PT100 in four-wire half-bridge CRBasic EXAMPLE.
Section 7. Installation Example PRT specifications: • Alpha = 0.00385 (PRTType 1) The temperature measurement requirements in this example are the same as in PT100 in Four-Wire Half-Bridge In this case, a three-wire half-bridge and (p. 258). CRBasic instruction BRHalf3W() are used to measure the resistance of the PRT. The diagram of the PRT circuit is shown in figure PT100 in Three-Wire Half- Bridge (p.
Section 7. Installation CRBasic Example 60. PT100 in Three‐wire Half‐bridge 'See FIGURE. PT100 in Three-Wire Half-Bridge for wiring diagram. (p. 261) Public Rs_Ro Public Deg_C BeginProg Scan(1,Sec,0,0) 'BrHalf3W(Dest,Reps,Range1,SEChan,ExChan,MPE,Ex_mV,True,0,250,100.93,0) BrHalf3W(Rs_Ro,1,mV25,1,Vx1,1,2200,True,0,250,100.93,0) 'PRTCalc(Destination,Reps,Source,PRTType,Mult,Offset) PRTCalc(Deg_C,1,Rs_Ro,1,1.0,0) NextScan EndProg 7.8.18.2.4 PT100 in Four-Wire Full-Bridge Example Shows: • How to measure a PRT in a four-wire full-bridge Advantages: •...
Section 7. Installation where X' = X / 1000 + R ) Thus, to obtain the value R , (R @ 0°C) for the temperature calculating instruction PRTCalc(), the multiplier and offset used in BRFull() are 0.001 and ), respectively. The multiplier (R ) used in the bridge transform algorithm (X = R (X/(X-1)) to obtain R is R...
Section 7. Installation CRBasic Example 61. PT100 in Four‐Wire Full‐Bridge 'See FIGURE. PT100 in Four-Wire Full-Bridge for wiring diagram. (p. 263) Public BrFullOut Public Rs_Ro Public Deg_C BeginProg Scan(1,Sec,0,0) 'BrFull(Dst,Reps,Range,DfChan,Vx1,MPS,Ex,RevEx,RevDf,Settle,Integ,Mult,Offset) BrFull(BrFullOut,1,mV25,1,Vx1,1,2500,True,True,0,250,.001,.02344) 'BrTrans = Rf*(X/(1-X)) Rs_Ro = 50 * (BrFullOut/(1 - BrFullOut)) 'PRTCalc(Destination,Reps,Source,PRTType,Mult,Offset) PRTCalc(Deg_C,1,Rs_Ro,2,1.0,0) NextScan EndProg ...
Page 265
Section 7. Installation Figure Running-Average Frequency Response is a graph of signal (p. 266) attenuation plotted against signal frequency normalized to 1/(running average duration). The signal is attenuated by a synchronizing filter with an order of 1 (simple averaging): Sin(πX) / (πX), where X is the ratio of the input signal frequency to the running-average frequency (running-average frequency = 1 / time length of the running average).
Section 7. Installation The recorded amplitude for this example should be about 1/3 of the input‐signal amplitude. A program was written with two stored variables: Accel2 and Accel2RA. The raw measurement was stored in Accel2, while Accel2RA was the result of performing a running average on the Accel2 variable. Both values were stored at a rate of 500 Hz. Figure Running‐Average Signal Attenuation show the two values (p. 267) plotted in a single graph to illustrate the attenuation (the running‐ average value has the lower amplitude). The resultant delay (delay in time) = (Scan rate)(N‐1)/2 = 2 ms (10‐1)/2 = 9 ms. This is about 1/3 of the input‐signal period. Figure 83: Running-average frequency response 266 ...
8.1 Measurements Several features give the CR800 the flexibility to measure many sensor types. Contact a Campbell Scientific applications engineer if assistance is required in assessing CR800 compatibility to a specific application or sensor type. Some sensors require precision excitation or a source of power. See Powering Sensors and Devices (p.
Section 8. Operation basic code requirements. The DataTime() instruction is a more recent introduction that facilitates time stamping with system time. See Data Table Declarations and CRBasic Editor Help for more information. (p. 453) CRBasic Example 62. Time Stamping with System Time 'Declare Variables Public value 'Declare data table DataTable(Test,True,1000) Sample(1,Value,FP2)
Section 8. Operation instructions BrFull(), BrFull6W(), BrHalf4W(), TCDiff(), and VoltDiff () instructions perform DIFF voltage measurements. Figure 85: PGI amplifier A PGIA processes the difference between the H and L inputs, while rejecting voltages that are common to both inputs. Figure PGIA with Input Signal Decomposition illustrates the PGIA with the input signal decomposed into a (p.
Section 8. Operation is reduced to ±2.5 Vdc, whereas input limits are always ±5 Vdc. Hence for non- negligible DIFF signals, "input limits" is more descriptive than "common-mode range." Note Two sets of numbers indicate analog channel assignments. When differential channels are identified, analog channels are numbered 1 - 3. Each differential channel has two inputs: high (H) and low (L).
Section 8. Operation Sensors with a low signal-to-noise ratio, such as thermocouples, should normally be measured differentially. However, if the measurement to be made does not require high accuracy or precision, such as thermocouples measuring brush-fire temperatures, a single-ended measurement may be appropriate. If sensors require differential measurement, but adequate input channels are not available, an analog multiplexer should be acquired to expand differential input capacity.
Section 8. Operation where Gain Error = ± (2500 * 0.0006) = ±1.5 mV Offset Error = 1.5 • 667 µV + 1 µV = 1.00 mV Therefore, Error = Gain Error + Offset Error = ±1.5 mV + 1.00 µV = ±2.50 mV In contrast, the error for a 500‐mV input under the same constraints is ±1.30 mV. The figure Voltage Measurement Accuracy illustrates (p. 275) the total error with respect to voltage measurements for the ±2500‐mV range. Figure 87: Voltage measurement accuracy (0° to 40°C) ...
Section 8. Operation 8.1.2.5 Voltage Range In general, a voltage measurement should use the smallest fixed-input range that will accommodate the full-scale output of the sensor being measured. This results in the best measurement accuracy and resolution. The CR800 has fixed input ranges for voltage measurements and an auto range to automatically determine the appropriate input voltage range for a given measurement.
Section 8. Operation 8.1.2.5.2 Fixed Voltage Ranges An approximate 9% range overhead exists on fixed input voltage ranges. For example, over-range on the ±2500 mV-input range occurs at approximately +2725 mV and -2725 mV. The CR800 indicates a measurement over-range by returning a NAN (not a number) for the measurement.
Section 8. Operation 8.1.2.6 Offset Voltage Compensation Analog measurement circuitry in the CR800 may introduce a small offset voltage to a measurement. Depending on the magnitude of the signal, this offset voltage may introduce significant error. For example, an offset of 3 μV on a 2500-mV signal introduces an error of only 0.00012%;...
Section 8. Operation When the CR800 reverses differential inputs or excitation polarity, it delays the same settling time after the reversal as it does before the first measurement. So, RevDiff RevEx there are two delays per channel when either is used. If both RevDiff RevEx are True, four measurements are performed;...
Section 8. Operation duration. Consequently, noise at 1 / (integer multiples) of the integration duration is effectively rejected by an analog integrator. table CRBasic Measurement Integration Times and Codes lists three integration durations available in the (p. 280) CR800 and associated CRBasic codes. If reversing the differential inputs or reversing the excitation is specified, there are two separate integrations per measurement;...
Section 8. Operation Figure 88: Ac power line noise rejection techniques ac Noise Rejection on Large Signals If rejecting ac-line noise when measuring with the 2500 mV (mV2500) and 5000 mV (mV5000) ranges, the CR800 makes two fast measurements separated in time by one-half line cycle (see figure ac Power Line Noise Rejection Techniques (p.
Section 8. Operation Table 56. ac Noise Rejection on Large Signals 2. During A/D, CR800 turns off excitation for ≈170 µs. 3. Excitation is switched on again for one-half cycle, then the second measurement is made. Restated, when the CR800 is programmed to use the half-cycle 50-Hz or 60-Hz rejection techniques, a sensor does not see a continuous excitation of the length entered as the settling time before the second measurement if the settling time entered is greater than one-half cycle.
Section 8. Operation Table 57. CRBasic Measurement Settling Times Settling Input Time Voltage Integration Settling Entry Range Code Time 450 µs (default) _50Hz 3 ms (default) _60Hz 3 ms (default) >100 μs entered Minimum settling time required to allow the input to settle to CR800 resolution specifications. X is an integer >100.
Page 284
Section 8. Operation steady-state conditions so changes in measured voltage are attributable to settling time rather than changes in pressure. Reviewing the section Programming (p. 108) may help in understanding the CRBasic code in the example. The first six measurements are shown in table First Six Values of Settling-Time Data Each trace in figure Settling Time for Pressure Transducer (p.
Note Self-calibration requires the CR800 to have an internal voltage standard. The internal voltage standard should periodically be calibrated by Campbell Scientific. When high-accuracy voltage measurements are required, a two-year calibration cycle is recommended.
Page 286
Section 8. Operation Unless a Calibrate() instruction is present in the running CRBasic program, the CR800 automatically performs self-calibration during spare time in the background as an automatic slow sequence with a segment of the (p. 138), calibration occurring every 4 seconds. If there is insufficient time to do the background calibration because of a scan-consuming user program, the CR800 will display the following warning at compile time: "Warning when Fast Scan x is running background calibration is disabled".
Section 8. Operation measurements (B) to be determined during CR800 self-calibration (maximum of 54 values). These values can be viewed in the Status table, with entries identified as listed in table Status Table Calibration Entries (p. 287). Automatic self-calibration can be overridden with the Calibrate() instruction, which forces a calibration for each execution, and does not employ any low-pass filtering on the newly determined G and B values.
Page 288
Section 8. Operation Table 59. Status Table Calibration Entries Descriptions of Status Table Elements Status Table Element Differential (Diff) ±mV Input Offset or Gain Integration Single-Ended (SE) Range CalGain(18) Gain 50-Hz Rejection CalSeOffset(1) Offset 5000 250 ms CalSeOffset(2) Offset 2500 250 ms CalSeOffset(3) Offset...
Section 8. Operation Table 59. Status Table Calibration Entries Descriptions of Status Table Elements Status Table Element Differential (Diff) ±mV Input Offset or Gain Integration Single-Ended (SE) Range CalDiffOffset(16) Diff Offset 50-Hz Rejection CalDiffOffset(17) Diff Offset 50-Hz Rejection CalDiffOffset(18) Diff Offset 50-Hz Rejection ...
Section 8. Operation A/D (analog-to-digital) conversion time = 15 µs Reps/No Reps -- If Reps > 1 (i.e., multiple measurements by a single instruction), no additional time is required. If Reps = 1 in consecutive voltage instructions, add 15 µs per instruction. 8.1.3 Resistance Measurements Many sensors detect phenomena by way of change in a resistive circuit.
Section 8. Operation Table 61. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and CRBasic Instruction and Circuit Diagram Fundamental Relationship Relationships Half-Bridge CRBasic Instruction: BrHalf() Fundamental Relationship Three-Wire Half-Bridge CRBasic Instruction: BrHalf3W() Fundamental Relationship Four-Wire Half-Bridge CRBasic Instruction: BrHalf4W() Fundamental Relationship These relationships apply to BrFull() Full-Bridge and BrFull6W().
Section 8. Operation Table 61. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and CRBasic Instruction and Circuit Diagram Fundamental Relationship Relationships Key: V = excitation voltage; V = sensor return voltages; R = "fixed", "bridge" or "completion" resistor; R = "variable" or "sensing"...
Section 8. Operation Other sensors, e.g., LVDTs (linear variable differential transformers), require an ac excitation because they rely on inductive coupling to provide a signal. dc excitation will provide no output. CR800 bridge measurements can reverse excitation polarity to provide ac excitation and avoid ion polarization.
Section 8. Operation • Effects due to the following are not included in the specification: Bridge-resistor errors Sensor noise Measurement noise The ratiometric-accuracy specification is applied to a three-wire half-bridge measurement that uses the BrHalf() instruction as follows: The relationship defining the BrHalf() instruction is X = V1/Vx, where V1 is the voltage measurement and Vx is the excitation voltage. The estimated accuracy of X is designated as ∆X, where ∆X = ∆V1/Vx. ∆V1 is ...
Section 8. Operation 8.1.3.3 Strain Calculations Read More! The FieldCalStrain() Demonstration Program section has (p. 154) more information on strain calculations. A principal use of the four-wire full bridge is the measurement of strain gages in structural stress analysis. StrainCalc() calculates microstrain, με, from an appropriate formula for the particular strain bridge configuration used.
If an external reference junction is to be used, Campbell Scientific strongly encourages users to carefully evaluate relevant parts of the Thermocouple Measurements section of the CR1000 Datalogger Operator's Manual, which is available at www.campbellsci.com.
Section 8. Operation instruction. PulseCount() instruction functions include returning counts or frequency on frequency or switch-closure signals. TimerIO() instruction has additional capabilities. Its primary function is to measure the time between state transitions. Note Consult CRBasic Editor Help for more information on PulseCount() and TimerIO() instructions.
Note Input-channel expansion devices for all input types are available from Campbell Scientific. Refer to Sensors and Peripherals for more information. Caution Maximum input voltage on pulse channels P1 through P2 is ±20 V. If pulse inputs of higher than ±20 V need to be measured, third-party external-signal...
Section 8. Operation Figure 94: Pulse-input channels 8.1.5.1.1 High-frequency Pulse (P1 - P2) High-frequency pulse inputs are routed to an inverting CMOS input buffer with input hysteresis. The CMOS input buffer is an output zero level with its input ≥ 2.2 V, and an output one level with its input ≤...
Read More! Review digital I/O channel specifications in CR800 Specifications Caution Contact Campbell Scientific for signal conditioning information if a pulse input < -8.0 or > +16 Vdc is to be measured. Under no circumstances should voltages greater than ±50 V be connected to channels C1 – C4.
Section 8. Operation 8.1.5.2.2 Low-Frequency Mode Low-frequency mode enables edge timing and measurement of period (not period averaging) and frequency. For information on period averaging, see Period Averaging (p. 307). Edge Timing (C1 - C4) Time between pulse edges can be measured. Results can be expressed in terms of microseconds or Hertz.
Section 8. Operation Figure 95: Connecting switch closures to digital I/O Using a pull-up resistor on digital I/O channels C1 - C4 8.1.5.3.1 Frequency Resolution Frequency resolution of a PulseCount() frequency measurement is calculated as where: FR = Resolution of the frequency measurement (Hz) S = Scan Interval of CRBasic Program Resolution of TimerIO() instruction is: where: FR = Frequency resolution of the measurement (Hz) ...
Section 8. Operation R = Timing resolution of the TimerIO() measurement = P = Period of input signal (seconds). For example, P = 1 / 1000 Hz = 0.001 s E = Number of rising edges per scan or 1, whichever is greater. Table 65. Example. E for a 10 Hz input signal Scan Rising Edge / Scan 0.05 TimerIO() instruction measures frequencies of ≤ 1 kHz with higher frequency resolution over short (sub-second) intervals. In contrast, sub-second frequency measurement with PulseCount() produce measurements of lower resolution.
Section 8. Operation frequency is not varying over the execution interval. The calculation returns the average regardless of how the signal is changing. 8.1.5.4 Pulse Measurement Problems 8.1.5.4.1 Pay Attention to Specifications The table Example of Differing Specifications for Pulse Input Channels (p.
Section 8. Operation Table 68. Time Constants (τ) Measurement τ See table Filter Attenuation of Pulse channel, low-level ac mode Frequency Signals footnote (p. 306) Digital I/O, high-frequency mode 0.025 Digital I/O, switch-closure mode 0.025 Table 69. Filter Attenuation of Frequency Signals. As shown for low-level ac inputs, increasing voltage is required at increasing frequencies to overcome filter attenuation on pulse-input channels*.
Section 8. Operation 8.1.5.4.3 Switch Bounce and NAN NAN will be the result of a TimerIO() measurement if one of two conditions occurs: 1. timeout expires 2. a signal on the channel is too fast (> 3 KHz) When the input channel experiences this type of signal, the CR800 operating system disables the interrupt that is capturing the precise time until the next scan is serviced.
Section 8. Operation Figure 97: Input conditioning circuit for period averaging 8.1.7 SDI-12 Recording Read More! SDI-12 Sensor Support and Serial Input / Output (p. 173) (p. 487). SDI-12 is a communications protocol developed to transmit digital data from smart sensors to data-acquisition units. It is a simple protocol, requiring only a single communication wire.
Current Limiting Resistor in a Rain Gage Circuit a 100-ohm (p. 309), resistor is connected in series at the switch to prevent arcing. This resistor is installed on all rain gages currently sold by Campbell Scientific. Figure 99: Current limiting resistor in a rain gage circuit ...
RS-232 sensor cable lengths should be limited to 50 feet. 8.1.10.4 SDI-12 Sensors The SDI-12 standard allows cable lengths of up to 200 feet. Campbell Scientific does not recommend SDI-12 sensor lead lengths greater than 200 feet; however, longer lead lengths can sometimes be accommodated by increasing the wire gage or powering the sensor with a second 12-Vdc power supply placed near the sensor.
C1, C2 and C3. Read More! For complete information on available measurement and control peripherals, go to the appendix Sensors and Peripherals www.campbellsci.com, or contact a Campbell Scientific applications engineer. ...
8.2.3 Serial-Input Expansion Modules Capturing input from intelligent serial-output devices can be challenging. Several Campbell Scientific serial I/O modules are designed to facilitate reading and parsing serial data. Campbell Scientific recommends consulting with an applications engineer when deciding which serial-input module is suited to a particular application.
Section 8. Operation Figure 100: Control port current sourcing 8.2.4.2 Relays and Relay Drivers Several relay drivers are manufactured by Campbell Scientific. For more information, see the appendix Relay Drivers contact a Campbell Scientific (p. 541), applications engineer, or go to www.campbellsci.com.
Section 8. Operation Figure 101: Relay driver circuit with relay Figure 102: Power switching without relay 8.2.5 Analog Control / Output Devices The CR800 can scale measured or processed values and transfer these values in digital form to an analog output device. The analog output device performs a digital-to-analog conversion to output an analog voltage or current.
Section 8. Operation 8.2.6 TIMs Terminal Input Modules (TIMs) are devices that provide simple measurement- support circuits in a convenient package. TIMs include voltage dividers for cutting the output voltage of sensors to voltage levels compatible with the CR800, modules for completion of resistive bridges, and shunt modules for measurement of analog-current sensors.
Section 8. Operation Table 71. CR800 SRAM Memory Comments Static Memory Operational memory used by the operating system regardless of the user program. This sector is rebuilt at power-up, program re-compile, and watchdog events. ---------------------------------- Operating Settings and Properties "Keep" memory. Stores settings such as PakBus address, station name, beacon intervals, neighbor lists, etc.
SRAM and the CPU: drive are automatically partitioned for use in the CR800. The USR: drive can be partitioned as needed. The USB: drive is automatically partitioned when a Campbell Scientific mass-storage device is connected. Table 72. Data-Storage Drives Drive...
File Control (p. 431) window. 8.3.1.1.4 USB: Drive USB: drive uses Flash memory on a Campbell Scientific mass storage device (see the appendix Mass Storage Devices ). Its primary purpose is the storage of ASCII data files.
Fully compatible formats are indicated with an asterisk. A more detailed discussion of data file formats is available in the Campbell Scientific publication LoggerNet Instruction Manual available at www.campbellsci.com. Table 73. TableFile()-Instruction Data-File Formats...
Page 321
Section 8. Operation Data-File Format Examples TOB1 TOB1 files may contain an ASCII header and binary data. The last line in the example contains cryptic text which represents binary data. Example: "TOB1","11467","CR1000","11467","CR1000.Std.20","CPU:file format.CR1","61449","Test" "SECONDS","NANOSECONDS","RECORD","battfivoltfiMin","PTemp" "SECONDS","NANOSECONDS","RN","","" "","","","Min","Smp" "ULONG","ULONG","ULONG","FP2","FP2" }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' TOA5 TOA5 files contain ASCII header and comma‐separated data. (p. 425) Example: "TOA5","11467","CR1000","11467","CR1000.Std.20","CPU:file format.CR1","26243","Test" "TIMESTAMP","RECORD","battfivoltfiMin","PTemp" "TS","RN","","" "","","Min","Smp" "2010-12-20 11:31:30",7,13.29,20.77 "2010-12-20 11:31:45",8,13.26,20.77 "2010-12-20 11:32:00",9,13.29,20.8 CSIXML CSIXML files contain header information and data in an XML (p. 448) format. ...
Section 8. Operation empty string. There will be one descriptor for each field name given on Header Line 2. Record Element 1 – Timestamp Data without timestamps are usually meaningless. Nevertheless, the TableFile() instruction optionally includes timestamps in some formats. Record Element 2 – Record Number Record numbers are optionally provided in some formats as a means to ensure data integrity and provide an up‐count data field for graphing operations. The maximum record number is &hffffffff (a 32‐bit number), then the record number sequence restarts at zero. The CR800 reports back to the datalogger support software 31 bits, or a maximum of &h7fffffff, then it restarts at 0. If the record number increments once a second, restart at zero will occur about once every 68 years. 8.3.2 Memory Conservation One or more of the following memory-saving techniques can be used on the rare occasions when a program reaches memory limits: •...
Table 74. File-Control Functions File-Control Functions Accessed Through Program Send , File Control Send DevConfig , keyboard with Campbell Scientific mass-storage media (USB: drive) , power-up Sending programs to the CR800 with Campbell Scientific mass-storage media (USB: drive) , web API HTTPPut (Sending a File to a Datalogger) 324 ...
Page 325
Datalogger support software File Control (p. 431) utility Device Configuration Utility (DevConfig) software (p. 92) Manual with Campbell Scientific mass-storage media (USB: drive). See Data Storage (p. 318) Automatic with Campbell Scientific mass-storage media (USB: drive) and Powerup.ini. See Power-up (p.
(p. 431) Support software File Control See software Help & Preserving Data at Program Send (p. 431). 110). Automatic on power-up of CR800 with Campbell Scientific mass-storage media (USB: drive) and Powerup.ini. See Power-up (p. 327). 8.3.4.2 Data Preservation Associated with file attributes is the option to preserve data in CR800 memory when a program is sent.
Section 8. Operation Table 76. Data-Preserve Options if "Preserve data if no table changed" if current program = overwritten program keep CPU data keep cache data else erase CPU data erase cache data end if end if if "erase data" erase CPU data erase cache data end if...
Section 8. Operation • Formatting memory drives. • Deleting data files associated with the previously running program. Note Back in the old days of volatile RAM, life was frustrating, but simple. Lost power meant lost programs, variables, and data – a clean slate. The advent of non- volatile memory has saved a lot of frustration in the field, but it requires thought in some applications.
Section 8. Operation • File = accompanying operating system or user program file. Name can be up to 22 characters long. • Device: the CR800 memory drive to which the accompanying operating system or user program file is copied (usually CPU:). If left blank or with an invalid option, default device will be CPU:.
Section 8. Operation Example Power-up.ini Files Powerup.ini Example 'Code format and syntax 'Command = numeric power-up command 'File = file associated with the action 'Device = device to which File is copied. Defaults to CPU: 'Command,File,Device 13,Write2CRD_2.cr1,cpu: Powerup.ini Example 'Copy program file pwrup.cr1 from the external drive to CPU: 'File will run only when CR800 powered-up later.
Section 8. Operation 8.3.5 File Names The maximum size of the file name that can be stored, run as a program, or FTP transferred in the CR800 is 59 characters. If the name is longer than 59 characters, an Invalid Filename error is displayed. If several files are stored, each with a long filename, memory allocated to the root directory can be exceeded before the actual memory of storing files is exceeded.
Systems usually require a single type of hardware and carrier signal. Some applications, however, require hybrid systems that utilize two or more hardware and signal carriers. Contact a Campbell Scientific applications engineer for assistance in configuring any telecommunications system. Synopses of software to support the various telecommunications devices and...
Section 8. Operation 8.4.1 Hardware and Carrier Signal Campbell Scientific supplies or recommends a wide range of telecommunications hardware. Table CR800 Telecommunications Options lists (p. 333) telecommunications destination, device, path, and carrier options which imply certain types of hardware for use with the CR800 datalogger. Information in table CR800 Telecommunications Options is conceptual.
Callback via telephone is well documented in CRBasic Editor Help (search term "callback"). For more information on other available Callback features, manuals for various telecommunications hardware may discuss Callback options. Contact a Campbell Scientific applications engineer for the latest information in Callback applications. Caution When using the ComME communications port with non- PakBus®...
PakBus addresses are set using DevConfig, PakBusGraph, CR800 Status table, or with an external keyboard / display. DevConfig (Device Configuration Utility) is the primary settings editor for Campbell Scientific equipment. It requires a hardwire RS-232 connection to a PC and allows backup of settings on the PC hard drive.
Section 8. Operation 8.5.3.3 Hello-request (one-way broadcast) All nodes hearing a hello-request broadcast (existing and potential neighbors) will issue a hello-message to negotiate or re-negotiate a neighbor relationship with the broadcasting node. 8.5.3.4 Neighbor Lists PakBus® devices in a network can be configured with a neighbor list. The CR800 sends out a hello-message to each node in the list whose CVI has expired at a random interval .
Section 8. Operation 8.5.4 PakBus Troubleshooting Various tools and methods have been developed to assist in troubleshooting PakBus® networks. 8.5.4.1 Link Integrity With beaconing or neighbor-filter discovery, links are established and verified using relatively small data packets (hello-messages). When links are used for regular telecommunications, however, longer messages are used.
Section 8. Operation than one hop away. Table PakBus Link-Performance Gage provides a link- (p. 340) performance gage. Table 81. PakBus Link-Performance Gage 500 byte Pings Sent Successes Link Status excellent good adequate <7 marginal 8.5.4.3 Traffic Flow Keep beacon intervals as long as possible with higher traffic (large numbers of nodes and / or frequent data collection).
Section 8. Operation 8.5.6 PakBus LAN Example ® To demonstrate PakBus networking, a small LAN (Local Area Network) of CR800s can be configured as shown in figure Configuration and Wiring of PakBus LAN A PC running LoggerNet uses the RS-232 port of the first (p.
Section 8. Operation 8.5.6.2 LAN Setup Configure CR800s before connecting them to the LAN: 1. Start Device Configuration Utility (DevConfig). Click on Device Type: CR800. Follow on-screen instructions to power CR800s and connect them to the PC. Close other programs that may be using the PC COM port, such as LoggerNet, PC400, PC200W, HotSync, etc.
Section 8. Operation Figure 111: LoggerNet Network-Map Setup: PakBusPort As shown in figure LoggerNet Device Map Setup: PakBusPort set the (p. 345), PakBusPort maximum baud rate to 115200. Leave other settings at the defaults. Figure 112: LoggerNet Device Map Setup: Dataloggers ...
Header level information needed for routing is not encrypted. Encryption uses the AES-128 algorithm. Campbell Scientific products supporting PakBus encryption include the following: • LoggerNet 4.2 •...
(p. 438) Overview ). Modbus, DNP3, and Web API are also supported. CAN bus is (p. 334) supported when using the Campbell Scientific SDM-CAN communications module. 8.6.1 DNP3 8.6.1.1 Overview The CR800 is DNP3 SCADA compatible. DNP3 is a SCADA protocol primarily used by utilities, power-generation and distribution networks, and the water- and wastewater-treatment industry.
Section 8. Operation Table 83. DNP3 Implementation — Data Types Required to Store Data in Public Tables for Object Groups Data Type Group Description Boolean Binary input Binary input change Binary output Control block Long Analog input Analog change event Analog output status Analog output block Time and date...
Section 8. Operation Syntax DNPUpdate (DNPSlaveAddr,DNPMasterAddr) 8.6.1.2.3 Programming for Data-Acquisition As shown in CRBasic example Implementation of DNP3 program the (p. 349), CR800 to return data when polled by the DNP3 master using the following three actions: 1. Place DNP() at the beginning of the program between BeginProg and Scan(). Set COM port, baud rate, and DNP3 address.
Section 8. Operation 'Object group 30, variation 2 is used to return analog data when the CR800 'is polled. Flag is set to an empty 8 bit number(all zeros), DNPEvent is a 'reserved parameter and is currently always set to zero. Number of events is 'only used for event data.
8.6.2.2 Terminology Table Modbus to Campbell Scientific Equivalents lists terminology (p. 351) equivalents to aid in understanding how CR800s fit into a SCADA system. Table 84. Modbus to Campbell Scientific Equivalents Modbus Domain Data Form Campbell Scientific Domain Coils Single Bit...
Section 8. Operation RTU / PLC Remote Telemetry Units (RTUs) and Programmable Logic Controllers (PLCs) were at one time used in exclusive applications. As technology increases, however, the distinction between RTUs and PLCs becomes more blurred. A CR800 fits both RTU and PLC definitions. 8.6.2.3 Programming for Modbus 8.6.2.3.1 Declarations Table CRBasic Ports, Flags, Variables, and Modbus Registers shows the (p. 352) linkage between CR800 ports, flags and Boolean variables and Modbus registers. Modbus does not distinguish between CR800 ports, flags, or Boolean variables. By declaring only ports, or flags, or Boolean variables, the declared feature is addressed by default.
Section 8. Operation Syntax MoveBytes(Dest, DestOffset, Source, SourceOffset, NumBytes) 8.6.2.3.3 Addressing (ModbusAddr) Modbus devices have a unique address in each network. Addresses range from 1 to 247. Address 0 is reserved for universal broadcasts. When using the NL100, use the same number as the Modbus and PakBus® address. 8.6.2.3.4 Supported Function Codes (Function) Modbus protocol has many function codes.
Section 8. Operation 8.6.2.5 Modbus over IP Modbus over IP functionality is an option with the CR800. Contact Campbell Scientific for details. 8.6.2.6 Modbus tidBytes Can Modbus be used over an RS‐232 link, 7 data bits, even parity, one stop bit? Yes. Precede ModBusMaster() / ModBusSlave() with SerialOpen() and set the numeric format of the COM port with any of the available formats, including the option of 7 data bits, even parity. SerialOpen() and ModBusMaster() can be used once and placed before Scan(). Concatenating two Modbus long 16‐bit variables to one Modbus long 32 bit number. 8.6.2.7 Converting 16-bit to 32-bit Longs Concatenation of two Modbus long 16‐bit variables to one Modbus long ...
Send files Collect files The full command set is available in the most recent CR800 operating system (see operating system in the glossary). API commands are also used with Campbell Scientific’s RTMC web server datalogger support software The following (p. 76).
Section 8. Operation Four levels of access are available through Basic Access Authentication: • all access denied (Level 0) • all access allowed (Level 1) • set variables allowed (Level 2) • read-only access (Level 3) Multiple user accounts and security levels can be defined. .csipasswd is created and edited in the Device Configuration Utility (DevConfig) software Net (p.
Section 8. Operation and arguments and the commands wherein they are used. Parameters and arguments for specific commands are listed in the following sections. Table 87. API Commands, Parameters, and Arguments Commands in which the Parameter parameter is used Function of parameter Argument(s) Specifies the data source.
Section 8. Operation DataQuery Specifies ending date and/or time expressed in defined date-range time when using format (see Time Syntax argument. section) 358) value SetValueEx Specifies the new value. numeric or string time ClockSet Specifies set time. time in defined format action FileControl Specifies FileControl action.
Section 8. Operation Table 88. BrowseSymbols API Command Parameters Optional. Specifies the URI for the data source. When (p. 447) source, tablename querying a CR800, and fieldname are optional. If source is not specified, (CR800) is assumed. A field name is always specified in association with a table name. If the field name is not specified, all fields are output.
Page 360
Section 8. Operation Boolean value that is set to true if the symbol is considered to be read-only. A value of false would indicate an expectation is_read_only that the symbol value can be changed using the SetValueEx command. Boolean value that is set to true if the symbol has child values can_expand that can be listed using the BrowseSymbols command.
Page 361
Section 8. Operation <td>BallastLine</td><td>dl:BallastLine</td><td>6</td><td>true</t d><td>false</td><td>true</td></tr><tr> <td>Public</td><td>dl:Public</td><td>6</td><td>true</td><td>fals e</td><td>true</td></tr> </table> </body> </html> XML Response format When is entered in the BrowseSymbols parameter, the response will be formated as CSIXML with a BrowseSymbolsResponse root element (p. 68) name. Following is an example response. Example page source output: <BrowseSymbolsResponse>...
Section 8. Operation is_read_only="false" can_expand="true"/><symbol name="Public" uri="dl:Public" type="6" is_enabled="true" is_read_only="false" can_expand="true"/> </BrowseSymbolsResponse> JSON Response When json is entered in the BrowseSymbols format parameter, the response will be formated as CSIJSON Following is an example response. (p. 68). "symbols": [ {"name": "Status","uri": "dl:Status","type": 6,"is_enabled": true,"is_read_only": false,"can_expand": true}, {"name": "MainData","uri": "dl:MainData","type": 6,"is_enabled": true,"is_read_only": false,"can_expand": true},...
Section 8. Operation Table 90. DataQuery API Command Parameters for data to be queried. Syntax: dl:tablename.fieldname. Field Optional. Specifies the URI (p. 447) name is optional. Field name is always specified in association with a table name. If field name is not specified, all fields are collected.
Page 364
Section 8. Operation http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=most-recent&p1=70 Response: collect the five most recent records from table MainData* http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=since-time&p1=2012-09-14T8:00:00 Response: collect all records of field Cond41 since the specified date and time* http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=since-record&p1=4700 Response: collect all records since the specified record* http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=backfill&p1=7200 Response: backfill all records since 3600 seconds ago* DataQuery Response The DataQuery format parameter determines the format of the response. For more detail concerning data response formats, see the Data File Formats section. When html is entered in the DataQuery...
Page 366
.."no": 108, .."vals": [66] TOA5 Response toa5 format When is entered in the DataQuery parameter, the response will be formated as Campbell Scientific TOA5. Following is an example response: "TOA5","TXSoil","CR1000","No_SN","CR1000.Std.25","TexasRun_1b.CR 2","12645","_1Hr" "TIMESTAMP","RECORD","ID","_6_inch","One","Two","Three","Temp_F_ Avg","Rain_in_Tot" "TS","RN","","","","","","","" "","","Smp","Smp","Smp","Smp","Smp","Avg","Tot" "2012-05-03 17:00:00",0,0,-0.8949984,-0.95232,-0.8949984,- 0.8637322,2.144136,0.09999999 "2012-05-03 18:00:00",1,0,-0.9106316,-0.9731642,-0.9210536,- 0.8845763,72.56885,0...
Page 367
"2012-05-05 21:00:00",10,5,-0.930173,-0.9822836,-0.9197509,- 0.8832736,70.1116,0 "2012-05-05 22:00:00",11,5,-0.9132372,-0.9653476,-0.908026,- 0.8611265,70.0032,0 "2012-05-05 23:00:00",12,5,-0.9353842,-0.9822836,-0.930173,- 0.8936957,69.83805,0 TOB1 Response tob1 format When is entered in the DataQuery parameter, the response will be formated as Campbell Scientific TOB1. Following is an example response. Example: "TOB1","11467","CR1000","11467","CR1000.Std.20","CPU :file format.CR1","61449","Test" "SECONDS","NANOSECONDS","RECORD","battfivoltfiMin"," PTemp" ...
Section 8. Operation "SECONDS","NANOSECONDS","RN","","" "","","","Min","Smp" "ULONG","ULONG","ULONG","FP2","FP2" }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' 8.6.3.5 Control CRBasic program language logic can be configured to allow remote access to many control functions by means of changing the value of a variable. 8.6.3.5.1 SetValueEx Command SetValueEx allows a web client to set a value in a host CR800 CRBasic variable.
Section 8. Operation SetValueEx Response format The SetValueEx parameter determines the format of the response.. If a format is not specified, the format defaults to HTML For more detail concerning data response formats, see the Data File Formats section. Responses contain two fields. In the XML output, the fields are attributes. Table 92.
Section 8. Operation XML Response When is entered in the SetValueEx format parameter, the response will be CSIXML with a SetValueExResponse root element name.. Following is an example response: <SetValueExResponse outcome="outcome-code" description="description-text"/> JSON Response json format When is entered in the SetValueEx parameter, the response will be CSIJSON.
Section 8. Operation ClockSet Response format The ClockSet parameter determines the format of the response. If a format is not specified, the format defaults to HTML. For more detail concerning data response formats, see the Data File Formats section. Responses contain three fields as described in the following table: Table 94.
Section 8. Operation JSON Response json format When is entered in the ClockSet parameter, the response will be formated as CSIJSON Following is an example response. (p. 68). {"outcome": 1,"time": "2011-12-01T11:40:32.61","description": " The clock was set"} 8.6.3.6.2 ClockCheck Command ClockCheck allows a web client to read the real-time clock from the host CR800. DataQuery takes the form: http://ip_address/?command=ClockCheck&format=html ClockCheck requires a minimum .csipasswd access level of 3 (read-only).
Page 373
Section 8. Operation Specifies the current value of the CR800 real-time clock . This value will only be valid if the value of outcome is set to 1. This time value will be formatted in the same way that record time stamps are formatted for the DataQuery response.
Section 8. Operation 8.6.3.7 Files Management Web API commands allow a web client to manage files on host CR800 memory drives. Camera image files are examples of collections often needing frequent management. 8.6.3.7.1 Sending a File to a Datalogger A file can be sent to the CR800 using an HTTPPut request. Sending a file requires a minimum .csipasswd access level of 1 (all access allowed).
Section 8. Operation *Done waiting for 100-continue <HTTP/1.1 200 OK <Date: Fri, 2 Dec 2011 05:31:50 <Server: CR1000.Std.25 <Content-Length: 0 < * Connection #0 to host 192.168.7.126 left intact * Closing connection #0 When a file with extension .OBJ is uploaded to the CR800 CPU: drive, the CR800 sees the file as a new operating system (OS) and does not actually upload it to CPU:.
Section 8. Operation Table 98. FileControl API Command Parameters file 1 — Compile and run the file specified by and mark it as the program to be run on power up. file 2 — Mark the file specified by as the program to be run on power up. file 3 —...
Section 8. Operation FileControl Response action All output formats contain the following parameters. Any (for example, 9) that performs a reset, the response is returned before the effects of the command are complete. Table 99. FileControl API Command Response A response of zero indicates success. Non-zero indicates failure. outcome Specifies the number of seconds that the web client should wait before attempting more communication with the station.
Section 8. Operation Examples: http://192.168.24.106/?command=ListFiles Response: returns the drive structure of the host CR800 (CPU:, USR:, CRD:, and USB:). http://192.168.24.106/CPU/?command=ListFiles Response: lists the files on the host CR800 CPU: drive. ListFiles Response format The format of the response depend on the value of the parameter in the command request. The response provides information for each of the files or directories that can be reached through the CR800 web server. The information for each file includes the following: Table 101.
Page 379
Section 8. Operation HTML page source: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>ListFiles Response</title></head> <body><h1>ListFiles Response</h1><table border="1"> <tr><td><b>Path</b></td> <td><b>Is Directory</b></td> <td><b>Size</b></td> <td><b>Last Write</b></td> <td><b>Run Now</b></td> <td><b>Run On Power Up</b></td> <td><b>Read Only</b></td> <td><b>Paused</b></td></tr><tr> <td>CPU/</td> <td>true</td>...
Section 8. Operation <file is_dir="false" path="CPU:lights-web.cr1" last_write="yyyy-mm-ddThh:mm:ss.xxx" size="16994" run_now="true" run_on_power_up="true" read_only="false" paused="false"/> </ListFilesResponse> JSON Response json format When is entered in the ListFiles parameter, the response will be formated as CSIJSON Following is an example response. (p. 68). "files": [ "path": "CPU:", "is_dir": true, "size": 50000,...
Development Kits ) are available to address applications not directly satisfied by standard software products. Limited support software for PDA and Linux applications are also available. Read More! A complete listing of Campbell Scientific software available for use with the CR800 is available in the appendix Software (p. 546).
Section 8. Operation Table 103. Special Keyboard-Display Key Functions Special Function [2] and [8] Navigate up and down through the menu list one line at a time [Enter] Selects the line or toggles the option of the line the cursor is on Back up one level in the menu [Esc] [Home]...
Section 8. Operation 8.8.1.1 Real-Time Tables and Graphs Figure 115: Real-time tables and graphs 8.8.1.2 Real-Time Custom The external keyboard / display can be configured with a user-defined, real-time display. The CR800 will keep the setup if the same program is running, or until it is changed by the user.
Section 8. Operation 8.8.3.1 File: Edit The CRBasic Editor is recommended for writing and editing datalogger programs. When making minor changes in the field with the external keyboard / display, restart the program to activate the changes. Figure 120: File: edit ...
Section 8. Operation 8.8.4 Ports and Status Read More! See the appendix Status Table and Settings (p. 505). Figure 121: Ports and status 8.8.5 Settings Figure 122: Settings 392 ...
Section 8. Operation 8.8.5.1 Set Time / Date Move the cursor to time element and press Enter to change it. Then move the cursor to Set and press Enter to apply the change. 8.8.5.2 PakBus Settings In the Settings menu, move the cursor to the PakBus® element and press Enter to change it.
Page 394
Section 8. Operation Q: Why compress a program or operating system before sending it to a CR800 datalogger? A: Compressing a file has the potential of significantly reducing its size. Actual reduction depends primarily on the number and proximity of redundant blocks of information in the file.
Section 8. Operation c) When prompted, set the archive format to “Gzip”. d) Select OK. The resultant file names will be of the type “myProgram.cr8.gz” and “CR800.Std.25.obj.gz”. Note that the file names end with “.gz”. The ".gz” extension must be preceded with the original file extension (.cr8, .obj) as shown. ...
The desiccant is replaced whenever the CR800 is repaired at Campbell Scientific. The module should not be opened by the user except to replace the lithium coin cell providing back up power to the clock and SRAM.
Section 9. Maintenance Time. Clock will need resetting when the battery is replaced. Final-storage data tables. A replacement lithium battery (pn 13519) can be purchased from Campbell Scientific or another supplier. Table Internal Lithium-Battery Specifications (p. 398) lists battery specifications.
Section 9. Maintenance Figure 125: Pulling edge away from panel Pull one edge of the canister away from the wiring panel to loosen it from three connector seatings. Figure 126: Removing nuts to disassemble canister Remove six nuts, then open the clam shell. ...
To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 227-2342. After an applications engineer determines the nature of the problem, an RMA number will be issued. Please write this number clearly on the outside of the shipping container. Campbell Scientific's shipping address is: CAMPBELL SCIENTIFIC, INC. ...
Page 401
Section 9. Maintenance form must be either emailed to repair@campbellsci.com or faxed to 435-227- 9579. Campbell Scientific is unable to process any returns until we receive this form. If the form is not received within three days of product receipt or is incomplete, the product will be returned to the customer at the customer's expense.
When using sensors, peripheral devices, or telecommunications hardware, look to the manuals for those products for additional help. Note If a Campbell Scientific product needs to be returned for repair or recalibration, a Return Materials Authorization number is first required.
"Mem3 fail" messages are not caused by user error, and only rarely by a hardware fault. Report any occurrence of this error to a Campbell Scientific applications engineer, especially if the problem is reproducible. Any program generating these errors is unlikely to be running correctly.
Section 10. Troubleshooting Table 106. Warning Message Examples Example of Warning Message Meaning calibration. An invalid external sensor signal applying a voltage beyond the internal ±8-Vdc supplies on a voltage input can induce this error. Removing the offending signal and powering up the logger will initiate a new self-calibration.
Non-zero indicates the CR800 has crashed, which can be caused by power or transient-voltage problems, or an operating-system or hardware problem. If power or transient problems are ruled out, the CR800 probably needs an operating-system update or repair by Campbell Scientific. (p. 3) 406 ...
Debugging beyond the source of the watchdog is quite involved. Please contact Campbell Scientific for assistance. There are a few key things to look for: 1. Are multiple tasks waiting for the same resource? This is always caused by a software bug.
Section 10. Troubleshooting results can be difficult due to the multitasking nature of the logger, but it can be a useful tool for fine tuning a program. 10.3.4 NAN and ±INF NAN (not-a-number) and ±INF (infinite) are data words indicating an exceptional occurrence in datalogger function or processing.
Section 10. Troubleshooting 10.3.4.3 Data Types, NAN, and ±INF NAN and ±INF are presented differently depending on the declared-variable data type. Further, they are recorded differently depending on the final-storage data type chosen compounded with the declared-variable data type used as the source (table Variable and FS Data Types with NAN and ±INF ).
Section 10. Troubleshooting 0 / 0 65535 2147483648 TRUE TRUE -2147483648 except Average() outputs NAN except Average() outputs 0 10.3.4.4 Output Processing and NAN When a measurement or process results in NAN, any output process with DisableVar = FALSE that includes an NAN measurement, e.g., Average(1,TC_TempC,FP2,False) will result in NAN being stored as final-storage data for that interval.
CommsMemFree() is an array of three registers in the Status table that (p. 506) report communications memory errors. In summary, if any CommsMemFree() register is at or near zero, assistance may be required from Campbell Scientific to diagnose and correct a potentially serious communications problem. Sections CommsMemFree(1) CommsMemFree(2) and CommsMemFree(3) (p.
Section 10. Troubleshooting CommsMemFree(1) is encoded using the following expression: CommsMemFree(1) = tiny + lil*100 + mid*10000 + med*1000000 + lrg*100000000 where, tiny = number of 16‐byte packets available lil = number of little (≈100 bytes) packets mid = number of medium size (≈530 bytes) packets med = number of big (≈3 kB) packets lrg = number of large (≈18 kB) packets available, primarily for TLS. The following expressions are used to pick the individual values from CommsMemFree(1): tiny = CommsMemFree(1) % 100 lil = (CommsMemFree(1) / 100) % 100 mid = (CommsMemFree(1) / 10000) % 100 med = (CommsMemFree(1) / 1000000) % 100...
Reducing PakBusNodes by one frees 224 bytes. If CommsMemFree(2) drops and stays down for no apparent reason (a very rare occurrence), please contact a Campbell Scientific applications engineer since the CR800 operating system may need adjustment. 10.4.3.3 CommsMemFree(3)
30 seconds as lilfreeq, bigfreeq, and recvdq. If lilfreeq or bigfreeq free packets drop and stay near zero, or if the number in rcvdq climbs and stays high (all are rare occurrences), please contact a Campbell Scientific application engineer as the operating system may need adjustment.
PS100 charging regulator, or a sealed-rechargeable battery attached to a CH100 charging regulator. If a need for repair is indicated after following the procedure, see Warranty and Assistance for information on (p. 3) sending items to Campbell Scientific. ...
Is the battery voltage > 12 Vdc? Battery voltage is adequate for CR800 operation. However, if the CR800 is to function for a long period, Campbell Scientific recommends replacing, or, if using a sealed, rechargeable battery, recharging the battery so the voltage is > 12 Vdc.
Page 417
1) Switch the power switch to or return the charging regulator to 2) Disconnect the power source (transformer / solar panel). Campbell Scientific for calibration. 3) Remove the 5-kΩ resistor 4) Place a 50-Ω, 1-Watt resistor between a terminal and a (ground) terminal on the charging regulator.
The procedure outlined in this flow chart tests PS100 and CH100 charging regulators that use ac/ac or ac/dc transformers as power source. If a need for repair is indicated after following the procedure, see Warranty and Assistance (p. 3) for information on sending items to Campbell Scientific. 418 ...
The charger is functioning properly. Remove the 50-Ω resistor. 10.5.3.4 Adjusting Charging Voltage Note Campbell Scientific recommends that a qualified electronic technician perform the following procedure. The procedure outlined in this flow chart tests and adjusts PS100 and CH100 charging regulators.
Page 420
Section 10. Troubleshooting Adjusting Charging Circuit 1) Place a 5-kΩ resistor between a terminal and a (ground) ground terminal on the charging regulator. Use a voltmeter to measure the voltage across the 5-kΩ resistor. 2) Connect a power source that supplies a voltage >17 V to the input terminals of the charging regulator.
Figure 128: Potentiometer R3 on PS100 and CH100 Charger / Regulator 10.6 Terminal Emulator CR800 terminal mode includes command prompts designed to aid Campbell Scientific engineers in operating system development. It has some features that advanced users may find useful for troubleshooting. Terminal commands should not be relied upon to have exactly the same features or formats from version to version of the OS, however.
Option Description Scan processing time; real time in seconds Lists technical data concerning program scans. Serial FLASH data dump Campbell Scientific engineering tool Read clock chip Lists binary data concerning the CR800 clock chip. Status Lists the CR800 Status table.
Page 423
If the table was (p. 382, p. 429) not full, data pulled from unfilled section will be garbage. Low level memory dump Campbell Scientific engineering tool Communications sniffer Enables monitoring of CR800 communications traffic. Peripheral bus module identify Campbell Scientific engineering tool ...
Section 10. Troubleshooting Figure 129: DevConfig terminal emulator tab 10.6.1 Serial Talk Through and Sniffer In the P: Serial Talk Through and W: Serial Comms Sniffer modes, the timeout can be changed from the default of 40 seconds to any value ranging from 1 to 86400 seconds (86400 seconds = 1 day).
Section 11. Glossary 11.1 Terms ac See Vac (p. 447). accuracy A measure of the correctness of a measurement. See also the appendix Accuracy, Precision, and Resolution (p. 449). A/D Analog‐to‐digital conversion. The process that translates analog voltage levels to digital values. Amperes (Amps) Base unit for electric current. Used to quantify the capacity of a power source or the requirements of a power‐consuming device. analog Data presented as continuously variable electrical signals. argument See parameter (p. 438). ASCII / ANSI Abbreviation for American Standard Code for Information Interchange / American National Standards Institute. An encoding scheme in which numbers from 0‐127 (ASCII) or 0‐255 (ANSI) are used to represent pre‐ defined alphanumeric characters. Each number is usually stored and transmitted as 8 binary digits (8 bits), resulting in 1 byte of storage per character of text. asynchronous The transmission of data between a transmitting and a receiving device occurs as a series of zeros and ones. For the data to be "read" correctly, the receiving device must begin reading at the proper point in the series. In asynchronous communication, this coordination is accomplished by having each character surrounded by one or more start and stop bits which designate the beginning and ending points of the information (see synchronous ). ...
Page 426
Section 11. Glossary Asynchronous Accepted abbreviation for "gauge." AWG is the accepted unit when identifying wire diameters. Larger AWG values indicate smaller cross‐ sectional diameter wires. Smaller AWG values indicate large‐diameter wires. For example, a 14 AWG wire is often used for grounding because it can carry large currents. 22 AWG wire is often used as sensor leads since only tiny currents are carried when measurements are made. baud rate The speed of transmission of information across a serial interface. Beacon A signal broadcasted to other devices in a PakBus® network to identify "neighbor" devices. A beacon in a PakBus® network ensures that all devices in the network are aware of other devices that are viable. If configured to do so, a clock‐set command may be transmitted with the beacon. This function can be used to synchronize the clocks of devices within the PakBus® network. See also PakBus and neighbor device (p. 438) (p. 436). binary Describes data represented by a series of zeros and ones. Also describes the state of a switch, either being on or off. BOOL8 A one‐byte data type that hold 8 bits (0 or 1) of information. BOOL8 uses less space than 32‐bit BOOLEAN data type. Boolean Name given a function, the result of which is either true or false. Boolean data type Typically used for flags and to represent conditions or hardware that have only two states (true or false) such as flags and control ports. Boolean data type Refers to a burst of measurements. Analogous to a burst of light, a burst of measurements is intense, such that it features a series of measurements in rapid succession, and is not continuous. 426 ...
Page 427
Section 11. Glossary Cache Data The data cache is a set of binary files kept on the hard disk of the computer running the datalogger support software. A binary file is created for each table in each datalogger. These files are set up to mimic the storage areas in datalogger memory, and by default are two times the size of the storage area. When the software collects data from a CR800, the data are stored in the binary file for that CR800. Various software functions retrieve data from the data cache instead of the CR800 directly. This allows the simultaneous sharing of data among software functions. Similar in function to CR800 final storage tables, the binary file for a datalogger is set up as ring memory. This means that as the file reaches its maximum size, the newest data will begin overwriting the oldest data. Calibration Wizard Software The calibration wizard facilitates the use of the CRBasic field calibration instructions FieldCal() and FieldCalStrain(). It is found in LoggerNet (4.0 or higher) or RTDAQ. Callback A name given to the process by which the CR800 initiates telecommunication with a PC running appropriate CSI datalogger support software. Also known as "Initiate Telecommunications." CD100 An optional enclosure mounted keyboard display for use with the CR1000 and CR800 dataloggers. See the appendix Keyboard Display (p. 545). code A CRBasic program, or a portion of a program. Com port COM is a generic name given to physical and virtual serial communications ports. constant A connector is a device that allows one or more electron conduits (wires, traces, leads, etc) to be connected or disconnected as a group. A connector consists of two parts — male and female. For example, a common household ac power receptacle is the female portion of a ...
Page 428
Section 11. Glossary connector. The plug at the end of a lamp power cord is the male portion of the connector. See terminal (p. 445). constant A packet of CR800 memory given an alpha‐numeric name and assigned a fixed number. control I/O Terminals C1 ‐ C4 or processes utilizing these terminals. CoraScript CoraScript is a command‐line interpreter associated with LoggerNet datalogger support software. Refer to the LoggerNet manual, available at www.campbellsci.com, for more information. CPU Central processing unit. The brains of the CR800. CR1000KD An optional hand‐held keyboard display for use with the CR1000 and CR800 dataloggers. See the appendix Keyboard Display (p. 545). CR10X Older generation Campbell Scientific datalogger replaced by the CR800. cr Carriage return CRBasic Editor Compile, Save and Send CRBasic Editor menu command that compiles, saves, and sends the program to the datalogger. CS I/O Campbell Scientific Input / Output. A proprietary serial communications protocol. CVI Communications verification interval. The interval at which a PakBus® device verifies the accessibility of neighbors in its neighbor list. If a 428 ...
Page 429
Section 11. Glossary neighbor does not communicate for a period of time equal to 2.5 x the CVI, the device will send up to four Hellos. If no response is received, the neighbor is removed from the neighbor list. datalogger support software Campbell Scientific software that includes at least the following functions: Datalogger telecommunications Downloading programs Clock setting Retrieval of measurement data Includes PC200W, PC400, RTDAQ, and LoggerNet suite. For more information, see Datalogger Support Software and the appendix (p. 76) Datalogger Support Software (p. 547). data point A data value which is sent to final storage as the result of an (p. 432) output processing (data storage) instruction. Strings of data points output at the same time make up a record in a data table. dc See Vdc (p. 447). DCE Data communications equipment. While the term has much wider meaning, in the limited context of practical use with the CR800, it denotes the pin configuration, gender, and function of an RS‐232 port. ...
Page 430
Section 11. Glossary DHCP Dynamic Host Configuration Protocol. A TCP/IP application protocol. differential A sensor or measurement terminal wherein the analog voltage signal is carried on two leads. The phenomenon measured is proportional to the difference in voltage between the two leads. digital Numerically presented data. Dim A CRBasic command for declaring and dimensioning variables. Variables declared with Dim remain hidden during datalogger operations. dimension To code for a variable array. DIM example(3) creates the three variables example(1), example(2), and example(3). DIM example(3,3) creates nine variables. DIM example (3,3,3) creates 27 variables. DNS Domain name system. A TCP/IP application protocol. DTE Data terminal equipment. While the term has much wider meaning, in the limited context of practical use with the CR800, it denotes the pin configuration, gender, and function of an RS‐232 port. The RS‐232 port on the CR800 and on many third‐party telecommunications devices, such as a digital cellular modems, are DCE. Attachment of a null‐modem cable to a DCE device effectively converts it to a DTE device. Duplex Can be half or full. Full‐duplex is simultaneous, bidirectional data. Duplex The percentage of available time a feature is in an active state. For example, if the CR800 is programmed with 1 second scan interval, but the program completes after only 100 millisecond, the program can be said to have a 10% duty cycle. 430 ...
Page 431
Section 11. Glossary Earth Ground A grounding rod or other suitable device that electrically ties a system or device to the earth. Earth ground is a sink for electrical transients and possibly damaging potentials, such as those produced by a nearby lightning strike. Earth ground is the preferred reference potential for analog voltage measurements. Note that most objects have a "an electrical potential" and the potential at different places on the earth ‐ even a few meters away ‐ may be different. engineering units Units that explicitly describe phenomena, as opposed to the CR800 measurement units of milliVolts or counts. ESD Electrostatic discharge ESS Environmental Sensor Station excitation Application of a precise voltage, usually to a resistive bridge circuit. execution time Time required to execute an instruction or group of instructions. If the execution time of a program exceeds the Scan() Interval, the program is executed less frequently than programmed. expression A series of words, operators, or numbers that produce a value or result. Glossary. File Control File Control is a feature of LoggerNet, PC400 and RTDAQ (p. 76) datalogger support software.
Page 432
Section 11. Glossary Format formats the selected CR800 memory device. All files, including data, on the device will be erased. LNCMD software A feature of LoggerNet Setup Screen. In the Setup Screen network map (Entire Network), click on a CR800 datalogger node. The File Retieval tab should be one of several tabs presented at the right of the screen. Fill and Stop Memory A memory configuration for data tables forcing a data table to stop accepting data when full. final storage The portion of CR800 SRAM Memory allocated for storing data tables with output arrays. Final Storage is a ring memory, with new data overwriting the oldest data. FLOAT Four‐byte floating‐point data type. Default CR800 data type for Public or Dim variables. Same format as IEEE4. IEEE4 is the name used when declaring data type for stored data table data. FP2 Two‐byte floating‐point data type. Default CR800 data type for stored data. While IEEE four‐byte floating point is used for variables and internal calculations, FP2 is adequate for most stored data. FP2 provides three or four significant digits of resolution, and requires half the memory as IEEE4. ...
Page 433
Section 11. Glossary global variable A variable available for use throughout a CRBasic program. The term is usually used in connection with subroutines, differentiating global variables (those declared using Public or Dim) from local variables, which are declared in the Sub() and Function() instructions. ground Being or related to an electrical potential of 0 Volts. half duplex Systems allow bi‐directional communications, but not simultaneously. handshake, handshaking The exchange of predetermined information between two devices to assure each that it is connected to the other. When not used as a clock line, the CLK/HS (pin 7) line in the datalogger CS I/O port is primarily used to detect the presence or absence of peripherals. Hello Exchange The process of verifying a node as a neighbor. Hertz Abbreviated "Hz." Unit of frequency described as cycles or pulses per second. HTML Hypertext Markup Language. A programming language used for the creation of web pages. HTTP Hypertext Transfer Protocol. A TCP/IP application protocol. IEEE4 Four‐byte, floating‐point data type. IEEE Standard 754. Same format as Float. Float is the name used when declaring data type for Public or Dim declared variables. ...
Page 434
Section 11. Glossary Glossary. Include file a file to be implicitly included at the end of the current CRBasic program, or it can be run as the default program. See Include File Name setting in table CR800 Settings (p. 518). INF A data word indicating the result of a function is infinite or undefined. Initiate telecommunication A name given to a processes by which the CR800 initiates telecommunications with a PC running appropriate Campbell Scientific datalogger support software. Also known as "Callback." input/output instructions Used to initiate measurements and store the results in input storage or to set or read control/logic ports. integer A number written without a fractional or decimal component. 15 and 7956 are integers; 1.5 and 79.56 are not. intermediate storage The portion of memory allocated for the storage of results of intermediate calculations necessary for operations such as averages or standard deviations. Intermediate storage is not accessible to the user. IP Internet Protocol. A TCP/IP internet protocol. IP address A unique address for a device on the internet. IP Trace IP trace is a CR800 function associated with IP data transmissions. In the evolution of the CR800 operating system, IP trace information was originally accessed through the CRBasic instruction IPTrace() and (p. 167) stored in a string variable. As the operating system progressed, the need for a more convenient repository arose. As a result, the Files Manager setting was modified to allow for the creation of a file on (p. 518) ...
Page 435
Section 11. Glossary "Keep" Memory Memory preserved through reset due to power‐up and program start‐ up. keyboard display The CR850 (a version of the CR800) has an integrated keyboard display. The CR1000KD keyboard display is compatible with the CR800 and CR850 dataloggers. lf Line feed local variable A variable available for use only by the subroutine wherein it was declared. The term differentiates local variables, which are declared in the Sub() and Function() instructions, from global variables, which are declared using Public or Dim. LONG Data type used when declaring integers. loop A series of instructions in a program that are repeated a prescribed number of times and followed by an "end" instruction which exits the program from the loop. loop counter Increments by one with each pass through a loop. manually initiated Initiated by the user, usually with a external keyboard / display, as opposed to occurring under program control. MD5 digest 16‐byte checksum of the VTP configuration. milli The SI prefix denoting 1/1000s of a base SI unit. ...
Page 436
Section 11. Glossary Modbus Communication protocol published by Modicon in 1979 for use in programmable logic controllers (PLCs). modem/terminal Any device which: has the ability to raise the CR800 ring line or be used with an optically isolated interface (see the appendix CS I/O Serial Interfaces ) to (p. 545) raise the ring line and put the CR800 in the telecommunications command state.
Page 437
Section 11. Glossary Neighbor Device Devices in a PakBus® network that can communicate directly with an individual device without being routed through an intermediate device. See PakBus (p. 438). NIST National Institute of Standards and Technology Node Part of the description of a datalogger network when using LoggerNet. Each node represents a device that the communications server will dial through or communicate with individually. Nodes are organized as a hierarchy with all nodes accessed by the same device (parent node) entered as child nodes. A node can be both a parent and a child. NSEC Eight‐byte data type divided up as four bytes of seconds since 1990 and four bytes of nanoseconds into the second. Null‐modem A device, usually a multi‐conductor cable, which converts an RS‐232 port from DCE to DTE or from DTE to DCE. offset a term, often a parameter in a CRBasic measurement instruction, to designate the y‐intercept, shifting factor, or zeroing factor in a linear function. For example, when converting °C to °F, the equation is °F = °C*1.8 + 32. The factor 32 is the offset. Ohm The unit of resistance. Symbol is the Greek letter Omega (Ω). 1.0 Ω equals the ratio of 1.0 Volt divided by 1.0 Amp. Ohm's Law Describes the relationship of current and resistance to voltage. Voltage equals the product of current and resistance (V = I*R). on‐line data transfer Routine transfer of data to a peripheral left on‐site. Transfer is controlled by the program entered in the datalogger. ...
Page 438
The operating system (also known as "firmware") is a set of instructions that controls the basic functions of the CR800 and enables the use of user written CRBasic programs. The operating system is preloaded into the CR800 at the factory but can be re‐loaded or upgraded by the CR800 user using Device Configuration Utility software. The most recent (p. 92) CR800 operating system file is available at www.campbellsci.com output A loosely applied term. Denotes a) the information carrier generated by an electronic sensor, b) the transfer of data from variable storage to final storage, or c) the transfer of power from the CR800 or a peripheral to another device. output array A string of data values output to final storage. Output occurs when the data table output trigger is true. output interval The time interval between initiations of a particular data‐table record. output processing instructions Process data values and generate output arrays. Examples of output processing instructions include Totalize(), Maximize(), Minimize(), Average(). The data sources for these instructions are values in variables. The results of intermediate calculations are stored in memory to await the output trigger. The ultimate destination of data generated by output processing instructions is usually final storage, but it may be output to variables for further processing. The transfer of processed summaries to final storage takes place when the output trigger is set to True. PakBus A proprietary telecommunications protocol similar in concept to internet protocol (IP). It has been developed by Campbell Scientific to facilitate communications between Campbell Scientific instrumentation. PakBus Graph software Shows the relationship of various nodes in a PakBus network, and allows for adjustment of many settings in each node. A PakBus node is typically a datalogger, a PC, or a telecommunications device. 438 ...
Page 439
Section 11. Glossary parameter Argument or parameter? These terms are frequently interchanged, but have a useful distinction. A parameter is part of a procedure (or command) definition; an argument is part of a procedure call (or command execution). An argument is place in a parameter. For example, in the CRBasic command Battery(dest), dest is a parameter and so defines what is to be put in its place. If a variable named BattV is meant to hold the result of the battery measurement made by Battery(), BattV is the argument placed in dest. Example: Battery(BattV) BattV is the argument. period average A measurement technique utilizing a high‐frequency digital clock to measure time differences between signal transitions. Sensors commonly measured with period average include vibrating‐wire transducers and water‐content reflectometers. peripheral Any device designed for use with, and requiring, the CR800 (or another Campbell Scientific datalogger) to operate. Ping A software utility that attempts to contact another specific device in a network. Poisson Ratio A ratio used in strain measurements equal to transverse strain divided by extension strain. v = ‐(ε / ε ). trans axial precision A measure of the repeatability of a measurement. Also see the appendix Accuracy, Precision, and Resolution (p. 449). PreserveVariables PreserveVariables instruction protects Public variables from being erased when a program is recompiled. ...
Page 440
Section 11. Glossary print device Any device capable of receiving output over pin 6 (the PE line) in a receive‐only mode. Printers, "dumb" terminals, and computers in a terminal mode fall in this category. print peripheral See print device (p. 439). processing instructions These instructions allow the user to further process input data values and return the result to a variable where it can be accessed for output processing. Arithmetic and transcendental functions are included in these instructions. program control instructions Used to modify the execution sequence of instructions contained in program tables; also used to set or clear flags. Public A CRBasic command for declaring and dimensioning variables. Variables declared with Public can be monitored during datalogger operation. pulse An electrical signal characterized by a sudden increase in voltage follow by a short plateau and a sudden voltage decrease. regulator A record is a complete line of data in a data table or data file. All data on the line share a common time stamp. regulator A device for conditioning an electrical power source. Campbell Scientific regulators typically condition ac or dc voltages greater than 16 Vdc to about 14 Vdc. resistance A feature of an electronic circuit that impedes or redirects the flow of electrons through the circuit. 440 ...
Page 441
Section 11. Glossary resistor A device that provides a known quantity of resistance. resolution A measure of the fineness of a measurement. See also Accuracy, Precision, and Resolution (p. 449). ring line (Pin 3) Line pulled high by an external device to "awaken" the CR800. Ring Memory A memory configuration for data tables allowing the oldest data to be overwritten. This is the default setting for data tables. ringing Oscillation of sensor output (voltage or current) that occurs when sensor excitation causes parasitic capacitances and inductances to resonate. RMS Root‐mean square, or quadratic mean. A measure of the magnitude of wave or other varying quantities around zero. RS‐232 Recommended Standard 232. A loose standard defining how two computing devices can communicate with each other. The implementation of RS‐232 in Campbell Scientific dataloggers to PC communications is quite rigid, but transparent to most users. Implementation of RS‐232 in Campbell Scientific datalogger to RS‐232 smart‐sensor communications is quite flexible. sample rate The rate at which measurements are made. The measurement sample rate is primarily of interest when considering the effect of time skew (i.e., how close in time are a series of measurements). The maximum sample rates are the rates at which measurements are made when initiated by a single instruction with multiple repetitions. scan interval The time interval between initiating each execution of a given Scan() of a CRBasic program. If the Scan() Interval is evenly divisible into 24 hours ...
Page 442
Section 11. Glossary (86,400 seconds), it is synchronized with the 24‐hour clock, so that the program is executed at midnight and every Scan() Interval thereafter. The program is executed for the first time at the first occurrence of the Scan() Interval after compilation. If the Scan() Interval does not divide evenly into 24 hours, execution will start on the first even second after compilation. scan time When time functions are run inside the Scan() / NextScan construct, time stamps are based on when the scan was started according to the CR800 clock. Resolution of scan time is equal to the length of the scan. See system time (p. 445). SDI‐12 Serial Data Interface at 1200 bps. Communication protocol for transferring data between data recorders and sensors. SDM Synchronous device for measurement. A processor‐based peripheral device or sensor that communicates with the CR800 via hardwire over a short distance using a proprietary protocol. Seebeck Effect Induces micro‐Volt level thermal electromotive forces (EMF) across junctions of dissimilar metals in the presence of temperature gradients. This is the principle behind thermocouple temperature measurement. It also causes small, correctable voltage offsets in CR800 measurement circuitry. Semaphore (Measurement Semaphore) In sequential mode, when the main scan executes, it locks the resources associated with measurements, i.e., it acquires the measurement semaphore. This is at the scan level, so all subscans within the scan (whether they make measurements or not), will lock out measurements from slow sequences (including the system background calibration). Locking measurement resources at the scan level gives non‐interrupted measurement execution of the main scan. Send The Send button in datalogger support software The Send (p. 76).
Page 443
Section 11. Glossary serial A loose term denoting output or a device that outputs an electronic series of alphanumeric characters. Short Cut software A CRBasic program generator suitable for many CR800 applications. Knowledge of CRBasic is not required. Short Cut is available at no charge at www.campbellsci.com. SI (Système Internationale) The International System of Units. signature A number which is a function of the data and the sequence of data in memory. It is derived using an algorithm which assures a 99.998% probability that if either the data or the data sequence changes, the signature changes. single‐ended Denotes a sensor or measurement terminal wherein the analog voltage signal is carried on a single lead, which is measured with respect to ground. skipped scans Occurs when the CR800 program is too long for the scan interval. Skipped scans can cause errors in pulse measurements. slow sequence A usually slower secondary scan in the CR800 CRBasic program. The main scan has priority over a slow sequence. SMTP Simple Mail Transfer Protocol. A TCP/IP application protocol. SNP Snapshot file SP Space ...
Page 444
Section 11. Glossary state Whether a device is on or off. Station Status command A command available in most datalogger support software available from Campbell Scientific. The following figure is a sample of the Station Status output. 444 ...
Page 445
Section 11. Glossary string A datum consisting of alphanumeric characters. support software Includes PC200W, PC400, RTDAQ, LoggerNet, and LoggerNet clients. Brief descriptions are found in Datalogger Support Software A (p. 76). complete listing of datalogger support software available from Campbell Scientific can be found in the appendix Software Software (p. 546). manuals can be found at www.campbellsci.com. synchronous The transmission of data between a transmitting and a receiving device occurs as a series of zeros and ones. For the data to be "read" correctly, the receiving device must begin reading at the proper point in the series. In synchronous communication, this coordination is accomplished by synchronizing the transmitting and receiving devices to a common clock signal (see Asynchronous ). (p. 425) system time When time functions are run outside the Scan() / NextScan construct, the time registered by the instruction will be based on the system clock, which has a 10‐ms resolution. See scan time (p. 442). task 1) Grouping of CRBasic program instructions by the CR800. Tasks include measurement, SDM, and processing. Tasks are prioritized by a CR800 operating in pipeline mode. 2) A user‐customized function defined through LoggerNet Task Master. TCP/IP Transmission Control Protocol / Internet Protocol. Telnet A software utility that attempts to contact and interrogate another specific device in a network. ...
Page 446
Section 11. Glossary terminal emulator A command‐line shell that facilitates the issuance of low‐level commands to a datalogger or some other compatible device. A terminal emulator is available in most datalogger support software available from Campbell Scientific. thermistor A thermistor is a resistive element whose change in resistance with temperature is wide, stable, and well‐characterized. It can be used as a device to measure temperature. The output of a thermistor is usually non‐linear, so measurement requires linearization, usually by means of the Steinhart‐Hart or another polynomial equation. Campbell Scientific thermistors, models 107, 108, and 109, are linearized by Steinhart‐Hart as implemented in the Therm107(), Therm108(), and Therm109() instructions. throughput The throughput rate is the rate at which a measurement can be taken, scaled to engineering units, and the reading stored in a data table. The CR800 has the ability to scan sensors at a rate exceeding the throughput rate. The primary factor affecting throughput rate is the amount of processing specified by the user. In sequential‐mode operation, all processing called for by an instruction must be completed before moving on to the next instruction. TTL Transistor‐transistor logic. A serial protocol using 0 Vdc and 5 Vdc as logic signal levels. TLS Transport layer security. An Internet communications security protocol. toggle To reverse the current power state. UINT2 Data type used for efficient storage of totalized pulse counts, port status (status of 16 ports stored in one variable, for example) or integer values that store binary flags. 446 ...
Page 447
Section 11. Glossary UPS Uninterrubtable power supply. A UPS can be constructed for most datalogger applications using ac line power, an ac/ac or ac/dc wall adapter, a charge controller, and a rechargeable battery. User Program The CRBasic program written by the CR800 user in the CRBasic Editor or the Short Cut program generator. USR: A portion of CR800 memory dedicated to the storage of image or other files. URI uniform resource identifier URL uniform resource locater variable A packet of CR800 memory given an alphanumeric name, which holds a potentially changing number or string. Vac Volts alternating current. Also VAC. Mains or grid power is high‐level Vac, usually 110 Vac or 220 Vac at a fixed frequency of 50 Hz or 60 Hz. High‐level Vac is used as a primary power source for Campbell Scientific power supplies. Do not connect high‐level Vac directly to the CR800. The CR800 measures varying frequencies of low‐level Vac in the range of ±20 Vac. Vdc Volts direct current. Also VDC. The CR800 operates with a nominal 12‐ Vdc power supply. It can supply nominal 12 Vdc, regulated 5 Vdc, and variable excitation in the ±2.5 Vdc range. It measures analog voltage in the ±5.0‐Vdc range and pulse voltage in the ±20‐Vdc range. Volt meter An inexpensive and readily available device useful in troubleshooting data acquisition system faults. ...
Page 448
Section 11. Glossary Volts SI unit for electrical potential. watchdog timer An error‐checking system that examines the processor state, software timers, and program‐related counters when the datalogger is running its program. If the processor has bombed or is neglecting standard system updates or if the counters are outside the limits, the watchdog timer resets the processor and program execution. Voltage surges and transients can cause the watchdog timer to reset the processor and program execution. When the watchdog timer resets the processor and program execution, an error count is incremented in the WatchdogTimer entry of the Status table A low number (1 to 10) (p. 506). of watchdog timer resets is of concern, but normally indicates the user should just monitor the situation. A large number (>10) of errors accumulating over a short period of time should cause increasing alarm since it indicates a hardware or software problem may exist. When large numbers of watchdog‐timer resets occur, consult with a Campbell Scientific applications engineer. weather tight Describes an instrumentation enclosure impenetrable by common environmental conditions. During extraordinary weather events, however, seals on the enclosure may be breached. Web API Application Programming Interface (see section Web API for more information). Glossary. Wild Card a character or expression that substitutes for any other character or expression. XML Extensible markup language. User Program The CRBasic program written by the CR800 user in CRBasic Editor or Short Cut. 448 ...
Section 11. Glossary 11.2 Concepts 11.2.1 Accuracy, Precision, and Resolution Three terms often confused are accuracy, precision, and resolution. Accuracy is a measure of the correctness of a single measurement, or the group of measurements in the aggregate. Precision is a measure of the repeatability of a group of measurements.
Appendix A. CRBasic Programming Instructions Read More! Parameter listings, application information, and code examples are available in CRBasic Editor Help. (p. 109) All CR800 CRBasic instructions are listed in the following sub-sections. Select instructions are explained more fully, some with example code, in Programming Resource Library Example code is throughout the CR800 manual.
Syntax Dim [variable] AS [data type] Dim Declares and dimensions private variables. Dimensions are optional. Syntax Dim [variable name (x,y,z)] ESSVariables Automatically declares all the variables required for the datalogger when used in an Environmental Sensor Station application. Used in conjunction with ESSInitialize. Syntax ESSVariables NewFieldNames Assigns a new name to a generic variable or array. Designed for use with Campbell Scientific wireless sensor networks. Syntax NewFieldNames(GenericName, NewNames) PreserveVariables Retains values in Dim or Public variables when program restarts after a power failure or manual stop. Syntax PreserveVariables Public Declares and dimensions public variables. Dimensions are optional. Syntax Public [variable name (x,y,z)] 452 ...
Appendix A. CRBasic Programming Instructions ReadOnly Flags a comma separated list of variables (Public or Alias name) as read‐only. Syntax ReadOnly [variable1, variable2, ...] Units Assigns a unit name to a field associated with a variable. Syntax Units [variable] = [unit name] A.1.2 Constant Declarations Const Declares symbolic constants for use in place of numeric entries. Syntax Const [constant name] = [value or expression] ConstTable / EndConstTable Declares constants, the value of which can be changed using the external keyboard / display or terminal C option. The program is recompiled with the new values when values change. See Constants (p. 122). Syntax ConstTable [constant a] = [value] [constant b] = [value]...
Note TableFile() with is now the preferred way to write data to a CF card in most applications. See TableFile() with Option 64 for more (p. 315) information. CardFlush Immediately writes any buffered data from CR800 internal memory and file system to resident Campbell Scientific mass‐storage media (USB: drive). 64 is often a preferred alternative to this instruction. TableFile() with Option Syntax CardFlush DSP4 Send data to the DSP4 display. Syntax DSP4(FlagVar, Rate) TableFile ...
Appendix A. CRBasic Programming Instructions A.2.3 Final Data Storage (Output) Processing Read More! See Data Output Processing Instructions (p. 130). FieldNames Immediately follows an output processing instruction to change default field names. Syntax FieldNames("Fieldname1 : Description1, Fieldname2 : Description2…") A.2.3.1 Single-Source Average Stores the average value over the output interval for the source variable or each element of the array specified. Syntax Average(Reps, Source, DataType, DisableVar) Covariance ...
Appendix A. CRBasic Programming Instructions PeakValley Detects maxima and minima in a signal. Syntax PeakValley(DestPV, DestChange, Reps, Source, Hysteresis) Sample Stores the current value at the time of output. Syntax Sample(Reps, Source, DataType) SampleFieldCal Writes field calibration data to a table. See Calibration Functions (p. 500). SampleMaxMin Samples a variable when another variable reaches its maximum or minimum for the defined output period. Syntax SampleMaxMin(Reps, Source, DataType, DisableVar) StdDev Calculates the standard deviation over the output interval. Syntax StdDev(Reps, Source, DataType, DisableVar) Totalize Sums the total over the output interval. ...
Appendix A. CRBasic Programming Instructions A.3 Single Execution at Compile Reside between BeginProg and Scan Instructions. ESSInitialize Placed after the BeginProg instruction but prior to the Scan instruction to initialize ESS variables at compile time. Syntax ESSInitialize MovePrecise Used in conjunction with AddPrecise, moves a high precision variable into another input location. Syntax MovePrecise(PrecisionVariable, X) PulseCountReset An obsolete instruction. Resets the pulse counters and the running averages used in the pulse count instruction. Syntax PulseCountReset A.4 Program Control Instructions A.4.1 Common Program Controls BeginProg / EndProg ...
Page 458
Appendix A. CRBasic Programming Instructions Syntax [{While | Until} condition] [statementblock] [ExitDo] [statementblock] Loop -or- [statementblock] [ExitDo] [statementblock] Loop [{While | Until} condition] EndSequence Ends the current sequence that started at BeginProg or after a SlowSequence and accompanying declaration sequences. Syntax EndSequence Exit Exits program. Syntax Exit For / Next Repeats a group of instructions for a specified number of times. Syntax counter = start end [ Step increment ] [statement block] [ExitFor] [statement block]...
Page 459
Appendix A. CRBasic Programming Instructions Scan / ExitScan / ContinueScan / NextScan Establishes the program scan rate. ExitScan and ContinueScan are optional. See Faster Measurement Rates for information on use of Scan() / NextScan in (p. 232) burst measurements. Syntax Scan(Interval, Units, Option, Count) [statement block] ExitScan [statement block] ContinueScan [statement block] NextScan Select Case / Case / Case Is / Case Else / EndSelect Executes one of several statement blocks depending on the value of an expression. CaseElse is optional. Note that EndSelect and EndIf call the same function. Syntax Select Case testexpression Case [expression 1] [statement block 1] Case [expression 2] [statement block 2] Case Is...
Appendix A. CRBasic Programming Instructions WaitDigTrig Triggers a measurement scan from an external digital trigger. Syntax WaitDigTrig(ControlPort, Option) While / Wend Execute a series of statements in a loop as long as a given condition is true. Syntax While [condition] [StatementBlock] Wend A.4.2 Advanced Program Controls Data / Read / Restore Defines a list of Float constants to be read (using Read) into a variable array later in the program. Syntax Data [list of constants] Read [VarExpr] Restore DataLong / Read / Restore Defines a list of Long constants to be read (using Read) into a variable array later in the program. Syntax DataLong [list of constants] Read [VarExpr] Restore...
Appendix A. CRBasic Programming Instructions ShutDownBegin Begins code to be run in the event of a normal shutdown such as when sending a new program. Syntax ShutDownBegin ShutDownEnd Ends code to be run in the event of a normal shutdown such as when sending a new program. Syntax ShutDownEnd A.5 Measurement Instructions Read More! For information on recording data from RS-232 and TTL output sensors, see Serial Input / Output and Serial I/O (p.
Appendix A. CRBasic Programming Instructions A.5.2 Voltage VoltDiff Measures the voltage difference between H and L inputs of a differential channel Syntax VoltDiff(Dest, Reps, Range, DiffChan, RevDiff, SettlingTime, Integ, Mult, Offset) VoltSe Measures the voltage at a single‐ended input with respect to ground. Syntax VoltSe(Dest, Reps, Range, SEChan, MeasOfs, SettlingTime, Integ, Mult, Offset) A.5.3 Thermocouples Read More! See Thermocouple (p. 297). TCDiff Measures a differential thermocouple. ...
Appendix A. CRBasic Programming Instructions BrHalf3W Measures ratio of R / R of a three‐wire half‐bridge. Syntax BrHalf3W(Dest, Reps, Range, SEChan, Vx/ExChan, MeasPEx, ExmV, RevEx, SettlingTime, Integ, Mult, Offset) BrHalf4W Measures ratio of R / R of a four‐wire half‐bridge. Syntax BrHalf4W(Dest, Reps, Range1, Range2, DiffChan, Vx/ExChan, MeasPEx, ExmV, RevEx, RevDiff, SettlingTime, Integ, Mult, Offset) A.5.5 Excitation ExciteV ...
Appendix A. CRBasic Programming Instructions A.5.7 Digital I/O CheckPort Returns the status of a control port. Syntax X = CheckPort(Port) PortGet Reads the status of a control port. Syntax PortGet(Dest, Port) PortsConfig Configures control ports as input or output. Syntax PortsConfig(Mask, Function) ReadIO Reads the status of selected control I/O ports. Syntax ReadIO(Dest, Mask) A.5.7.1 Control PortSet Sets the specified port high or low. Syntax PortSet(Port, State) PulsePort Toggles the state of a control port, delays the specified amount of time, toggles the port, and delays a second time. Syntax PulsePort(Port, Delay) WriteIO ...
ACPower(DestAC, ConfigAC, LineFrq, ChanV, VMult, MaxVrms, ChanI, IMult, MaxIrms, Reps) DANGER ac power can kill. User is responsible for ensuring connections to ac power mains conforms to applicable electrical codes. Contact a Campbell Scientific applications engineer for information on available isolation transformers.
Page 466
Appendix A. CRBasic Programming Instructions CS7500 Communicates with the CS7500 open‐path CO and H O sensor. Syntax CS7500(Dest, Reps, SDMAddress, Command) CSAT3 Communicates with the CSAT3 three‐dimensional sonic anemometer. Syntax CSAT3(Dest, Reps, SDMAddress, CSAT3Cmd, CSAT3Opt) EC100 Communicates with the EC150 Open Path and EC155 Closed Path IR Gas Analyzers via SDM. Syntax EC100(Dest, SDMAddress, EC100Cmd) EC100Configure Configures the EC150 Open Path and EC155 Closed Path IR Gas Analyzers. Syntax EC100Configure(Result, SDMAddress, ConfigCmd, DestSource) GPS Used with a GPS device to keep the CR800 clock correct or provide other information from the GPS such as location and speed. Proper operation of this instruction may require a factory upgrade of on‐board memory. Syntax ...
Appendix A. CRBasic Programming Instructions A.5.10 Peripheral Device Support Multiple SDM instructions can be used within a program. AM25T Controls the AM25T Multiplexer. Syntax AM25T(Dest, Reps, Range, AM25TChan, DiffChan, TCType, Tref, ClkPort, ResPort, VxChan, RevDiff, SettlingTime, Integ, Mult, Offset) AVW200 Enables CR800 to get measurements from an AVW200 Vibrating Wire Spectrum Analyzer. Syntax AVW200(Result, ComPort, NeighborAddr, PakBusAddr, Dest, AVWChan, MuxChan, Reps, BeginFreq, EndFreq, ExVolt, Therm50_60Hz, Multiplier, Offset)
Page 469
Appendix A. CRBasic Programming Instructions SDMAO4 Sets output voltage levels in an SDM‐AO4 analog output device. Syntax SDMAO4(Source, Reps, SDMAdress) SDMAO4A Sets output voltage levels in an SDM‐AO4A analog output device. Syntax SDMAO4A(Source, Reps, SDMAdress) SDMCAN Reads and controls an SDM‐CAN interface. Syntax SDMCAN(Dest, SDMAddress, TimeQuanta, TSEG1, TSEG2, ID, DataType, SDMCD16AC Controls an SDM‐CD16AC, SDM‐CD16, or SDM‐CD16D control device. Syntax SDMCD16AC(Source, Reps, SDMAddress) SDMCD16Mask Controls an SDM‐CD16AC, SDM‐CD16, or SDM‐CD16D control device. Unlike the SDMCD16AC, it allows the CR800 to select the ports to activate via a mask. Commonly used with TimedControl(). Syntax SDMCD16Mask(Source, Mask, SDMAddress) SDMCVO4 ...
Appendix A. CRBasic Programming Instructions SDMSIO4 Controls and transmits / receives data from an SDM‐SIO4 Interface. Syntax SDMSIO4(Dest, Reps, SDMAddress, Mode, Command, Param1, Param2, ValuesPerRep, Multiplier, Offset) SDMSpeed Changes the rate the CR800 uses to clock SDM data. Syntax SDMSpeed(BitPeriod) SDMSW8A Controls and reads an SDM‐SW8A. Syntax SDMSW8A(Dest, Reps, SDMAddress, FunctOp, SW8AStartChan, Mult, Offset) SDMTrigger Synchronize when SDM measurements on all SDM devices are made. Syntax SDMTrigger SDMX50 Allows individual multiplexer switches to be activated independently of the TDR100 instruction. Syntax SDMX50(SDMAddress, Channel) TDR100 ...
Appendix A. CRBasic Programming Instructions A.6.2 Arithmetic Operators Table 112. Arithmetic Operators Symbol Name Notes Result is always promoted to a float to avoid problems that (p. 142) may occur when raising an integer to a negative power. However, loss of precision occurs if result is > 24 bits. For example: (46340 ^ 2) will yield 2,147,395,584 (not precisely correct) Raise to power...
Appendix A. CRBasic Programming Instructions • bits 5-4: value_2 • bits 3-0: value_3 Code to extract these values is shown in CRBasic example Using Bit-Shift Operators (p. 473). With unsigned integers, shifting left is equivalent to multiplying by two. Shifting right is equivalent to dividing by two.
Appendix A. CRBasic Programming Instructions CRBasic Example 69. Using Bit‐Shift Operators input_val As Long value_1 As Long value_2 As Long value_3 As Long 'read input_val somehow value_1 = (input_val AND &B11000000) >> 6 value_2 = (input_val AND &B00110000) >> 4 'note that value_3 does not need to be shifted value_3 = (input_val AND &B00001111) ...
Appendix A. CRBasic Programming Instructions A.6.6 Trigonometric Functions A.6.6.1 Derived Functions Table Derived Trigonometric Functions is a list of trigonometric functions (p. 474) that can be derived from functions intrinsic to CRBasic. Table 114. Derived Trigonometric Functions Function CRBasic Equivalent Secant Sec = 1 / Cos(X) Cosecant...
Appendix A. CRBasic Programming Instructions COS Returns the cosine of an angle specified in radians. Syntax x = COS(source) COSH Returns the hyperbolic cosine of an expression or value. Syntax x = COSH(source) SIN Returns the sine of an angle. Syntax x = SIN(source) SINH Returns the hyperbolic sine of an expression or value. Syntax x = SINH(Expr) TAN Returns the tangent of an angle. Syntax x = TAN(source) TANH Returns the hyperbolic tangent of an expression or value. Syntax x = TANH(Source) A.6.7 Arithmetic Functions ABS ...
Page 476
Appendix A. CRBasic Programming Instructions Floor Rounds a value to a lower integer. Syntax variable = Floor(Number) FRAC Returns the fractional part of a number. Syntax x = FRAC(source) INT or FIX Return the integer portion of a number. Syntax x = INT(source) x = Fix(source) INTDV Performs an integer division of two numbers. Syntax X INTDV Y LN or LOG Returns the natural logarithm of a number. Ln and Log perform the same function. Syntax x = LOG(source) x = LN(source) Note LOGN = LOG(X) / LOG(N) LOG10 ...
Appendix A. CRBasic Programming Instructions Round Rounds a value to a higher or lower number. Syntax variable = Round (Number, Decimal) SGN Finds the sign value of a number. Syntax x = SGN(source) Sqr Returns the square root of a number. Syntax x = SQR(number) A.6.8 Integrated Processing DewPoint Calculates dew point temperature from dry bulb and relative humidity. Syntax DewPoint(Dest, Temp, RH) PRT Calculates temperature from the resistance of an RTD. This instruction has been superseded by PRTCalc() in most applications. Syntax PRT(Dest, Reps, Source, Mult) PRTCalc ...
Appendix A. CRBasic Programming Instructions VaporPressure Calculates vapor pressure from temperature and relative humidity. Syntax VaporPressure(Dest, Temp, RH) WetDryBulb Calculates vapor pressure (kPa) from wet‐ and dry‐bulb temperatures and barometric pressure. Syntax WetDryBulb(Dest, DryTemp, WetTemp, Pressure) A.6.9 Spatial Processing AvgSpa Computes the spatial average of the values in the source array. Syntax AvgSpa(Dest, Swath, Source) CovSpa Computes the spatial covariance of sets of data. Syntax CovSpa(Dest, NumOfCov, SizeOfSets, CoreArray, DatArray) FFTSpa Performs a Fast Fourier Transform on a time series of measurements. Syntax FFTSpa(Dest, N, Source, Tau, Units, Option) MaxSpa ...
Appendix A. CRBasic Programming Instructions A.6.10 Other Functions AddPrecise Used in conjunction with MovePrecise, allows high‐precision totalizing of variables or manipulation of high‐precision variables. Syntax AddPrecise(PrecisionVariable, X) AvgRun Stores a running average of a measurement. Syntax AvgRun(Dest, Reps, Source, Number) Note AvgRun() should not be inserted within a For / Next construct with the Source and Dest parameters indexed and Reps set to 1. In essence this would be performing a single running average, using the values of the different elements of the array, instead of performing an independent running average on each element of the array.
Appendix A. CRBasic Programming Instructions LevelCrossing Processes data into a one‐ or two‐dimensional histogram using a level‐crossing counting algorithm. Syntax LevelCrossing(Source, DataType, DisableVar, NumLevels, 2ndDim, CrossingArray, 2ndArray, Hysteresis, Option) RainFlow Processes data with the Rainflow counting algorithm, essential to estimating cumulative damage fatigue to components undergoing stress / strain cycles (see Downing S. D., Socie D. F. (1982) Simple Rainflow Counting Algorithms. International Journal of Fatigue Volume 4, Issue 1). Syntax RainFlow(Source, DataType, DisableVar, MeanBins, AmpBins, Lowlimit, Highlimit, MinAmp, Form) A.7 String Functions Read More! See String Operations (p.
Appendix A. CRBasic Programming Instructions String Output Processing The Sample() instruction will convert data types if the source data type is different than the Sample() data type. Strings are disallowed in all output processing instructions except Sample(). A.7.2 String Commands ArrayLength Returns the length of a variable array. Syntax ArrayLength(Variable) ASCII Returns the ASCII / ANSI code of a character in a string. Syntax Variable = ASCII(ASCIIString(1,1,X)) CheckSum Returns a checksum signature for the characters in a string. Syntax Variable = CheckSum(ChkSumString, ChkSumType, ChkSumSize) CHR Inserts an ANSI character into a string. Syntax CHR(Code) FormatFloat Converts a floating‐point value into a string. Replaced by SPrintF(). Syntax String = FormatFloat(Float, FormatString) FormatLong ...
Page 482
Appendix A. CRBasic Programming Instructions HexToDec Converts a hexadecimal string to a float or integer. Syntax Variable = HexToDec(Expression) InStr Finds the location of a string within a string. Syntax Variable = InStr(Start, SearchString, FilterString, SearchOption) LTrim Returns a copy of a string with no leading spaces. Syntax variable = LTrim(TrimString) Left Returns a substring that is a defined number of characters from the left side of the original string. Syntax variable = Left(SearchString, NumChars) Len Returns the number of bytes in a string. Syntax Variable = Len(StringVar) LowerCase ...
Appendix A. CRBasic Programming Instructions StrComp Compares two strings by subtracting the characters in one string from the characters in another Syntax Variable = StrComp(String1, String2) SplitStr Splits out one or more strings or numeric variables from an existing string. Syntax SplitStr(SplitResult, SearchString, FilterString, NumSplit, SplitOption) SPrintF Converts data to formatted strings. Returns length of formatted string. Replaces FormatFloat() and FormatLong(). Syntax length = SPrintF(Destination, format,...) Trim Returns a copy of a string with no leading or trailing spaces. Syntax variable = Trim(TrimString) UpperCase Converts a string to all uppercase characters Syntax String = UpperCase(SourceString) A.8 Clock Functions Within the CR800, time is stored as integer seconds and nanoseconds into the second since midnight, January 1, 1990.
Page 484
Appendix A. CRBasic Programming Instructions Date Returns a formatted date/time string of type Long derived from seconds since 1990. Syntax Date(SecsSince1990, Option) DaylightSaving Defines daylight saving time. Determines if daylight saving time has begun or ended. Optionally advances or turns‐back the datalogger clock one hour. Syntax variable = DaylightSaving(DSTSet, DSTnStart, DSTDayStart, DSTMonthStart, DSTnEnd, DSTDayEnd, DSTMonthEnd, DSTHour) DaylightSavingUS Determine if US daylight saving time has begun or ended. Optionally advance or turn‐back the datalogger clock one hour. Syntax variable = DaylightSavingUS(DSTSet) IfTime Returns a number indicating True (‐1) or False (0) based on the datalogger's real‐ time clock. Syntax If (IfTime(TintoInt, Interval, Units)) Then -or- Variable = IfTime(TintoInt, Interval, Units) PakBusClock ...
Appendix A. CRBasic Programming Instructions Timer Returns the value of a timer. Syntax variable = Timer(TimNo, Units, TimOpt) A.9 Voice-Modem Instructions Note Refer to the Campbell Scientific voice-modem manuals for complete information. DialVoice Defines the dialing string for a COM310 voice modem. Syntax DialVoice(DialString) VoiceBeg, EndVoice Marks the beginning and ending of voice code executed when the CR800 detects a ring from a voice modem. Syntax VoiceBeg [voice code to be executed] EndVoice VoiceHangup ...
Appendix A. CRBasic Programming Instructions VoiceSpeak Defines the voice string that should be spoken by the voice modem. Syntax VoiceSpeak("String" + Variable + "String"…, Precision) A.10 Custom Keyboard and Display Menus Read More! More information concerning use of the keyboard is found in sections Using the Keyboard Display and Read More! To implement (p.
Appendix A. CRBasic Programming Instructions MenuPick Creates a list of selectable options that can be used when editing a MenuItem value. Syntax: MenuPick(Item1, Item2, Item3...) DisplayValue Defines the name and associated data‐table value or variable for an item in a custom menu. Syntax: DisplayValue("MenuItemName", Expression) SubMenu / EndSubMenu Define the beginning and ending of a second‐level menu for a custom menu. Syntax: DisplayMenu("MenuName", 100) SubMenu("MenuName") [menu definition] EndSubMenu EndMenu A.11 Serial Input / Output Read More! See Serial I/O (p. 201). MoveBytes ...
Campbell Scientific PakBus® Networking Guide available at www.campbellsci.com. PakBus ® is a proprietary network communications protocol designed to maximize synergies between Campbell Scientific dataloggers and peripherals. It features auto-discovery and self-healing. Following is a list of CRBasic instructions that ® ® control PakBus processes.
Page 489
Appendix A. CRBasic Programming Instructions • Com310 • ComSDC7 • ComSDC8 • ComSDC10 • ComSDC11 • Com1 (C1,C2) • Com2 (C3,C4) • • • Com32 – Com46 (available when using a single-channel expansion peripheral. See the appendix Serial Input Expansion Modules ) Baud rate on asynchronous ports (ComRS-232, ComME, Com1, Com2, and Com32 - Com46) default to 9600 unless set otherwise in the SerialOpen() ®...
Page 490
Appendix A. CRBasic Programming Instructions ClockReport Sends the datalogger clock value to a remote datalogger in the PakBus network. Syntax ClockReport(ComPort, RouterAddr, PakBusAddr) DataGram Initializes a SerialServer / DataGram / PakBus application in the datalogger when a program is compiled. Syntax DataGram(ComPort, BaudRate, PakBusAddr, DestAppID, SrcAppID) DialSequence / EndDialSequence Defines the code necessary to route packets to a PakBus device. Syntax DialSequence(PakBusAddr) DialSuccess = DialModem(ComPort, DialString, ResponseString) EndDialSequence(DialSuccess) GetDataRecord Retrieves the most recent record from a data table in a remote PakBus datalogger and stores the record in the CR800. Syntax GetDataRecord(ResultCode, ComPort, NeighborAddr, PakBusAddr, Security, Timeout, Tries, TableNo, DestTableName) Note CR200, CR510PB, CR10XPB, and CR23XPB dataloggers do not respond to a GetDataRecord request from other PakBus dataloggers.
Page 491
Appendix A. CRBasic Programming Instructions Route Returns the neighbor address of (or the route to) a PakBus datalogger. Syntax variable = Route(PakBusAddr) RoutersNeighbors Returns a list of all PakBus routers and their neighbors known to the datalogger. Syntax RoutersNeighbors( DestArray(MaxRouters, MaxNeighbors+1)) Routes Returns a list of known dynamic routes for a PakBus datalogger that has been configured as a router in a PakBus network. Syntax Routes(Dest) SendData Sends the most recent record from a data table to a remote PakBus device. Syntax SendData(ComPort, RouterAddr, PakBusAddr, DataTable) SendFile Sends a file to another PakBus datalogger. Syntax SendFile(ResultCode, ComPort, NeighborAddr, PakBusAddr, Security, TimeOut, "LocalFile", "RemoteFile") SendGetVariables ...
Appendix A. CRBasic Programming Instructions TimeUntilTransmit The TimeUntilTransmit instruction returns the time remaining, in seconds, before communication with the host datalogger. Syntax TimeUntilTransmit Table 115. Asynchronous-Port Baud Rates -nnnn (autobaud starting at nnnn) 0 (autobaud starting at 9600) 1200 4800 9600 (default) 19200 38400 57600 115200 autobaud: measurements are mode on the communications signal and the baud rate is determined by the CR800.
Appendix A. CRBasic Programming Instructions FindSpa Searches a source array for a value and returns the value's position in the array. Syntax FindSpa(SoughtLow, SoughtHigh, Step, Source) Move Moves the values in a range of variables into different variables or fills a range of variables with a constant. Syntax Move(Dest, DestReps, Source, SourceReps) A.14 File Management Commands to access and manage files stored in CR800 memory. CalFile Stores variable data, such as sensor calibration data, from a program into a non‐ volatile CR800 memory file. CalFile pre‐dates and is not used with the FieldCal function. Syntax CalFile(Source/Dest, NumVals, "Device:filename", Option) Encryption ...
Page 494
Appendix A. CRBasic Programming Instructions FileManage Manages program files from within a running datalogger program. Syntax FileManage("Device: FileName", Attribute) FileOpen Opens an ASCII text file or a binary file for writing or reading. Syntax FileHandle = FileOpen("FileName", "Mode", SeekPoint) FileRead Reads a file referenced by FileHandle and stores the results in a variable or variable array. Syntax FileRead(FileHandle, Destination, Length) FileReadLine Reads a line in a file referenced by a FileHandle and stores the result in a variable or variable array. Syntax FileReadLine(FileHandle, Destination, Length) FileRename Changes the name of file on a CR800 drive. Syntax FileRename(drive:OldFileName, drive:NewFileName) FileSize Returns the size of a file stored in CR800 memory. Syntax ...
Appendix A. CRBasic Programming Instructions NewFile Determines if a file stored on the datalogger has been updated since the instruction was last run. Typically used with image files. Syntax NewFile(NewFileVar, "FileName") RunProgram Runs a datalogger program file from the active program file. Syntax RunProgram("Device:FileName", Attrib) A.15 Data-Table Access and Management Commands to access and manage data stored in data tables, including Public and Status tables. FileMark Inserts a filemark into a data table. Syntax FileMark(TableName) GetRecord ...
Appendix A. CRBasic Programming Instructions TableName.Output Determine if data was written to a specific data table the last time the data table was called. Syntax TableName.Output(1,1) TableName.Record Determines the record number of a specific data table record. Syntax TableName.Record(1,n) TableName.TableFull Indicates whether a fill‐and‐stop table is full or whether a ring‐mode table has begun overwriting its oldest data. Syntax TableName.TableFull(1,1) TableName.TableSize Returns the number of records allocated for a data table. Syntax TableName.TableSize(1,1) TableName.TimeStamp Returns the time into an interval or a time stamp for a record in a specific data table. Syntax TableName.TimeStamp(m,n) WorstCase Saves one or more "worst case" data storage events into separate tables. Used in conjunction with DataEvent(). Syntax WorstCase(TableName, NumCases, MaxMin, Change, RankVar) A.16 Information Services These instructions address use of email, SMS, Web Pages, and other IP services.
Page 497
Appendix A. CRBasic Programming Instructions EMailRecv Polls an SMTP server for email messages and stores the message portion of the email in a string variable. Syntax variable = EMailRecv("ServerAddr", "ToAddr", "FromAddr", "Subject", Message, "Authen", "UserName", "PassWord", Result) EMailSend Sends an email message to one or more email addresses via an SMTP server. Syntax variable = EMailSend("ServerAddr", "ToAddr", "FromAddr", "Subject", "Message", "Attach", "UserName", "PassWord", Result) EthernetPower Controls power state of all Ethernet devices. Syntax EthernetPower(state) FTPClient Sends or retrieves a file via FTP. Syntax ...
Page 498
Appendix A. CRBasic Programming Instructions IPNetPower Controls power state of individual Ethernet devices. Syntax IPNetPower( IPInterface, State) IPRoute Sets the interface to be used (Ethernet or PPP) when the datalogger sends an outgoing packet and both interfaces are active. Syntax IPRoute(IPAddr, IPInterface) IPTrace Writes IP debug messages to a string variable. Syntax IPTrace(Dest) NetworkTimeProtocol Synchronizes the datalogger clock with an Internet time server. Syntax variable = NetworkTimeProtocol(NTPServer, NTPOffset, NTPMaxMSec) PingIP Pings IP address. Syntax variable = PingIP(IPAddress, Timeout) PPPOpen Establishes a PPP connection with a server. Syntax variable = PPPOpen PPPClose ...
Appendix A. CRBasic Programming Instructions UDPOpen Opens a port for transferring UDP packets. Syntax UDPOpen(IPAddr, UDPPort, UDPBuffsize) WebPageBegin / WebPageEnd Declares a web page that is displayed when a request for the defined HTML page comes from an external source. Syntax WebPageBegin("WebPageName", WebPageCmd) HTTPOut("<p>html string to output " + variable + " additional string to output</p>") HTTPOut("<p>html string to output " + variable + " additional string to output</p>") WebPageEnd XMLParse() ...
Appendix A. CRBasic Programming Instructions DNP Sets up a CR800 as a DNP slave (outstation/server) device. Third parameter is optional. Syntax DNP(ComPort, BaudRate, DisableLinkVerify) DNPUpdate Determines when the DNP slave will update arrays of DNP elements. Specifies the address of the DNP master to send unsolicited responses. Syntax DNPUpdate(DNPAddr) DNPVariable Sets up the DNP implementation in a DNP slave CR800. Syntax DNPVariable(Array, Swath, Object, Variation, Class, Flag, Event Expression, Number of Events) ModBusMaster Sets up a datalogger as a ModBus master to send or retrieve data from a ModBus slave. Syntax ModBusMaster(ResultCode, ComPort, BaudRate, ModBusAddr, Function, Variable, Start, Length, Tries, TimeOut) ModBusSlave ...
Appendix A. CRBasic Programming Instructions LoadFieldCal Loads values from the FieldCal file into variables in the datalogger. Syntax LoadFieldCal(CheckSig) NewFieldCal Triggers storage of FieldCal values when a new FieldCal file has been written. Syntax DataTable(TableName, NewFieldCal, Size) SampleFieldCal EndTable SampleFieldCal Stores the values in the FieldCal file to a data table. Syntax DataTable(TableName, NewFieldCal, Size) SampleFieldCal EndTable A.20 Satellite Systems Instructions for GOES, ARGOS, INMARSAT-C, OMNISAT. Refer to satellite transmitter manuals available at www.campbellsci.com. A.20.1 Argos ArgosData ...
Appendix A. CRBasic Programming Instructions ArgosTransmit Initiates a single transmission to an Argos satellite when the instruction is executed. Syntax ArgosTransmit(ResultCode, ST20Buffer) A.20.2 GOES GOESData Sends data to a Campbell Scientific GOES satellite data transmitter. Syntax GOESData(Dest, Table, TableOption, BufferControl, DataFormat) GOESGPS Stores GPS data from the satellite into two variable arrays. Syntax GOESGPS(GoesArray1(6), GoesArray2(7)) GOESSetup Programs the GOES transmitter for communication with the satellite. Syntax GOESSetup(ResultCode, PlatformID, MsgWindow, STChannel, STBaud, RChannel, RBaud, STInterval, STOffset, RInterval) GOESStatus ...
Appendix A. CRBasic Programming Instructions OmniSatSTSetup Sets up the OMNISAT transmitter to send data over the GOES or METEOSAT satellite at a self‐timed transmission rate. Syntax OmniSatSTSetup(ResultCodeST, ResultCodeTX, OmniPlatformID, OmniMsgWindow, OmniChannel, OmniBaud, STInterval, STOffset) A.20.4 INMARSAT-C INSATData Sends a table of data to the OMNISAT‐I transmitter for transmission via the INSAT‐1 satellite. Syntax INSATData(ResultCode, TableName, TX_Window, TX_Channel) INSATSetup Configures the OMNISAT‐I transmitter for sending data over the INSAT‐1 satellite. Syntax INSATSetup(ResultCode, PlatformID, RFPower) INSATStatus Queries the transmitter for status information. Syntax INSATStatus(ResultCode) A.21 User Defined Functions Function / EndFunction ...
Page 504
Appendix A. CRBasic Programming Instructions 504 ...
Appendix B. Status Table and Settings The CR800 Status table contains system operating-status information accessible via the external keyboard / display DevConfig or datalogger support (p. 545), (p. 92), software Table Common Uses of the Status Table lists some of the (p.
Appendix B. Status Table and Settings Table 116. Common Uses of the Status Table Feature or Status Field(s) Suspect Constituent to Consult RS-232Handshaking RS-232Timeout CommActive CommConfig Baudrate PakBus IsRouter PakBusNodes (see (p. 413) CommsMemFree(2) (p. 413) CentralRouters Beacon Verify MaxPacketSize CRBasic Program ProgSignature CompileResults...
Page 507
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type xxx.yyy xxx = hardware revision RevBoard Integer Status number; yyy = clock chip software revision; stored in FLASH memory. Sets a name internal to the CR800.
Page 508
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Number of times system voltage dropped below 9.6 between resets. When this condition is detected, the Integer 0-99 Error Low12VCount5 Reset by CR800 ceases measurements...
Page 509
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Bytes of unallocated memory on the CPU (SRAM). All free memory may not be available for data tables. As 4 kB and MemoryFree memory is allocated and...
Page 510
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type A value of 98765 written to this location will initiate a full memory reset. Full Enter memory reset will reinitialize Integer Config FullMemReset...
Page 511
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Processing time (μs) of the last scan. Time is measured from the end of the EndScan instruction (after the measurement event is set) to ProcessTime the beginning of the EndScan...
Page 512
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Array of the three security 0 - 65535 (0 is Security14 settings or codes. Will not be Integer array of 3 0, 0, 0 Status no security)
Page 513
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Array of values telling the configuration of comm ports. Aliased to: CommConfigRS-232 Ports toggled RS-232 CommConfigME through program through CommConfigCOM310 0 = Program control...
Page 514
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Array of Beacon intervals (in seconds) for comms ports. Aliased to: BeaconRS-232 BeaconME BeaconSDC7 0 - approx. BeaconSDC8 Beacon Integer array of 9 Config PB 65,500...
Page 515
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Controls which datalogger port PPP service is configured to use. Warning: Integer 0 (Inactive) pppInterface If this value is set to CS I/O ME, do not attach any other devices to the CS I/O port.
Page 516
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Calibration table of differential offset values. Each integration / range combination has a CalDiffOffset differential offset associated Integer array of 18 close to 0 Calib with it.
Page 517
Appendix B. Status Table and Settings instruction (ModBus, DNP3, generic protocols), CommsActive will remain TRUE as long as characters are received at a rate faster than every 40 seconds. In addition, PPP will activate its COM port with a 31 minute timeout. When PPP closes, it will cancel the timeout and set CommsActive as FALSE.
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry OS Version Specifies the version of the operating system currently in the CR800.
Page 519
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry ®...
Page 520
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry Neighbors Allowed This setting specifies, for a given port, the explicit list of PakBus®...
Page 521
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry This read-only setting lists the routes, in the case of a router, or the router neighbors, in the case of a leaf node, that were known to the CR800 at the time the setting was read.
Page 522
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry FilesManager := { "(" pakbus-address "," name-prefix "," number-files ")" }.
Page 523
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry This setting specifies the name of a file to be implicitly included at the end of the current CRBasic program or can be run as the default program.
Page 524
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry Specifies the IP address that is used for the PPP interface if that interface is active (the PPP interface setting needs to be set to something other than Inactive).
Page 525
Appendix B. Status Table and Settings Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry Telnet Enabled Set to 1 if the Telnet service should be enabled.
Page 526
Appendix B. Status Table and Settings 526 ...
Appendix C. Serial Port Pinouts C.1 CS I/O Communications Port Pin configuration for the CR800 CS I/O port is listed in table CS I/O Pin Description (p. 527). Table 119. CS I/O Pin Description ABR: Abbreviation for the function name. PIN: Pin number.
Appendix C. Serial Port Pinouts connect the computer DTE device to the CR800 DCE device. The following table describes RS-232 pin function with standard DCE-naming notation. Note Pins 1, 4, 6, and 9 function differently than a standard DCE device. This is to accommodate a connection to a modem or other DCE device via a null modem.
Page 529
Appendix C. Serial Port Pinouts Table 121. Standard Null-Modem Cable or Adapter-Pin Connections* pin 1 & 6 ---------- pin 4 pin 2 ---------- pin 3 pin 3 ---------- pin 2 pin 4 ---------- pin 1 & pin 6 pin 5 ---------- pin 5 pin 7...
Appendix D. ASCII / ANSI Table American Standard Code for Information Interchange (ASCII) / American National Standards Institute (ANSI) Decimal and Hexadecimal Codes and Characters Used with CR800 Tools Keyboard Hyper- Keyboard Hyper- Display LoggerNet Terminal Display LoggerNet Terminal Char Char Char Char...
13-bit binary value, D being the MSB (p. 205). Largest 13-bit magnitude is 8191, but D - P Campbell Scientific defines the largest-allowable magnitude as 7999 Decimal locaters can be viewed as a negative base-10 exponent with decimal locations as shown in table FP2 Decimal-Locater Bits (p.
CR800. Some sensors require external signal conditioning. The performance of some sensors is enhanced with specialized input modules. F.1.1 Wired Sensors Types The following wired-sensor types are available from Campbell Scientific and are easily integrated into CR800 systems. Please contact a Campbell Scientific applications engineer for specific model numbers.
Appendix F. Other Campbell Scientific Products F.1.2 Wireless Sensor Network Wireless sensors use the Campbell wireless sensor (CWS) spread-spectrum radio technology. The following wireless sensor devices are available. Table 125. Wireless Sensor Modules Model Description CWB100 Series Radio-base module for datalogger.
Appendix F. Other Campbell Scientific Products F.2.2 Pulse / Frequency Input Expansion Modules These modules expand and enhance pulse- and frequency-input capacity. Table 128. Pulse / Frequency Input-Expansion Modules Model Description SDM-INT8 Eight-channel interval timer SDM-SW8A Eight-channel, switch-closure module LLAC4 Four-channel, low-level ac module ...
18359 F.3 Cameras A camera can be an effective data gathering device. Campbell Scientific cameras are rugged-built for reliable performance at environmental extremes. Images can be stored automatically to a Campbell Scientific datalogger and transmitted over a variety of Campbell Scientific telecommunications devices.
F.5 Dataloggers Other Campbell Scientific datalogging devices can be used in networks with the CR800. Data and control signals can pass from device to device with the CR800 acting as a master, peer, or slave. Dataloggers communicate in a network via...
CR9000 Configurable, modular, expandable, high-speed F.6 Power Supplies Several power supplies are available from Campbell Scientific to power the CR800. F.6.1 Battery / Regulator Combination Read More! Information on matching power supplies to particular applications can be found in the Campbell Scientific Application Note "Power Supplies", available at www.campbellsci.com.
Appendix F. Other Campbell Scientific Products F.8 Telecommunications Products Many telecommunications devices are available for use with the CR800 datalogger. F.8.1 Keyboard Display Table 147. Keyboard Displays Keyboard displays are either integrated into the datalogger or communicate through the CS I/O port.
F.9 Data Storage Devices Data-storage devices allow you to collect data on-site with a small device and carry it back to the PC (SneakerNet). Campbell Scientific mass-storage devices attach to the CR800 CS I/O port. Table 153. Mass-Storage Devices Model...
Appendix F. Other Campbell Scientific Products Table 154. Starter Software Model Description Easy-to use datalogger support software specialized for VisualWeather weather and agricultural applications, PC, Windows® compatible. F.10.2 Datalogger Support Software PC200W PC400, RTDAQ, and LoggerNet provide increasing levels of power required for integration, programming, data retrieval and telecommunications applications.
Appendix F. Other Campbell Scientific Products F.10.2.1 LoggerNet Suite The LoggerNet suite features a client-server architecture that facilitates a wide range of applications and enables tailoring software acquisition to specific requirements. Table 156. LoggerNet Adjuncts and Clients Software Description LoggerNetAdmin...
Appendix F. Other Campbell Scientific Products Table 157. Software Tools Software Compatibility Description Bundled with PC400, LoggerNet, and RTDAQ. Also availble at no cost at Device Configuration Utility PC, Windows www.campbellsci.com. Used (DevConfig) to configure settings and update operating systems for Campbell Scientific devices.
Page 550
Appendix F. Other Campbell Scientific Products 550 ...
Page 564
Index WriteIO ............464 Writing Program ........... 108 XML ............... 448 XOR ............... 473 Y‐intercept ............ 141, 142 Zero ............... 155, 166 Zero Basis ............151 564 ...
Page 566
CAMPBELL SCIENTIFIC COMPANIES Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES • www.campbellsci.com info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA • www.csafrica.co.za sales@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA)
Need help?
Do you have a question about the CR850 and is the answer not in the manual?
Questions and answers