-
CR1000 Measurement and Control System Revision: 5/13 C o p y r i g h t © 2 0 0 0 - 2 0 1 3 C a m p b e l l S c i e n t i f i c , I n c .
-
-
Warranty The CR1000 Measurement and Control Datalogger is warranted for three (3) years subject to this limited warranty: “PRODUCTS MANUFACTURED BY CAMPBELL SCIENTIFIC, INC. are warranted by Campbell Scientific, Inc. (“Campbell”) to be free from defects in materials and workmanship under normal use and service for twelve (12) months from date of shipment unless otherwise specified in the corresponding Campbell pricelist or product manual.
-
-
Assistance Products may not be returned without prior authorization. The following contact information is for US and International customers residing in countries served by Campbell Scientific, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 227-2342.
-
-
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 ...............
-
Table of Contents Section 5. System Overview ..........................................57 5.1 CR1000 Datalogger................................................................................. 58 5.1.1 Clock.............................................................................................. 59 5.1.2 Sensor Support............................................................................... 59 5.1.3 CR1000 Wiring Panel.................................................................... 60 5.1.3.
-
Table of Contents Section 7. Installation.....................................................81 7.1 Moisture Protection................................................................................. 81 7.2 Temperature Range ................................................................................. 81 7.3 Enclosures ............................................................................................... 81 7.4 Power Sources....................................................................
-
Table of Contents 7.7.3.4 Single-Line Declarations.................................................... 115 7.7.3.4.1 Variables................................................................... 115 7.7.3.4.2 Constants .................................................................. 122 7.7.3.4.3 Alias and Unit Declarations...................................... 124 7.7.3.5 Declared Sequences ........................................................... 125 7.7.3.5.1 Data Tables...............................
-
Table of Contents 7.8.2.5 FTP Client.......................................................................... 171 7.8.2.6 Telnet ................................................................................. 171 7.8.2.7 SNMP................................................................................. 171 7.8.2.8 Ping .................................................................................... 171 7.8.2.9 Micro-Serial Server............................................................ 172 7.8.
-
Table of Contents 7.8.13.4 Inserting String Characters............................................... 239 7.8.13.5 Extracting String Characters ............................................ 239 7.8.13.6 String Use of ASCII / ANSII Codes ................................ 239 7.8.13.7 Formatting Strings............................................................ 240 7.8.13.8 Formatting String Hexadecimal Variables ....................... 240 7.8.14 Data Tables ...................................................
-
Table of Contents 8.1.2.8.2 Measuring the Necessary Settling Time ................... 287 8.1.2.9 Self-Calibration.................................................................. 289 8.1.2.10 Time Skew Between Measurements ................................ 294 8.1.3 Resistance Measurements............................................................ 295 8.1.3.1 ac Excitation....................................................................... 297 8.1.3.2 Accuracy of Ratiometric-Resistance Measurements....
-
Table of Contents 8.3.1.1 Data Storage....................................................................... 332 8.3.1.1.1 Data Table SRAM .................................................... 333 8.3.1.1.2 CPU: Drive ............................................................... 333 8.3.1.1.3 USR: Drive ............................................................... 333 8.3.1.1.4 USB: Drive ............................................................... 334 8.3.1.1.5 CRD: Drive............................
-
Table of Contents 8.6.2 Modbus ........................................................................................ 367 8.6.2.1 Overview............................................................................ 367 8.6.2.2 Terminology....................................................................... 368 8.6.2.2.1 Glossary of Terms .................................................... 368 8.6.2.3 Programming for Modbus .................................................. 369 8.6.2.3.1 Declarations...
-
Table of Contents Section 10. Troubleshooting........................................423 10.1 Status Table......................................................................................... 423 10.2 Operating Systems............................................................................... 423 10.3 Programming....................................................................................... 423 10.3.1 Status Table as Debug Resource................................................ 423 10.3.1.
-
Table of Contents A.2.2 Data Destinations........................................................................ 476 A.2.3 Final Data Storage (Output) Processing ..................................... 477 A.2.3.1 Single-Source .................................................................... 477 A.2.3.2 Multiple-Source ................................................................ 478 A.3 Single Execution at Compile................................................................ 479 A.
-
Table of Contents A.21 User Defined Functions...................................................................... 525 Appendix B. Status Table and Settings ......................527 Appendix C. Serial Port Pinouts..................................549 C.1 CS I/O Communications Port ............................................................... 549 C.2 RS-232 Communications Port .............................................................. 549 C.2.1 Pin-Out................................................
-
Table of Contents F.10.3 Software Tools .......................................................................... 571 F.10.4 Software Development Kits ...................................................... 571 Index ..............................................................................573 List of Figures Figure 1: Data-acquisition system components............................................. 34 Figure 2: Wiring panel ................................................................................
-
Table of Contents Figure 49: Quarter-bridge strain-gage schematic with RC-resistor shunt ... 163 Figure 50: Strain-gage shunt calibration started.......................................... 165 Figure 51: Strain-gage shunt calibration finished........................................ 165 Figure 52: Starting zero procedure.............................................................. 166 Figure 53: Zero procedure finished .............................................................
-
Table of Contents Figure 104: Current limiting resistor in a rain gage circuit ......................... 325 Figure 105: Control port current sourcing................................................... 328 Figure 106: Relay driver circuit with relay ................................................. 329 Figure 107: Power switching without relay ................................................ 329 Figure 108: PakBus network addressing .....................................................
-
Table of Contents Table 19. Binary Conditions of TRUE and FALSE.................................... 146 Table 20. Logical Expression Examples ..................................................... 146 Table 21. Abbreviations of Names of Data Processes................................. 148 Table 22. Calibration Report for Air RH Sensor......................................... 154 Table 23. Calibration Report for Salinity Sensor ........................................ 156 Table 24.
-
Table of Contents Table 71. Frequency Resolution Comparison ............................................. 319 Table 72. Example of Differing Specifications for Pulse-Input Channels .. 320 Table 73. Time Constants (τ) ...................................................................... 321 Table 74. Filter Attenuation of Frequency Signals. .................................... 321 Table 75. CR1000 Memory Allocation....................................................... 330 Table 76. CR1000 SRAM Memory .....
-
Table of Contents Table 125. Standard Null-Modem Cable or Adapter-Pin Connections* ..... 551 Table 126. FP2 Data-Format Bit Descriptions ............................................ 557 Table 127. FP2 Decimal-Locater Bits ......................................................... 557 Table 128. Wired Sensor Types .................................................................. 559 Table 129. Wireless Sensor Modules .......................................................... 560 Table 130.
-
Table of Contents CRBasic Example 15. BeginProg / Scan() / NextScan / EndProg Syntax .. 136 CRBasic Example 16. Scan Syntax............................................................. 136 CRBasic Example 17. Measurement Instruction Syntax............................. 140 CRBasic Example 18. Use of Expressions in Arguments ........................... 141 CRBasic Example 19. Use of Arrays as Multipliers and Offsets ................ 142 CRBasic Example 20. Conversion of FLOAT / LONG to Boolean............
-
Table of Contents CRBasic Example 68. Using NAN in Expressions ..................................... 428 CRBasic Example 69. Using NAN to Filter Data ....................................... 431 CRBasic Example 70. Using Bit-Shift Operators ....................................... 495 CRBasic Example 71. Retries in PakBus Communications........................
-
Section 1. Introduction 1.1 HELLO Whether in extreme cold in Antarctica, scorching heat in Death Valley, salt spray from the Pacific, micro-gravity in space, or the harsh environment of your office, Campbell Scientific dataloggers support research and operations all over the world. Our customers work a broad spectrum of applications, from those more complex than any of us imagined, to those simpler than any of us thought practical. The limits of the CR1000 are defined by our customers.
-
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 — CRBasic code, input commands, and output responses when set apart on dedicated lines or in program examples.
-
Section 2. Cautionary Statements The CR1000 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. The internal battery will be depleted in three years or less if a CR1000 is left on the shelf. When the CR1000 is continuously used, the internal battery may last up to 10 or more years.
-
Section 2.
-
Section 3. Initial Inspection • The CR1000 datalogger ship with, o 1 each pn 8125 small, flat-bladed screwdriver o 1 each pn 1113 large, flat-bladed screwdriver o 1 each pn 3315 five-inch long, type-T thermocouple for use as a tutorial device o One datalogger program pre-loaded into the CR1000 o 4 each pn 505 screws for use in mounting the CR1000 to an enclosure backplate. o 4 each pn 6044 nylon hardware inserts for use in mounting the CR1000 to a Campbell Scientific enclosure backplate.
-
Section 3.
-
Section 4. Quickstart Tutorial This tutorial presents an introduction to CR1000 data acquisition. 4.1 Primer – CR1000 Data-Acquisition Data acquisition with the CR1000 is the result of a step-wise procedure involving the use of electronic sensor technology, the CR1000, a telecommunications link, and datalogger support software (p. 77). 4.1.1 Components of a Data-Acquisition System A typical data-acquisition system is conceptualized in figure Data-Acquisition System Components (p. 34).
-
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 CR1000 Module and Power Supply 4.1.2.1 Wiring Panel As shown in figure CR1000 Wiring Panel (p. 35), the wiring panel provides terminals for connecting sensors, power and communications devices. Internal surge protection is incorporated with the input channels.
-
Section 4. Quickstart Tutorial Figure 2: Wiring panel 4.1.2.2 Power Supply The CR1000 is powered by a nominal 12 Vdc source. Acceptable power range is 9.6 to 16 Vdc. External power connects through the green POWER IN on the face of the CR1000. The POWER IN connection is internally reverse-polarity protected. 4.1.2.3 Backup Battery A lithium battery backs up the CR1000 clock, program, and memory in case of power loss. See Internal Battery (p. 76).
-
Section 4. Quickstart Tutorial 4.1.3 Sensors Most electronic sensors, whether or not manufactured or sold by Campbell Scientific, can be interfaced to the CR1000. Check for on-line content concerning interfacing sensors at www.campbellsci.com, or contact a Campbell Scientific applications engineer for assistance. 4.1.3.1 Analog Sensors Analog sensors output continuous voltages that vary with the phenomena measured. Analog sensors connect to analog terminals.
-
Section 4. Quickstart Tutorial Table 1. Single-Ended and Differential Input Channels Differential Channel Single-Ended Channel 1H 1 1L 2 2H 3 2L 4 3H 5 3L 6 4H 7 4L 8 5H 9 5L 10 6H 11 6L 12 7H 13 7L 14 8H 15 8L 16 4.1.3.2 Bridge Sensors Many sensors use a resistive bridge to measure phenomena. Pressure sensors and position sensors commonly use a resistive bridge.
-
Section 4. Quickstart Tutorial Figure 5: Half-bridge wiring -- wind vane potentiometer Figure 6: Full-bridge wiring -- pressure transducer 4.1.3.3 Pulse Sensors Pulse sensors are measured on CR1000 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. The CR1000 detects each wave as the wave transitions between voltage extremes (high to low or low to high).
-
Section 4. Quickstart Tutorial 4.1.3.3.1 Pulses Measured Figure Pulse Sensor Output Signal Types (p. 39) illustrates three pulse sensor output signal types. Figure 7: Pulse-sensor output signal types 4.1.3.3.2 Pulse-Input Channels Table Pulse-Input Channels and Measurements (p. 39) lists devices, channels and options for measuring pulse signals. Table 2.
-
Section 4. Quickstart Tutorial channel. Connect the other wire to a pulse channel. Sometimes the sensor will require power from the CR1000, so there will be two more wires – one of which is always ground. Connect power ground to a G channel. Do not confuse the pulse wire with the positive power wire, or damage to the sensor or CR1000 may result. Some switch-closure sensors may require a pull-up resistor. Consult figure Connecting Switch Closures to Digital I/O (p.
-
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 4.1.4 Digital I/O Ports The CR1000 has eight digital I/O ports selectable as binary inputs or control outputs. These are multi-function ports. Edge timing, switch closure, and highfrequency pulse functions are introduced in Pulse Sensors (p. 38) and discussed at length in Pulse (p. 312).
-
Section 4. Quickstart Tutorial Figure 11: Control and monitoring with digital I/O 4.1.5 SDM Channels SDM (Serial Device for Measurement) devices expand the input and output capacity of the CR1000. Brief descriptions of SDM device capabilities are found in the appendix Sensors and Peripherals. These devices connect to the CR1000 through digital I/O ports C1, C2, and C3 C3. 4.1.
-
Section 4. Quickstart Tutorial 4.2.1 What You Will Need The following items are needed to complete this exercise: • Campbell Scientific CR1000 datalogger • Campbell Scientific PS100 12 Vdc power supply (or compatible power supply) with red and black wire leads. • Thermocouple (included with the CR1000) • Personal Computer (PC) with an available RS-232 serial port (a USB-to-RS232 cable may be used if an RS-232 port is not available). • RS-232 cable (included with the CR1000). • PC200W software.
-
Section 4. Quickstart Tutorial Figure 12: Power and RS-232 connections 4.2.3 PC200W Software Setup 1. Install the PC200W software onto a PC. Follow on-screen prompts during the installation process. Use the default program and destination folders. 2. Open the PC200W software (figure PC200W Main Window (p. 45) ). When the software is first run, the EZSetup Wizard will run automatically in a new window. This will configure the software to communicate with the CR1000.
-
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 Introduction Datalogger Type and Name Information Needed Provides and introduction to the EZSetup Wizard along with instructions on how to navigate through the wizard. Select the CR1000 from the scroll window. Accept the default name of "CR1000." Select the correct PC COM port for the RS-232 connection. Typically, this will be COM1.
-
Section 4. Quickstart Tutorial Table 3. PC200W EZSetup Wizard Example Selections Start the wizard to follow table entries. Screen Name Information Needed wizard. After exiting the wizard, the main PC200W window becomes visible. The window has several tabs available. By default, the Clock/Program tab is visible. This tab displays information on the currently selected CR1000 with clock and program functions. The Monitor Data or Collect Data tabs may be selected at any time.
-
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. Enter "1." A second prompt will appear requesting the thermocouple reference temperature source.
-
Section 4. Quickstart Tutorial Figure 15: Short Cut thermocouple wiring 4.2.4.3 Procedure: (Short Cut Steps 10 to 11) Historical Note In the space-race era, measuring thermocouples in the field was a complicated and cumbersome process incorporating a thermocouple wire with three junctions, a micro-voltmeter, a vacuum flask filled with an ice slurry, and a thick reference book. One thermocouple junction was connected to the microvoltmeter. Another sat in the vacuum flask.
-
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. These are used to set the time interval when data are stored. 13.
-
Section 4. Quickstart Tutorial Figure 17: Short Cut output table definition 4.2.4.5 Procedure: (Short Cut Step 17 to 18) 17. Click Finish to compile the program. Give the program the name QuickStart. A summary screen will appear showing the compiler results. Any errors during compiling will also be displayed.
-
Section 4. Quickstart Tutorial 18. Close this window by clicking on X in the upper right corner. 4.2.5 Send Program and Collect Data PC200W Support Software Objectives: This portion of the tutorial will use PC200W to send the program to the CR1000, collect data from the CR1000, and store the data on the PC. 4.2.5.1 Procedure: (PC200W Step 1) 1. From the PC200W Clock/Program tab, click on Connect button to establish communications with the CR1000.
-
Section 4. Quickstart Tutorial CR1000. To view the OneMin table, select an empty cell in the display area, then click Add. Figure 20: PC200W Monitor Data tab – Public table 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.
-
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 22: PC200W Collect Data tab 4.2.5.5 Procedure: (PC200W Steps 7 to 9) 7. Click the OneMin box so a check mark appears in the box. Under What to Collect, select New data from datalogger. This selects the to be collected. 8. Click on Collect.
-
Section 4. Quickstart Tutorial Figure 23: PC200W View data utility 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 CR1000_OneMin.dat file and click Open. 11. The collected data are now shown.
-
Section 4. Quickstart Tutorial Figure 24: PC200W View data table 4.2.5.7 Procedure: (PC200W Steps 12 to 13) 12. Click on any data column. To display the data in a new line graph, click on .
-
Section 4. Quickstart Tutorial 13. Close the Graph and View windows, and then close the PC200W program.
-
Section 5. System Overview A Campbell Scientific data-acquisition system is made up of the following basic components: • Sensors • Datalogger o Clock o Measurement and control circuitry o Telecommunications circuitry o User-entered CRBasic program • Telecommunications device • Datalogger support software (p. 77) (computer or mobile) The figure Features of a Data-Acquisition System (p. 58) illustrates a common CR1000-based data-acquisition system.
-
Section 5. System Overview Figure 26: Features of a data-acquisition system 5.1 CR1000 Datalogger The CR1000 datalogger is one part of a data acquisition system. It is a precision instrument designed for demanding, low-power measurement applications. CPU, analog and digital measurements, analog and digital outputs, and memory usage are controlled by the operating system in conjunction with the user program and on-board clock.
-
Section 5. System Overview Sensors transduce phenomena into measurable electrical forms, outputting voltage, current, resistance, pulses, or state changes. The CR1000, sometimes with the assistance of various peripheral devices, can measure nearly all electronic sensors. The CR1000 measures analog voltage and pulse signals, representing the magnitudes numerically.
-
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 CR1000 Wiring Panel The wiring panel of the CR1000 is the interface to many CR1000 functions. These functions are best introduced by reviewing features of the CR1000 wiring panel. The figure Wiring Panel (p.
-
Section 5. System Overview as compared to pulse-count measurements. The frequency resolution of pulsecount 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 — 2 channels (P1 to P2) configurable for counts or frequency of the following signal types.
-
Section 5. System Overview • Continuous Analog Output — available by adding a peripheral analog output device available from Campbell Scientific. Refer to the appendix CAO Modules (p. 563) for information on available output-expansion modules. 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.
-
Section 5. System Overview • Peripheral 5-Vdc Power Source — 1 terminal (5V) and associated ground (G) supply power to sensors and peripheral devices requiring regulated 5 Vdc. 5.1.3.5 Communications Ports Read More! See sections RS-232 and TTL Recording (p. 323), Telecommunications and Data Retrieval (p. 348), and PakBus Overview (p. 351). The CR1000 is equipped with six communications ports.
-
Section 5. System Overview CRBasic programming in the CR1000 facilitates creation of custom menus for the external keyboard / display. Figure Custom Menu Example (p. 70) shows windows from a simple custom menu named DataView. DataView appears as the main menu on the keyboard display. DataView has menu item Counter, and submenus PanelTemps, TCTemps and System Menu. Counter allows selection of one of four values. Each submenu displays two values from CR1000 memory.
-
Section 5. System Overview Common power devices are: • • Batteries o Alkaline D-cell — 1.5 Vdc / cell o Rechargeable lead-acid battery Charge sources o Solar panels o Wind generators o Vac / Vac or Vac / Vdc wall adapters Refer to the appendix Power Supplies (p. 564) for specific model numbers of approved power supplies. NOTE While the CR1000 has an input voltage range of 9.6 to 16 Vdc, peripherals (telecommunications devices, sensors, etc.
-
Section 5. System Overview 5.1.6.2 User Programming Read More! See sections Programming (p. 108) and CRBasic Programming Instructions (p. 473), and CRBasic Editor Help for more programming assistance. A CRBasic program directs the CR1000 how and when sensors are to be measured, calculations made, and data stored. A program is created on a PC and sent to the CR1000. The CR1000 can store a number of programs in memory, but only one program is active at a given time.
-
Section 5. System Overview • Main Memory o 4-MB SRAM o Battery backed o OS variables o CRBasic compiled program binary structure (490 kB maximum) o CRBasic variables o Final Storage o Communications memory o USR: drive User allocated FAT32 RAM drive Photographic images (See the appendix Cameras (p.
-
Section 5. System Overview Data stored on Campbell Scientific mass storage devices are retrieved through a telecommunication link to the CR1000 or by removing the device, connecting it to a PC, and copying / moving files using Windows Explorer. 5.1.8.3 Via CF Card Caution When installing a CF (p. 450) card module, first turn off the CR1000 power.
-
Section 5. System Overview The CR1000 communicates with external devices to receive programs, send data, or act in concert with a network. The primary communication protocol is PakBus. Modbus and DNP3 communication protocols are also supported. Refer to the appendix Telecommunications Hardware for information on available communications devices. 5.1.9.1 PakBus Read More! See PakBus Overview (p. 351).
-
Section 5. System Overview The CR1000 supports DNP3 slave communication for inclusion in DNP3 SCADA networks. 5.1.9.4 Keyboard Display Read More! See Using the Keyboard Display (p. 399). The external keyboard / display is a powerful tool for field use. It allows complete access to most datalogger tables and functions, which allow the user to monitor, make modifications, and troubleshoot a datalogger installation conveniently and in most weather conditions. 5.1.9.4.
-
Section 5. System Overview supplied void of active security measures. By default, RS-232, Telnet, FTP and HTTP services, all of which give high level access to CR1000 data and programs, are enabled without password protection. Campbell Scientific encourages CR1000 users who are concerned about security, especially those with exposure to IP threats, to send the latest operating system to the CR1000 (available at www.campbellsci.com) and to disable un-used services and secure those that are used.
-
Section 5. System Overview LoggerNet: • All datalogger functions and data are easily accessed via RS-232 and Ethernet using Campbell Scientific datalogger support software. • Cora command find-logger-security-code. Telnet: • Watch IP traffic in detail. IP traffic can reveal potentially sensitive information such as FTP login usernames and passwords, and server connection details including IP addresses and port numbers.
-
Section 5. System Overview Up to three levels of lockout can be set. Valid pass codes are 1 through 65535 (0 is no security). Note If a pass code is set to a negative value, a positive code must be entered to unlock the CR1000. That positive code will equal 65536 + (negative security code). For example, a security code of -1111 must be entered as 64425 to unlock the CR1000.
-
Section 5. System Overview 5.1.10.2.1 Security By-Pass Security can be bypassed at the datalogger using a external keyboard / displaykeyboard display. Pressing and holding the "Del" key while powering up a CR1000 will cause it to abort loading a program and provide a 120 second window to begin changing or disabling security codes in the settings editor (not Status table) with the keyboard display.
-
Section 5. System Overview 5.1.10.3.4 Settings Several CR1000 settings accessible with DevConfig enable the entry of various passwords. See Settings (p. 96). • PPP Password • PakBus/TCP Password • FTP Password • TLS Password (Transport Layer Security (TLS) Enabled) • TLS Private Key Password • AES-128 encrypted PakBus communications encryption key (see Communications Encryption (p. 75) ) 5.1.10.
-
Section 5. System Overview 5.1.11 Maintenance Read More! See Maintenance (p. 417). With reasonable care, the CR1000 should give many years of reliable service. 5.1.11.1 Protection from Water The CR1000 and most of its peripherals must be protected from moisture. Moisture in the electronics will seriously damage, and probably render unrepairable, the CR1000. Water can come from flooding or sprinkler irrigation, but most often comes as condensation.
-
Section 5. System Overview 5.2 Datalogger Support Software Read More! For a complete listing of available datalogger support software, see the appendix Software (p. 569). • PC200W Starter Software is available at no charge at www.campbellsci.com. It supports a transparent RS-232 connection between PC and CR1000, and includes Short Cut for creating CR1000 programs. Tools for setting the datalogger clock, sending programs, monitoring sensors, and on-site viewing and collection of data are also included.
-
Section 5.
-
Section 6. CR1000 Specifications 1.1 CR1000 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.
-
Section 6.
-
Section 7. Installation 7.1 Moisture Protection When humidity tolerances are exceeded and condensation occurs, damage to CR1000 electronics can result. Effective humidity control is the responsibility of the user. Internal CR1000 module moisture is controlled at the factory by sealing the module with a packet of silica gel inside. The desiccant is replaced whenever the CR1000 is repaired at Campbell Scientific.
-
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 worstcase power requirements and environmental extremes. For example, the power requirement of a weather station may be substantially higher during extreme cold, while at the same time, the extreme cold constricts the power available from the power supply.
-
Section 7. Installation Scientific application engineer if assistance in selecting a power supply is needed, particularly with applications in extreme environments. 7.4.1 CR1000 Power Requirement The CR1000 operates on dc voltage ranging from 9.6 to 16 Vdc. It is internally protected against accidental polarity reversal. A transient voltage suppressor (TVS) diode on the 12-Vdc power input terminal (p. 35) provides transient protection by clamping voltages in the range of 19 to 21 V.
-
Section 7. Installation with the largest voltage to power the CR1000 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. 82). The CR1000 wiring panel is a convenient power distribution device for powering sensors and peripherals that require a 5- or 12-Vdc source.
-
Section 7. Installation Table 4. Current Source and Sink Limits 1 Terminal Limit < 1.50 A @ 85°C 5 5V + CS I/O (combined) 1 < 200 mA "Source" is positive amperage; "sink" is negative amperage (-). 2 Exceeding current limits limits will cause voltage output to become unstable. Voltage should stabilize once current is again reduced to within stated limits. 3 A polyfuse is used to limit power. Result of overload is a voltage drop. To reset, disconnect and allow circuit to cool.
-
Section 7. Installation Note Table Current Source and Sink Limits (p. 84) has more information on excitation load capacity. 7.4.5.3 Continuous Unregulated (Nominal 12 Volt) Voltage on the 12V terminals will change with CR1000 supply voltage. 7.4.5.4 Switched Unregulated (Nominal 12 Volt) The SW-12 terminal is often used to control low power devices such as sensors that require 12 Vdc during measurement. Current sourcing must be limited to 900 mA or less at 20°C.
-
Section 7. Installation protection at installation. Spark-gap protection is usually an option with these products, so it should always be requested when ordering. Spark gaps for these devices must be connected to either the earth ground lug, the enclosure ground, or to the earth (chassis) ground. 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.
-
Section 7. Installation Figure 31: Schematic of grounds 7.5.1.1 Lightning Protection The most common and destructive ESDs are primary and secondary lightning strikes. Primary lightning strikes hit instrumentation directly. Secondary strikes induce voltage in power lines or wires connected to instrumentation.
-
Section 7. Installation lightning strike. Figure Lightning-Protection Scheme (p. 89) shows a simple lightning-protection scheme utilizing a lightning rod, metal mast, heavy-gage ground wire, and ground rod to direct damaging current away from the CR1000. Figure 32: Lightning-protection scheme 7.5.2 Single-Ended Measurement Reference Low-level, single-ended voltage measurements are sensitive to ground potential fluctuations.
-
Section 7. Installation grounds ( ) and power grounds (G). To take advantage of this design, observe the following grounding rule: Note Always connect a device ground next to the active terminal associated with that ground. Several ground wires can be connected to the same ground terminal. Examples: • Connect grounds associated with 5V, 12V, and C1 – C8 terminals to G terminals. • Connect excitation grounds to the closest ( terminal block.
-
Section 7. Installation 7.5.4 Ground Looping in Ionic Measurements When measuring soil-moisture with a resistance block, or water conductivity with a resistance cell, the potential exists for a ground loop error. In the case of an ionic soil matric potential (soil moisture) sensor, a ground loop arises because soil and water provide an alternate path for the excitation to return to CR1000 ground. This example is modeled in the diagram, figure Model of a Ground Loop with a Resistive Sensor (p. 92).
-
Section 7. Installation Figure 33: Model of a ground loop with a resistive sensor 7.6 CR1000 Configuration The CR1000 ships from Campbell Scientific to communicate with Campbell Scientific datalogger support software (p. 77) via RS-232. Some applications, however, require changes to the factory defaults. Most settings address telecommunication variations between the CR1000 and a network or PC.
-
Section 7. Installation • Provide a terminal emulator useful in configuring devices not directly supported by DevConfig graphical user interface. • Show Help as prompts and explanations. Help for the appropriate settings for a particular device can also be found in the user manual for that device. • Update from www.campbellsci.com. As shown in figure DevConfig CR1000 Facility (p.
-
Section 7. Installation Note Beginning with OS 25, the OS has become large enough that a CR1000 with serial number ≤ 11831, which has only 2 MB of SRAM, may not have enough memory to receive it under some circumstances. If problems are encountered with a 2 MB CR1000, sending the OS over a direct RS-232 connection is usually successful. Since sending an OS to the CR1000 resets memory, data loss will certainly occur. Depending on several factors, the CR1000 may also become incapacitated for a time.
-
Section 7. Installation Figure 35: DevConfig OS download window Figure 36: Dialog box confirming OS download 7.6.2.2 Sending OS with Program Send Operating system files can be sent using the Program Send command.
-
Section 7. Installation Program Send (p. 96), this has the benefit of usually (but not always) preserving CR1000 settings. Table 5. Operating System Version in which Preserve Settings via Program Send Instituted Datalogger OS Version / Date CR1000 16 / 11-10-08 CR800 7 / 11-10-08 CR3000 9 / 11-10-08 Campbell Scientific recommends upgrading operating systems only via a directhardwire link. However, the Send button in the datalogger support software (p. 399, p.
-
Section 7. Installation 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. This button will remain disabled if the device does not support the DevConfig protocol messages. Clicking Save on the summary screen will save the configuration to an XML file.
-
Section 7. Installation Figure 38: Summary of CR1000 configuration 7.6.3.1.1 Deployment Tab Illustrated in figure DevConfig Deployment Tab (p. 99), the Deployment tab allows 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.
-
Section 7. Installation Figure 39: DevConfig Deployment tab Datalogger Sub-Tab • Serial Number displays the CR1000 serial number. This setting is set at the factory and cannot be edited. • OS Version displays the operating system version that is in the CR1000. • Station Name displays the name that is set for this station. The default station name is the CR1000 serial number. • PakBus® Address allows users to set the PakBus® address of the datalogger. The allowable range is between 1 and 4094.
-
Section 7. Installation 100 • Beacon Interval sets the interval (in seconds) on which the datalogger will broadcast beacon messages on the port specified by Selected Port. • Verify Interval specifies the interval (in seconds) at which the datalogger will expect to have received packets from neighbors on the port specified by Selected Port.
-
Section 7. Installation Figure 40: DevConfig Deployment | ComPorts Settings tab Advanced Sub-Tab • Is Router allows the datalogger to act as a PakBus® router. • PakBus Nodes Allocation indicates the maximum number of PakBus® devices the CR1000 will communicate with if it is set up as a router. This setting is used to allocate memory in the CR1000 to be used for its routing table. • Max Packet Size is the size of PakBus® packets transmitted by the CR1000.
-
Section 7. Installation • Files Manager Setting specifies the number of files with the specified extension that will be saved when received from a specified node. Figure 41: DevConfig Deployment | Advanced tab 7.6.3.1.2 Logger Control Tab 102 • Clocks in the PC and CR1000 are checked every second and the difference displayed. The System Clock Setting allows entering what offset, if any, to use with respect to standard time (Local Daylight Time or UTC, Greenwich mean time).
-
Section 7. Installation Figure 42: DevConfig Logger Control tab 7.6.3.2 Settings via CRBasic Some variables in the Status table can be requested or set during program execution using CRBasic commands SetStatus() and SetSecurity(). Entries can be requested or set by setting a Public or Dim variable equivalent to the Status table entry, as can be done with variables in any data table. For example, to set a variable, x, equal to a Status table entry, the syntax is, x = Status.
-
Section 7. Installation Campbell Scientific recommends implementing one or both of the provisions described in "Include" File (p. 104) and Default.cr1 File (p. 106) to help preserve remote communication, or other vital settings. 7.6.3.3.1 "Include" File The Include file is a CRBasic program file that resides in CR1000 memory and compiles as an insert to the user-entered program. It is essentially a subroutine stored in a file separate from the main program file.
-
Section 7. Installation Figure 44: "Include File" settings via PakBusGraph CRBasic Example 1. Using an "Include File" to Control SW‐12 'Assumes that the Include file in CRBasic example "Include File" to Control SW-12 (p. 105) 'is loaded onto the CR1000 CPU: Drive. 'The Include file will control power to the cellular phone modem.
-
Section 7. Installation '<<<<<<<<<<<<<<<<<<<<<<
-
Section 7. Installation 6. If there is no default.cr1 file or it cannot be compiled, the CR1000 will not automatically run any program. 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. • program devices and LoggerNet with new settings.
-
Section 7. Installation • It does not understand distances or topography; that is, it does not warn the user when broadcast distances are exceeded or identify obstacles to radio transmission. 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.
-
Section 7. Installation 7.7.1 Writing and Editing Programs 7.7.1.1 Short Cut Editor and Program Generator Short Cut is easy-to-use, menu-driven software that presents the user with lists of predefined measurement, processing, and control algorithms from which to choose. The user makes choices, and Short Cut writes the CRBasic code required to perform the tasks. Short Cut creates a wiring diagram to simplify connection of sensors and external devices. Quickstart Tutorial (p.
-
Section 7. Installation 7.7.1.2.1 Inserting Comments into Program Comments are non-executable text placed within the body of a program to document or clarify program algorithms. As shown in CRBasic example Inserting Comments (p. 110), comments are inserted into a program by preceding the comment with a single quote ('). Comments can be entered either as independent lines or following CR1000 code. When the CR1000 compiler sees a single quote ('), it ignores the rest of the line. CRBasic Example 4.
-
Section 7. Installation Regardless of the program-upload tool used, if any change occurs to data table structures listed in table Data Table Structures (p. 111), data will be erased when a new program is sent. Table 6.
-
Section 7. Installation 7.7.3 Syntax 7.7.3.1 Numerical Formats Four numerical formats are supported by CRBasic. Most common is the use of base-10 numbers. Scientific notation, binary, and hexadecimal formats may also be used, as shown in table Formats for Entering Numbers in CRBasic (p. 112). Only standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 8. Formats for Entering Numbers in CRBasic Format Example Base-10 Equivalent Value Standard 6.832 6.
-
Section 7. Installation Table 9. CRBasic Program Structure Declarations Define CR1000 memory usage. Declare constants, variables, aliases, units, and data tables. Declare constants List fixed constants. Declare Public variables List / dimension variables viewable during program execution. Dimension variables List / dimension variables not viewable during program execution. Define Aliases Assign aliases to variables. Define Units Assign engineering units to variable (optional).
-
Section 7. Installation 'Define public variables Public RefTemp Public TC(6) 'Define Units Units RefTemp = degC Units TC = DegC Declare public variables, dimension array, and declare units. 'Define data tables DataTable(Temp,1,2000) DataInterval(0,10,min,10) Average(1,RefTemp,FP2,0) Average(6,TC(),FP2,0) EndTable Declarations Define data table 'Begin Program BeginProg 'Set scan interval Scan(1,Sec,3,0) 'Measurements PanelTemp(RefTemp,250) TCDiff(TC()...
-
Section 7. Installation operator is located in the Help files of CRBasic Editor, which is included with LoggerNet, PC400, and RTDAQ datalogger support software suites. 7.7.3.3.1 Multiple Statements on One Line Multiple short statements can be placed on a single text line if they are separated with a colon. This is a convenient feature in some programs. However, in general, programs that confine text lines to single statements are easier for humans to read.
-
Section 7. Installation variables can be viewed through the external keyboard / display or software numeric monitors. Dim variables cannot. All user defined variables are initialized once when the program starts. Additionally, variables that are used in the Function() or Sub() declaration,or that are declared within the body of the function or subroutine are local to that function or subroutine.
-
Section 7. Installation In this example, a For/Next structure with a changing variable is used to specify which elements of the array will have the logical operation applied to them. The CRBasic For/Next function will only operate on array elements that are clearly specified and ignore the rest. If an array element is not specifically referenced, e.g., TempC(), CRBasic references only the first element of the array, TempC(1). CRBasic Example 7.
-
Section 7. Installation 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. See String Operations (p. 236). String length can also be declared.
-
Section 7. Installation Table 10. Data Types Name: Command or Argument FP2 Description / Word Size Campbell Scientific floating point / Where Used Final data storage 2 byte As Float IEEE Floating Point / Notes Default final storage data type. Use FP2 for stored data requiring 3 or 4 significant digits. If more significant digits are needed, use IEEE4 or an offset. Resolution / Range Zero Minimum Maximum 0.000 ±0.001 ±7999. Absolute Value Decimal Location 0 -- 7.999 X.XXX 8 -- 79.
-
Section 7. Installation Table 10. Data Types Name: Command or Argument Description / Word Size As Boolean Signed Integer / BOOLEAN 4 byte Where Used Notes Resolution / Range Use to store TRUE or FALSE states, such as with flags and control ports. 0 is always false. -1 is always true. Depending on the application, any other number may be interpreted as true or false. See True = -1, False = 0 (p. 145).To save memory, consider using UINT2 or BOOL8.
-
Section 7.
-
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. 122). CRBasic Example 11. Initializing Variables Public aaa As Long = 1 Public bbb(2) As String *20 = {"String_1", "String_2"} Public ccc As Boolean = True ‘Initialize variable ddd elements 1,1 1,2 1,3 & 2,1.
-
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. Predefined constants include some instruction names, as well as valid alphanumeric names for instruction parameters.
-
Section 7. Installation Table 11. Predefined Constants and Reserved Words mv50cR mv500c mv7_5 mv7_5c mvX10500 mv50R NSEC PROG SCAN mvX1500 Select STRING SUB sec TABLE TRUE TypeB SUBSCAN TypeJ TypeK TypeN TypeE TypeS TypeT UINT2 TypeR usec v10 v2 Until v2c v50 v60 v20 EX1 vX15 VX2 VX1 vX105 EX2 EX3 VX3 VX4 While 7.7.3.4.3 Alias and Unit Declarations A variable can be assigned a second name, or alias, by which it can be called throughout the program.
-
Section 7. Installation CRBasic Example 13.
-
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 (p. 127) shows a data file as it appears after the associated data table has been downloaded from a CR1000 programmed with the code in CRBasic example Definition and Use of a Data Table (p. 127).
-
Section 7. Installation Table 13. Typical Data Table TOA5 CR1000 CR1000 1048 CR1000.Std.13.06 CPU:Data.cr1 TIMESTAMP RECORD BattVolt_Avg PTempC_Avg TempC_Avg(1) TempC_Avg(2) TS RN Volts Deg C Deg C Deg C Avg Avg Avg Avg 7/11/2007 16:10 0 13.18 23.5 23.54 25.12 7/11/2007 16:20 1 13.18 23.5 23.54 25.51 7/11/2007 16:30 2 13.19 23.51 23.05 25.73 7/11/2007 16:40 3 13.19 23.54 23.61 25.95 7/11/2007 16:50 4 13.19 23.55 23.09 26.05 7/11/2007 17:00 5 13.19 23.
-
Section 7.
-
Section 7. Installation • Size-Table size is the number of records to store in a table before new data begins overwriting old data. If "10" is entered, 10 records are stored in the table -- the eleventh record will overwrite the first record. If "-1" is entered, memory for the table is automatically allocated at the time the program compiles.
-
Section 7. Installation lapse occurs, the SkippedRecords status entry is incremented, and a 16-byte subheader with time stamp and record number is inserted into the data frame before the next record is written. Consequently, programs that lapse frequently waste significant memory. If Lapses is set to an argument of 20, the memory allocated for the data table is increased by enough memory to accommodate 20 sub-headers (320 bytes).
-
Section 7. Installation Data Output-Processing Instructions Final data storage processing instructions (aka "output processing" instructions) determine what data are stored in a data table. When a data table is called in the CRBasic program, final data storage processing instructions process variables holding current inputs or calculations. If trigger conditions are true, for example if the output interval has expired, processed values are stored, or output, into the data table.
-
Section 7. Installation 7.7.3.5.2 Subroutines Read More! See Subroutines (p. 187) for more information on programming with subroutines. Subroutines allow a section of code to be called by multiple processes in the main body of a program. Subroutines are defined before the main program body of a program. Note A particular subroutine can be called by multiple program sequences simultaneously.
-
Section 7. Installation Instructions or commands that are handled by each sequencer are listed in table Task Processes (p. 133). The measurement task sequencer is a rigidly timed sequence that measures sensors and outputs control signals for other devices. The digital task sequencer manages measurement and control of SDM devices.
-
Section 7. Installation the sequence in which the instructions are executed may not be in the order in which they appear in the program. Therefore, conditional measurements are not allowed in pipeline mode. Because of the precise execution of measurement instructions, processing in the current scan (including update of public variables and data storage) is delayed until all measurements are complete.
-
Section 7. Installation Note Measurement tasks have priority over other tasks such as processing and communication to allow accurate timing needed within most measurement instructions. Care must be taken when initializing variables when multiple sequences are used in a program. If any sequence relies on something (variable, port, etc.
-
Section 7. Installation Table 17. Program Timing Instructions Instructions SubScan / NextSubScan General Guidelines Use when measurements or processing must run at faster frequencies than that of the main program. Syntax Form BeginProg Scan() '. '. '. SubScan() '. '. '. NextSubScan NextScan EndProg 7.7.3.7.
-
Section 7. Installation allows the processing in the scan to lag behind measurements at times without affecting measurement timing. Use of the CRBasic Editor default size is normal. Refer to section SkippedScan (p. 425) for troubleshooting tips. • Count — number of scans to make before proceeding to the instruction following NextScan. A count of 0 means to continue looping forever (or until ExitScan). In the example in CRBasic example Scan Syntax (p.
-
Section 7. Installation measurement hardware until the main scan, including measurements and processing, is complete. Main Scans Execution of the main scan usually occurs quickly, so the processor may be idle much of the time. For example, a weather-measurement program may scan once per second, but program execution may only occupy 250 ms, leaving 75% of available scan time unused. The CR1000 can make efficient use of this interstitial scan time to optimize program execution and communications control.
-
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. 473) contains a comprehensive list of these instructions. 7.7.3.8.1 Measurement and Data-Storage Processing CRBasic instructions have been created for making measurements and storing data.
-
Section 7. Installation PanelTemp is the keyword. Two parameters follow: Dest, a destination variable name in which the temperature value is stored; and Integ, a length of time to integrate the measurement. To place the panel temperature measurement in the variable RefTemp, using a 250-µs integration time, the syntax is as shown in CRBasic example Measurement Instruction Syntax (p. 140). CRBasic Example 17. Measurement Instruction Syntax PanelTemp(RefTemp, 250) 7.7.3.8.
-
Section 7. Installation Table 18. Rules for Names Name 1 Category Maximum Length (number of characters) Data-table name 20 Field name 39 Field-name description 64 Allowed characters and other names. 1 Variables, constants, units, aliases, station names, field names, data table names, and file names can share identical names; that is, once a name is used, it is reserved only in that category. 7.7.3.8.4 Expressions in Arguments Read More! See Expressions (p.
-
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.
-
Section 7. Installation 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. Instructions that use double precision are AddPrecise(), Average(), AvgRun(), AvgSpa(), CovSpa(), MovePrecise(), RMSSpa(), StdDev(), StdDevSpa(), and Totalize(). Floating-point arithmetic is common in many electronic, computational systems, but it has pitfalls high-level programmers should be aware of.
-
Section 7. Installation BeginProg Fa = 0 Fb = 0.125 L = 126 Ba = Fa Bb = Fb Bc = L EndProg 'This will set Ba = False (0) 'This will Set Bb = True (-1) 'This will Set Bc = True (-1) FLOAT from LONG or Boolean When a LONG or Boolean is converted to FLOAT, the integer value is loaded into the FLOAT. Booleans are converted to -1 or 0. LONG integers greater than 24 bits (16,777,215; the size of the mantissa for a FLOAT) will lose resolution when converted to FLOAT.
-
Section 7. Installation CRBasic Example 22. Constants to LONGs or FLOATs Public I As Long Public A1, A2 Const ID = 10 BeginProg A1 = A2 + ID I = ID * 5 EndProg In CRBasic example Constants to LONGs or FLOATs (p. 145), I is an integer. A1 and A2 are FLOATS. The number 5 is loaded As FLOAT to add efficiently with constant ID, which was compiled As FLOAT for the previous expression to avoid an inefficient runtime conversion from LONG to FLOAT before each floating point addition. 7.7.3.9.
-
Section 7. Installation TRUE is safe, it may not always be the best programming technique. Consider the expression If Condition(1) then... Since = True is omitted from the expression, Condition(1) is considered true if it equals any non-zero value. Table 19.
-
Section 7. Installation Table 20. Logical Expression Examples If X >= 5 AND Z = 2 then Y = 0 Sets Y = 0 only if both X >= 5 and Z = 2 are true. If 6 then Y = 0. If 6 is true since 6 (a non-zero number) is returned, so Y is set to 0 every time the statement is executed. If 0 then Y = 0. If 0 is false since 0 is returned, so Y will never be set to 0 by this statement. Z = (X > Y). Z equals -1 if X > Y, or Z will equal 0 if X <= Y. The NOT operator complements every bit in the word.
-
Section 7.
-
Section 7. Installation Table 21. Abbreviations of Names of Data Processes Abbreviation Process Name Max Maximum Min Minimum SMM Sample at Max or Min Std Standard Deviation MMT Moment No abbreviation Sample Hst Histogram 1 H4D Histogram4D FFT FFT Cov Covariance RFH RainFlow Histogram LCr Level Crossing WVc WindVector Med Median ETsz ET RSo Solar Radiation (from ET) TMx Time of Max TMn Time of Min 1 Hst is reported in the form Hst,20,1.0000e+00,0.0000e+00,1.
-
Section 7. Installation 7.7.3.11 System Signatures Signatures help assure system integrity and security. The following resources provide information on using signatures. • Signature() instruction in Diagnostics (p. 483). • RunSignature entry in table Status Table Fields and Descriptions (p. 528). • ProgSignature entry in table Status Table Fields and Descriptions (p. 528). • OSSignature entry in table Status Table Fields and Descriptions (p. 528). • Security (p.
-
Section 7. Installation 7.8 Programming Resource Library This library of notes and CRBasic code addresses a narrow selection of CR1000 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. Adjusting a sensor's output signal is preferred, but not always possible or practical.
-
Section 7. Installation each with two supporting instructions: • LoadFieldCal() — an optional instruction that evaluates the validity of, and loads values from a CAL file. • SampleFieldCal — an optional data-storage output instruction that writes the latest calibration values to a data table (not to the CAL file).
-
Section 7. Installation Mode Variable Interpretation > 0 and ≠ 6 calibration in progress <0 calibration encountered an error 2 calibration in process 6 calibration complete. 7.8.1.4.2 Two-point Calibrations (multiplier / gain) Use this two-point calibration procedure to adjust multipliers (slopes) and offsets (y-intercepts). See Two Point Slope and Offset (Option 2) (p. 159) and Two Point Slope Only (Option 3) (p. 161) for demonstration programs: 1.
-
Section 7. Installation "offset" = "y‐ intercept" = "zero" "multiplier" = "slope" = "gain" 7.8.1.5.1 Zero or Tare (Option 0) Zero option simply adjusts a sensor's output to zero. It does not affect the multiplier. Case: A sensor measures the relative humidity (RH) of air. Multiplier is known to be stable, but sensor offset drifts and requires regular zeroing in a desiccated chamber. The following procedure zeros the RH sensor to obtain the calibration report shown.
-
Section 7. Installation 5. To simulate conditions for a 30-day, service-calibration, again with desiccated chamber conditions, set variable KnownRH to 0.0. Change the value in variable CalMode to 1 to start calibration. When CalMode increments to 6, simulated 30-day, service zero calibration is complete. Calibrated Offset will equal -52.5%. CRBasic Example 26.
-
Section 7. Installation Table 23. Calibration Report for Salinity Sensor Parameter Parameter at Deployment Parameter at 7-Day Service mV output 1350 mV 1345 mV KnownSalt (standard solution) 30 mg/l 30 mg/l Multiplier 0.05 mg/l/mV 0.05 mg/l/mV Offset -37.50 mg/l -37.23 mg/l RH reading 30 mg/l 30 mg/l 1. Send the program in CRBasic example FieldCal Offset Demo Program (p. 156) to the CR1000. An excitation channel has been programmed to simulate a sensor output. 2.
-
Section 7. Installation BeginProg Multiplier = .05 Offset = 0 LoadFieldCal(true) 'Load the CAL File, if possible Scan(100,mSec,0,0) 'Simulate measurement by exciting channel VX1/EX1 ExciteV(Vx1,mV,0) 'Make the calibrated measurement VoltSE(SaltContent,1,mV2500,6,1,0,250,Multiplier,Offset) 'Perform a calibration if CalMode = 1 FieldCal(1,SaltContent,1,Multiplier,Offset,CalMode,KnownSalt,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 7.8.1.5.
-
Section 7. Installation Calibration Report for Pressure Transducer Parameter Measurement Before Zero Measurement After Zero Piezometer Output (digits) 8746 0 Piezometer Temperature (°C) 21.4 0 Barometer Pressure (mb) 991 0 1. Send CRBasic example FieldCal() Zero Basis Demo Program (p. 158) to the CR1000. 2. To simulate the pressure transducer in zero conditions: • Digits_Measured is set to 8746 automatically • Temp_Measured is set to 21.4 automatically • BP_Measured to 991 3.
-
Section 7. Installation 'AVW200(AVWRC,Com1,0,200,VW(1,1),1,1,1,1000,4000,1,_60Hz,1,0) '<
-
Section 7. Installation 4. When variable CalMode increments to 6, the deployment calibration is complete. Calibrated multiplier is -0.08. Calibrated offset is 53.978. 5. To continue this example, simulate a two-stage, 7-day service calibration wherein both multiplier and offset drift (output @ 30 l/s = 285 mV, output @ 10 l/s = 522 mV). a. Set variable SignalmV to 285. Set variable KnownFlow to 30.0. b. Start the 7-day, service calibration by setting variable CalMode = 1. c.
-
Section 7. Installation 7.8.1.5.5 Two-Point Slope Only (Option 3) Some measurement applications do not require determination of offset. Wave form analysis, for example, may only require relative data to characterize change. Case: A soil-water sensor is to be used to detect a pulse of water moving through soil. To adjust the sensitivity of the sensor, two soil samples, with volumetric water contents of 10% and 35%, will provide two known points.
-
Section 7. Installation Scan(100,mSec,0,0) 'Simulate measurement by exciting channel VX1/EX1 ExciteV(Vx1,mV,0) 'Make the calibrated measurement VoltSE(RelH2OContent,1,mV2500,6,1,0,250,Multiplier,Offset) 'Perform a calibration if CalMode = 1 FieldCal(3,RelH2OContent,1,Multiplier,Offset,CalMode,KnownWC,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 7.8.1.
-
Section 7. Installation 4. The zero function of FieldCalStrain() allows the user to set a particular strain as an arbitrary zero, if desired. Zeroing is normally done after the shunt calibration. Zero and shunt options can be combined through a single CR1000 program. The following program is provided to demonstrate use of FieldCalStrain() features. If a strain gage configured as shown in figure Quarter-Bridge StrainGage Schematic (p.
-
Section 7. Installation CRBasic Example 31.
-
Section 7. Installation 7.8.1.6.1 Quarter-Bridge Shunt (Option 13) With CRBasic example FieldCalStrain() Calibration Demo (p. 164) sent to the CR1000, and the strain gage stable, use the external keyboard / display or software numeric monitor to change the value in variable KnownRes to the nominal resistance of the gage, 1000 Ω, as shown in figure Strain-Gage Shunt Calibration Started (p. 165). Set Shunt_Mode to 1 to start the two-point shunt calibration.
-
Section 7. Installation Figure 52: Starting zero procedure Figure 53: Zero procedure finished 7.8.2 Information Services Support of information services (FTP, HTTP, XML, POP3, SMTP, Telnet, NTCIP, NTP, HTML) is extensive in the CR1000, to the point of requiring another manual at least as thick as the CR1000 manual so fully cover applicable topics. This section only nicks the surface. The most up-to-date information on implementing IS services is contained in CRBasic Editor Help.
-
Section 7. Installation • PakBus communication over TCP/IP.
-
Section 7. Installation Figure 54: Preconfigured HTML Home Page 7.8.2.3 Custom HTTP Web Server Although the default home page cannot be accessed by the user for editing, it can be replaced with the HTML code of a customized web page. To replace the default home page, save the new home page under the name default.html and copy it to the datalogger. It can be copied to a CR1000 drive with File Control. Deleting default.html will cause the CR1000 to use its original, default home page.
-
Section 7.
-
Section 7. Installation CRBasic Example 32. HTML 'NOTE: Lines ending with "+" are wrapped to the next line to fit on the printed page 'NOTE Continued: Do not wrap lines when entering program into CRBasic Editor. Dim Commands As String * 200 Public Time(9), RefTemp, Public Minutes As String, Seconds As String, Temperature As String DataTable(CRTemp,True,-1) DataInterval(0,1,Min,10) Sample(1,RefTemp,FP2) Average(1,RefTemp,FP2,False) EndTable 'Default HTML Page WebPageBegin("default.
-
Section 7. Installation BeginProg Scan(1,Sec,3,0) PanelTemp(RefTemp,250) RealTime(Time()) Minutes = FormatFloat(Time(5),"%02.0f") Seconds = FormatFloat(Time(6),"%02.0f") Temperature = FormatFloat(RefTemp, "%02.02f") CallTable(CRTemp) NextScan EndProg 7.8.2.4 FTP Server The CR1000 automatically runs an FTP server. This allows Windows Explorer to access the CR1000 file system via FTP, with drives on the CR1000 being mapped into directories or folders. The root directory on the CR1000 can be any drive.
-
Section 7. Installation 7.8.2.9 Micro-Serial Server The CR1000 can be configured to allow serial communication over a TCP/IP port. This is useful when communicating with a serial sensor over ethernet via microserial server (third-party serial to ethernet interface) to which the serial sensor is connected. See the network-link manual and the CRBasic Editor Help for the TCPOpen() instruction for more information. Information on available network links is available in the appendix Network Links (p. 567). 7.
-
Section 7. Installation • Programmed mode automates much of the SDI-12 protocol and provides for data recording. 7.8.3.1 SDI-12 Transparent Mode System operators can manually interrogate and enter settings in probes using transparent mode. Transparent mode is useful in troubleshooting SDI-12 systems because it allows direct communication with probes. Transparent mode may need to wait for commands issued by the programmed mode to finish before sending responses.
-
Section 7. Installation 7.8.3.1.1 SDI-12 Transparent Mode Commands Commands have three components: Sensor address (a) – a single character, and is the first character of the command. Sensors are usually assigned a default address of zero by the manufacturer. Wildcard address (?) is used in Address Query command. Some manufacturers may allow it to be used in other commands. Command body (e.g., M1) – an upper case letter (the “command”) followed by alphanumeric qualifiers.
-
Section 7. Installation Table 25. Standard SDI-12 Command and Response Set Command Name Command Syntax 1 Response Start Concurrent Measurement aC! atttnn Additional Concurrent Measurements aC1! . . . aC9! atttnn atttnn atttnn atttnn atttnn aCC1! ... aCC9! atttnn Additional Concurrent Measurements and Request CRC Continuous Measurements Continuous Measurements and Request CRC aR0! ... aR9! aRC0! ...
-
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 • nn = the number of values to be returned when one or more subsequent D! commands are issued. Start Measurement Command (aMv!) Qualifier v is a variable between 1 and 9.
-
Section 7. Installation Send Data Commands (aD0! to aD9!) These commands requests data from the sensor. They are normally issued automatically by the CR1000 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. In transparent mode, a user does likewise.
-
Section 7. Installation is programmed with the M! command (note that the SDI-12 address is a separate instruction parameter), the CR1000 issues the aM! AND aD0! commands with proper elapsed time between the two. The CR1000 automatically issues retries and performs other services that make the SDI-12 measurement work as trouble free as possible. Table SDI-12Recorder() Commands (p. 178) summarizes CR1000 actions triggered by some SDI12Recorder() commands.
-
Section 7. Installation Table 26. SDI12Recorder() Commands SDIRecorder() Instruction SDICommand Entry Actions Internal to CR1000 and Sensor 2 Use variable replacement in program to use same instance of SDI12Recorder() as issued aCV! (see the CRBasic example Using SDI12Recorder() C Command ).
-
Section 7. Installation Scan(5,Sec,0,0) 'Non-SDI-12 measurements here NextScan SlowSequence Scan(5,Min,0,0) SDI12Recorder(Temp(1),1,0,"M!",1.0,0) SDI12Recorder(Temp(2),1,1,"M!",1.0,0) 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!.
-
Section 7. Installation CRBasic Example 33.
-
Section 7.
-
Section 7. Installation SlowSequence Do 'Note SDI12SensorSetup / SDI12SensorResponse must be renewed 'after each successful SDI12Recorder() poll.
-
Section 7. Installation CRBasic Example 35. Using an SDI‐12 Extended Command 'SDI-12 extended command "XT23.61!" sent to CH200 Charging Regulator 'Correct response is "0OK", if zero (0) is the SDI-12 address. ' 'Declare Variables Public SDI12command As String Public SDI12result As String 'Main Program BeginProg Scan(20,Sec,3,0) SDI12command = "XT" & FormatFloat(PTemp,"%4.2f") & "!" SDI12Recorder(SDI12result,1,0,SDI12command,1.0,0) NextScan EndProg 7.8.3.2.
-
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 Source(6) = batt_volt * 1000 'primary power, mVdc Source(7) = PTemp * 1.
-
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 (p. 186) shows a 35-second power-usage profile example.
-
Section 7. Installation 7.8.4 Subroutines A subroutine is a group of programming instructions that is called by, but runs outside of, the main program. Subroutines are used for the following reasons: • To reduce program length. Subroutine code can be executed multiple times in a program scan. • To ease integration of proven code segments into new programs. • To compartmentalize programs to improve organization.
-
Section 7. Installation 'Global variables (Used only outside subroutine by choice) 'Declare Counter in the Main Scan. Public counter(2) As Long 'Declare Product of PI * counter(2). Public pi_product(2) As Float 'Global variable (Used only in subroutine by choice) 'For / Next incrementor used in the subroutine.
-
Section 7. Installation Table 29. OutputOpt Options Option Description (WVc() is the Output Array) WVc(1): Mean horizontal wind speed (S) WVc(2): Unit vector mean wind direction (Θ1) 0 1 WVc(3): Standard deviation of wind direction σ(Θ1). Standard deviation is calculated using the Yamartino algorithm. This option complies with EPA guidelines for use with straight-line Gaussian dispersion models to model plume transport.
-
Section 7. Installation Standard deviation of horizontal wind fluctuations from sub-intervals is calculated as follows: where: is the standard deviation over the data-storage interval, and are sub-interval standard deviations. A sub-interval is specified as a number of scans.
-
Section 7. Installation Figure 58: Mean wind-vector graph where for polar sensors: or, in the case of orthogonal sensors: 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 Direction (p.
-
Section 7. Installation Standard Deviation of Direction Figure 59: Standard Deviation of Direction The Taylor Series for the Cosine function, truncated after 2 terms is: For deviations less than 40 degrees, the error in this approximation is less than 1%. At deviations of 60 degrees, the error is 10%.
-
Section 7. Installation and 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 (p. 399) and Custom Keyboard and Display Menus (p. 508). Menus for the external keyboard / display can be customized to simplify routine operations.
-
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 (p. 196) lists CRBasic programming for a custom menu that facilitates viewing data, entering notes, and controlling a device. figure Custom Menu Example — Home Screen (p. 194) through figure Custom Menu Example — Control LED Boolean Pick List (p.
-
Section 7.
-
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 (p. 194) through Custom Menu Example — Control LED Boolean Pick List (p. 196) in reference to the following CRBasic example Custom Menus (p. 196). CRBasic Example 38.
-
Section 7.
-
Section 7. Installation 'Measure Two Thermocouples TCDiff(TCTemp(),2,mV2500C,1,TypeT,RefTemp,True,0,250,1.
-
Section 7. Installation Note Do not confuse CRBasic files with .DLD extensions with files of .DLD type used by legacy Campbell Scientific dataloggers.
-
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. #If LoggerType = CR3000 SelectedSpeed = "CR3000 running at " & Speed & " intervals." #ElseIf LoggerTypes = CR1000 SelectedSpeed = "CR1000 running at " & Speed & " intervals.
-
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 CR1000. The instrument does this by translating "11001010" into a series of higher and lower voltages, which it transmits to the CR1000. The CR1000 receives and reconstructs these voltage levels as "11001010.
-
Section 7. Installation 7.8.8.2 I/O Ports The CR1000 supports two-way serial communication with other instruments through ports listed in table CR1000 Serial Ports (p. 202). A serial device will often be supplied with a nine-pin D-type connector serial port. Check the manufacture's pinout for specific information. In most cases, the standard nine-pin RS-232 scheme is used. If that is the case then, • Connect sensor RX (receive, pin 2) to datalogger Tx (transmit, channel C1, C3, C5, C7).
-
Section 7. Installation Note If an instrument or sensor optionally supports SDI-12, Modbus, or DNP3, consider using these protocols before programming a custom protocol. These higher-level protocols are standardized among many manufacturers and are easy to use, relative to a custom protocol. SDI-12, Modbus, and DNP3 also support addressing systems that allow multiplexing of several sensors on a single communications port, which makes for more efficient use of resources. 7.8.8.
-
Section 7. Installation Marks and Spaces RS‐232 signal levels are inverted logic compared to TTL. The different levels are called marks and spaces. When referenced to signal ground, the valid RS‐232 voltage level for a mark is ‐3 to ‐25, and for a space is +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).
-
Section 7. Installation • BaudRrate — Baud rate mismatch is frequently a problem when developing a new application. Check for matching baud rates. Some developers prefer to use a fixed baud rate during initial development. When set to -nnnn (where nnnn is the baud rate) or 0, auto baud-rate detect is enabled. Autobaud is useful when using the CS I/O and RS-232 ports since it allows ports to be simultaneously used for sensor and PC telecommunications.
-
Section 7. Installation • Buffer-size margin (one extra record + one byte). SerialOutBlock()1,3 • 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 COM1, COM2, COM3, or COM4, and the number of bytes is also entered as constant. SerialOut() • Handy for ASCII command and a known response, e.g., Hayes-modem commands.
-
Section 7. Installation • Does the record have a delimiter character, e.g. ",", spaces, or tabs? These delimiters are useful for parsing the record into usable numbers. • Will the sensor be sending multiple data strings? Multiple strings usually require filtering before parsing. • How fast will data be sent to the CR1000? • Is power consumption critical? • Does the sensor compute a checksum? Which type? A checksum is useful to test for data corruption. 2.
-
Section 7. Installation 7.8.8.5.3 Output Programming Basics Applications with the purpose of transmitting data to another device usually include the following procedures. Other procedures may be required depending on the application. 1. Open a serial port (SerialOpen() command) to configure it for communications. • Parameters are set according to the requirements of the communications link and the serial device. • Example: SerialOpen(Com1,9600,0,0,10000) • Designate the correct port in CRBasic.
-
Section 7. Installation Example (humidity, temperature, and pressure sensor): SerialInString = "RH= 60.5 %RH T= 23.7 °C Tdf= 15.6 °C Td= 15.6 °C a= 13.0 g/m3 x= 11.1 g/kg Tw= 18.5 °C H2O= 17889 ppmV pw=17.81 hPa pws 29.43 hPa h= 52.3 kJ/kg dT= 8.1 °C" • Hex Pairs: Bytes are translated to hex pairs, consisting of digits 0 - 9 and letters a - f. Each pair describes a hexadecimal ASCII / ANSI code. Some codes translate to alpha-numeric values, others to symbols or non-printable control characters.
-
Section 7. Installation • String declarations: String variables are memory intensive. Determine how large strings are and declare variables just large enough to hold the string. If the sensor sends multiple strings at once, consider declaring a single string variable and read incoming strings one at a time. The CR1000 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.
-
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.
-
Section 7.
-
Section 7. Installation Figure 71: HyperTerminal COM-Port Settings Tab Click File | Properties | Settings | ASCII Setup... and set as shown.
-
Section 7. Installation 7.8.8.6.2 Create Send Text File Create a file from which to send a serial string. The file shown in figure HyperTerminal Send Text-File Example (p. 214) will send the string [2008:028:10:36:22]C to the CR1000. Use Notepad (Microsoft Windows utility) or some other text editor that will not place unexpected hidden characters in the file. Figure 73: HyperTerminal send text-file example To send the file, click Transfer | Send Text File | Browse for file, then click OK. 7.8.8.6.
-
Section 7. Installation recognize the C command. CR1000 dataloggers, however, require custom programming to output and accept these same ASCII strings. A similar program can be used to emulate CR10X and CR23X dataloggers. Solution: CRBasic example Measure Sensors / Send RS-232 Data (p. 215) imports and exports serial data via the CR1000 RS-232 port. Imported data are expected to have the form of the legacy Campbell Scientific time set C command.
-
Section 7.
-
Section 7. Installation 'If it is a leap year, use this section.
-
Section 7.
-
Section 7.
-
Section 7. Installation 7.8.8.7 Q & A Q: I am writing a CR1000 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. Adding strings together means the 2nd string will start at the first null it finds in the first string.
-
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 * 1 TempData = LargerString If TempData = "S" Then A single character can be retrieved from any position in a string using the third dimension.
-
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. SerialIn() is writing into an array of characters.
-
Section 7. Installation Figure 75: Data from TrigVar program CRBasic Example 42. Using TrigVar to Trigger Data Storage 'In this example, the variable "counter" is incremented by 1 each scan. The data table 'is called every scan, which includes the Sample(), Average(), and Totalize() 'instructions. TrigVar is true when counter = 2 or counter = 3. Data are stored when 'TrigVar is true.
-
Section 7. Installation produce a time stamp that may be accessed from the program after being written to a data table. The time of other events, such as alarms, can be stored using the RealTime() instruction. • Accessing and storing a time stamp from another datalogger in a PakBus network. 7.8.10.1 NSEC Options NSEC is used in a CRBasic program one of the following three ways. In all cases, the time variable is only sampled with a Sample() instruction, Reps = 1. 1. Time variable is declared As Long.
-
Section 7. Installation 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.
-
Section 7. Installation 'Declarations Public rTime(9) As Long Public rTime2(7) As Long Dim x '(or Float) '(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) For x = 1 To 7 rTime2(x) = rTime(x) Next CallTable SecondTable NextScan EndProg CRBasic Example 46.
-
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 7.8.
-
Section 7. Installation Variable aliasing (p. 124) can be employed in the CRBasic program to make the data more understandable.
-
Section 7. Installation Figure 78: Bool8 data from bit-shift example (PC data file) CRBasic Example 47.
-
Section 7.
-
Section 7. Installation FlagsBool8(1) FlagsBool8(2) FlagsBool8(3) FlagsBool8(4) = = = = Flags AND (Flags >> (Flags >> (Flags >> &HFF 8) AND &HFF 16) AND &HFF 24) AND &HFF 'AND 'AND 'AND 'AND 1st 2nd 3rd 4th 8 8 8 8 bits bits bits bits of of of of "Flags" "Flags" "Flags" "Flags" & & & & 11111111 11111111 11111111 11111111 CallTable(Bool8Data) NextScan EndProg 7.8.
-
Section 7. Installation Table 32. TABLE. Summary of Analog Voltage Measurement Rates Maximum Rate Number of Simultaneous Channels Maximum Duty Cycle Maximum Measaurements Per Burst Description 100 Hz 600 Hz 2000 Hz Multiple channels Fewer channels One channel 100% < 100% < 100% N/A Variable 65535 Near simultaneous measurements on multiple channels Near simultaneous measurements on fewer channels Up to 8 sequential differential or 16 single-ended channels.
-
Section 7. Installation BeginProg Scan(1,Sec,0,0)'<<<
-
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. Generally, faster rates require measurement of fewer channels.
-
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. 7.8.12.3 Measurement Rate: 601 to 2000 Hz To measure at rates greater than 600 Hz, VoltSE() is switched into burst mode by placing a dash (-) before the channel number and placing alternate arguments in other parameters.
-
Section 7. Installation 200 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, Destination Dim FastTemp(500) dimensions array FastTemp() to store 500 measurements (one second of data at 500 Hz, one-half second of data at 1000 Hz, etc.) The dimension can be any integer from 1 to 65535.
-
Section 7. Installation 7.8.13.1 String Operators The table String Operators (p. 237) list and describes available string operators. String operators are case sensitive. Table 38. String Operators Operator & Description Concatenates strings. Forces numeric values to strings before concatenation. Example 1 & 2 & 3 & "a" & 5 & 6 & 7 = "123a567" + Adds numeric values until a string is encountered. When a string is encountered, it is appended to the sum of the numeric values.
-
Section 7. Installation Table 39. String Concatenation Examples Expression Comments Result Str(1) = 5.4 + 3 + " Volts" Add floats, concatenate strings "8.4 Volts" Str(2) = 5.4 & 3 & " Volts" Concatenate floats and strings "5.43 Volts" Lng(1) = "123" Convert string to long 123 Lng(2) = 1+2+"3" Add floats to string / convert to long 33 Lng(3) = "1"+2+3 Concatenate string and floats 123 Lng(4) = 1&2&"3" Concatenate floats and string 123 7.8.13.
-
Section 7. Installation 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" "123456789" 'Result is StringVar(7,1,4) = "A" "123A56789" 'Result is StringVar(7) = MoveBytes(Strings(7,1,4),0,"A",0,1) "123A56789" 'Result is Try (does not work): Instead, use: 7.8.13.
-
Section 7. Installation 7.8.13.7 Formatting Strings Table 43. Formatting Strings Examples Expression Result Str(1)=123e4 Str(2)=FormatFloat(123e4,"%12.2f") Str(3)=FormatFloat(Values(2)," The battery is %.3g Volts ") Str(4)=Strings(3,1,InStr(1,Strings(3),"The battery is ",4)) Str(5)=Strings(3,1,InStr(1,Strings(3),"is ",2) + 3) Str(6)=Replace("The battery is 12.4 Volts"," is "," = ") Str(7)=LTrim("The battery is 12.4 Volts") Str(8)=RTrim("The battery is 12.4 Volts") Str(9)=Trim("The battery is 12.
-
Section 7. Installation 'Data Tables 'Table output on two intervals depending on condition.
-
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. When a character changes, the signature changes. Incorporating signature data into a the CR1000 data set allows system administrators to track program changes and assure data quality.
-
Section 7. Installation 'function Scan(1,Sec,0,0) ProgSig = Status.ProgSignature RunSig = Status.RunSignature x = 24 ExeSig(1) = Signature 'Set variable to Status table entry '"ProgSignature" 'Set variable to Status table entry '"RunSignature" 'signature includes code since initial 'Signature instruction y = 43 ExeSig(2) = Signature 'Signature includes all code since 'ExeSig(1) = Signature CallTable Signatures NextScan 7.8.17 Advanced Programming Examples 7.8.17.
-
Section 7.
-
Section 7. Installation Minimum(1,AirTemp_C,FP2,0,False) Sample(1,DeltaT_C, FP2) Sample(1,HowMany, FP2) 'Stores temperature minimum in low 'resolution format 'Stores temp difference sample in low 'resolution format 'Stores how many data events in low 'resolution format EndTable BeginProg 'A second way of naming a station is to load the name into a string variable. The is 'place here so it is executed only once, which saves a small amount of program 'execution time.
-
Section 7. Installation 'Count how many times the DataEvent “DeltaT_C>=3” has occurred. The '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. HowMany = Event.EventCount(1,1) 'Call Data Tables CallTable(OneMin) CallTable(Event) NextScan EndProg 7.8.17.
-
Section 7. Installation 'Main Program BeginProg Scan(1,Sec,0,0) PanelTemp(PTemp,250) Counter1 = Counter1 + 1 NextScan 'Begin executable section of program 'Begin main scan 'End main scan SlowSequence 'Begin slow sequence 'Declare Public Variables for Secondary Scan (can be declared at head of program) Public Batt_Volt Public Counter2 'Declare Data Table DataTable(Test,1,-1) 'Data Table “Test” is event driven. 'The event is the scan.
-
Section 7.
-
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) If 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.
-
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) If 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 (p. 250) demonstrates programming to create and use a scaling array.
-
Section 7. Installation 'Begin Program BeginProg 'Load scaling array (multipliers and offsets) Mult(1) = 1.
-
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. DataTable(DeltaT,DeltaT_C >= 3,-1) Sample(1,Status.
-
Section 7.
-
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 < ±0.0005°C (caused by rounding errors in CR1000 math).
-
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. ASTM E1137) Constant Coefficient e 1.7584810E-05 f -1.1550000E-06 g 1.7909000E+00 h -2.9236300E+00 i 9.1455000E+00 j 2.5581900E+02 Table 46.
-
Section 7. Installation Table 47. PRTCalc() Type-Code-3 Sensor US Industrial Standard, alpha = 0.00391 (Reference: OMIL R84 (2003)) Constant Coefficient i 8.8564290E+00 j 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 a 3.9739000E-03 d -2.3480000E-06 e 1.8139880E-05 f -1.1740000E-06 g 1.7297410E+00 h -2.8905090E+00 i 8.8326690E+00 j 2.5159480E+02 Table 49.
-
Section 7. Installation Table 50. PRTCalc() Type-Code-6 Sensor Standard ITS-90 SPRT, alpha = 0.003926 (Reference: Minco / Instrunet) Constant Coefficient a 3.9848000E-03 d -2.3480000E-06 e 1.8226630E-05 f -1.1740000E-06 g 1.6319630E+00 h -2.4709290E+00 i 8.8283240E+00 j 2.5091300E+02 7.8.18.2 Measuring PT100s (100-Ohm PRTs) PT100s (100-ohm PRTs) are readily available. The CR1000 can measure PT100s in several configurations, each with its own advantages. 7.8.18.2.
-
Section 7. Installation Figure PT100 in Four-Wire Half-Bridge (p. 259) shows the circuit used to measure a 100-Ω PRT. The 10-kΩ resistor allows the use of a high excitation voltage and a low input range. This ensures that noise in the excitation does not have an effect on signal noise.
-
Section 7. Installation 0.15°C over the -10 to 40°C temperature range. Because the measurement is ratiometric (RS/Rf), the properties of the 10-kΩ resistor do not affect the result. A terminal-input module (TIM) can be used to complete the circuit shown in figure PT100 in Four-Wire Half-Bridge (p. 259). Refer to the appendix Signal Conditioners (p. 561) for information concerning available TIM modules. Figure 79: PT100 in four-wire half-bridge CRBasic EXAMPLE.
-
Section 7. Installation Example PRT specifications: • Alpha = 0.00385 (PRTType 1) The temperature measurement requirements in this example are the same as in PT100 in Four-Wire Half-Bridge (p. 257). In this case, a three-wire half-bridge and 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 HalfBridge (p. 260). As in section PT100 in Four-Wire Half-Bridge (p.
-
Section 7. Installation Figure 80: PT100 in three-wire half-bridge CRBasic Example 60. PT100 in Three‐wire Half‐bridge 'See FIGURE. PT100 in Three-Wire Half-Bridge (p. 260) for wiring diagram. 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.
-
Section 7. Installation where, VS = measured bridge‐output voltage VX = excitation voltage or, X = 1000 (RS/(RS+R1)‐R3/(R2+R3)). With reference to figure PT100 in Four-Wire Full-Bridge (p. 263), the resistance of the PRT (RS) is calculated as: RS = R1 X' / (1‐X') where X' = X / 1000 + R3/(R2+R3) Thus, to obtain the value RS/R0, (R0 = RS @ 0°C) for the temperature calculating instruction PRTCalc(), the multiplier and offset used in BRFull() are 0.001 and R3/(R2+R3), respectively.
-
Section 7. Installation Figure 81: PT100 in four-wire full-bridge CRBasic Example 61. PT100 in Four‐Wire Full‐Bridge 'See FIGURE. PT100 in Four-Wire Full-Bridge (p. 263) for wiring diagram. 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,.
-
Section 7. Installation where XN is the most recent value of the source variable and XN-1 is the previous value (X1 is the oldest value included in the average, i.e., N-1 values back from the most recent). NANs are ignored in the processing of AvgRun() unless all values in the population are NAN. AvgRun() uses high-precision math, so a 32-bit extension of the mantissa is saved and used internally resulting in 56 bits of precision.
-
Section 7. Installation Note N = Number of points in running average) To calculate the delay in time, multiply the result from the above equation by the period at which the running average is executed (usually the scan period): Delay in time = (scan period) (N ‐ 1) / 2 For the example above, the delay is: Delay in time = (1 ms) (4 ‐ 1) / 2 = 1.5 ms Example: Actual test using an accelerometer mounted on a beam whose resonant frequency is about 36 Hz. The measurement period was 2 ms.
-
Section 7. Installation Figure 84: Running-average signal attenuation 7.8.20 Writing High-Frequency Data to CF An advanced method for writing high-frequency time-series data to CompactFlash (CF) cards is now available for CR1000 dataloggers. It supports 16-GB or smaller CF cards. It improves the user interface by allowing smaller, userdetermined file sizes. This may be the most suitable method for writing to CF cards, especially in high-speed measurement applications. 7.8.20.
-
Section 7. Installation also be used in applications where the site cannot be accessed for extended periods. However, large CF cards do not eliminate the risk of data loss. 1 The CRD: drive is a memory drive created when a CF card is connected to the datalogger through the appropriate peripheral device. The CR1000 is adapted for CF use by addition of the NL115 or CFM100 modules. NL115 and CFM100 modules are available at additional cost from Campbell Scientific.
-
Section 7. Installation CRBasic Example 62. Using TableFile() with Option 64 with CF Cards 'The following CRBasic program shows how the instruction is used in micrometeorology 'eddy-covariance programs. The file naming scheme used in TableFile() in this example is 'customized using variables, constants, and text. Public sensor(10) DataTable(ts_data,TRUE,-1) 'TableFile("filename",Option,MaxFiles,NumRec/TimeIntoInterval,Interval,Units, OutStat,LastFileName) TableFile("CRD:"&Status.SerialNumber(1,1)&".
-
Section 7. Installation CFM100 modules. The card must only be ejected after the status light shows a solid green. Q: Why are individual files limited to 2 GB? A: In common with many other systems, the datalogger natively supports signed4-byte integers. This data type can represent a number as large as 231, or in terms of bytes, roughly 2 GB. This is the maximum file length that can be represented in the datalogger directory table.
-
Section 7. Installation • better vibration and shock resistance • longer life spans (more read/write cycles) Note More CF card recommendations are presented in the application note, CF Card Information, which is available at www.campbellsci.com. Q: Why not use SD cards? A: CF cards offer advantages over Secure Digital (SD) cards, including ruggedness, ease of handling, and connection reliability. Q: Can closed files be retrieved remotely? A: Yes.
-
Section 7. Installation 2 "rings": the datalogger has a ring memory. In other words, once filled, rather than stopping when full, oldest data are overwritten by new data. In this context, "rings" designates when new data begins to overwrite the oldest data. 3 CPU data table fill times can be confirmed in the datalogger Status table.
-
Section 7.
-
Section 8. Operation 8.1 Measurements Several features give the CR1000 the flexibility to measure many sensor types. Contact a Campbell Scientific applications engineer if assistance is required in assessing CR1000 compatibility to a specific application or sensor type. Some sensors require precision excitation or a source of power. See Powering Sensors and Devices (p. 84). 8.1.1 Time Measurement of time is an essential function of the CR1000.
-
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 (p. 475) and CRBasic Editor Help for more information. CRBasic Example 63.
-
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 (p. 275), illustrates the PGIA with the input signal decomposed into a common-mode voltage (Vcm) and a DIFF-mode voltage (Vdm).
-
Section 8. Operation is reduced to ±2.5 Vdc, whereas input limits are always ±5 Vdc. Hence for nonnegligible 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 - 8. Each differential channel has two inputs: high (H) and low (L). Single-ended channels are identified by the number set 1-16. Caution Sustained voltages in excess of ±8.
-
Section 8. Operation Sensors with a low signal-to-noise ratio, such as thermocouples, should normally be measured differentially. However, if the measurement to be made does not require high accuracy or precision, such as thermocouples measuring brush-fire temperatures, a single-ended measurement may be appropriate. If sensors require differential measurement, but adequate input channels are not available, an analog multiplexer should be acquired to expand differential input capacity.
-
Section 8. Operation 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. 8.1.2.
-
Section 8. Operation where Gain Error = ± (2500 * 0.0006) = ±1.5 mV and 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 (p. 279) illustrates the total error with respect to voltage measurements for the ±2500‐mV 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 CR1000 has fixed input ranges for voltage measurements and an auto range to automatically determine the appropriate input voltage range for a given measurement. The table Analog Voltage Input Ranges with CMN / OID (p.
-
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 CR1000 indicates a measurement over-range by returning a NAN (not a number) for the measurement. 8.1.2.5.
-
Section 8. Operation 8.1.2.6 Offset Voltage Compensation Analog measurement circuitry in the CR1000 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 2500mV signal introduces an error of only 0.00012%; however, the same offset on a 0.25-mV signal introduces an error of 1.2%.
-
Section 8. Operation When the CR1000 reverses differential inputs or excitation polarity, it delays the same settling time after the reversal as it does before the first measurement. So, there are two delays per channel when either RevDiff or RevEx is used. If both RevDiff and RevEx are True, four measurements are performed; positive and negative excitations with the inputs one way and positive and negative excitations with the inputs reversed. To illustrate, 1. the CR1000 switches to the channel 2.
-
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 (p. 284) lists three integration durations available in the CR1000 and associated CRBasic codes. If reversing the differential inputs or reversing the excitation is specified, there are two separate integrations per measurement; if both reversals are specified, there are four separate integrations.
-
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 CR1000 makes two fast measurements separated in time by one-half line cycle (see figure ac Power Line Noise Rejection Techniques (p. 285) ). A 60-Hz half cycle is 8333 µs, so the second measurement must start 8333 µs after the first measurement integration began.
-
Section 8. Operation Table 56. ac Noise Rejection on Large Signals 2. During A/D, CR1000 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 CR1000 is programmed to use the half-cycle 50-Hz or 60-Hz rejection techniques, a sensor does not see a continuous excitation of the length entered as the settling time before the second measurement if the settling time entered is greater than one-half cycle.
-
Section 8. Operation Table 57. CRBasic Measurement Settling Times Settling Time Entry Input Voltage Range Integration Code Settling 1 Time 0 All 250 450 µs (default) 0 All _50Hz 3 ms (default) 0 All _60Hz 3 ms (default) >100 All X 2 μs entered 1 Minimum settling time required to allow the input to settle to CR1000 resolution specifications. 2 X is an integer >100.
-
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 (p. 289). Each trace in figure Settling Time for Pressure Transducer (p.
-
Section 8. Operation Figure 90: Settling time for pressure transducer Table 58. First Six Values of Settling-Time Data TIMESTAMP REC PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) Smp Smp Smp Smp Smp Smp 1/3/2000 23:34 0 0.03638599 0.03901386 0.04022673 0.04042887 0.04103531 0.04123745 1/3/2000 23:34 1 0.03658813 0.03921601 0.04002459 0.04042887 0.04103531 0.0414396 1/3/2000 23:34 2 0.03638599 0.03941815 0.04002459 0.04063102 0.04042887 0.04123745 1/3/2000 23:34 3 0.
-
Section 8. Operation Unless a Calibrate() instruction is present in the running CRBasic program, the CR1000 automatically performs self-calibration during spare time in the background as an automatic slow sequence (p. 138), with a segment of the calibration occurring every 4 seconds.
-
Section 8. Operation measurements (B) to be determined during CR1000 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. 291). 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.
-
Section 8. Operation Table 59. Status Table Calibration Entries Status Table Element Descriptions of Status Table Elements Differential (Diff) Single-Ended (SE) CalGain(18) Offset or Gain ±mV Input Range Integration Gain 2.5 50-Hz Rejection CalSeOffset(1) SE Offset 5000 250 ms CalSeOffset(2) SE Offset 2500 250 ms CalSeOffset(3) SE Offset 250 250 ms CalSeOffset(4) SE Offset 25 250 ms CalSeOffset(5) SE Offset 7.5 250 ms CalSeOffset(6) SE Offset 2.
-
Section 8. Operation Table 59. Status Table Calibration Entries Descriptions of Status Table Elements Status Table Element Differential (Diff) Single-Ended (SE) Offset or Gain ±mV Input Range Integration CalDiffOffset(16) Diff Offset 25 50-Hz Rejection CalDiffOffset(17) Diff Offset 7.5 50-Hz Rejection CalDiffOffset(18) Diff Offset 2.5 50-Hz Rejection Table 60.
-
Section 8. Operation Table 60. Calibrate() Instruction Results Array Cal() Element Descriptions of Array Elements Differential (Diff) Single-Ended (SE) 27 Typical Value Offset or Gain ±mV Input Range Integration Gain 250 60-Hz Rejection -0.067 mV/LSB 28 SE Offset 25 60-Hz Rejection ±5 LSB 29 Diff Offset 25 60-Hz Rejection ±5 LSB Gain 25 60-Hz Rejection -0.0067 mV/LSB 30 31 SE Offset 7.5 60-Hz Rejection ±10 LSB 32 Diff Offset 7.5 60-Hz Rejection ±10 LSB Gain 7.
-
Section 8. Operation 1 A/D (analog-to-digital) conversion time = 15 µs 2 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. Thermistors, strain gages, and position potentiometers are examples. Resistance measurements are special-case voltage measurements.
-
Section 8. Operation Table 61.
-
Section 8. Operation Table 61. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and Circuit Diagram CRBasic Instruction and Fundamental Relationship Relationships 1 Key: Vx = excitation voltage; V1, V2 = sensor return voltages; Rf = "fixed", "bridge" or "completion" resistor; Rs = "variable" or "sensing" resistor. 2 Where X = result of the CRBasic bridge measurement instruction with a multiplier of 1 and an offset of 0. 3 See the appendix Resistive Bridge Modules (p.
-
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. CR1000 bridge measurements can reverse excitation polarity to provide ac excitation and avoid ion polarization. Note Sensors requiring ac excitation require techniques to minimize or eliminate ground loops. See Ground Looping in Ionic Measurements (p. 91). 8.1.3.
-
Section 8. Operation • Effects due to the following are not included in the specification: o Bridge-resistor errors o Sensor noise o 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.
-
Section 8. Operation 8.1.3.3 Strain Calculations Read More! The FieldCalStrain() Demonstration Program (p. 153) section has 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. All strain gages supported by StrainCalc() use the full-bridge schematic.
-
Section 8. Operation Table 63. StrainCalc() Instruction Equations StrainCalc() BrConfig Code Configuration Full-bridge strain gage. Half the bridge has two gages parallel to + and , and the other half to and + : - 6 where: • : Poisson's Ratio (0 if not applicable) • GF: Gage Factor • Vr: 0.001 (Source-Zero) if BRConfig code is positive (+) • Vr: -0.
-
Section 8. Operation reference junction and 0°C. This compensation voltage, combined with the measured thermocouple voltage, can be used to compute the absolute temperature of the thermocouple junction. To facilitate thermocouple measurements, a thermistor is integrated into the CR1000 wiring panel for measurement of the reference junction temperature by means of the PanelTemp() instruction. TCDiff() and TCSe() thermocouple instructions determine thermocouple temperatures using the following sequence.
-
Section 8. Operation outside the chamber. The temperature of this bar was also measured by another datalogger. Differences between the temperature measured by one of the thermocouples and the actual temperature of the bar are due to the temperature difference between the terminals the thermocouple is connected to and the thermistor reference (the figures have been corrected for thermistor errors). Figure Panel-Temperature Gradients (Low Temperature to High) (p.
-
Section 8. Operation Figure 93: Panel-temperature gradients (low temperature to high) Figure 94: Panel-temperature gradients (high temperature to low) 8.1.4.1.
-
Section 8. Operation Standards and Technology) Monograph 175 (1993). ANSI (American National Standards Institute) has established limits of error on thermocouple wire which is accepted as an industry standard (ANSI MC 96.1, 1975). Table Limits of Error for Thermocouple Wire (p. 305) gives the ANSI limits of error for standard and special grade thermocouple wire of the types accommodated by the CR1000.
-
Section 8. Operation Resolution (p. 306) lists high resolution ranges available for various thermocouple types and temperature ranges. The following four example calculations of thermocouple input error demonstrate how the selected input voltage range impacts the accuracy of measurements. Figure Input Error Calculation (p. 307) shows from where various values are drawn to complete the calculations. See Measurement Accuracy (p. 278) for more information on measurement accuracy and accuracy calculations.
-
Section 8. Operation Figure 95: Input error calculation Input Error Examples: Type T Thermocouple @ 45°C These examples demonstrate that in the environmental temperature range, inputoffset error is much greater than input-gain error because a small input range is used. Conditions: CR1000 module temperature,‐25 to 50°C Temperature = 45°C Reference temperature = 25°C Delta T (temperature difference) = 20°C Thermocouple output multiplier at 45°C = 42.4 µV °C‐1 Thermocouple output = 20°C * 42.4 µV °C‐1 = 830.
-
Section 8. Operation Error Calculations with Input Reversal = True µV error = gain term + offset term = (830.7 µV * 0.12%) + (1.5 * 0.67 µV + 1.0 µV) = 0.997 µV + 2.01 µV = 3.01 µV (= 0.071 °C) Error Calculations with Input Reversal = False µV Error = gain term + offset term = (830.7 µV * 0.12%) + (3 * 0.67 µV + 2.0 µV) = 0.997 µV + 4.01 µV = 5.01 µV (= 0.
-
Section 8. Operation Error Calculations with Input Reversal = False µV error = gain term + offset term = (44500 µV * 0.12%) + (3 * 66.7 µV + 2.0 µV) = 53.4 µV + 200 µV = 7.25 µV (= 7.25 °C) 8.1.4.1.4 Ground Looping Error When the thermocouple measurement junction is in electrical contact with the object being measured (or has the possibility of making contact), a differential measurement should be made to avoid ground looping. 8.1.4.1.
-
Section 8. Operation Table 66. Limits of Error on CR1000 Thermocouple Polynomials TC Type Limits of Error °C Relative to NIST Standards Range °C K -130 to 200 ±0.005 200 to 1000 ±0.02 -50 to 1372 -50 to 950 ±0.01 950 to 1372 ±0.04 8.1.4.1.7 Reference-Junction Error Thermocouple instructions TCDiff() and TCSe() include the parameter TRef to incorporate the reference-junction temperature into the measurement.
-
Section 8. Operation The magnitude of the errors discussed in Error Analysis (p. 302) show that the greatest sources of error in a thermocouple measurement are usually, • The typical (and industry accepted) manufacturing error of thermocouple wire • The reference temperature The table Thermocouple Error Examples (p. 311) tabulates the relative magnitude of these errors.
-
Section 8. Operation greater than the extension-wire range. In any case, errors can arise if temperature gradients exist within the junction box. Figure Diagram of a Thermocouple Junction Box (p. 312) illustrates a typical junction box wherein the reference junction is the CR1000. Terminal strips are a different metal than the thermocouple wire.
-
Section 8. Operation Figure 97: Pulse-sensor output signal types Figure 98: Switch-closure pulse sensor Table 69.
-
Section 8. Operation 8.1.5.1 Pulse-Input Channels (P1 - P2) Read More! Review pulse counter specifications at CR1000 Specifications. Review pulse counter programming in CRBasic Editor Help for the PulseCount() instruction. Dedicated pulse-input channels (P1 through P2), as shown in figure Pulse-Input Channels (p. 314), can be configured to read high-frequency pulses, low-level ac signals, or switch closures. Note Input-channel expansion devices for all input types are available from Campbell Scientific.
-
Section 8. Operation 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 ≤ 0.9 V. When a pulse channel is configured for high-frequency pulse, an internal 100-kΩ pull-up resistor to 5 Vdc on the P1 or P2 input is automatically employed.
-
Section 8. Operation 8.1.5.2.1 High Frequency Mode Digital I/O channels have a small 25-ns input RC-filter time constant between the terminal block and the CMOS input buffer, which allows for higher-frequency pulse counting (up to 400 kHz) when compared with pulse-input channels P1 – P2 (250 kHz maximum). Switch-closure mode is a special case edge-count function.
-
Section 8. Operation 8.1.5.3 Pulse Measurement Tips • The PulseCount() instruction, whether measuring pulse inputs on pulse channels (P1 through P2) or on digital I/O channels (C1 – C8), uses dedicated 24-bit counters to accumulate all counts over the user-specified scan interval. The resolution of pulse counters is one count or 1 Hz. Counters are read at the beginning of each scan and then cleared. Counters will overflow if accumulated counts exceed 16,777,216, resulting in erroneous measurements.
-
Section 8. Operation Using a pull-up resistor on digital I/O channels C1 - C8 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) R = Timing resolution of the TimerIO() measurement = P = Period of input signal (seconds). For example, P = 1 / 1000 Hz = 0.
-
Section 8. Operation Table 70. Example. E for a 10 Hz input signal Scan Rising Edge / Scan E 5.0 50 50 0.5 5 5 0.05 0.5 1 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. Consider a 1-kHz input. Table Frequency Resolution Comparison (p.
-
Section 8. Operation 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. 320) compares specifications for pulse-input channels to emphasize the need for matching the proper device to application. Take time to understand signals to be measured and compatible channels. Table 72.
-
Section 8. Operation Table 73. Time Constants (τ) Measurement τ Pulse channel, high-frequency mode 1.2 Pulse channel, switch-closure mode 3300 Pulse channel, low-level ac mode See table Filter Attenuation of Frequency Signals (p. 321) footnote Digital I/O, high-frequency mode 0.025 Digital I/O, switch-closure mode 0.025 Table 74. Filter Attenuation of Frequency Signals.
-
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 CR1000 operating system disables the interrupt that is capturing the precise time until the next scan is serviced. This is done so that the CR1000 does not get bogged down in interrupts.
-
Section 8. Operation Figure 102: Input conditioning circuit for period averaging 8.1.7 SDI-12 Recording Read More! SDI-12 Sensor Support (p. 172) and Serial Input / Output (p. 509). 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. Typically, the data-acquisition unit also supplies power (12 Vdc and ground) to the SDI-12 sensor.
-
Section 8. Operation Figure 103: Circuit to limit control port input to 5 Vdc 8.1.9 Field Calibration Read More! Field Calibration of Linear Sensors (FieldCal) (p. 151) has complete information. Calibration increases accuracy of a measurement device by adjusting its output, or the measurement of its output, to match independently verified quantities. Adjusting a sensor output directly is preferred, but not always possible or practical.
-
Section 8. Operation Figure 104: Current limiting resistor in a rain gage circuit 8.1.10.3 RS-232 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. 8.
-
Section 8. Operation each CR1000 can catch the rising edge of a digital pulse from the Master CR1000 and synchronize measurements or other functions, using the WaitDigTrig() instructions, independent of CR1000 clocks or data time stamps. When programs are running in pipeline mode, measurements can be synchronized to within a few microseconds (see WaitDigTrig Scans ). 3. PakBus commands – the CR1000 is a PakBus device, so it is capable of being a node in a PakBus network.
-
Section 8. Operation over a proprietary, three-wire serial communications link utilizing channels C1, C2 and C3. Read More! For complete information on available measurement and control peripherals, go to the appendix Sensors and Peripherals, www.campbellsci.com, or contact a Campbell Scientific applications engineer. 8.2.1 Analog-Input Expansion Modules Mechanical relay and solid-state relay multiplexers are available to expand the number of analog sensor inputs.
-
Section 8. Operation Figure 105: 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 (p. 563), contact a Campbell Scientific applications engineer, or go to www.campbellsci.com. Compatible, inexpensive, and reliable single-channel relay drivers for a wide range of loads are available from various electronic vendors such as Crydom, Newark, Mouser, etc. 8.2.4.
-
Section 8. Operation Figure 106: Relay driver circuit with relay Figure 107: Power switching without relay 8.2.5 Analog Control / Output Devices The CR1000 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. The output level is maintained until updated by the CR1000. Refer to the appendix Continuous Analog Output (CAO) Modules (p.
-
Section 8. Operation cutting the output voltage of sensors to voltage levels compatible with the CR1000, modules for completion of resistive bridges, and shunt modules for measurement of analog-current sensors. Refer to the appendix Signal Conditioners (p. 561) for information concerning available TIM modules. 8.2.7 Vibrating Wire Vibrating wire modules interface vibrating-wire transducers to the CR1000. Refer to the appendix Pulse / Frequency Input-Expansion Modules (p.
-
Section 8. Operation Internal Serial Flash 3 12 kB: Device Settings 500 kB: CPU: drive External Flash (Optional) 2 GB: USB: drive External CompactFlash (Optional) ≤ 16 GB: CRD: drive Device Settings — A backup of settings such as PakBus address, station name, beacon intervals, neighbor lists, etc. Rebuilt when a setting changes. CPU: drive — Holds program files, field calibration files, and other files not frequently overwritten. Slower than SRAM.
-
Section 8. Operation Table 76. CR1000 SRAM Memory Use Comments ---------------------------------Variables & Constants ---------------------------------Final-Storage Data Tables Stores variables in the user program. These values may persist through powerup, recompile, and watchdog events if the PreserveVariables instruction is in the running program. Final Storage is given lowest priority in SRAM memory allocation. Stores data resulting from CR1000 measurements. This memory is termed "Final Storage.
-
Section 8. Operation CRD: Principal use is to expand Final Storage (p. 454), but it is also used to store .JPG, cr1, and .DAT files. 1 The CPU: drive uses a FAT16 file system, so it is limited to 128 file. If the file names are longer than 8.3 characters (e.g. 12345678.123), you can store less. 2 The USR: drive uses a FAT32 file system, so there is no practical limit to the number of files that can be stored on it.
-
Section 8. Operation Note Placing an optional USR: size setting in the user program over-rides manual changes to USR: size. When USR: size is changed manually, the user program restarts and the programmed size for USR: takes immediate effect. The USR: drive holds any file type within the constraints of the size of the drive and the limitations on filenames. Files typically stored include image files from cameras (see the appendix Cameras (p.
-
Section 8. Operation Campbell Scientific CF card modules connect to the CR1000 peripheral port. Each has a slot for Type I or Type II CF cards. A maximum of 30 data tables can be created on a CF card. Refer to Writing High-Frequency Data to CF Cards (p. 266) for information on programming the CR1000 to use CF cards. Refer to the appendix Card-Storage Modules for information on available CF-card modules. Note CardConvert software, included with mid- and top-level datalogger support software (p. 399, p.
-
Section 8. Operation Table 78.
-
Section 8. Operation 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' E1H TOA5 TOA5 files contain ASCII (p. 447) header and comma‐separated data. Example: "TOA5","11467","CR1000","11467","CR1000.Std.20","CPU:file format.
-
Section 8. Operation 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.
-
Section 8. Operation 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.
-
Section 8. Operation • Initializes system variables. • Clears communications memory. Full memory reset does not affect the CRD: drive directly. Subsequent user program uploads, however, can erase CRD:. Operating systems can also be sent using the program Send feature in datalogger support software (p. 77). Beginning with CR1000 operating system v.16, settings and status are preserved when sending a subsequent operating system by this method; data tables are erased.
-
Section 8. Operation Table 79. File-Control Functions File-Control Functions Accessed Through 1 2 Sending programs to the CR1000 Program Send , File Control Send , 3 DevConfig , keyboard with CF card (CRD: drive) or Campbell Scientific mass-storage 4 media (USB: drive) , power-up with CF card (CRD: drive) or Campbell Scientific mass5 storage media (USB: drive) , web API HTTPPut (Sending a File to a Datalogger) Setting program file attributes. See File Attributes (p.
-
Section 8. Operation Table 79. File-Control Functions File-Control Functions Accessed Through 1 Datalogger support software (p. 77) Program Send command 2 Datalogger support software File Control (p. 454) utility 3 Device Configuration Utility (DevConfig) (p. 92) software 4 Manual with CF card (CRD: drive) or Campbell Scientific mass-storage media (USB: drive). See Data Storage (p. 332) 5 Automatic with CF card (CRD: drive) or Campbell Scientific mass-storage media (USB: drive) and Powerup.ini.
-
Section 8. Operation Table 80. CR1000 File Attributes Attribute Function Attribute for Programs Sent to CR1000 with: 1 Support software program Send (p. 454) command. See software Help. 2 Support software File Control (p. 454). See software Help & Preserving Data at Program Send (p. 110). 3 Automatic on power-up of CR1000 with CF card (CRD: drive) or Campbell Scientific massstorage media (USB: drive) and Powerup.ini. See Power-up (p. 343). 8.3.4.
-
Section 8. Operation Power-up functions include • Sending programs to the CR1000. • Optionally setting run attributes of CR1000 program files. • Sending an OS to the CR1000. • 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.
-
Section 8. Operation Syntax Syntax for the powerup.ini file is: Command,File,Device where, • Command = one of the numeric commands in table Powerup.ini Commands (p. 345). • File = accompanying operating system or user program file. Name can be up to 22 characters long. • Device: the CR1000 memory drive to which the accompanying operating system or user program file is copied (usually CPU:). If left blank or with an invalid option, default device will be CPU:.
-
Section 8. Operation • Command 13 Copies the specified program to the designated drive and sets the run attribute of the program to Run Always. Data on a CF card from the previously running program will be erased. • Command 14 Copies the specified program to the designated drive and sets the run attribute to Run Now. Data on a CF card from the previously running program will be erased. Example Power-up.ini Files Powerup.
-
Section 8. Operation 8.3.4.4 File Management Q & A Q: How do I hide a program file on the CR1000 without using the CRBasic FileManage() instruction? A: Use the CoraScript File-Control command, or the Web API FileControl command. 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 CR1000 is 59 characters. If the name is longer than 59 characters, an Invalid Filename error is displayed.
-
Section 8. Operation Table 82.
-
Section 8. Operation hardware are the PC COM port, the CR1000 RS-232 port, and a serial cable. The carrier signal is RS-232, and the protocol is PakBus®. Of these three, a user most often must come to terms with only the hardware, since the carrier signal and protocol are transparent in most applications. 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.
-
Section 8. Operation Digital Display Direct Connect CS I/O Serial Comms external keyboard / display Direct Connect Serial Comms 8.4.2 Protocols The CR1000 communicates with datalogger support software (p. 77) and other Campbell Scientific dataloggers (p. 563) using the PakBus (p. 461) protocol (PakBus Overview (p. 351) ). Modbus, DNP3, and Web API are also supported (see Alternate Telecommunications and Data Retrieval (p. 364) ).
-
Section 8. Operation of the query can be seen in the DevConfig and PakBusGraph settings tables. SDC queries occur whether or not an SDC device is attached. 8.5 PakBus Overview Read More! This section is provided as a primer to PakBus® communications. More information is available in PakBus Networking Guide, available at www.campbellsci.com. The CR1000 communicates with computers or other Campbell Scientific dataloggers via PakBus®.
-
Section 8. Operation o Routers can be branch routers. Branch routers only know as neighbors central routers, routers in route to central routers, and routers one level outward in the network. o Routers can be central routers. Central routers know the entire network. A PC running LoggerNet is typically a central router. o Routers can be router-capable dataloggers or communications devices. The CR1000 is a leaf node by factory default.
-
Section 8. Operation Table 84.
-
Section 8. Operation Discovery occurs when nodes exchange hellos. A hello-exchange occurs during a hello-message between two nodes. 8.5.3.1 Hello-message (two-way exchange) A hello-message is an interchange between two nodes that negotiates a neighbor link. A hello-message is sent out in response to one or both of either a beacon or a hello-request. 8.5.3.
-
Section 8. Operation • If Verify Interval = 0, then CVI = 2.5 x Beacon Interval* • If Verify Interval = 60, then CVI = 60 seconds* • If Beacon Interval = 0 and Verify Interval = 0, then CVI = 300 seconds* • If the router or master does not hear from a neighbor for one CVI, it begins again to send a hello-message to that node at the random interval.
-
Section 8. Operation 8.5.4.2 Ping Link integrity can be verified with the following procedure by using PakBusGraph Ping Node. Nodes can be pinged with packets of 50, 100, 200, or 500 bytes. Note Do not use packet sizes greater than 90 when pinging with 100 mW radio modems and radio enabled dataloggers (see the appendix Telecommunications Hardware ). Pinging with ten repetitions of each packet size will characterize the link.
-
Section 8. Operation Figure 110: Tree Map 8.5.6 PakBus LAN Example To demonstrate PakBus® networking, a small LAN (Local Area Network) of CR1000s can be configured as shown in figure Configuration and Wiring of PakBus LAN (p. 358). A PC running LoggerNet uses the RS-232 port of the first CR1000 to communicate with all CR1000s. All LoggerNet functions, such as send programs, monitor measurements and collect data, are available to each CR1000.
-
Section 8. Operation Figure 111: Configuration and wiring of PakBus LAN 8.5.6.2 LAN Setup Configure CR1000s before connecting them to the LAN: 1. Start Device Configuration Utility (DevConfig). Click on Device Type: CR1000. Follow on-screen instructions to power CR1000s and connect them to the PC. Close other programs that may be using the PC COM port, such as LoggerNet, PC400, PC200W, HotSync, etc. 2. Click on the Connect button at the lower left. 3.
-
Section 8.
-
Section 8. Operation Figure 114: DevConfig Deployment | Advanced tab Table 86. PakBus-LAN Example Datalogger-Communications Settings Software→ Device Configuration Utility (DevConfig) Tab→ Deployment Sub-Tab→ Datalogger Setting→ PakBus Adr Sub-Setting→ COM1 Baud Rate Datalogger ↓ Neighbors Baud Rate Begin: End: 1 115.2K Fixed 2 2 115.2K Fixed CR1000_2 2 115.2K Fixed 1 1 Disabled CR1000_3 3 115.2K Fixed 1 1 115.2K Fixed CR1000_4 4 115.
-
Section 8. Operation 8.5.6.3 LoggerNet Setup Figure 115: LoggerNet Network-Map Setup: COM port In LoggerNet Setup, click Add Root and add a ComPort. Then Add a PakBusPort, and (4) CR1000 dataloggers to the device map as shown in figure LoggerNet Device-Map Setup (p. 361).
-
Section 8. Operation Figure 116: LoggerNet Network-Map Setup: PakBusPort As shown in figure LoggerNet Device Map Setup: PakBusPort (p. 362), set the PakBusPort maximum baud rate to 115200. Leave other settings at the defaults.
-
Section 8. Operation As shown in figure LoggerNet Device-Map Setup: Dataloggers (p. 362), set the PakBus® address for each CR1000 as listed in table PakBus-LAN Example Datalogger-Communications Settings (p. 360). 8.5.7 PakBus Encryption PakBus encryption allows two end devices to exchange encrypted commands and data. Routers and other leaf nodes do not need to be set for encryption. The CR1000 has a setting accessed through DevConfig that sets it to send / receive only encrypted commands and data.
-
Section 8. Operation Note Setting the encryption key for a PakBus port device will force all messages it sends to use encryption. 8.6 Alternate Telecommunications The CR1000 communicates with datalogger support software (p. 77) and other Campbell Scientific dataloggers (p. 563) using the PakBus (p. 461) protocol (PakBus Overview (p. 351) ). Modbus, DNP3, and Web API are also supported. CAN bus is supported when using the Campbell Scientific SDM-CAN communications module. 8.6.1 DNP3 8.6.1.
-
Section 8. Operation Table 87. DNP3 Implementation — Data Types Required to Store Data in Public Tables for Object Groups Data Type Group Description Boolean 1 Binary input 2 Binary input change 10 Binary output 12 Control block 30 Analog input 32 Analog change event 40 Analog output status 41 Analog output block 50 Time and date 51 Time and date CTO Long 8.6.1.2.2 CRBasic Instructions Complete descriptions and options of commands are available in CRBasic Editor Help.
-
Section 8. Operation Syntax DNPUpdate (DNPSlaveAddr,DNPMasterAddr) 8.6.1.2.3 Programming for Data-Acquisition As shown in CRBasic example Implementation of DNP3 (p. 366), program the CR1000 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. 2. Setup the variables to be sent to the master using DNPVariable().
-
Section 8. Operation 'Object group 30, variation 2 is used to return analog data when the CR1000 '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.
-
Section 8. Operation 8.6.2.2 Terminology Table Modbus to Campbell Scientific Equivalents (p. 368) lists terminology equivalents to aid in understanding how CR1000s fit into a SCADA system. Table 88.
-
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 CR1000 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 (p. 369) shows the linkage between CR1000 ports, flags and Boolean variables and Modbus registers.
-
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. CR1000 commands support the following. Table 90.
-
Section 8. Operation 8.6.2.5 Modbus over IP Modbus over IP functionality is an option with the CR1000. Contact Campbell Scientific for details. 8.6.2.6 Modbus tidBytes Q: Can Modbus be used over an RS‐232 link, 7 data bits, even parity, one stop bit? A: 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.
-
Section 8. Operation Scan(1,Sec,0,0) 'In the case of the CR1000 being the ModBus master then the 'ModbusMaster instruction would be used (instead of fixing 'the variables as shown between the BeginProg and SCAN instructions). ModbusMaster(Result,COMRS232,-115200,5,3,Register(),-1,2,3,100) 'MoveBytes(DestVariable,DestOffset,SourceVariable,SourceOffSet, 'NumberOfBytes) MoveBytes(Combo,2, Register_LSW,2,2) MoveBytes(Combo,0, Register_MSW,2,2) NextScan EndProg 8.6.
-
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) (p. 92) software Net Services tab, Edit .csipasswd File button. When in Datalogger .
-
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 91.
-
Section 8. Operation p2 DataQuery Specifies ending date and/or time when using date-range argument. time expressed in defined format (see Time Syntax (p. 375) section) value SetValueEx Specifies the new value. numeric or string time ClockSet Specifies set time. time in defined format action FileControl Specifies FileControl action. 1 through 20 file FileControl Specifies first argument of FileControl action.
-
Section 8. Operation Table 92. BrowseSymbols API Command Parameters uri Optional. Specifies the URI (p. 470) for the data source. When querying a CR1000, uri source, tablename and fieldname are optional. If source is not specified, dl (CR1000) 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. If fieldname refers to an array without a subscript, all fields associated with that array will be output.
-
Section 8. Operation is_read_only Boolean value that is set to true if the symbol is considered to be read-only. A value of false would indicate an expectation that the symbol value can be changed using the SetValueEx command. can_expand Boolean value that is set to true if the symbol has child values that can be listed using the BrowseSymbols command. If the client specifies the URI for a symbol that does not exist, the server will respond with an empty symbols set.
-
Section 8. Operation
BallastLine | dl:BallastLine | 6 | true | false | true | Public | dl:Public | 6 | true | fals e | true |