Campbell CR850 Operator's Manual

Campbell CR850 Operator's Manual

Measurement and control system
Table of Contents

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CR850 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Campbell CR850

  • 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”...
  • Page 5: About This Manual

    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 7: Table Of Contents

    Table of Contents Section 1. Introduction ...........27 1.1 HELLO ....................27 1.2 Typography ..................... 27 Section 2. Cautionary Statements.........29 Section 3. Initial Inspection ...........31 Section 4. Quickstart Tutorial ........33 4.1 Primer – CR800 Data-Acquisition ............33 4.1.1 Components of a Data-Acquisition System........33 4.1.1.1 Sensors .................
  • 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 10 Table of Contents 7.7.3.5 Declared Sequences ............125 7.7.3.5.1 Data Tables............... 125 7.7.3.5.2 Subroutines ............... 131 7.7.3.5.3 Incidental Sequences ..........132 7.7.3.6 Execution and Task Priority..........132 7.7.3.6.1 Pipeline Mode............133 7.7.3.6.2 Sequential Mode ............134 7.7.3.7 Execution Timing............... 135 7.7.3.7.1 Scan() / NextScan .............
  • Page 11 Table of Contents 7.8.2.9 Micro-Serial Server............173 7.8.2.10 Modbus TCP/IP..............173 7.8.2.11 DHCP................173 7.8.2.12 DNS ................. 173 7.8.2.13 SMTP ................173 7.8.3 SDI-12 Sensor Support..............173 7.8.3.1 SDI-12 Transparent Mode..........174 7.8.3.1.1 SDI-12 Transparent Mode Commands..... 175 7.8.3.2 SDI-12 Programmed Modes ..........178 7.8.3.2.1 SDI-12 Recorder Mode ..........
  • Page 12 Table of Contents 7.8.13.8 Formatting String Hexadecimal Variables ....... 241 7.8.14 Data Tables ................241 7.8.15 PulseCountReset Instruction............242 7.8.16 Program Signatures..............243 7.8.16.1 Text Signature ..............243 7.8.16.2 Binary Runtime Signature..........243 7.8.16.3 Executable Code Signatures..........243 7.8.17 Advanced Programming Examples..........244 7.8.17.1 Miscellaneous Features ............
  • Page 13 Table of Contents 8.1.5.1.1 High-frequency Pulse (P1 - P2)........ 300 8.1.5.1.2 Low-Level ac (P1 - P2) ..........300 8.1.5.1.3 Switch Closure (P1 - P2) .......... 300 8.1.5.2 Pulse Input on Digital I/O Channels C1 - C4..... 301 8.1.5.2.1 High Frequency Mode..........301 8.1.5.2.2 Low-Frequency Mode ..........
  • Page 14 Table of Contents 8.4 Telecommunications and Data Retrieval..........332 8.4.1 Hardware and Carrier Signal ............333 8.4.2 Protocols ..................333 8.4.3 Initiating Telecommunications (Callback)........333 8.5 PakBus Overview.................. 334 8.5.1 PakBus Addresses................ 335 8.5.2 Nodes: Leaf Nodes and Routers ..........335 8.5.2.1 Router and Leaf-Node Configuration.........
  • Page 15 Table of Contents 8.6.3.6 Clock Functions ..............370 8.6.3.6.1 ClockSet Command..........370 8.6.3.6.2 ClockCheck Command..........372 8.6.3.7 Files Management .............. 374 8.6.3.7.1 Sending a File to a Datalogger ......... 374 8.6.3.7.2 FileControl Command ..........375 8.6.3.7.3 ListFiles Command ..........377 8.6.3.7.4 NewestFile Command ..........
  • 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.
  • Page 23 Table of Contents Table 103. Special Keyboard-Display Key Functions ........ 383 Table 104. Typical Gzip File Compression Results........395 Table 105. Internal Lithium-Battery Specifications........398 Table 106. Warning Message Examples ............. 404 Table 107. Math Expressions and CRBasic Results ........409 Table 108.
  • Page 24: C Rbasic Example 42. Using Trigvar To Trigger Data Storage 2

    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.
  • Page 26 Table of Contents        26     ...
  • Page 27: Section 1. Introduction

    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 —...
  • Page 29: Section 2. Cautionary Statements

    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.
  • Page 30 Section 2. Cautionary Statements   30     ...
  • Page 31: Section 3. Initial Inspection

    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.
  • Page 32 Section 3. Initial Inspection   32     ...
  • Page 33: Section 4. Quickstart Tutorial

    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.
  • Page 34: Cr800 Module And Power Supply

    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.
  • Page 35: Figure 2: Wiring Panel

    Section 4. Quickstart Tutorial Figure 2: Wiring panel  ...
  • Page 36: Power Supply

    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.
  • Page 37: Bridge Sensors

    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.
  • Page 38: Pulse Sensors

    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.
  • Page 39: Pulses Measured

    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.
  • Page 40: Pulse Sensor Wiring

    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.
  • Page 41: Figure 9: Location Of Rs-232 Ports

    Section 4. Quickstart Tutorial Figure 9: Location of RS-232 ports Figure 10: Use of RS-232 and digital I/O when reading RS-232 devices  ...
  • Page 42: Digital I/O Ports

    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.
  • Page 43: Hands-On: Measuring A Thermocouple

    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.
  • Page 44: Pc200W Software Setup

    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).
  • Page 45: Figure 13: Pc200W Main Window

    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.
  • Page 46: Write Program With Short Cut

    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.
  • Page 47: Procedure: (Short Cut Steps 7 To 9)

    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.
  • Page 48: Procedure: (Short Cut Steps 10 To 11)

    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.
  • Page 49: Procedure: (Short Cut Steps 12 To 16)

    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.
  • Page 50: Procedure: (Short Cut Step 17 To 18)

    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.
  • Page 51: Send Program And Collect Data

    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.
  • Page 52: Figure 20: Pc200W Monitor Data Tab – Public Table

    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   ...
  • Page 53: Procedure: (Pc200W Step 5)

    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  ...
  • Page 54: Procedure: (Pc200W Step 6)

    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.
  • Page 55: Figure 24: Pc200W View Data Utility

    Section 4. Quickstart Tutorial Figure 24: PC200W View data utility  ...
  • Page 56: Procedure: (Pc200W Steps 10 To 11)

    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.
  • Page 57: Section 5. System Overview

    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.
  • Page 58: Cr800 Datalogger

    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.
  • Page 59: Clock

    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 •...
  • Page 60: Cr800 Wiring Panel

    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.
  • Page 61: Voltage Outputs

    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 —...
  • Page 62: Grounding Terminals

    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: •...
  • Page 63: Communications Ports

    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).
  • Page 64: Cr1000Kd Keyboard Display

    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.
  • Page 65: Programming

    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.
  • Page 66: Memory And Final Data Storage

    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.
  • Page 67: Data Retrieval

    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.
  • Page 68: Data Format On Computer

    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.
  • Page 69: Modbus

    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.
  • Page 70: Security

    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...
  • Page 71: Vulnerabilities

    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: •...
  • Page 72: Pass-Code Lockout

    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.
  • Page 73: Security By-Pass

    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.
  • Page 74: Pakbus Instructions

    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: •...
  • Page 75: Communications Encryption

    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.
  • Page 76: Calibration

    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.
  • Page 78 Section 5. System Overview   78     ...
  • Page 79: Section 6. Cr800 Specifications

    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     ...
  • Page 80 Section 6. CR800 Specifications         80     ...
  • Page 81: Section 7. Installation

    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.
  • Page 82: Power Sources

    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.
  • Page 83: Cr800 Power Requirement

    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.
  • Page 84: Powering Sensors And Devices

    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.
  • Page 85: Switched Voltage Excitation

    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.
  • Page 86: Continuous Unregulated (Nominal 12 Volt)

    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...
  • Page 88: Lightning Protection

    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.
  • Page 89: Figure 32: Lightning-Protection Scheme

    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.
  • Page 90: Single-Ended Measurement Reference

    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).
  • Page 91: Ground Looping In Ionic Measurements

    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;...
  • Page 92: Cr800 Configuration

    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.
  • Page 93: Figure 34: Device Configuration Utility (Devconfig)

    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. •...
  • Page 94: Sending The Operating System

    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 ≤...
  • Page 95: Figure 35: Devconfig Os Download Window

    Section 7. Installation Figure 35: DevConfig OS download window Figure 36: Dialog box confirming OS download  ...
  • Page 96: Sending Os With Program Send

    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.
  • Page 97: Figure 37: Devconfig Settings Editor

    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.
  • Page 98: Deployment Tab

    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. •...
  • Page 100: Figure 40: Devconfig Deployment | Comports Settings Tab

    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.
  • Page 101: Logger Control Tab

    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.
  • Page 102: Settings Via Crbasic

    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.
  • Page 103: Durable Settings

    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.
  • Page 104: Figure 43: "Include File" Settings Via Devconfig

    Section 7. Installation Figure 43: "Include File" settings via DevConfig Figure 44: "Include File" settings via PakBusGraph 104     ...
  • Page 105: Default.cr8 File

    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)
  • Page 106: Program Run Priorities

    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.
  • Page 107: Network Planner

    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. •...
  • Page 108: Basics

    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.
  • Page 109: Crbasic Editor

    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.
  • Page 110: Sending Programs

    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...
  • Page 111: Figure 46: Crbasic Editor Program Send File Control Window

    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  ...
  • Page 112: Syntax

    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...
  • Page 113: Table 9. Crbasic Program Structure

    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...
  • Page 115: Command Line

    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"...
  • Page 116: Single-Line Declarations

    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.
  • Page 119: Table 10. Data Types

    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)
  • Page 122: Constants

    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.
  • Page 123: Table 11. Predefined Constants And Reserved Words

    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.
  • Page 124: Alias And Unit Declarations

    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.
  • Page 125: Declared Sequences

    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...
  • Page 126: Table 12. Toa5 Environment Line

    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.
  • Page 127: Table 13. Typical Data Table

    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.
  • Page 130: Table 14. Datainterval() Lapse Parameter Options

    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...
  • Page 131: Subroutines

    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) •...
  • Page 132: Incidental Sequences

    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.
  • Page 133: Pipeline Mode

    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.
  • Page 134: Sequential Mode

    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.
  • Page 135: Execution Timing

    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.
  • Page 136: Slowsequence / Endsequence

    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.
  • Page 137: Subscan() / Nextsubscan

    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.
  • Page 139: Instructions

    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.
  • Page 140: Argument Types

    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.
  • Page 141: Expressions In Arguments

    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;...
  • Page 142: Expressions

    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.
  • Page 143: Floating-Point Arithmetic

    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...
  • Page 145: Logical Expressions

    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.
  • Page 146: Table 19. Binary Conditions Of True And False

    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.
  • Page 147: String 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.
  • Page 148: Program Access To Data Tables

    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) = "...
  • Page 149: Table 21. Abbreviations Of Names Of Data Processes

    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. •...
  • Page 150: System Signatures

    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.
  • Page 151: Use Of Move() To Conserve Code Space

      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.
  • Page 152: Crbasic Programming

    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.
  • Page 153: Single-Point Calibrations (Zero, Offset, Or Zero Basis)

    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).
  • Page 154: Fieldcal() Demonstration Programs

    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: •...
  • Page 155: Figure 48: Zero (Option 0)

    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).
  • Page 156: Offset (Option 1)

    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.
  • Page 157: Zero Basis (Option 4)

    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...
  • Page 159: Two-Point Slope And Offset (Option 2)

    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.
  • Page 161: Two-Point Slope Only (Option 3)

    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.
  • Page 162: Fieldcalstrain() Demonstration Program

    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().
  • Page 164: Figure 49: Quarter-Bridge Strain-Gage Schematic With Rc-Resistor Shunt

    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...
  • Page 165: Quarter-Bridge Shunt (Option 13)

    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)
  • Page 166: Quarter-Bridge Zero (Option 10)

    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.
  • Page 167: Information Services

    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...
  • Page 168: Pakbus Over Tcp/Ip And Callback

    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.
  • Page 169: Custom Http Web Server

    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.
  • Page 170: Figure 55: Home Page Created Using Webpagebegin() Instruction

    Section 7. Installation Figure 55: Home page created using WebPageBegin() instruction Figure 56: Customized numeric-monitor web page     170     ...
  • Page 171 WebPageBegin("default.html",Commands) HTTPOut("<html>") HTTPOut("<style>body {background-color: oldlace}</style>") HTTPOut("<body><title>Campbell Scientific CR800 Datalogger</title>") HTTPOut("<h2>Welcome To the Campbell Scientific CR800 Web Site!</h2>") HTTPOut("<tr><td style=" + CHR(34) +"width: 290px" + CHR(34) + ">") HTTPOut("<a href=" + CHR(34) + "http://www.campbellsci.com" + _ CHR(34) + ">") HTTPOut("<img src="+ CHR(34) +"/CPU/SHIELDWEB2.jpg"+ CHR(34) + "width=" + _ CHR(34) +"128"+CHR(34)+"height="+CHR(34)+"155"+ CHR(34) + "class="...
  • Page 172: Ftp Server

    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...
  • Page 173: Micro-Serial Server

    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.
  • Page 174: Transparent Mode

    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.
  • Page 175: Transparent Mode Commands

    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 •...
  • Page 178: Programmed Modes

    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.
  • Page 179: Table 26. Sdi12Recorder() Commands

    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...
  • Page 184 Section 7. Installation SlowSequence 'Note SDI12SensorSetup / SDI12SensorResponse must be renewed 'after each successful SDI12Recorder() poll. SDI12SensorSetup(1,1,0,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(1)) Loop EndSequence SlowSequence SDI12SensorSetup(1,3,1,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(2)) Loop EndSequence SlowSequence SDI12SensorSetup(1,5,2,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(3)) Loop EndSequence SlowSequence SDI12SensorSetup(1,7,3,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(4)) Loop EndSequence EndProg  ...
  • Page 185: Sensor Mode

    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.
  • Page 186: Power Considerations

    Section 7. Installation   CRBasic Example 36. SDI‐12 Sensor Setup  Public PTemp, batt_volt Public Source(10) BeginProg Scan(5,Sec,0,0) PanelTemp(PTemp,250) Battery(batt_volt) Source(1) = PTemp 'temperature, deg C Source(2) = batt_volt 'primary power, Vdc Source(3) = PTemp * 1.8 + 32 'temperature, deg F Source(4) = batt_volt 'primary power, Vdc Source(5) = PTemp 'temperature, deg C...
  • Page 187: Table 28. Example Power Usage Profile For A Network Of Sdi-12 Probes

    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.
  • Page 188: Subroutines

    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.
  • Page 189: Wind Vector

    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.
  • Page 190: Outputopt Parameters

    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.
  • Page 191: Measured Raw Data

    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)
  • Page 192: Figure 58: Mean Wind-Vector Graph

    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...
  • Page 193: Figure 59: Standard Deviation Of Direction

    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.
  • Page 194: Custom Menus

    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.
  • Page 195: Figure 60: Custom Menu Example — Home Screen

    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 —...
  • Page 196: Figure 63: Custom Menu Example — Predefined-Notes Pick List

    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 ...
  • Page 197: Figure 67: Custom Menu Example — Control-Led Pick List

    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)
  • Page 199: Conditional Compilation

    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>...
  • Page 201: Serial I/O

    Section 7. Installation #ElseIf LoggerType = CR800 Const SourcSerialPort = Com1 #Else Const SourcSerialPort = Com1 #EndIf 'Public Variables Public ValueRead, SelectedSpeed As String * 50 'Main Program BeginProg 'Return the selected speed and logger type for display. LoggerType = CR3000 SelectedSpeed = "CR3000 running at "...
  • Page 202: Introduction

    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.
  • Page 203: I/O Ports

    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.
  • Page 204: Glossary Of Terms

    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. ...
  • Page 205: Crbasic Programming

    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.
  • Page 206: Input Instruction Set Basics

    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 ®...
  • Page 207: Input Programming Basics

    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()
  • Page 208: Output Programming Basics

    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.
  • Page 209: Translating Bytes

    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. •...
  • Page 210: Memory Considerations

    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.
  • Page 211: Demonstration Program

    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.
  • Page 212: Testing Applications

    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"...
  • Page 213: Figure 69: Hyperterminal New Connection Description

    Section 7. Installation Figure 69: HyperTerminal New Connection description Figure 70: HyperTerminal Connect-To settings  ...
  • Page 214: Figure 71: Hyperterminal Com-Port Settings Tab

    Section 7. Installation Figure 71: HyperTerminal COM-Port Settings Tab Click File | Properties | Settings | ASCII Setup... and set as shown. Figure 72: HyperTerminal ASCII setup 214     ...
  • Page 215: Create Send Text File

    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...
  • Page 221: Q & A

    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...
  • Page 223: Trigvar And Disablevar - Controlling Data Output And Processing

    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.
  • Page 224: Nsec Data Type

    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.
  • Page 225: Nsec Options

    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.
  • Page 228: Bool8 Data Type

    Section 7. Installation '3) sample time to three string forms using the TableName.FieldName notation. 'Form 1: "mm/dd/yyyy hr:mm:ss UTTime(1) = TimeTable.TimeLong(1,1) 'Form 2: "dd/mm/yyyy hr:mm:ss UTTime(2) = TimeTable.TimeLong(3,1) 'Form 3: "ccyy-mm-dd hr:mm:ss (ISO 8601 Int'l Date) UTTime(3) = TimeTable.TimeLong(4,1) NextScan EndProg  ...
  • Page 229: Figure 76: Alarms Toggled In Bit-Shift Example

    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)  ...
  • Page 230: Figure 78: Bool8 Data From Bit-Shift Example (Pc Data File)

    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)
  • Page 232: Faster Measurement Rates

    Section 7. Installation FlagsBool8(1) = Flags &HFF 'AND 1st 8 bits of "Flags" & 11111111 FlagsBool8(2) = (Flags >> &HFF 'AND 2nd 8 bits of "Flags" & 11111111 FlagsBool8(3) = (Flags >> &HFF 'AND 3rd 8 bits of "Flags" & 11111111 FlagsBool8(4) = (Flags >>...
  • Page 233: Measurements From 1 Hz To 100 Hz

    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...
  • Page 234: Measurement Rate: 101 To 600 Hz

    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.
  • Page 235: Subscan() / Nextsubscan Details

    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.
  • Page 236: Measurement Rate: 601 To 2000 Hz

    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.
  • Page 237: String Operations

    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()
  • Page 238: String Operators

    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 &...
  • Page 239: String Concatenation

    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"...
  • Page 240: Inserting String Characters

    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"...
  • Page 241: Formatting Strings

    Section 7. Installation 7.8.13.7 Formatting Strings Table 43. Formatting Strings Examples Expression Result Str(1)=123e4 1230000 Str(2)=FormatFloat(123e4,"%12.2f") 1230000.00 Str(3)=FormatFloat(Values(2)," The battery is %.3g Volts ") “The battery is 12.4 Volts” Str(4)=Strings(3,1,InStr(1,Strings(3),"The battery is ",4)) 12.4 Volts Str(5)=Strings(3,1,InStr(1,Strings(3),"is ",2) + 3) 12.4 Volts Str(6)=Replace("The battery is 12.4 Volts","...
  • Page 242: Pulsecountreset Instruction

    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)
  • Page 243: Program Signatures

    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.
  • Page 244: Advanced Programming Examples

    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.
  • Page 247: Running Average And Total Of Rain

    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.
  • Page 248: Groundwater Pump Test

    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...
  • Page 250 Section 7. Installation '1 Minute Data Interval Scan(1,Min,0,70) Counter(4) = Counter(4) + 1 Battery(Batt_volt) PanelTemp(PTemp,250) TCDiff(Level,1,mV2_5,1,TypeT,PTemp,True ,0,250,1.0,0) TimeIntoInterval(0,1,Min) Then TimeIntoTest = TimeIntoTest + 1 EndIf 'Call Output Tables CallTable LogTable NextScan '2 Minute Data Interval Scan(2,Min,0,200) Counter(5) = Counter(5) + 1 Battery(Batt_volt) PanelTemp(PTemp,250) TCDiff(Level,1,mV2_5,1,TypeT,PTemp,True ,0,250,1.0,0)
  • Page 251: Scaling Array

    Section 7. Installation '10 Minute Data Interval Scan(10,Min,0,0) Counter(6) = Counter(6) + 1 Battery(Batt_volt) PanelTemp(PTemp,250) TCDiff(Level,1,mV2_5,1,TypeT,PTemp,True,0,250,1.0,0) TimeIntoInterval(0,1,Min) Then TimeIntoTest = TimeIntoTest + 1 EndIf 'Call Output Tables CallTable LogTable NextScan EndIf EndProg   7.8.17.5 Scaling Array CRBasic example Scaling Array demonstrates programming to create and (p.
  • Page 252: Conditional Output

    Section 7. Installation 'Begin Program BeginProg 'Load scaling array (multipliers and offsets) Mult(1) = 1.8 : Offset(1) = 32 Mult(2) = 1 : Offset(2) = 2 Mult(3) = 1 : Offset(3) = 3 Mult(4) = 1 : Offset(4) = 4 Mult(5) = 1 : Offset(5) = 5 Mult(6) = 1 : Offset(6) = 6 Mult(7) = 1 : Offset(7) = 7...
  • Page 253: Capturing Events

    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.
  • Page 254: Prt Measurement

    Section 7. Installation 'Declare Event Driven Data Table DataTable(Event,True,1000) DataEvent(0,DeltaT_C>=3,DeltaT_C<3,0) Sample(1,PTemp_C, FP2) Sample(1,AirTemp_C, FP2) Sample(1,DeltaT_C, FP2) EndTable 'Declare Time Driven Data Table DataTable(OneMin,True,-1) DataInterval(0,1,Min,10) Sample(1,EventCounter, FP2) EndTable BeginProg Scan(1,Sec,1,0) 'Wiring Panel Temperature PanelTemp(PTemp_C,_60Hz) 'Type T Thermocouple measurements: TCDiff(AirTemp_C,1,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1,0) 'Calculate the difference between air and panel temps DeltaT_C = AirTemp_C - PTemp_C 'Update Event Counter (uses special syntax Event.EventCount(1,1)) EventCounter = Event.EventCount(1,1)
  • Page 255: Table 45. Prtcalc() Type-Code-1 Sensor

    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 <...
  • Page 256: Table 46. Prtcalc() Type-Code-2 Sensor

    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.
  • Page 257: Table 48. Prtcalc() Type-Code-4 Sensor

    Section 7. Installation Table 47. PRTCalc() Type-Code-3 Sensor US Industrial Standard, alpha = 0.00391 (Reference: OMIL R84 (2003)) Constant Coefficient 8.8564290E+00 2.5190880E+02   Table 48. PRTCalc() Type-Code-4 Sensor Old Japanese Standard, alpha = 0.003916 (Reference: JIS C 1604:1981, National Instruments) Constant Coefficient 3.9739000E-03...
  • Page 258: Measuring Pt100S (100-Ohm Prts)

    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.
  • Page 260: Pt100 In Three-Wire Half-Bridge

    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.
  • Page 261: Figure 80: Pt100 In Three-Wire Half-Bridge

    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.
  • Page 262: Pt100 In Four-Wire Full-Bridge

    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: •...
  • Page 263: Figure 81: Pt100 In Four-Wire Full-Bridge

    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...
  • Page 264: Running Average

    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).
  • Page 266: Figure 83: Running-Average Frequency Response

    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     ...
  • Page 267: Figure 84: Running-Average Signal Attenuation

    Section 7. Installation Figure 84: Running-average signal attenuation  ...
  • Page 268 Section 7. Installation 268     ...
  • Page 269: Measurements

    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.
  • Page 270: Voltage

    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)
  • Page 271: Input Limits

    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.
  • Page 272: Reducing Error

    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).
  • Page 273: Measurement Sequence

    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.
  • Page 274: Measurement Accuracy

    Section 8. Operation Table 51. CRBasic Parameters Varying Measurement Sequence and Timing CRBasic Parameter Description MeasOfs Correct ground offset on single-ended measurements. RevDiff Reverse high and low differential inputs. SettlingTime Sensor input settling time. Integ Duration of input signal integration. RevEx Reverse polarity of excitation voltage.
  • Page 275: Figure 87: Voltage Measurement Accuracy (0° To 40°C)

    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)  ...
  • Page 276: Voltage Range

    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.
  • Page 277: Fixed Voltage Ranges

    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.
  • Page 278: Offset Voltage Compensation

    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%;...
  • Page 279: Ground Reference Offset Voltage

    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;...
  • Page 280: Ac Power Line Noise Rejection

    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;...
  • Page 281: Figure 88: Ac Power Line Noise Rejection Techniques

    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.
  • Page 282: Signal Settling Time

    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.
  • Page 283: Minimizing Settling Errors

    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.
  • Page 285: Self-Calibration

    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".
  • Page 287: Table 59. Status Table Calibration Entries

    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...
  • Page 289: Table 60. Calibrate() Instruction Results

    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  ...
  • Page 290: Time Skew Between Measurements

    Section 8. Operation Table 60. Calibrate() Instruction Results Descriptions of Array Elements Array Cal() Typical Value Differential (Diff) ±mV Input Element Offset or Gain Integration Single-Ended (SE) Range Gain 60-Hz Rejection -0.067 mV/LSB Offset 60-Hz Rejection ±5 LSB Diff Offset 60-Hz Rejection ±5 LSB Gain...
  • Page 291: Resistance Measurements

    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.
  • Page 292: Table 61. Resistive-Bridge Circuits With Voltage Excitation

    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().
  • Page 293: Ac Excitation

    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"...
  • Page 294: Accuracy Of Ratiometric-Resistance Measurements

    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.
  • Page 295: Figure 91: Deriving ∆V1

    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 ...
  • Page 296: Strain Calculations

    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.
  • Page 297: Thermocouple

    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.
  • Page 298: Figure 92: Pulse-Sensor Output Signal Types

    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.
  • Page 299: Pulse-Input Channels (P1 - P2)

    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...
  • Page 300: High-Frequency Pulse (P1 - P2)

    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 ≤...
  • Page 301: Pulse Input On Digital I/O Channels C1 - C4

    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.
  • Page 302: Low-Frequency Mode

    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.
  • Page 303: Frequency Resolution

    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) ...
  • Page 304: Table 65. Example. E For A 10 Hz Input Signal

    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.
  • Page 305: Pulse Measurement Problems

    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.
  • Page 306: Figure 96: Amplitude Reduction Of Pulse-Count Waveform (Before And After 1-Μs Time Constant Filter)

    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*.
  • Page 307: Switch Bounce And Nan

    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.
  • Page 308: Recording

    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.
  • Page 309: Field Calibration

    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  ...
  • Page 310: Sensors

    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.
  • Page 311: Measurement And Control Peripherals

    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.  ...
  • Page 312: Analog-Input Expansion Modules

    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.
  • Page 313: Relays And Relay Drivers

    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.
  • Page 314: Analog Control / Output Devices

    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.
  • Page 315: Tims

    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.
  • Page 316: Table 70. Cr800 Memory Allocation

    Section 8. Operation Table 70. CR800 Memory Allocation Memory Comments Sector Internal battery-backed See table CR800 SRAM Memory for detail. (p. 317) SRAM 4 MB* Operating system Internal Flash 2 MB Device Settings — A backup of settings such as PakBus address, station name, beacon Internal Serial Flash intervals, neighbor lists, etc.
  • Page 317: Table 71. Cr800 Sram Memory

    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.
  • Page 318: Data Storage

    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...
  • Page 319: Usb: 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.
  • Page 320: Table 73. Tablefile()-Instruction Data-File Formats

    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. ...
  • Page 322 Section 8. Operation CSIJSON CSIJSON files contain header information and data in a JSON format.    Example:  "signature": 38611,"environment": {"stationfiname": "11467","tablefiname": "Test","model": "CR1000","serialfino": "11467", "osfiversion": "CR1000.Std.21.03","progfiname": "CPU:file format.CR1"},"fields": [{"name": "battfivoltfiMin","type": "xsd:float", "process": "Min"},{"name": "PTemp","type": "xsd:float","process": "Smp"}]}, "data": [{"time": "2011-01-06T15:04:15","no": 0,"vals": [13.28,21.29]}, {"time": "2011-01-06T15:04:30","no": 1,"vals": [13.28,21.29]}, {"time": "2011-01-06T15:04:45","no": 2,"vals": [13.28,21.29]}, {"time": "2011-01-06T15:05:00","no": 3,"vals": [13.28,21.29]}]}...
  • Page 323: Memory Conservation

    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: •...
  • Page 324: Program Send Reset

    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.
  • Page 326: File Attributes

    (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.
  • Page 327: External Memory Power-Up

    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...
  • Page 328: Creating And Editing Powerup.ini

    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.
  • Page 329: Table 77. Powerup.ini Commands

    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:.
  • Page 330: File Management Q & A

    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.
  • Page 331: File Names

    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.
  • Page 332: Telecommunications And Data Retrieval

    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...
  • Page 333: Hardware And Carrier Signal

    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.
  • Page 334: Pakbus Overview

    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®...
  • Page 335: Pakbus Addresses

    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.
  • Page 336: Figure 103: Pakbus Network Addressing

    Section 8. Operation Figure 103: PakBus network addressing LoggerNet is configured by default as a router and can route datalogger- to- datalogger communications. Table 80. PakBus Leaf-Node and Router Device Configuration Network PakBus PakBus PakBus Description Transparent Device Leaf Node Router Aware CR200X...
  • Page 337: Linking Pakbus Nodes: Neighbor Discovery

    Section 8. Operation Table 80. PakBus Leaf-Node and Router Device Configuration Network PakBus PakBus PakBus Description Transparent Device Leaf Node Router Aware SC932A Serial interface • Telephone COM220 • modem Telephone COM310 • modem Short-haul SRM-5A • modem This network link is not compatible with CR800 datalogger.  ...
  • Page 338: Hello-Request (One-Way Broadcast)

    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 .
  • Page 339: Pakbus Troubleshooting

    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.
  • Page 340: Traffic Flow

    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).
  • Page 341: Pakbus Lan Example

    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.
  • Page 342: Lan Setup

    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.
  • Page 343: Figure 108: Devconfig Deployment | Comports Settings Tab

    Section 8. Operation Figure 108: DevConfig Deployment | ComPorts Settings tab Figure 109: DevConfig Deployment | Advanced tab  ...
  • Page 344: Loggernet Setup

    Section 8. Operation Table 82. PakBus-LAN Example Datalogger-Communications Settings Software→ Device Configuration Utility (DevConfig) Tab→ Deployment Sub-Tab→ Datalogger ComPort Settings Advanced Setting→ PakBus Adr COM1 COM2 Is Router Sub-Setting→ Baud Rate Neighbors Baud Rate Neighbors Datalogger ↓ Begin: End: Begin: End: CR800_1 115.2K Fixed...
  • Page 345: Figure 111: Loggernet Network-Map Setup: Pakbusport

    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  ...
  • Page 346: Pakbus Encryption

    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 •...
  • Page 347: Alternate Telecommunications

    (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.
  • Page 348: Crbasic Instructions

    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...
  • Page 349: Programming For Data-Acquisition

    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.
  • Page 350: Modbus

    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.
  • Page 351: Terminology

    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...
  • Page 352: Programming For Modbus

    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.
  • Page 353: Addressing (Modbusaddr)

    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.
  • Page 354: Modbus Over Ip

    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 ...
  • Page 355: Web Service Api

    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).
  • Page 356: Command Syntax

    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.
  • Page 357: Table 87. Api Commands, Parameters, And Arguments

    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.
  • Page 358: Time Syntax

    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.
  • Page 359: Table 88. Browsesymbols Api Command Parameters

    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>...
  • Page 362: Dataquery Command

    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},...
  • Page 363: Table 90. Dataquery Api Command Parameters

    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 365 Section 8. Operation <tr valign="middle" align="center"> <td nowrap>2012-08-21 22:41:50.0</td> <td nowrap>104</td> <td nowrap>66</td> </tr> <tr valign="middle" align="center"> <td nowrap>2012-08-21 22:42:00.0</td> <td nowrap>105</td> <td nowrap>66</td> </tr> <tr valign="middle" align="center"> <td nowrap>2012-08-21 22:42:10.0</td> <td nowrap>106</td> <td nowrap>66</td> </tr> <tr valign="middle" align="center"> <td nowrap>2012-08-21 22:42:20.0</td> <td nowrap>107</td>...
  • 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"  ...
  • Page 368: Control

    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.
  • Page 369: Table 92. Setvalue Api Command Response

    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.
  • Page 370: Clock Functions

    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.
  • Page 371: Table 94. Clockset Api Command Response

    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.
  • Page 372: Clockcheck Command

    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.
  • Page 374: Files Management

    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).
  • Page 375: Filecontrol Command

    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:.
  • Page 376: Table 98. Filecontrol Api Command Parameters

    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 —...
  • Page 377: Listfiles Command

    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.
  • Page 378: Table 101. Listfiles Api Command Response

    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>...
  • Page 380 Section 8. Operation Page source template: <!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>...
  • Page 381: Newestfile Command

    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,...
  • Page 382: Support Software

    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).
  • Page 383: Table 103. Special Keyboard-Display Key Functions

    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]...
  • Page 384: Figure 113: Using The Keyboard / Display

    Section 8. Operation Figure 113: Using the keyboard / display 384     ...
  • Page 385: Data Display

    Section 8. Operation 8.8.1 Data Display Figure 114: Displaying data with the keyboard / display  ...
  • Page 386: Real-Time Tables And Graphs

    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.
  • Page 387: Figure 116: Real-Time Custom

    Section 8. Operation Figure 116: Real-time custom  ...
  • Page 388: Final-Storage Tables

    Section 8. Operation 8.8.1.3 Final-Storage Tables Figure 117: Final-storage tables 388     ...
  • Page 389: Run/Stop Program

    Section 8. Operation 8.8.2 Run/Stop Program Figure 118: Run/Stop Program  ...
  • Page 390: File Display

    Section 8. Operation 8.8.3 File Display Figure 119: File display 390     ...
  • Page 391: File: Edit

    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  ...
  • Page 392: Ports And Status

    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     ...
  • Page 393: Set Time / Date

    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.
  • Page 395: Table 104. Typical Gzip File Compression Results

    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.  ...
  • Page 396 Section 8. Operation 396     ...
  • Page 397: Section 9. Maintenance

    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.
  • Page 398: Figure 124: Loosening Retention Nuts

    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.
  • Page 399: Figure 125: Pulling Edge Away From Panel

    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.  ...
  • Page 400: Repair

    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.
  • Page 402 Section 9. Maintenance   402     ...
  • Page 403: Section 10. Troubleshooting

    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.
  • Page 404: Compileresults

    "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.
  • Page 405: Skippedscan

    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.
  • Page 406: Progerrors

    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   ...
  • Page 407: Watchdoginfo.txt File

    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.
  • Page 408: Nan And ±Inf

    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.
  • Page 409: Data Types, Nan, And ±Inf

    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 ).
  • Page 410: Output Processing And Nan

    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.
  • Page 411: Communications

    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.
  • Page 412: Table 109. Commsmemfree(1) Defaults And Use Example, Tls Not Active

    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...
  • Page 413: Commsmemfree(2)

    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)
  • Page 414: Power Supplies

    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.
  • Page 415: Troubleshooting Power At A Glance

    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.  ...
  • Page 416: Charging Regulator With Solar-Panel Test

    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.
  • Page 418: Charging Regulator With Transformer Test

    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     ...
  • Page 419: Adjusting Charging Voltage

    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.
  • Page 421: Terminal Emulator

    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.
  • Page 422: Table 111. Cr800 Terminal Commands

    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  ...
  • Page 424: Serial Talk Through And Sniffer

    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).
  • Page 425: Section 11. Glossary

    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 ...
  • Page 449: Concepts

    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.
  • Page 450 Section 11. Glossary 450     ...
  • Page 451: Appendix A. Crbasic Programming Instructions

    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.
  • Page 452: Variable Declarations & Modifiers

    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     ...
  • Page 453: Constant Declarations

    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]...
  • Page 454: Data Destinations

    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 ...
  • Page 455: Final Data Storage (Output) Processing

    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 ...
  • Page 456: Multiple-Source

    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. ...
  • Page 457: Single Execution At Compile

    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...
  • Page 460: Advanced Program Controls

    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...
  • Page 461: Measurement Instructions

    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.
  • Page 462: Voltage

    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. ...
  • Page 463: Excitation

    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 ...
  • Page 464: Digital I/O

    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 ...
  • Page 465: 465

    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 ...
  • Page 467: Wireless Sensor Network

    Appendix A. CRBasic Programming Instructions Therm107  Measures a Campbell Scientific 107 thermistor.  Syntax  Therm107(Dest, Reps, SEChan, Vx/ExChan, SettlingTime, Integ, Mult, Offset) Therm108  Measures a Campbell Scientific 108 thermistor.  Syntax  Therm108(Dest, Reps, SEChan, Vx/ExChan, SettlingTime, Integ, Mult, Offset) Therm109  Measures a Campbell Scientific 109 thermistor.  Syntax  Therm109(Dest, Reps, SEChan, Vx/ExChan, SettlingTime, Integ, Mult, Offset) A.5.9.1 Wireless Sensor Network ArrayIndex ...
  • Page 468: Peripheral Device Support

    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 ...
  • Page 470: Processing And Math Instructions

    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 ...
  • Page 471: Arithmetic Operators

    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...
  • Page 472: Compound-Assignment Operators

    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.
  • Page 473: Logical Operators

    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)  ...
  • Page 474: Trigonometric Functions

    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...
  • Page 475: Arithmetic Functions

    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 ...
  • Page 477: Integrated Processing

    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 ...
  • Page 478: Spatial Processing

    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 ...
  • Page 479: Other Functions

    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.
  • Page 480: String Functions

    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.
  • Page 481: String Commands

    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 ...
  • Page 483: Clock Functions

    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 ...
  • Page 485: Voice-Modem Instructions

    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 ...
  • Page 486: Custom Keyboard And Display Menus

    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.
  • Page 487: Serial Input / Output

    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 ...
  • Page 488: Peer-To-Peer Pakbus Communications

    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 ...
  • Page 492: Variable Management

    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.
  • Page 493: File Management

    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 ...
  • Page 495: Data-Table Access And Management

    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 ...
  • Page 496: Information Services

    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 ...
  • Page 499: Modem Control

    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() ...
  • Page 500: Calibration Functions

    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  ...
  • Page 501: Satellite Systems

    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 ...
  • Page 502: Goes

    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 ...
  • Page 503: Inmarsat-C

    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     ...
  • Page 505: Appendix B. Status Table And Settings

    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.
  • Page 506: Table 117. Status-Table Fields And Descriptions

    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.
  • Page 518: Table 118. Cr800 Settings

    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     ...
  • Page 527: Appendix C. Serial Port Pinouts

    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.
  • Page 528: Power States

    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...
  • Page 530 Appendix C. Serial Port Pinouts     530     ...
  • Page 531: Appendix D. Ascii / Ansi Table

    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...
  • Page 532 Appendix D. ASCII / ANSI Table Keyboard Hyper- Keyboard Hyper- Display LoggerNet Terminal Display LoggerNet Terminal Char Char Char Char Char Char ▲ ž ▼ Ÿ ƒ á ¡ í " " " ¢ ó £ ú ¤ ñ ¥ Ñ...
  • Page 533 Appendix D. ASCII / ANSI Table Keyboard Hyper- Keyboard Hyper- Display LoggerNet Terminal Display LoggerNet Terminal Char Char Char Char Char Char Á ┴ Â ┬ Ã ├ Ä ─ Å ┼ Æ ╞ Ç ╟ È ╚ É ╔ Ê...
  • Page 534 Appendix D. ASCII / ANSI Table Keyboard Hyper- Keyboard Hyper- Display LoggerNet Terminal Display LoggerNet Terminal Char Char Char Char Char Char ä Σ å σ æ µ ç τ è Φ é Θ ê Ω ë δ ì ∞ í...
  • Page 535: Appendix E. Fp2 Data Format

    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.
  • Page 536 Appendix E. FP2 Data Format         536     ...
  • Page 537: Appendix F. Other Campbell Scientific Products

    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.
  • Page 538: Wireless Sensor Network

    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.
  • Page 539: Pulse / Frequency Input Expansion Modules

    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  ...
  • Page 540: Voltage Dividers

    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.
  • Page 541: Control Output Modules

      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...
  • Page 542: Power Supplies

    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.
  • Page 543: Batteries

    Model Description BPALK D-cell, 12-Vdc alkaline battery pack 12-Ahr, sealed-rechargeable battery (requires regulator & BP12 primary source). Includes mounting bracket for Campbell Scientific enclosures. 24-Ahr, sealed-rechargeable battery (requires regulator & BP24 primary source). Includes mounting bracket for Campbell Scientific enclosures.
  • Page 544: Primary Power Sources

    Appendix F. Other Campbell Scientific Products F.6.5 Primary Power Sources Table 144. Primary Power Sources Model Description 18-Vac, 1.2-A wall-plug charger (accepts 110-Vac mains 9591 power, requires regulator) 18-Vdc wall-plug charger (accepts 90- to 264-Vac mains 14014 power, requires regulator)
  • Page 545: Telecommunications Products

    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.
  • Page 546: Private Network Radios

    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...
  • Page 547: Datalogger Support Software

    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.
  • Page 548: Loggernet Suite

    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...
  • Page 549: Software Development Kits

    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 551: Index

    Index Amperes (Amps) ..........425  Analog............36, 60, 270,  425  12V Terminal..........62  Analog Control..........314  12‐Volt Supply ..........86  Analog Input ..........36  Analog Input Expansion.........312  Analog Input Range ........276  5 V‐Low ............506  Analog Measurement ........90, 274, 408  50 Hz Rejection ..........82, 280  Analog Output ..........61, 314, 463  5‐V Pin............527  Analog Sensor..........309  5V Terminal............62  AND ...............473  5‐Volt Supply ..........85  AND Operator..........230, 473  AngleDegrees ..........451  ANSI ...............425, 531  API ..............70  60‐Hz Rejection..........82, 280  Argos..............501  ArgosData ............501  ArgosDataRepeat...........501 ...
  • Page 552 Index Backup............36, 76  CalFile............493  Backup Battery..........36, 76, 398  Calibrate............500, 503  Battery ............36, 64, 82,  Calibration ............ 76, 134, 152,  83, 186, 398,  278, 285,  415, 461,  309  506  Calibration ‐‐ Background ......506  Baud .............. 44, 92, 411,  Calibration ‐‐ Functions......... 500  488, 499  Call ..............457  Baud Rate............204, 205,  Callback............168, 333,  350, 426,  427, 434,  487, 492,  499  501, 506, ...
  • Page 553 Index Concatenation ..........239  Custom Menu ..........69, 70, 486  Conditional Compile ........199, 200  CVI ..............428  Conditional Output ........252  CWB100 ............467  Conditioning Circuit ........308  CWB100Routes..........467  Configuration..........92  CWB100RSSI ..........467  Configure Display...........393  Connection ............34, 43, 60,  83  Data / Read / Restore ........460  Conservation..........129, 151,  Data Acquisition System ‐‐ Components ..33  210, 323  Data bits ............204  Conserving Code Space........150  Data Collection ..........33, 51  Const..............123, 453  Data Fill Days ..........506  Constant ............116, 122,  Data Format...........68, 535  123, 428 ...
  • Page 554 Index Desiccant............75, 81, 429  Editor ............46  DevConfig............92, 429  Editor ‐ Short Cut .......... 108  Device Configuration........92  Email ............. 167, 496  Device Map ........... 340  EMailRecv ............. 496  DewPoint............477  EMailSend ............. 496  DHCP ............. 173, 430  EMF ............... 272  DHCPRenew ..........496  Enclosures............. 70, 81  Diagnosis ‐ Power Supply......415  Encrypt............
  • Page 555 Index Field ‐ Zero.............154  Full Duplex .............432  Field Calibration..........151, 152,  Full Memory Reset ........506, 518  309  Full‐Bridge .............37, 291  Field Calibration Slope Only......161  Function / EndFunction .........503  FieldCal ............154, 500  Function Codes ‐ Modbus......353  FieldCalStrain..........162, 164,  500  FieldNames ............455  Gain ...............141, 142,  File Management...........100, 324,  274  493  Garbage ............432  FileClose............493  Gas‐discharge Tubes........86  FileCopy ............493  GetDataRecord ..........489  FileEncrypt .............493  GetFile ............489  FileList............493  GetRecord............495  FileManage ............493  GetVariables ..........489 ...
  • Page 556 Index HTTPOut............496  Instructions ‐‐ HTTPPOST ......496  Humidity ............75, 81  Instructions ‐‐ HTTPPUT........ 496  HydraProbe ........... 465  Instructions ‐‐ IPNetPower......496  Instructions ‐‐ RainFlowSample ....456, 479  Instructions ‐‐ Resistance......291  Instructions ‐‐ SDMAO4A......468  I/O ..............201, 310,  Instructions ‐‐ SolarPosition......477  487  Instructions ‐‐ SPrintF ........481  I/O Port ............42  Instructions ‐‐ XMLParse....... 496  ID..............96  InstructionTimes ........... 461  IEEE4 .............
  • Page 557 Index Lightning ............34, 75, 86,  Median ............455  431  Memory ............66, 151, 315  Lightning Protection ........88  Memory Free ..........506  Lightning Rod..........88  MemoryTest ..........461  Line Continuation ..........115  Menu ‐ Custom..........194, 486  Linear Sensor ..........309  MenuItem............486  Link Performance...........340  MenuPick............486  Lithium Battery ..........36, 398, 506  Messages ............506  Little Endian...........204  Mid ..............481  LN or LOG............475  Milli..............435  LoadFieldCal...........500  Millivoltage Measurement ......270  Lock..............70  Minimum ............455  LOG10 ............475  MinSpa............478 ...
  • Page 558 Index Network ............489  Output Processing......... 130  NetworkTimeProtocol........496  OutputOpt............. 190  NewFieldCal ..........500  Overrange ............. 259, 277,  NewFieldNames ..........452  408, 436  NewFile ............493  Overrun............403, 506  NIST............... 437  Overview............58  Node.............. 335, 437,  Overview ‐ Modbus ........350  506, 518  Overview ‐ Power Supply......414  Noise ............. 82, 272, 279,  280, 281 ...
  • Page 559 Index Polarity Reversal ..........278  Program Control Instructions ......440  Polarized Sensor ..........293  Program Editor ..........46  Port ..............42, 63, 203,  Program Errors ..........404, 406,  392, 506,  506  527  Program Example ..........105, 106,  Port Connection..........43  110, 112,  Port Settings ..........100  117, 118,  PortGet ............464  120, 121,  PortsConfig ............464  123, 127,  PortSet ............464  136, 140,  Power.............62, 64, 83,  141, 142,  84  144, 145,  Power Consumption ........83  147, 148,  Power States..........528  151, 155, ...
  • Page 560 Index Quarter‐Bridge Shunt........165  Route Filter ........... 518  Quarter‐Bridge Zero........166  Router ............335, 336,  Quickstart Tutorial ........33  506, 518  RoutersNeighbors ......... 489  Routes............489, 518  RS‐232............40, 60, 205,  Rain Gage ............309  411, 441,  RainFlow............479  506, 518  Randomize ............ 479  RTrim............. 481  Ratiometric ........... 294  RTU ............... 352  RC Resistor Shunt..........
  • Page 561 Index SDMIO16............468  Settling Time..........280, 282,  SDMSIO4............468  283, 284,  SDMSpeed .............468  285, 309  SDMSW8A............468  SGN..............475  SDMTrigger ............468  Short Cut............46  SDMX50 ............468  Shunt Calibration...........166  SecsPerRecord ..........506  Shunt Zero .............166  SecsSince1990 ..........483  Shut Down Sequence........132  Security ............70, 506, 518  ShutDownBegin ..........460  Seebeck Effect ..........442  ShutDownEnd..........460  Select Case / Case / Case Is / Case Else / EndSelect ..457  SI Système Internationale......443  Self‐Calibration ..........285  Signal Conditioner .........90  Semaphore ............442  Signal Settling Time ........282, 283  SemaphoreGet..........134, 460 ...
  • Page 562 Index Start Time............506  TableName.FieldName ......... 495  Start Up Code..........506  TableName.Output ........495  Starter Software..........44, 46  TableName.Record ........495  State.............. 444, 528  TableName.TableFull ........495  State Measurement ........42  TableName.TableSize........495  Statement Aggregation......... 115  TableName.TimeStamp ........ 495  StaticRoute............ 489  TAN ............... 474  StationName ..........96, 116, 451,  TANH............. 474  506, 518 ...
  • Page 563 Index Totalize ............455  Variable Management........492  Transducer.............33, 59, 285  Variable Modifier...........452  Transformer...........64, 418  Variable Out of Bounds .........506  Transient............62, 75, 83,  Vdc..............447  403, 431,  Vector ............192  448  Vehicle Power Connection ......83  Trigger ‐‐ Output..........223  Verify Interval ..........506, 518  Trigger Variable ..........223  Via CRBasic ............102  Triggers ............223  Vibrating Wire Input Module ......315  TriggerSequence ..........457  VibratingWire ..........464  Trigonometric Function .........474  Viewing Data ..........44, 51  TrigVar ............223, 224  Voice Modem ..........485  Trim..............481 ...
  • 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)

This manual is also suitable for:

Cr800

Table of Contents