-
CR3000 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 CR3000 Micrologger(R) 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 4.2.5.6 Procedure: (PC200W Steps 10 to 11)................................... 55 4.2.5.7 Procedure: (PC200W Steps 12 to 13)................................... 56 Section 5. System Overview ..........................................57 5.1 CR3000 Datalogger................................................................................. 58 5.1.1 Clock.............................................................................................. 59 5.1.2 Sensor Support........................
-
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.1 Numerical Formats............................................................. 117 7.7.3.2 Structure ............................................................................. 117 7.7.3.3 Command Line................................................................... 119 7.7.3.3.1 Multiple Statements on One Line ............................. 120 7.7.3.3.2 One Statement on Multiple Lines ............................. 120 7.7.3.4 Single-Line Declarations...........................
-
Table of Contents 7.8.2 Information Services.................................................................... 171 7.8.2.1 PakBus Over TCP/IP and Callback.................................... 172 7.8.2.2 Default HTTP Web Server................................................. 172 7.8.2.3 Custom HTTP Web Server ................................................ 173 7.8.2.4 FTP Server ......................................................................... 176 7.8.2.5 FTP Client...............................
-
Table of Contents 7.8.12.3 Measurement Rate: 601 to 2000 Hz ................................. 240 7.8.13 String Operations ....................................................................... 241 7.8.13.1 String Operators ............................................................... 242 7.8.13.2 String Concatenation........................................................ 242 7.8.13.3 String NULL Character.................................................... 243 7.8.13.4 Inserting String Characters......
-
Table of Contents 8.1.2.6.2 Ground Reference Offset Voltage ............................ 289 8.1.2.6.3 Background Calibration............................................ 289 8.1.2.7 Integration .......................................................................... 289 8.1.2.7.1 ac Power Line Noise Rejection ................................ 290 8.1.2.8 Signal Settling Time........................................................... 291 8.1.2.8.1 Minimizing Settling Errors..................................
-
Table of Contents 8.2.4.3 Component-Built Relays .................................................... 334 8.2.5 Analog Control / Output Devices ................................................ 335 8.2.6 TIMs ............................................................................................ 335 8.2.7 Vibrating Wire............................................................................. 335 8.2.8 Low-level ac ................................................................................
-
Table of Contents 8.6.1 DNP3 ........................................................................................... 369 8.6.1.1 Overview............................................................................ 369 8.6.1.2 Programming for DNP3 ..................................................... 369 8.6.1.2.1 Declarations.............................................................. 369 8.6.1.2.2 CRBasic Instructions ................................................ 370 8.6.1.2.
-
Table of Contents Section 9. Maintenance ................................................421 9.1 Moisture Protection ............................................................................... 421 9.2 Replacing the Internal Battery............................................................... 421 9.3 Repair .................................................................................................... 424 Section 10. Troubleshooting........................................427 10.1 Status Table...
-
Table of Contents Appendix A. CRBasic Programming Instructions .....475 A.1 Program Declarations........................................................................... 475 A.1.1 Variable Declarations & Modifiers............................................. 476 A.1.2 Constant Declarations................................................................. 477 A.2 Data-Table Declarations....................................................................... 477 A.2.1 Data-Table Modifiers....................
-
Table of Contents A.17 Modem Control .................................................................................. 524 A.18 SCADA .............................................................................................. 524 A.19 Calibration Functions ......................................................................... 525 A.20 Satellite Systems................................................................................. 526 A.20.1 Argos ....................................................
-
Table of Contents F.8.4 Telephone .................................................................................... 570 F.8.5 Private Network Radios............................................................... 570 F.8.6 Satellite Transceivers .................................................................. 570 F.9 Data Storage Devices............................................................................ 570 F.10 Data Acquisition Support Software .................................................
-
Table of Contents Figure 41: DevConfig Deployment tab ....................................................... 104 Figure 42: DevConfig Deployment | ComPorts Settings tab....................... 106 Figure 43: DevConfig Deployment | Advanced tab .................................... 107 Figure 44: DevConfig Logger Control tab .................................................. 108 Figure 45: "Include File" settings via DevConfig .......................................
-
Table of Contents Figure 97: Panel-temperature gradients (high temperature to low)............. 310 Figure 98: Input error calculation................................................................ 313 Figure 99: Diagram of a thermocouple junction box .................................. 318 Figure 100: Pulse-sensor output signal types .............................................. 319 Figure 101: Switch-closure pulse sensor.....................................................
-
Table of Contents Table 10. Formats for Entering Numbers in CRBasic................................. 117 Table 11. CRBasic Program Structure ........................................................ 118 Table 12. Data Types .................................................................................. 124 Table 13. Predefined Constants and Reserved Words................................. 128 Table 14. TOA5 Environment Line ............................................................ 131 Table 15.
-
Table of Contents Table 64. Resistive-Bridge Circuits with Current Excitation1 .................... 302 Table 65. Analog Input-Voltage Range and Basic Resolution.................... 304 Table 66. StrainCalc() Instruction Equations .............................................. 305 Table 67. Limits of Error for Thermocouple Wire (Reference Junction at 0°C).................................................................................................. 311 Table 68.
-
Table of Contents Table 117. CommsMemFree(1) Defaults and Use Example, TLS Active .. 437 Table 118. CR3000 Terminal Commands................................................... 446 Table 119. Arithmetic Operators................................................................. 495 Table 120. Compound-Assignment Operators ............................................ 497 Table 121. Derived Trigonometric Functions ............................................. 498 Table 122. Asynchronous-Port Baud Rates.........
-
Table of Contents CRBasic Example 4. Inserting Comments .................................................. 115 CRBasic Example 5. Load binary information into a variable.................... 117 CRBasic Example 6. Proper Program Structure.......................................... 118 CRBasic Example 7. Using a Variable Array in Calculations .................... 122 CRBasic Example 8. Using Variable Array Dimension Indices ................. 122 CRBasic Example 9. Data Type Declarations........................
-
Table of Contents CRBasic Example 58. BeginProg / Scan / NextScan / EndProg Syntax ..... 257 CRBasic Example 59. PT100 in Four-Wire Half-Bridge............................ 264 CRBasic Example 60. PT100 in Three-wire Half-bridge............................ 266 CRBasic Example 61. PT100 in Four-Wire Full-Bridge............................. 268 CRBasic Example 62. PT100s with Current Excitation.............................. 270 CRBasic Example 63. Using TableFile() with Option 64 with CF Cards...
-
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 CR3000 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 CR3000 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 CR3000 is left on the shelf. When the CR3000 is continuously used, the internal battery may last up to 10 or more years.
-
Section 2.
-
Section 3. Initial Inspection • The CR3000 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 CR3000 o 4 each pn 505 screws for use in mounting the CR3000 to an enclosure backplate. o 4 each pn 6044 nylon hardware inserts for use in mounting the CR3000 to a Campbell Scientific enclosure backplate.
-
Section 3.
-
Section 4. Quickstart Tutorial This tutorial presents an introduction to CR3000 data acquisition. 4.1 Primer – CR3000 Data-Acquisition Data acquisition with the CR3000 is the result of a step-wise procedure involving the use of electronic sensor technology, the CR3000, a telecommunications link, and datalogger support software (p. 76). 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 CR3000 Module and Power Supply The CR3000 module integrates measurement electronics with an integrated keyboard and multi-line display. 4.1.2.1 Wiring Panel As shown in figure CR3000 Wiring Panel (p. 35), the wiring panel provides terminals for connecting sensors, power and communications devices.
-
Section 4. Quickstart Tutorial Figure 2: Wiring panel 4.1.2.2 Power Supply The CR3000 is powered by a nominal 12 Vdc source. Acceptable power range is 10 to 16 Vdc. Many CR3000 are supplied with an integrated power supply base. Power to a power supply base is controlled by a manual switch on the right side of the case, below the keyboard display. External power connects through the green POWER IN on the face of the CR3000. The POWER IN connection is internally reverse-polarity protected. 4.1.2.
-
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 CR3000. 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 9H 17 9L 18 10H 19 10L 20 11H 21 11L 22 12H 23 12L 24 13H 25 13L 26 14H 27 14L 28 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 • A specific resistance in a pressure transducer strain gage correlates to a specific water pressure. • A change in resistance in a wind vane potentiometer correlates to a change in wind direction. 4.1.3.2.1 Voltage Excitation Bridge resistance is determined by measuring the difference between a known voltage applied to a bridge and the measured return voltage. The CR3000 supplies a precise scalable voltage excitation via excitation terminals.
-
Section 4. Quickstart Tutorial 4.1.3.2.2 Current Excitation Resistance can be determined by supplying a precise current and measuring the return voltage. The CR3000 supplies a precise excitation current via current excitation terminals. Return voltage is measured on analog input terminals. Examples of bridge sensor wiring using current excitation are illustrated in figure Current Excitation -- PRT (p. 39). Note When using long leads with current excitation, consult Minimizing Settling Error (p. 292).
-
Section 4. Quickstart Tutorial Figure 8: Pulse-sensor output signal types 4.1.3.3.2 Pulse-Input Channels Table Pulse-Input Channels and Measurements (p. 40) lists devices, channels and options for measuring pulse signals. Table 2.
-
Section 4. Quickstart Tutorial result. Some switch-closure sensors may require a pull-up resistor. Consult figure Connecting Switch Closures to Digital I/O (p. 323) for information on use of pull-up resistors. Figure 9: Pulse input wiring -- anemometer switch 4.1.3.4 RS-232 Sensors The CR3000 has 6 ports available for RS-232 input as shown in figure Location of RS-232 Ports (p. 41). Note With the correct adaptor, the CS I/O port can be used as an RS-232 I/O port.
-
Section 4. Quickstart Tutorial Figure 11: Use of RS-232 and digital I/O when reading RS-232 devices 4.1.4 Digital I/O Ports The CR3000 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. 39) and discussed at length in Pulse (p. 318). Other functions include device-driven interrupts, asynchronous communications and SDI-12 communications.
-
Section 4. Quickstart Tutorial 4.1.5 SDM Channels SDM (Serial Device for Measurement) devices expand the input and output capacity of the CR3000. Brief descriptions of SDM device capabilities are found in the appendix Sensors and Peripherals. These devices connect to the CR3000 through C3ports SDM-C1, SDM-C2, and SDM-C3. 4.1.6 Input Expansion Modules Modules are available from Campbell Scientific to expand the number of input and digital I/O ports on the CR3000.
-
Section 4. Quickstart Tutorial 4.2.2 Hardware Setup Note The thermocouple is attached to the CR3000 later. 4.2.2.1 Internal Power Supply With reference to figure Power and RS-232 Connections (internal-power supply) (p. 44), some CR3000 dataloggers are shipped with a power supply internal to the removable base. This internal power supply may use alkaline batteries or sealedrechargeable batteries. For more information and installation procedures, refer to the Alkaline Battery Base (p.
-
Section 4. Quickstart Tutorial 5. Attach the black wire from the PS100 to the terminal labeled G on the green connector. 6. After confirming the correct polarity on the wire connections, insert the green power connector into its receptacle on the CR3000. 7. Connect the RS-232 cable between the RS-232 port on the CR3000 and the RS-232 port on the PC (or to the USB-to-RS-232 cable). 8. Move the on/off switch on the PS100 to the On position. Figure 14: Power and RS-232 connections (internal-power supply) 4.
-
Section 4. Quickstart Tutorial Figure 15: 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 CR3000 from the scroll window. Accept the default name of "CR3000." 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 CR3000 with clock and program functions. The Monitor Data or Collect Data tabs may be selected at any time.
-
Section 4. Quickstart Tutorial Figure 16: 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 17: 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 18: 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 19: 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 CR3000, collect data from the CR3000, 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 CR3000.
-
Section 4. Quickstart Tutorial CR3000. To view the OneMin table, select an empty cell in the display area, then click Add. 4.2.5.3 Procedure: (PC200W Step 5) 5. In the Add Selection window Tables field, click on OneMin, then click Paste. The OneMin table is now displayed. Figure 22: PC200W Monitor Data tab – Public and OneMin Tables 4.2.5.4 Procedure: (PC200W Step 6) 6. Click on the Collect Data tab.
-
Section 4. Quickstart Tutorial Figure 23: 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. A dialog box will appear prompting for a filename. Click Save to accept the default filename of CR3000_OneMin.dat. A progress bar will appear as data are collected, followed by a Collection Complete message. Click OK to continue. 9.
-
Section 4. Quickstart Tutorial Figure 24: 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 CR3000_OneMin.dat file and click Open. 11. The collected data are now shown.
-
Section 4. Quickstart Tutorial Figure 25: 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 . Figure 26: PC200W View line graph 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. 76) (computer or mobile) The figure Features of a Data-Acquisition System (p. 58) illustrates a common CR3000-based data-acquisition system.
-
Section 5. System Overview Figure 27: Features of a data-acquisition system 5.1 CR3000 Datalogger The CR3000 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 CR3000, sometimes with the assistance of various peripheral devices, can measure nearly all electronic sensors. The CR3000 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 CR3000 Wiring Panel The wiring panel of the CR3000 is the interface to many CR3000 functions. These functions are best introduced by reviewing features of the CR3000 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 — 4 channels (P1 to P4) configurable for counts or frequency of the following signal types.
-
Section 5. System Overview The number of CAO terminals can be expanded with peripheral CAO devices available from Campbell Scientific. Refer to the appendix CAO Modules (p. 565) for more information. • Current Excitation — three switched terminals (IX1, IX2, IX3) with return connecting to IXR terminal. Capable of driving between –2500 µA and 2500 µA. 5.1.3.3 Grounding Terminals Read More! See Grounding (p. 92). Proper grounding will lend stability and protection to a data acquisition system.
-
Section 5. System Overview • Peripheral 12 Vdc Power Source — 2 terminals (12V) and associated grounds (G) supply power to sensors and peripheral devices requiring nominal 12 Vdc. This supply may drop as low as 9.6 Vdc before datalogger operation stops. Precautions should be taken to minimize the occurrence of data from underpowered sensors. • 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.
-
Section 5. System Overview the use of the keyboard display is available in the sections Read More! To implement custom menus, see CRBasic Editor Help for the DisplayMenu() instruction. CRBasic programming in the CR3000 facilitates creation of custom menus for the integrated 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.
-
Section 5. System Overview with an upper input voltage limit of 15 Vdc may be damaged if connected to a CR3000 that is powered by 16 Vdc. 5.1.5 Programming The CR3000 is a highly programmable instrument, adaptable to the most demanding measurement and telecommunications requirements. 5.1.5.1 Operating System and Settings Read More! See CR3000 Configuration (p. 97). The CR3000 is shipped factory-ready with an operating system (OS) installed.
-
Section 5. System Overview Note Once a Short Cut generated program has been edited with CRBasic Editor, it can no longer be modified with Short Cut. 5.1.6 Memory and Final Data Storage Read More! See Memory and Final Data Storage (p. 335). CR3000 memory is organized as follows. Memory size is posted in the Status table (see the appendix Status Table and Settings (p. 529) ).
-
Section 5. System Overview Data files from TableFile() instruction (TOA5, TOB1, CSIXML and CSIJSON) o Keep memory (OS variables not initialized) o Dynamic runtime memory allocation Additional final data storage is available by using the optional CF (p. 451) card with a CF module listed in the appendix Card Storage Module, or with a mass storage device (see the appendix Mass Storage Devices ). 5.1.
-
Section 5. System Overview data this way, stop the CR3000 program to ensure data are not written to the card while data are retrieved; otherwise, data corruption will result. Data stored on CF cards are retrieved through a telecommunication link to the CR3000 or by removing the card, carrying it to a computer, and retrieving the data via a third-party CF adapter. Retrieving data, especially large files, is much faster through a CF adapter than telecommunications with the CR3000.
-
Section 5. System Overview • Routing — the CR3000 can act as a router, passing on messages intended for another logger. PakBus supports automatic route detection and selection. • Short distance networks with no extra hardware —-a CR3000 can talk to another CR3000 over distances up to 30 feet by connecting transmit, receive and ground wires between the dataloggers. PC communications with a PakBus datalogger via the CS I/O port, over phone modem or radio, can be routed to other PakBus dataloggers.
-
Section 5. System Overview displays two values from CR3000 memory. PanelTemps shows the CR3000 wiring-panel temperature at each scan, and the one-minute sample of panel temperature. TCTemps displays two thermocouple temperatures. Figure 28: Custom menu example 5.1.9 Security CR3000 applications may include the collection of sensitive data, operation of critical systems, or networks accessible by many individuals. The CR3000 is supplied void of active security measures.
-
Section 5. System Overview Note All security features can be subverted through physical access to the CR3000. If absolute security is a requirement, the CR3000 datalogger must be kept in a secure location. 5.1.9.1 Vulnerabilities While "security through obscurity" may have provided sufficient protection in the past, Campbell Scientific dataloggers increasingly are deployed in sensitive applications.
-
Section 5. System Overview HTTP: • Send datalogger programs. • View table data. • Get historical records or other files present on the datalogger drive spaces. • More access is given when a .csipasswd is in place (so make sure users with administrative rights have strong log-in credentials) 5.1.9.2 Pass-code Lockout Pass-code lockouts (historically known simply as "security codes") are the oldest method of securing a Campbell Scientific datalogger.
-
Section 5. System Overview Level 1 must be set before Level 2. Level 2 must be set before Level 3. If a level is set to 0, any level greater than it will also be set to 0. For example, if level 2 is 0 then level 3 is automatically set to 0. Levels are unlocked in reverse order: level 3 before level 2, level 2 before level 1. When a level is unlocked, any level greater than it will also be unlocked, so unlocking level 1 (entering the Level 1 security code) also unlocks levels 2 and 3.
-
Section 5. System Overview 5.1.9.3.2 PakBus Instructions The following CRBasic PakBus instructions have provisions for password protection: • ModemCallBack() • SendVariable() • SendGetVariables() • SendFile() • GetVariables() • GetFile() • GetDataRecord() 5.1.9.3.3 IS Instructions The following CRBasic instructions that service CR3000 IP capabilities have provisions for password protection: • EMailRecv() • EMailSend() • FTPClient() 5.1.9.3.
-
Section 5. System Overview One use of file encryption may be to secure proprietary code but make it available for copying. 5.1.9.5 Communications Encryption PakBus is the CR3000 root communication protocol. By encrypting certain portions of PakBus communications, a high level of security is given to datalogger communications. See PakBus Encryption (p. 368) for more information. 5.1.9.
-
Section 5. System Overview 5.1.10.3 Calibration Read More! See Self-Calibration (p. 295). The CR3000 uses an internal voltage reference to routinely calibrate itself. Campbell Scientific recommends factory recalibration every two years. If calibration services are required, refer to the section entitled Assistance (p. 5) at the front of this manual. 5.1.10.4 Internal Battery Caution Misuse or improper installation of the lithium battery can cause severe injury.
-
Section 5. System Overview applications in LoggerNet Remote are run on a separate computer, and are used to manage the LoggerNet Linux server. • VISUALWEATHER Weather Station Software supports Campbell Scientific weather stations. Version 3.0 or higher supports custom weather stations or the ET107, ET106, and MetData1 pre-configured weather stations. The software allows you to initialize the setup, interrogate the station, display data, and generate reports from one or more weather stations.
-
Section 5.
-
Section 6. CR3000 Specifications 1.1 CR3000 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.
-
Section 6.
-
Section 7. Installation 7.1 Moisture Protection When humidity tolerances are exceeded and condensation occurs, damage to CR3000 electronics can result. Effective humidity control is the responsibility of the user. Internal CR3000 module moisture is controlled at the factory by sealing the module with a packet of silica gel inside. The desiccant is replaced whenever the CR3000 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 Power supplies available from Campbell Scientific can be reviewed in the appendix Power Supplies (p. 566), or at www.campbellsci.com. Contact a Campbell Scientific application engineer if assistance in selecting a power supply is needed, particularly with applications in extreme environments. 7.4.1 CR3000 Power Requirement The CR3000 operates on dc voltage ranging from 9.6 to 16 Vdc. It is internally protected against accidental polarity reversal.
-
Section 7. Installation 7.4.3.2 Internal Batteries Internal-power supplies have a thermal fuse that limits source current and minimizes the need for repair. If excessive current is drawn, the fuse gets hot, increases in resistance, and limits current. When the problem is fixed, the fuse cools and the resistance decreases, usually allowing current to eventually pass.
-
Section 7. Installation 8. Check for normal datalogging function before leaving the site. Table 4. Alkaline Battery Service and Temperatures Temperature (°C) % of 20°C Service* 20 - 50 100 15 98 10 94 5 90 0 86 -10 70 -20 50 -30 30 *Data based on one "D" cell under conditions of 50-mA current drain with a 30-ohm load. As the current drain decreases, the percent service improves for a given temperature. Figure 30: Alkaline battery orientation 7.4.3.2.
-
Section 7. Installation The charging source powers the CR3000 while float charging the batteries. The batteries power the CR3000 if the charging source is interrupted. The table Sealed Rechargeable Battery and AC Transformer Specifications (p. 87) lists the recommended operational temperature range and other specifications. Leads from the charging source connect to the CHARGING INPUT by way of two, screw-secured terminals on the connector. Polarities of the leads on these terminals do not matter.
-
Section 7. Installation Sealed Rechargeable-Battery Safety There are inherent hazards associated with the use of sealed rechargeable batteries. Under normal operation, lead acid batteries generate small quantities of hydrogen gas. This gaseous by-product is generally insignificant because the hydrogen dissipates naturally before building-up to an explosive level (4%). However, if the batteries are shorted or overcharged, hydrogen gas may be generated at a rate sufficient to create a hazard.
-
Section 7. Installation Figure 31: Sealed rechargeable battery wiring 7.4.3.2.3 Low Profile (No Battery) Base A CR3000 with the low-profile base (see the appendix Battery Bases (p. 567) ) will not have an internal power supply. In this configuration, power is supplied to the CR3000 by attaching an external 12-Vdc power source to the POWER IN connector on the lower left of the CR3000 face. The appendix Power Supplies (p.
-
Section 7. Installation Figure 32: Connecting to vehicle power supply 7.4.5 Powering Sensors and Devices Read More! See Power Sources (p. 82). The CR3000 wiring panel is a convenient power distribution device for powering sensors and peripherals that require a 5- or 12-Vdc source. It has 2 continuous 12Vdc terminals (12V), one program-controlled switched 12 Vdc terminal (SW12V), and one continuous 5 Vdc terminal (5V).
-
Section 7. Installation Table 6. Current Source and Sink Limits 1 Terminal 5 5V + CS I/O (combined) 1 Limit < 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 See Sensors Requiring Current Excitation (p. 330) for precautions when measuring resistances > 1000 Ω or sensors with leads > 50 feet. 7.4.5.3 Continuous Regulated (5 Volt) The 5V terminal is regulated and remains near 5 Vdc (±4%) so long as the CR3000 supply voltage remains above 9.6 Vdc. It is intended for power sensors or devices requiring a 5-Vdc power supply. It is not intended as an excitation source for bridge measurements.
-
Section 7. Installation PortSet() is a measurement task instruction. Use it when powering analog input sensors that need to be powered just prior to measurement. A 12-Vdc switching circuit, designed to be driven by a digital I/O port, is available from Campbell Scientific and is listed in the appendix Relay Drivers (p. 565). Note The SW12V terminal supply is unregulated and can supply up to 900 mA at 20°C. See table Current Source and Sink Limits (p. 89).
-
Section 7. Installation In laboratory applications, locating a stable earth ground is challenging, but still necessary. In older buildings, new ac receptacles on older ac wiring may indicate that a safety ground exists when, in fact, the socket is not grounded. If a safety ground does exist, good practice dictates the verification that it carries no current.
-
Section 7. Installation Note Lightning strikes may damage or destroy the CR3000 and associated sensors and power supplies. In addition to protections discussed in ESD Protection (p. 92), use of a simple lightning rod and low-resistance path to earth ground is adequate protection in many installations. A lightning rod serves two purposes. Primarily, it serves as a preferred strike point. Secondarily, it dissipates charge, reducing the chance of a lightning strike. Figure Lightning-Protection Scheme (p.
-
Section 7. Installation 7.5.2 Single-Ended Measurement Reference Low-level, single-ended voltage measurements are sensitive to ground potential fluctuations. The grounding scheme in the CR3000 has been designed to eliminate ground potential fluctuations due to changing return currents from 12V, SW12V, 5V, and C1 – C8 terminals. This is accomplished by utilizing separate signal grounds ( ) and power grounds (G).
-
Section 7. Installation CR3000. Despite being tied to the same ground, differences in current drain and lead resistance result in different ground potential at the two instruments. For this reason, a differential measurement should be made on the analog output from the external signal conditioner. 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.
-
Section 7. Installation Figure 35: Model of a ground loop with a resistive sensor 7.6 CR3000 Configuration The CR3000 ships from Campbell Scientific to communicate with Campbell Scientific datalogger support software (p. 76) via RS-232. Some applications, however, require changes to the factory defaults. Most settings address telecommunication variations between the CR3000 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 CR3000 Facility (p.
-
Section 7. Installation If problems are encountered with a 2 MB CR3000, sending the OS over a direct RS-232 connection is usually successful. Since sending an OS to the CR3000 resets memory, data loss will certainly occur. Depending on several factors, the CR3000 may also become incapacitated for a time. Consider the following before updating the OS. 1. Is sending the OS necessary to correct a critical problem? -- If not, consider waiting until a scheduled maintenance visit to the site. 2.
-
Section 7. Installation Figure 37: DevConfig OS download window Figure 38: 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. 101), this has the benefit of usually (but not always) preserving CR3000 settings. Table 7. 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. 404, 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 40: Summary of CR3000 configuration 7.6.3.1.1 Deployment Tab Illustrated in figure DevConfig Deployment Tab (p. 104), 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 41: DevConfig Deployment tab Datalogger Sub-Tab • Serial Number displays the CR3000 serial number. This setting is set at the factory and cannot be edited. • OS Version displays the operating system version that is in the CR3000. • Station Name displays the name that is set for this station. The default station name is the CR3000 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 • 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 42: 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 CR3000 will communicate with if it is set up as a router. This setting is used to allocate memory in the CR3000 to be used for its routing table. • Max Packet Size is the size of PakBus® packets transmitted by the CR3000.
-
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 43: DevConfig Deployment | Advanced tab 7.6.3.1.2 Logger Control Tab • Clocks in the PC and CR3000 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 44: 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. 109) and Default.cr3 File (p. 111) 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 CR3000 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 46: "Include File" settings via PakBusGraph CRBasic Example 1. Using an "Include File" to Control SW12V‐1 'Assumes that the Include file in CRBasic example "Include File" to Control SW12V-1 (p. 111) 'is loaded onto the CR3000 CPU: Drive. 'The Include file will control power to the cellular phone modem.
-
Section 7. Installation CRBasic Example 2. "Include File" to Control SW12V‐1. '"Include File" "Add-on" Program 'Control Cellular modem power for the main program. 'Cell phone + to be wired to SW12V-1 terminal, - to G. '<<<<<<<<<<<<<<<<<<<<<<
-
Section 7. Installation the BeginProg statement. This allows the "Include" file to act both as an "Include" file and as the default program. 5. If the program listed in the Include File Name setting cannot be run or if no program is specified, the CR3000 will attempt to run the program named default.cr3 on its CPU: drive. 6. If there is no default.cr3 file or it cannot be compiled, the CR3000 will not automatically run any program. 7.6.3.5 Network Planner Figure 47: Network Planner Setup 7.6.3.5.
-
Section 7. Installation Caveats • Network Planner aids in, but does not replace, the design process • It aids development of PakBus networks only. • It does not make hardware recommendations. • It does not generate datalogger programs. • 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.
-
Section 7. Installation 7.7 Programming Programs are created with either Short Cut (p. 467) or CRBasic Editor (p. 114). Programs can be up to 490 kB in size; most programs, however, are much smaller. 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.
-
Section 7. Installation channels, and processing instructions that compress many common calculations used in CR3000 dataloggers. These four elements must be properly placed within the program structure. 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. 115), comments are inserted into a program by preceding the comment with a single quote (').
-
Section 7. Installation Note To retain data, Preserve data if no table changed must be selected whether or not CF card (CRD: drive) or Campbell Scientific mass-storage media (USB: drive) be connected. Regardless of the program-upload tool used, if any change occurs to data table structures listed in table Data Table Structures (p. 116), data will be erased when a new program is sent. Table 8.
-
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. 117). Only standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 10. Formats for Entering Numbers in CRBasic Format Example Base-10 Equivalent Value Standard 6.832 6.
-
Section 7. Installation Table 11. CRBasic Program Structure Declarations Define CR3000 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 integrated 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. 241). String length can also be declared.
-
Section 7. Installation Table 12. 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 12. 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. 150).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. 127). 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 13. 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. 132) shows a data file as it appears after the associated data table has been downloaded from a CR3000 programmed with the code in CRBasic example Definition and Use of a Data Table (p. 132).
-
Section 7. Installation Table 15. Typical Data Table TOA5 CR3000 CR3000 1048 CR3000.Std.13.06 CPU:Data.cr3 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. 192) 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. 138). 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 19. 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. 429) 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 CR3000 can make efficient use of this interstitial scan time to optimize program execution and communications control.
-
Section 7. Installation Figure 49: 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. 475) 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. 145). CRBasic Example 17. Measurement Instruction Syntax PanelTemp(RefTemp, 250) 7.7.3.8.
-
Section 7. Installation Table 20. 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. 150), 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 21.
-
Section 7. Installation Table 22. 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 23. 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. 485). • RunSignature entry in table Status Table Fields and Descriptions (p. 530). • ProgSignature entry in table Status Table Fields and Descriptions (p. 530). • OSSignature entry in table Status Table Fields and Descriptions (p. 530). • Security (p.
-
Section 7. Installation 7.8 Programming Resource Library This library of notes and CRBasic code addresses a narrow selection of CR3000 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. 164) and Two Point Slope Only (Option 3) (p. 166) 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 25. 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. 161) to the CR3000. 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,mV5000,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. 163) to the CR3000. 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,mV5000,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 CR3000 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. 169) sent to the CR3000, and the strain gage stable, use the integrated 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. 170). Set Shunt_Mode to 1 to start the two-point shunt calibration.
-
Section 7. Installation Figure 54: Starting zero procedure Figure 55: 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 CR3000, to the point of requiring another manual at least as thick as the CR3000 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 56: 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 CR3000 drive with File Control. Deleting default.html will cause the CR3000 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 CR3000 automatically runs an FTP server. This allows Windows Explorer to access the CR3000 file system via FTP, with drives on the CR3000 being mapped into directories or folders. The root directory on the CR3000 can be any drive.
-
Section 7. Installation 7.8.2.9 Micro-Serial Server The CR3000 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. 569). 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 27. 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 CR3000 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 CR3000 issues the aM! AND aD0! commands with proper elapsed time between the two. The CR3000 automatically issues retries and performs other services that make the SDI-12 measurement work as trouble free as possible. Table SDI-12Recorder() Commands (p. 183) summarizes CR3000 actions triggered by some SDI12Recorder() commands.
-
Section 7. Installation Table 28. SDI12Recorder() Commands SDIRecorder() Instruction SDICommand Entry Actions Internal to CR3000 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. 191) 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 31. 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 60: 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 61: 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. 404) and Custom Keyboard and Display Menus (p. 510). Menus for the integrated 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. 201) lists CRBasic programming for a custom menu that facilitates viewing data, entering notes, and controlling a device. figure Custom Menu Example — Home Screen (p. 199) through figure Custom Menu Example — Control LED Boolean Pick List (p.
-
Section 7.
-
Section 7. Installation Figure 69: Custom menu example — control-LED pick list Figure 70: Custom menu example — control-LED Boolean pick list Note See figures Custom Menu Example — Home Screen (p. 199) through Custom Menu Example — Control LED Boolean Pick List (p. 201) in reference to the following CRBasic example Custom Menus (p. 201). CRBasic Example 38.
-
Section 7.
-
Section 7. Installation 'Measure Two Thermocouples TCDiff(TCTemp(),2,mV1000C,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 CR3000. The instrument does this by translating "11001010" into a series of higher and lower voltages, which it transmits to the CR3000. The CR3000 receives and reconstructs these voltage levels as "11001010.
-
Section 7. Installation 7.8.8.2 I/O Ports The CR3000 supports two-way serial communication with other instruments through ports listed in table CR3000 Serial Ports (p. 207). 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 CR3000? • 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 CR3000 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 73: 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. 219) will send the string [2008:028:10:36:22]C to the CR3000. Use Notepad (Microsoft Windows utility) or some other text editor that will not place unexpected hidden characters in the file. Figure 75: 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. CR3000 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. 220) imports and exports serial data via the CR3000 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 CR3000 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 77: Data from TrigVar program CRBasic Example 42. Using TrigVar to Trigger Data Storage 'In this example, the variable "counter" is incremented by 1 each scan. The data table 'is called every scan, which includes the Sample(), Average(), and Totalize() 'instructions. TrigVar is true when counter = 2 or counter = 3. Data are stored when 'TrigVar is true.
-
Section 7. Installation • Placing a time stamp in a second position in a record. • Accessing a time stamp from a data table and subsequently storing it as part of a larger data table. Maximum(), Minimum(), and FileTime() instructions produce a time stamp that may be accessed from the program after being written to a data table. 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.
-
Section 7. Installation 'Program BeginProg Scan(1,Sec,0,0) TimeVar = FirstTable.TimeStamp CallTable FirstTable CallTable SecondTable NextScan EndProg CRBasic Example 44. NSEC — Two Element Time Array 'TimeStamp is retrieved into variables TimeOfMaxVar(1) and TimeOfMaxVar(2). Because 'the variable is dimensioned to 2, NSEC assumes, '1) TimeOfMaxVar(1) = seconds since 00:00:00 1 January 1990, and '2) TimeOfMaxVar(2) = μsec into a second.
-
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. 129) can be employed in the CRBasic program to make the data more understandable.
-
Section 7. Installation Figure 80: 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 34. 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 39. 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. 242) list and describes available string operators. String operators are case sensitive. Table 40. 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 41. 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 45. 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 CR3000 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,mV20,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,mV20,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,mV20,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. 255) 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 CR3000 math).
-
Section 7. Installation Table 47. 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 48.
-
Section 7. Installation Table 49. 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 50. 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 51.
-
Section 7. Installation Table 52. 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 CR3000 can measure PT100s in several configurations, each with its own advantages.
-
Section 7. Installation the measurement range is -10 to 40°C. The length of the cable from the CR3000 and the bridge resistors to the PRT is 500 feet. Figure PT100 in Four-Wire Half-Bridge (p. 264) 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 calibrated multiplier. The 10 ppm/°C temperature coefficient of the fixed resistor will limit the error due to its change in resistance with temperature to less than 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. 264).
-
Section 7. Installation 7.8.18.2.3 PT100 in Three-Wire Half-Bridge Example shows: • How to measure a PRT in a three-wire half-bridge configuration. Advantages: • Uses half as many input channels as four-wire half-bridge. Disadvantages: • May not be as accurate as four-wire half-bridge. 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. 262).
-
Section 7. Installation Figure 82: PT100 in three-wire half-bridge CRBasic Example 60. PT100 in Three‐wire Half‐bridge 'See FIGURE. PT100 in Three-Wire Half-Bridge (p. 266) 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,mV50,1,Vx1,1,4400,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. 268), 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 83: PT100 in four-wire full-bridge CRBasic Example 61. PT100 in Four‐Wire Full‐Bridge 'See FIGURE. PT100 in Four-Wire Full-Bridge (p. 268) 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,mV50,1,Vx1,1,5000,True,True,0,250,.001,.
-
Section 7. Installation Example PRT Specifications: • Alpha = 0.00392 (PRTType 2) Excitation Current Excitation current should be optimized such that when the sensor is at its maximum-expected resistance (maximum-expected temperature), the voltage across the resistor is close to, but does not exceed, the maximum allowed by one of the CR3000 analog-input voltage ranges. Excitation should be limited to avoid too much self heating.
-
Section 7. Installation Conclusion: Limit is imposed by the resistance of the PRT. If resistance of 5 PRTs is expected to sum below 5000 Ω (below an average of ≈0°C), 5 PRTs can be accommodated. Figure 84: PT100s with current excitation CRBasic Example 62. PT100s with Current Excitation 'See FIGURE. PT100s with Current Excitation (p. 270) for wiring diagram.
-
Section 7. Installation 7.8.19 Running Average The AvgRun() instruction calculates a running average of a measurement or calculated value. A running average is the average of the last N values where N is the number of values, as expressed in figure Running-Average Equation (p. 271), Figure 85: Running-average equation 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).
-
Section 7. Installation Input frequency to running average (normalized frequency) = 100 / 250 = 0.4 Sin(0.4π) / (0.4π) = 0.757 (or read from figure Running‐Average Frequency Response (p. 273), where the X axis is 0.4) For a 100‐Hz input signal with an Amplitude of 10‐V peak to peak, a running average outputs a 100‐Hz signal with an amplitude of 7.57‐V peak to peak. There is also a phase shift, or delay, in the AvgRun() output.
-
Section 7. Installation Figure 86: Running-average frequency response Figure 87: 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 CR3000 dataloggers. It supports 16-GB or smaller CF cards. It improves the user interface by allowing smaller, userdetermined file sizes.
-
Section 7. Installation 7.8.20.1 TableFile() with Option 64 Option 64 has been added as a format option for the CRBasic instruction TableFile(). It combines the speed and efficiency of the CardOut() instruction with the flexibility of the TableFile() instruction. CF cards up to 16 GB are supported. TableFile() with Option 64, TOB3 is now available in CR3000 operating systems 25 or greater. TableFile() is a CRBasic instruction that creates a file from a data table in datalogger CPU memory.
-
Section 7. Installation DataTable(TableName,TriggerVariable,Size) TableFile(FileName...LastFileName) 'Output processing instructions go here EndTable For example, in micrometeorological applications, TableFile() with Option 64 is used to create a new high-frequency data file once per day. The size of the file created is a function of the datalogger scan frequency and the number of variables saved to the data table.
-
Section 7. Installation data to be continuously and more quickly written to the card in ≈1 KB blocks. TOB3 binary format copies data directly from CPU memory to the CF card without format conversion, lending additional speed and efficiency to the data storage process. Note Pre-allocation of CF card files significantly increases run time write performance. It also reduces the risk of file corruption that can occur as a result of power loss or incorrect card removal.
-
Section 7. Installation Q: Which CF memory card should I use? A: Campbell Scientific recommends and supports only the use of FMJ brand CF cards. These CF cards are industrial-grade and have passed Campbell Scientific hardware testing.
-
Section 7. Installation card must be inserted before the data table in datalogger CPU memory rings2, or data will be overwritten and lost. For example, consider an application wherein the data table in datalogger CPU memory has a capacity for about 45 minutes of data3. The exchange must take place anytime before the 45 minutes expire.
-
Section 8. Operation 8.1 Measurements Several features give the CR3000 the flexibility to measure many sensor types. Contact a Campbell Scientific applications engineer if assistance is required in assessing CR3000 compatibility to a specific application or sensor type. Some sensors require precision excitation or a source of power. See Powering Sensors and Devices (p. 89). 8.1.1 Time Measurement of time is an essential function of the CR3000.
-
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. 477) and CRBasic Editor Help for more information. CRBasic Example 64.
-
Section 8. Operation instructions BrFull(), BrFull6W(), BrHalf4W(), TCDiff(), VoltDiff () and Resistance () instructions instructions perform DIFF voltage measurements. Figure 88: 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. 281), 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 - 14. Each differential channel has two inputs: high (H) and low (L). Single-ended channels are identified by the number set 1-28. 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 53. 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 = ±2 mV and Offset Error = 1.5 • Differential (DF) Resolution + 1 µV = (1.5 • 167 µV) + 1 µV = 2515 µV = 0.252 mV Therefore, Error = Gain Error + Offset Error = ±2 mV + 0.251 mV = ±2.252 mV In contrast, the error for a 1000-mV input under the same constraints is ±0.451 mV. Figure Voltage Measurement Accuracy (p. 285) illustrates the total error with respect to voltage measurements for the ±5000-mV and ±1000-mV ranges.
-
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 CR3000 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 mV and -1090 mV. The CR3000 indicates a measurement over-range by returning a NAN (not a number) for the measurement. 8.1.2.5.3 Common Mode Null / Open Input Detect For floating differential sensors, such as thermocouples, nulling of any residual common-mode voltage prior to measurement pulls the H and L input amplifier (IA) inputs within the ±5-V Input Limits.
-
Section 8. Operation Table 55.
-
Section 8. Operation excitation "on time" for each polarity is exactly the same to ensure that ionic sensors do not polarize with repetitive measurements. Read More! A white paper entitled "The Benefits of Input Reversal and Excitation Reversal for Voltage Measurements" is available at www.campbellsci.com. 8.1.2.6.2 Ground Reference Offset Voltage When MeasOff is enabled (= True), the CR3000 measures the offset voltage of the ground reference prior to each VoltSe() or TCSe() measurement.
-
Section 8. Operation 8.1.2.7.1 ac Power Line Noise Rejection Grid or mains power (50 or 60 Hz, 230 or 120 Vac) can induce electrical noise at integer multiples of 50 or 60 Hz. Small analog voltage signals, such as thermocouples and pyranometers, are particularly susceptible. CR3000 voltage measurements can be programmed to reject (filter) 50-Hz or 60-Hz related noise.
-
Section 8. Operation approximately 170 µs, leaving a maximum input-settling time of approximately 8160 µs (8333 µs - 170 µs). If the maximum input-settling time is exceeded, 60Hz line-noise rejection will not occur. For 50-Hz rejection, the maximum input settling time is approximately 9830 µs (10,000 µs - 170 µs). The CR3000 does not prevent or warn against setting the settling time beyond the half-cycle limit. Table ac Noise Rejection on Large Signals (p.
-
Section 8. Operation The CR3000 delays after switching to a channel to allow the input to settle before initiating the measurement. The SettlingTime parameter of the associated measurement instruction is provided to allow the user to tailor measurement instruction settling times with 100 µs resolution up to 35000 µs. Default settling times are listed in table CRBasic Measurement Settling Times (p. 292), and are meant to provide sufficient signal settling in most cases.
-
Section 8. Operation • When relatively large resistances are measured (> 1000 ohms), or relatively long cable lengths are used (> 50 foot) with sensors requiring current excitation, a 0.1-µf feed-forward capacitor should be placed between IX and IXR to prevent excessive ringing (p. 465). With this capacitor present a minimum of 3 ms is recommended for the SettlingTime parameter in the measurement instruction. The capacitor simply connects between the chosen IX output terminal and the IXR return terminal.
-
Section 8. Operation BrFull(PT(7),1,mV20,1,Vx1,1,2500,True,True,700,250,1.0,0) BrFull(PT(8),1,mV20,1,Vx1,1,2500,True,True,800,250,1.0,0) BrFull(PT(9),1,mV20,1,Vx1,1,2500,True,True,900,250,1.0,0) BrFull(PT(10),1,mV20,1,Vx1,1,2500,True,True,1000,250,1.0,0) BrFull(PT(11),1,mV20,1,Vx1,1,2500,True,True,1100,250,1.0,0) BrFull(PT(12),1,mV20,1,Vx1,1,2500,True,True,1200,250,1.0,0) BrFull(PT(13),1,mV20,1,Vx1,1,2500,True,True,1300,250,1.0,0) BrFull(PT(14),1,mV20,1,Vx1,1,2500,True,True,1400,250,1.
-
Section 8. Operation 8.1.2.9 Self-Calibration Read More! Related topics can be found in Offset Voltage Compensation (p. 287). The CR3000 self-calibrates to compensate for changes induced by fluctuating operating temperatures and aging. Without self-calibration, measurement accuracy over the operational temperature range is worse by about a factor of 10. That is, over the extended temperature range of -40°C to 85°C, the accuracy specification of ±0.
-
Section 8. Operation If this rate of update for measurement channels is too slow, the Calibrate() instruction can be used. The Calibrate() instruction computes the necessary G and B values every scan without any low-pass filtering. For a VoltSe() instruction, B is determined as part of self-calibration only if the parameter MeasOff = 0. An exception is B for VoltSe() on the ±2500 mV input range with 250 μs integration, which is always determined in self-calibration for use internally.
-
Section 8. Operation Table 61.
-
Section 8. Operation Table 61.
-
Section 8. Operation Table 62. Calibrate() Instruction Results Array Cal() Element Descriptions of Array Elements Differential (Diff) Single-Ended (SE) Offset or Gain ±mV Input Range Integration Typical Value Gain 200 60-Hz Rejection -0.00667 mV/LSB 24 25 SE Offset 50 60-Hz Rejection ±30 LSB 26 Diff Offset 50 60-Hz Rejection ±30 LSB Gain 50 60-Hz Rejection -0.
-
Section 8. Operation 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. By supplying a precise, known voltage to a resistive circuit, and then measuring the returning voltage, resistance can be calculated. Read More! Available resistive bridge completion modules are listed in the appendix Signal Conditioners (p. 563).
-
Section 8. Operation Table 63. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and Circuit Diagram Three-Wire Half-Bridge CRBasic Instruction and Fundamental Relationship Relationships 1,3 CRBasic Instruction: BrHalf3W() 2 Fundamental Relationship : 1,3 Four-Wire Half-Bridge CRBasic Instruction: BrHalf4W() 2 Fundamental Relationship : 1,3 Full-Bridge CRBasic Instruction: BrFull() These relationships apply to BrFull() and BrFull6W().
-
Section 8. Operation Table 63. 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 'Main Program BeginProg R2 = 1000 R3 = 1000 R4 = 1000 'Resistance of R2 'Resistance of R3 'Resistance of R4 Scan(500,mSec,1,0) 'Full Bridge Measurement: BrFull(X,1,mV2000,1,1,1,2500,True,True,0,_60Hz,1.0,0.0) X1 = ((-1 * X) / 1000) + (R3 / (R3 + R4)) R1 = (R2 * (1 - X1)) / X1 NextScan EndProg 8.1.3.1 ac Excitation Some resistive sensors require ac excitation. These include electrolytic tilt sensors, soil moisture blocks, water conductivity sensors, and wetness sensing grids.
-
Section 8. Operation • Offset = 3 x Basic Resolution + 5.0 µV if the measurement is of a singleended input channel The following table lists basic resolution values. Table 65. Analog Input-Voltage Range and Basic Resolution Range (mV) Basic Resolution (µV) ±5000 ±1000 ±200 ±50 ±20 167 33.3 6.67 1.67 0.
-
Section 8. Operation Figure 94: Deriving ∆V1 8.1.3.3 Strain Calculations Read More! The FieldCalStrain() Demonstration Program (p. 158) 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 66. StrainCalc() Instruction Equations StrainCalc() BrConfig Code Configuration Half-bridge strain gage. One gage parallel to + , the other parallel to : 3 Full-bridge strain gage. Two gages parallel to + , the other two parallel to - : 4 Full-bridge strain gage. Half the bridge has two gages parallel to + and and : - , and the other half to + 5 Full-bridge strain gage.
-
Section 8. Operation Scientific strongly encourages any user of thermocouples to carefully evaluate Error Analysis (p. 307). An introduction to thermocouple measurements is located in Hands-on Exercise: Measuring a Thermocouple (p. 43). The micro-volt resolution and low-noise voltage measurement capability of the CR3000 is well suited for measuring thermocouples. A thermocouple consists of two wires, each of a different metal or alloy, joined at one end to form the measurement junction.
-
Section 8. Operation specification of 0.1°C for temperatures between 0 and 70°C. Below freezing and at higher temperatures, this specification is degraded. Combined with possible errors in the completion-resistor measurement and the Steinhart and Hart equation used to calculate the temperature from resistance, the accuracy of panel temperature is estimated in figure Panel Temperature Error Summary (p. 309). In summary, error is estimated at ± 0.1°C over -0 to 40°C, ± 0.3°C from -25 to 50°C, and ± 0.
-
Section 8.
-
Section 8.
-
Section 8. Operation 8.1.4.1.2 Thermocouple Limits of Error The standard reference that lists thermocouple output voltage as a function of temperature (reference junction at 0°C) is the NIST (National Institute of 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.
-
Section 8. Operation 8.1.4.1.3 Thermocouple Voltage Measurement Error Thermocouple outputs are extremely small — 10 to 70 µV per °C. Unless high resolution input ranges are used when programming, the CR3000, accuracy and sensitivity are compromised. Table Voltage Range for Maximum Thermocouple Resolution (p. 312) lists high resolution ranges available for various thermocouple types and temperature ranges.
-
Section 8. Operation Figure 98: 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: CR3000 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.07%) + (1.5 * 0.67 µV + 1.0 µV) = 0.581 µV + 2.01 µV = 2.59 µV (= 0.061 °C) Error Calculations with Input Reversal = False µV Error = gain term + offset term = (830.7 µV * 0.07%) + (3 * 0.67 µV + 2.0 µV) = 0.581 µV + 4.01 µV = 4.59 µV (= 0.
-
Section 8. Operation Error Calculations with Input Reversal = False µV error = gain term + offset term = (44500 µV * 0.07%) + (3 * 6.67 µV + 2.0 µV) = 31.2 µV + 22.0 µV = 1.52 µV (= 1.52 °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 69. Limits of Error on CR3000 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. 307) 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. 317) 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. 318) illustrates a typical junction box wherein the reference junction is the CR3000. Terminal strips are a different metal than the thermocouple wire.
-
Section 8. Operation Figure 100: Pulse-sensor output signal types Figure 101: Switch-closure pulse sensor Table 72.
-
Section 8. Operation 8.1.5.1 Pulse-Input Channels (P1 - P4) Read More! Review pulse counter specifications at CR3000 Specifications. Review pulse counter programming in CRBasic Editor Help for the PulseCount() instruction. Dedicated pulse-input channels (P1 through P4), as shown in figure Pulse-Input Channels (p. 320), 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.2 Low-Level ac (P1 - P4) Rotating magnetic-pickup sensors commonly generate ac output voltages ranging from thousandths of Volts at low rotational speeds to several volts at high rotational speeds. Pulse channels contain internal signal-conditioning hardware for measuring low-level ac-output sensors. When configured for low-level ac, P1 through P4 measure signals ranging from 20-mV RMS (±28 mV peak) to 14-V RMS (±20 V peak).
-
Section 8. Operation Edge Counting (C1 - C8) Rising edges (transitions from <1.5 Vdc to >3.5 Vdc) or falling edges (transitions from >3.5 Vdc to <1.5 Vdc) of a square-wave signal can be counted. Switch Closure (C1 - C8) Two schemes are available for connecting switch-closure sensors to the CR3000. If a switch is to close directly to ground, an external pull-up resistor is should be used as shown in figure Using a Pull-up Resistor on Digital I/O Channels C1 - C8 (p. 323).
-
Section 8. Operation calibrated in terms of frequency (Hz (p. 458) ) so are usually measured using the PulseCount() frequency option. • Accuracy of PulseCount() is limited by a small scan-interval error of ±(3 ppm of scan interval + 10 µs), plus the measurement resolution error of ±1 / (scan interval). The sum is essentially ±1 / (scan interval). • Use the LLAC4 (p. 562) module to convert non-TTL level signals, including low-level ac signals, to TTL levels for input into digital I/O channels C1 – C8.
-
Section 8. Operation 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 = 540 ns136 ns P = Period of input signal (seconds). For example, P = 1 / 1000 Hz = 0.
-
Section 8. Operation Table 74. Frequency Resolution Comparison PulseCount(), POption=1 TimerIO(), Function=2 0.5 s Scan 5.0 s Scan FR = 2 Hz FR = 0.2 Hz FR = 0.0011 Hz FR = 0.
-
Section 8. Operation Input filters, however, attenuate the amplitude (voltage) of the signal. The amount of attenuation is a function of the frequency passing through the filter. Higher-frequency signals are attenuated more. If a signal is attenuated enough, it may not pass the state transition thresholds required by the detection device (listed in table Pulse-Input Channels and Measurements (p. 40) ). To avoid over attenuation, sensor output voltage must be increased at higher frequencies.
-
Section 8. Operation Figure 104: Amplitude reduction of pulse-count waveform (before and after 1-µs time constant filter) 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 CR3000 operating system disables the interrupt that is capturing the precise time until the next scan is serviced.
-
Section 8. Operation input conditioning circuitry. The threshold allows direct connection of standard digital signals, but it is not recommended for small amplitude sensor signals. For sensor amplitudes less than 20 mV peak-to-peak, a dc blocking capacitor is recommended to center the signal at CR3000 ground (threshold = 0) because of offset voltage drift along with limited accuracy (±10 mV) and resolution (1.2 mV) of a threshold other than zero. Figure Input Conditioning Circuit for Period Averaging (p.
-
Section 8. Operation 8.1.8 RS-232 and TTL Read More! Serial Input / Output Instructions (p. 512) and Serial I/O (p. 205). The CR3000 can usually receive and record RS-232 and 0 – 5 Vdc logic data from sensors designed to transmit via these protocols. Data are received through the CS I/O port with the proper interface (see the appendix CS I/O Serial Interfaces (p. 569) ), the RS-232 port, or the digital I/O communication ports (C1 & C2, C3 & C4, C5 & C6, C7 & C8).
-
Section 8. Operation 8.1.10.1 Analog Sensor Cables Cable length in analog sensors is most likely to affect the signal settling time. For more information, see Signal Settling Time (p. 291). 8.1.10.2 Sensors Requiring Current Excitation When relatively large resistances are measured (> 1000 ohms), or relatively long cable lengths are used (> 50 foot) with sensors requiring current excitation, a 0.1µf feed-forward capacitor should be placed between IX and IXR to prevent excessive ringing (p. 465).
-
Section 8. Operation multiple CR3000s. Techniques outlined below enable network administrators to synchronize CR3000 clocks and measurements in a CR3000 network. Care should be taken when a clock-change operation is planned. Any time the CR3000 clock is changed, the deviation of the new time from the old time may be sufficient to cause a skipped record in data tables.
-
Section 8. Operation With any synching method, care should be taken as to when and how things are executed. Nudging the clock can cause skipped scans or skipped records if the change is made at the wrong time or changed by too much. 5. GPS – clocks in CR3000s can be synchronized to within about 10 ms of each other using the GPS() instruction. CR3000s built since October of 2008 (serial numbers ≥ 3168) can be synchronized within a few microseconds of each other and within ≈200 µs of UTC.
-
Section 8. Operation 8.2.4 Control Outputs Controlling power to an external device is a common function of the CR3000. On-board control terminals and peripheral devices are available for binary (on / off) or analog (variable) control. A switched, 12-Vdc channel is also available. See Switched Unregulated (Nominal 12 Volt) (p. 91). 8.2.4.
-
Section 8. Operation 8.2.4.3 Component-Built Relays Figure Relay Driver Circuit with Relay (p. 334) shows a typical relay driver circuit in conjunction with a coil driven relay which may be used to switch external power to some device. In this example, when the control port is set high, 12 Vdc from the datalogger passes through the relay coil, closing the relay which completes the power circuit and turns on the fan.
-
Section 8. Operation 8.2.5 Analog Control / Output Devices The CR3000 can scale measured or processed values and transfer these values in digital form to either its on-board CAO ports or 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 CR3000. Refer to the appendix Continuous Analog Output (CAO) Modules (p.
-
Section 8. Operation Table 78. CR3000 Memory Allocation Memory Comments Sector Internal battery-backed See table CR3000 SRAM Memory (p. 337) for detail. 1 SRAM 4 MB* Internal Flash 2 Operating system 2 MB 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.
-
Section 8. Operation Table 79. CR3000 SRAM Memory Use Static Memory ---------------------------------Operating Settings and Properties ---------------------------------CRBasic Program Operating Memory ---------------------------------Variables & Constants ---------------------------------Final-Storage Data Tables Comments Operational memory used by the operating system regardless of the user program. This sector is rebuilt at power-up, program re-compile, and watchdog events. "Keep" memory.
-
Section 8. Operation 8.3.1.1 Data Storage Data-storage drives are listed in table CR3000 Memory Drives (p. 338). Data-table SRAM and the CPU: drive are automatically partitioned for use in the CR3000. The USR: drive can be partitioned as needed. The USB: drive is automatically partitioned when a Campbell Scientific mass-storage device is connected.The CRD: drive is automatically partitioned when a CF card is installed. Table 80. Data-Storage Drives Drive Recommended File Types 1 cr3, .
-
Section 8. Operation configured using DevConfig settings or SetStatus() instruction in a CRBasic program. Partition USR: drive to at least 11264 bytes in 512-byte increments. If the value entered is not a multiple of 512 bytes, the size is rounded up. Maximum size of USR: is the total RAM size less 400 kB; i.e., for a CR3000 with 4-MB memory, the maximum size of USR: is about 3.6 MB. USR: is not affected by program recompilation or formatting of other drives.
-
Section 8. Operation 8.3.1.1.5 CRD: Drive CRD: drive uses CompactFlash® (CF) memory cards exclusively. Its primary purpose is the storage of binary data files. See File-System Errors (p. 352) for explanation of error codes associated with CRD: use. Caution When installing or removing card-storage modules, first turn off CR3000 power. Removing a card from the module while the CF card is active can cause data corruption and may damage the card.
-
Section 8. Operation then copy a small file to the card, and then delete the file (while still in the PC). Copying the file to the freshly formatted card forces the PC to update the info sector. The PC is much faster than the datalogger at updating the info sector. 8.3.1.1.6 Data File Formats TableFile() instruction data-file formats contain time-series data and may have an option to include header, time stamp and record number. Table TableFile()Instruction Data-File Formats (p.
-
Section 8. Operation Table 81. TableFile()-Instruction Data-File Formats Elements Included TableFile() Format Option Base File Format 35 CSIJSON 64 2 Header Information Time Stamp Record Number X TOB3 1 Formats compatible with datalogger support software (p. 76) data-viewing and graphing utilities 2 SeeWriting High-Frequency Data to CF Cards (p. 273) for more information on using option 64. Data-File Format Examples TOB1 TOB1 files may contain an ASCII header and binary data.
-
Section 8. Operation CR1000.Std.20 CPU:file format.CR1 13.2921.04 13.2921.04 13.2921.
-
Section 8. Operation will be represented by four field names: “values(1,1)”, “values(1,2)”, “values(2,1)”, and “values(2,2)”. Scalar (non‐array) variables will not have subscripts. Line 3 – Data Units Includes the units associated with each field in the record. If no units are programmed in the CR3000 CRBasic program, an empty string is entered for that field. Line 4 – Data-Processing Descriptors Entries describe what type of processing was performed in the CR3000 to produce corresponding data, e.g.
-
Section 8. Operation Read More! More information on string variable-memory use and conservation is available in String Operations (p. 241). 8.3.3 Memory Reset Four features are available for complete or selective reset of CR3000 memory. 8.3.3.1 Full Memory Reset Full memory reset occurs when an operating system is sent to the CR3000 using DevConfig or when entering 98765 in the Status table field FullMemReset.
-
Section 8. Operation associated with the program are erased. Drive formatting is performed through datalogger support software (p. 571) Format (p. 456) command. 8.3.4 File Management As summarized in table File Control Functions (p. 346), files in CR3000 memory (program, data, CAL, image) can be managed or controlled with datalogger support software (p. 76), CR3000 web API, or CoraScript. Use of CoraScript is described in the LoggerNet software manual, which is available at www.campbellsci.com.
-
Section 8. Operation Table 82. File-Control Functions File-Control Functions Accessed Through 6 Create a data file from a data table TableFile() JPEG files manager integrated keyboard / display , LoggerNet | PakBusGraph, web API NewestFile Hiding files Web API FileControl Encrypting files Web API FileControl Abort program on power-up Hold DEL down on datalogger keypad 1 Datalogger support software (p. 76) Program Send command 2 Datalogger support software File Control (p.
-
Section 8. Operation Table 83. CR3000 File Attributes Attribute Function Attribute for Programs Sent to CR3000 with: 2 a) File Control with Run Now checked. Run Now Runs only when file sent to CR3000 b) CF card (CRD: drive) or Campbell Scientific 3 mass-storage media (USB: drive) power-up using commands 6 & 14 (see TABLE. Powerup.ini Commands (p. 350) ).
-
Section 8. Operation in the file automatically uploading to the CR3000 and running. Powerup.ini options also allow final-data storage management comparable to the support software File Control (p. 456) feature. The CRD: drive has precedence over USB: drive. Caution Test Power-up options in the lab before going to the field. Always carry a laptop or palm PC into difficult- or expensive-to-access places as backup. Power-up functions include • Sending programs to the CR3000.
-
Section 8. Operation powerup.ini file in the CR3000 with the integrated keyboard / display to see what the CR3000 actually sees. Comments can be added to the file by preceding them with a single-quote character ('). All text after the comment mark on the same line is ignored. Syntax Syntax for the powerup.ini file is: Command,File,Device where, • Command = one of the numeric commands in table Powerup.ini Commands (p. 350). • File = accompanying operating system or user program file.
-
Section 8. Operation • Command 6 Copies the specified program to the designated drive and sets the run attribute of the program to Run Now. Data on a CF card from the previously running program will be preserved. • Command 7 Copies the specified file to the designated drive with no run attributes. • 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.
-
Section 8. Operation Powerup.ini Example 'Run a program file now, erase data now. 14,run.cr1,cpu: 8.3.4.4 File Management Q & A Q: How do I hide a program file on the CR3000 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 CR3000 is 59 characters.
-
Section 8. Operation Table 85.
-
Section 8. Operation 8.4 Telecommunications and Data Retrieval Telecommunications, in the context of CR3000 operation, is the movement of information between the CR3000 and another computing device, usually a PC. The information can be programs, data, files, or control commands. Telecommunications systems require three principal components: hardware, carrier signal, and protocol. For example, a common way to communicate with the CR3000 is with PC200W software by way of a PC COM port.
-
Section 8. Operation Satellite System Satellite Transceiver RF CompactFlash (CF) card Direct connect through CF module connected to peripheral port Parallel Comms CS Mass Storage Device Direct Connect CS I/O Serial Comms Audible Report Land-line Telephone Voice Heads-Up Display Direct Connect CS I/O Serial Comms Digital Display Direct Connect CS I/O Serial Comms integrated keyboard / display Integrated ® 8.4.2 Protocols The CR3000 communicates with datalogger support software (p.
-
Section 8. Operation Though usually unnoticed, a short burst of SDC communication occurs at power-up and other times when the datalogger is reset, such as when compiling a program or changing settings that require recompiling. This SDC activity is the datalogger querying the SDC to see if the integrated keyboard / display is available. When DevConfig and PakBus Graph retrieve settings, the CR3000 queries the SDC to determine what SDC devices are connected.
-
Section 8. Operation • • Leaf nodes are measurement devices at the end of a branch of the PakBus® web. o Leaf nodes can be linked to any router. o A leaf node cannot route packets but can originate or receive them. Routers are measurement or telecommunications devices that route packets to other linked routers or leaf nodes. 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.
-
Section 8. Operation Table 87.
-
Section 8. Operation • hello-request • CVI • beacon To form a network, nodes must establish links with neighbors (neighbors are adjacent nodes). Links are established through a process called discovery. 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.
-
Section 8. Operation 8.5.3.6 Maintaining Links Links are maintained by means of the CVI (communications verification interval). The CVI can be specified in each node with the Verify Interval setting in DevConfig (ComPorts Settings). The following rules apply: Note During the hello-message, a CVI must be negotiated between two neighbors. The negotiated CVI is the lesser of the first node's CVI and 6/5ths of the neighbor's CVI. • If Verify Interval = 0, then CVI = 2.
-
Section 8. Operation Hence, the size of the responses to the file-receive commands that the CR3000 sends is governed by the Max Packet Size setting for the datalogger as well as that of any of its parents in the LoggerNet network map. Note that this calculation also takes into account the error rate for devices in the link. BMP5 data-collection transaction does not provide any way for the client to specify a cap on the size of the response message.
-
Section 8. Operation Figure 112: Flat Map Figure 113: Tree Map 8.5.6 PakBus LAN Example To demonstrate PakBus® networking, a small LAN (Local Area Network) of CR3000s can be configured as shown in figure Configuration and Wiring of PakBus LAN (p. 363). A PC running LoggerNet uses the RS-232 port of the first CR3000 to communicate with all CR3000s. All LoggerNet functions, such as send programs, monitor measurements and collect data, are available to each CR3000.
-
Section 8. Operation Figure 114: Configuration and wiring of PakBus LAN 8.5.6.2 LAN Setup Configure CR3000s before connecting them to the LAN: 1. Start Device Configuration Utility (DevConfig). Click on Device Type: CR3000. Follow on-screen instructions to power CR3000s 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 117: DevConfig Deployment | Advanced tab Table 89. PakBus-LAN Example Datalogger-Communications Settings Software→ Device Configuration Utility (DevConfig) Tab→ Deployment Sub-Tab→ Datalogger Setting→ PakBus Adr Sub-Setting→ Advanced ComPort Settings COM1 Baud Rate Datalogger ↓ Is Router COM2 Neighbors 1 Baud Rate Begin: End: CR3000_1 1 115.2K Fixed 2 2 115.2K Fixed CR3000_2 2 115.2K Fixed 1 1 Disabled CR3000_3 3 115.2K Fixed 1 1 115.
-
Section 8. Operation 8.5.6.3 LoggerNet Setup Figure 118: LoggerNet Network-Map Setup: COM port In LoggerNet Setup, click Add Root and add a ComPort. Then Add a PakBusPort, and (4) CR3000 dataloggers to the device map as shown in figure LoggerNet Device-Map Setup (p. 366).
-
Section 8. Operation Figure 119: LoggerNet Network-Map Setup: PakBusPort As shown in figure LoggerNet Device Map Setup: PakBusPort (p. 367), 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. 367), set the PakBus® address for each CR3000 as listed in table PakBus-LAN Example Datalogger-Communications Settings (p. 365). 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 CR3000 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 CR3000 communicates with datalogger support software (p. 76) and other Campbell Scientific dataloggers (p. 565) using the PakBus (p. 463) protocol (PakBus Overview (p. 356) ). 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 90. 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 8.6.1.2.3 Programming for Data-Acquisition As shown in CRBasic example Implementation of DNP3 (p. 371), program the CR3000 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(). Dual instructions cover static (current values) and event (previous ten records) data.
-
Section 8.
-
Section 8. Operation Table 91. Modbus to Campbell Scientific Equivalents Modbus Domain Data Form Campbell Scientific Domain Coils Single Bit Ports, Flags, Boolean Variables Digital Registers 16-bit Word Floating Point Variables Input Registers 16-bit Word Floating Point Variables Holding Registers 16-bit Word Floating Point Variables RTU / PLC CR3000 Master Usually a computer Slave Usually a CR3000 Field Instrument Sensor 8.6.2.2.
-
Section 8. Operation 8.6.2.3 Programming for Modbus 8.6.2.3.1 Declarations Table CRBasic Ports, Flags, Variables, and Modbus Registers (p. 374) shows the linkage between CR3000 ports, flags and Boolean variables and Modbus registers. Modbus does not distinguish between CR3000 ports, flags, or Boolean variables. By declaring only ports, or flags, or Boolean variables, the declared feature is addressed by default.
-
Section 8. Operation 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. CR3000 commands support the following. Table 93.
-
Section 8. Operation 8.6.2.5 Modbus over IP Modbus over IP functionality is an option with the CR3000. 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 CR3000 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. 97) 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 94.
-
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. 380) 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 95. BrowseSymbols API Command Parameters uri Optional. Specifies the URI (p. 472) for the data source. When querying a CR3000, uri source, tablename and fieldname are optional. If source is not specified, dl (CR3000) 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 |