Campbell CR1000 Operator's Manual

Campbell CR1000 Operator's Manual

Measurement and control system
Hide thumbs Also See for CR1000:
Table of Contents

Advertisement

Quick Links

Want to get going? Go to the Quickstart
section. Want
(p. 41)
to see notes pertaining to this preliminary manual release?
Go to Release Notes
.
(p. 34)
CR1000 Measurement and

Control System

Preliminary for OS v.28: 4/13/15
C o p y r i g h t
©
2 0 0 0
2 0 1 5
C a m p b e l l
S c i e n t i f i c ,
I n c .

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for Campbell CR1000

  • Page 1: Control System

    Want (p. 41) to see notes pertaining to this preliminary manual release? Go to Release Notes (p. 34) CR1000 Measurement and Control System Preliminary for OS v.28: 4/13/15 C o p y r i g h t © 2 0 0 0 –...
  • Page 3 Warranty The CR1000 Measurement and Control Datalogger is warranted for three (3) years subject to this limited warranty: Limited Warranty: Products manufactured by CSI are warranted by CSI to be free from defects in materials and workmanship under normal use and service for twelve months from the date of shipment unless otherwise specified in the corresponding product manual.
  • Page 5 A completed form must be either emailed to repair@campbellsci.com or faxed to 435-227- 9579. Campbell Scientific is unable to process any returns until we receive this form. If the form is not received within three days of product receipt or is incomplete, the product will be returned to the customer at the customer's expense.
  • Page 7 Precautions DANGER — MANY HAZARDS ARE ASSOCIATED WITH INSTALLING, USING, MAINTAINING, AND WORKING ON OR AROUND TRIPODS, TOWERS, AND ANY ATTACHMENTS TO TRIPODS AND TOWERS SUCH AS SENSORS, CROSSARMS, ENCLOSURES, ANTENNAS, ETC. FAILURE TO PROPERLY AND COMPLETELY ASSEMBLE, INSTALL, OPERATE, USE, AND MAINTAIN TRIPODS, TOWERS, AND ATTACHMENTS, AND FAILURE TO HEED WARNINGS, INCREASES THE RISK OF DEATH, ACCIDENT, SERIOUS INJURY, PROPERTY DAMAGE, AND PRODUCT...
  • Page 8 Periodically (at least yearly) check electrical ground connections. • WHILE EVERY ATTEMPT IS MADE TO EMBODY THE HIGHEST DEGREE OF SAFETY IN ALL CAMPBELL SCIENTIFIC PRODUCTS, THE CUSTOMER ASSUMES ALL RISK FROM ANY INJURY RESULTING FROM IMPROPER INSTALLATION, USE, OR MAINTENANCE OF TRIPODS, TOWERS, OR ATTACHMENTS TO TRIPODS AND TOWERS SUCH AS SENSORS, CROSSARMS, ENCLOSURES, ANTENNAS, ETC.
  • Page 9: Table Of Contents

    Table of Contents 1. Introduction ..............33 1.1 HELLO ....................33 1.2 Typography .................... 33 1.3 Capturing CRBasic Code ............... 34 2. Cautionary Statements ..........37 3. Initial Inspection ............39 4. System Quickstart ............. 41 4.1 Data-Acquisition Systems — Quickstart ..........41 4.2 Sensors —...
  • Page 10 5.3.9.2 Telecommunications ............89 5.3.9.3 Mass-Storage Device ............89 5.3.9.4 Memory Card (CRD: Drive) — Overview ......89 5.3.9.5 Data-File Formats in CR1000 Memory ....... 90 5.3.9.6 Data Format on Computer ........... 90 5.3.10 Alternate Telecommunications — Overview ......90 5.3.10.1 Modbus ................
  • Page 11 7.6.3.1 Soil Temperature Thermocouple ........109 7.6.3.2 External Signal Conditioner ..........109 7.6.4 Ground Looping in Ionic Measurements ........109 7.7 CR1000 Configuration — Details ............111 7.7.1 Configuration Tools ..............111 7.7.1.1 Configuration with DevConfig ......... 111 7.7.1.2 Network Planner ............... 112 7.7.1.2.1 Overview ..............
  • Page 12 Table of Contents 7.8.2 Writing and Editing Programs ............ 125 7.8.2.1 Short Cut Programming Wizard ........125 7.8.2.2 CRBasic Editor ..............125 7.8.2.2.1 Inserting Comments into Program ......126 7.8.2.2.2 Conserving Program Memory ......... 126 7.8.3 Sending CRBasic Programs ............126 7.8.3.1 Preserving Data at Program Send ........
  • Page 13 Table of Contents 7.9.1 Advanced Programming Techniques .......... 169 7.9.1.1 Capturing Events ............... 169 7.9.1.2 Conditional Output ............170 7.9.1.3 Groundwater Pump Test ........... 171 7.9.1.4 Miscellaneous Features ............. 174 7.9.1.5 PulseCountReset Instruction ..........177 7.9.1.6 Scaling Array ..............177 7.9.1.7 Signatures: Example Programs .........
  • Page 14 Table of Contents 7.9.14.2.1 Measurements from 101 to 600 Hz 2 ..... 232 7.9.14.3 Measurement Rate: 601 to 2000 Hz ........ 233 7.9.15 Measurement: PRT ..............234 7.9.15.1 Measuring PT100s (100 Ω PRTs) ........235 7.9.15.1.1 Self-Heating and Resolution ........235 7.9.15.1.2 PRT Calculation Standards ........
  • Page 15 Table of Contents 7.9.21.4 FTP Server ..............294 7.9.21.5 FTP Client ............... 294 7.9.21.6 Telnet ................295 7.9.21.7 SNMP ................295 7.9.21.8 Ping (IP) ................295 7.9.21.9 Micro-Serial Server ............295 7.9.21.10 Modbus TCP/IP ............. 295 7.9.21.11 DHCP ................295 7.9.21.12 DNS ................
  • Page 16 8.3.1.1.4 USB: Drive .............. 375 8.3.1.2 Memory Card (CRD: Drive) — Details ......376 8.3.2 Data-File Formats ............... 377 8.3.3 Resetting the CR1000 ..............381 8.3.3.1 Full Memory Reset ............381 8.3.3.2 Program Send Reset ............381 8.3.3.3 Manual Data-Table Reset ..........382 8.3.3.4 Formatting Drives .............
  • Page 17 Table of Contents 8.5.3 Linking PakBus Nodes: Neighbor Discovery ......395 8.5.3.1 Hello-Message ..............396 8.5.3.2 Beacon................396 8.5.3.3 Hello-Request ..............396 8.5.3.4 Neighbor Lists ..............396 8.5.3.5 Adjusting Links ..............396 8.5.3.6 Maintaining Links ............. 397 8.5.4 PakBus Troubleshooting ............. 397 8.5.4.1 Link Integrity ..............
  • Page 18 Table of Contents 8.6.3.12 DNS ................. 423 8.6.3.13 SMTP ................423 8.6.3.14 Web API ................423 8.6.3.14.1 Authentication ............424 8.6.3.14.2 Command Syntax ..........425 8.6.3.14.3 Time Syntax ............427 8.6.3.14.4 Data Management — BrowseSymbols Command ................. 427 8.6.3.14.5 Data Management — DataQuery Command ..431 8.6.3.14.6 Control —...
  • Page 19 Table of Contents 9.3 Factory Calibration or Repair Procedure ..........476 10. Troubleshooting ............ 479 10.1 Troubleshooting — Essential Tools ........... 479 10.2 Troubleshooting — Basic Procedure ..........479 10.3 Troubleshooting — Error Sources ............. 479 10.4 Troubleshooting — Status Table ............481 10.5 Programming ..................
  • Page 20 Table of Contents 11.1 Terms ....................507 11.2 Concepts ..................... 533 11.2.1 Accuracy, Precision, and Resolution ........533 12. Attributions ............. 535 Appendices A. CRBasic Programming Instructions ...... 537 A.1 Program Declarations ................537 A.1.1 Variable Declarations & Modifiers ..........538 A.1.2 Constant Declarations ..............
  • Page 21 Table of Contents A.7.10.1 Histograms ..............573 A.8 String Functions .................. 574 A.8.1 String Operations ............... 574 A.8.2 String Commands ..............575 A.9 Time Keeping — Instructions ............. 578 A.10 Voice-Modem Instructions ..............580 A.11 Custom Menus — Instructions ............581 A.12 Serial Input / Output ................
  • Page 22 Table of Contents G.3.5 Passive Signal Conditioners Lists ..........647 G.3.5.1 Resistive-Bridge TIM Modules List ......... 647 G.3.5.2 Voltage-Divider Modules List .......... 647 G.3.5.3 Current-Shunt Modules List ..........647 G.3.5.4 Transient-Voltage Suppressors List ......... 648 G.3.6 Terminal-Strip Covers List ............648 G.4 PLC Control Modules —...
  • Page 23 Figure 36. Device Configuration Utility (DevConfig) ........ 112 Figure 37. Network Planner Setup .............. 113 Figure 38. Summary of CR1000 Configuration .......... 122 Figure 39. CRBasic Editor Program Send File Control window ....127 Figure 40. "Include File" Settings Via DevConfig ........149 Figure 41.
  • Page 24 Table of Contents Figure 61. Zero Procedure Start ..............227 Figure 62. Zero Procedure Finish ..............227 Figure 63. PT100 in Four-Wire Half-Bridge ..........240 Figure 64. PT100 in Three-Wire Half-Bridge ..........242 Figure 65. PT100 in Four-Wire Full-Bridge ..........244 Figure 66.
  • Page 25 Table 2. Differential and Single-Ended Input Terminals ......65 Table 3. Pulse-Input Terminals and Measurements ........69 Table 4. CR1000 Wiring Panel Terminal Definitions ........77 Table 5. Current Source and Sink Limits ............ 103 Table 6. Status/Setting/DTI: Access Points ..........115 Table 7.
  • Page 26 0°C) ....................331 Table 67. Voltage Range for Maximum Thermocouple Resolution ... 331 Table 68. Limits of Error on CR1000 Thermocouple Polynomials .... 334 Table 69. Reference-Temperature Compensation Range and Error .... 335 Table 70. Thermocouple Error Examples ........... 336...
  • Page 27 Table 105. DNP3 Implementation — Data Types Required to Store Data in Public Tables for Object Groups ..........409 Table 106. Modbus to Campbell Scientific Equivalents ......412 Table 107. CRBasic Ports, Flags, Variables, and, Modbus Registers ..414 Table 108. Supported Modbus Function Codes .......... 415 Table 109.
  • Page 28 Table 131. CommsMemFree(1) Defaults and Use Example, TLS Not Active ....................492 Table 132. CommsMemFree(1) Defaults and Use Example, TLS Active .. 492 Table 133. CR1000 Terminal Commands ........... 502 Table 134. Log Locations ................504 Table 135. Program Send Command ............524 Table 136.
  • Page 29 CR1000 Tools ..................637 Table 191. FP2 Data-Format Bit Descriptions ..........641 Table 192. FP2 Decimal-Locater Bits ............641 Table 193. Endianness in Campbell Scientific Instruments ......643 Table 194. Dataloggers ................645 Table 195. Analog-Input Modules .............. 646 Table 196. Pulse-Input Modules ..............646 Table 197.
  • Page 30 Table of Contents Table 219. CF-Card Storage Module ............653 Table 220. Starter Software ................. 654 Table 221. Datalogger Support Software ............ 655 Table 222. LoggerNet Suite ..............655 Table 223. Software Tools ................656 Table 224. Software Development Kits ............656 Table 225.
  • Page 31 Table of Contents CRBasic Example 34. Programming with Bool8 and a Bit-Shift Operator ....................200 CRBasic Example 35. NSEC — One Element Time Array ......203 CRBasic Example 36. NSEC — Two Element Time Array ....... 203 CRBasic Example 37. NSEC — Seven and Nine Element Time Arrays ..204 CRBasic Example 38.
  • Page 33: Introduction

    (435) 227-9100 or email support@campbellsci.com. In earlier days, Campbell Scientific dataloggers greeted our customers with a cheery HELLO at the flip of the ON switch. While the user interface of the CR1000 datalogger has advanced beyond those simpler days, you can still hear the cheery HELLO echoed in the voices you hear at Campbell Scientific.
  • Page 34: Capturing Crbasic Code

    June of 2015, for a comprehensive review. Readers If any information in this manual, which is preliminary to address OS v. 28 changes, is mission critical, please consult a Campbell Scientific application engineer. Primary changes since Version 5/13 are addition of the Precautions section (p.
  • Page 35 Section 1. Introduction NewFile() instruction Operating system management Period averaging Precision of variables Programming Route() instruction Security Skipped records Subroutines SW12 and 12V terminals Task sequencer Terminal mode Time and clock Troubleshooting Watchdog resets...
  • Page 37: Cautionary Statements

    The internal battery will be depleted in three years or less if a CR1000 is left on the shelf. When the CR1000 is continuously used, the internal battery may last up to 10 or more years. See section Internal Battery —...
  • Page 39: Initial Inspection

    Ensure that the expected lengths of cables were received. Contact Campbell Scientific immediately if there are any discrepancies. • Check the operating system version in the CR1000 as outlined in the section and update as needed. Sending the Operating System (OS) (p. 117),...
  • Page 41: System Quickstart

    (p. 512) A CR1000 is only one part of a data-acquisition system. To acquire good data, suitable sensors and a reliable data-retrieval method are required. A failure in any part of the system can lead to "bad" data or no data. A typical data-acquisition system is conceptualized in figure Data-Acquisition System Components (p.
  • Page 42: Sensors - Quickstart

    (p. 533). processing components and simply output a digital value in binary, hexadecimal, or ASCII character form. The CR1000, sometimes with the assistance of various peripheral devices, can measure or read nearly all electronic sensor output types. Sensor types supported include: Analog •...
  • Page 43: Datalogger - Quickstart

    (p. 75) • Dataloggers — List (p. 645) The CR1000 can measure almost any sensor with an electrical response. The CR1000 measures electrical signals and converts the measurement to engineering units, performs calculations and reduces data to statistical values. Most applications do not require that every measurement be stored but rather combined with other measurements in statistical or computational summaries.
  • Page 44: Power Supplies - Quickstart

    The CR1000 is operable with power from 9.6 to 16 Vdc applied at the POWER IN terminals of the green connector on the face of the wiring panel.
  • Page 45: Internal Battery - Quickstart

    • Data Retrieval and Telecommunication Peripherals — Lists (p. 651) If the CR1000 datalogger sits near a PC, direct-connect serial communication is usually the best solution. In the field, direct serial, a data-storage device, can be used during a site visit. A remote telecommunication option (or a combination of options) allows you to collect data from your PC over long distances and gives you the power to discover problems early.
  • Page 46: Datalogger Support Software - Quickstart

    LoggerLink Mobile Datalogger Starter software for iOS and Android • A CRBasic program must be loaded into the CR1000 to enable it to make measurements, read sensors, and store data. Short Cut is used to write simple CRBasic programs without the need to learn the CRBasic programming language.
  • Page 47: Hardware Setup

    4. After confirming the power supply connections have the correct polarity, insert the green power connector into its receptacle on the CR1000 wiring panel. 5. Connect the serial cable between the RS-232 port on the CR1000 and the RS- 232 port on the PC.
  • Page 48: Pc200W Software Setup

    After exiting the wizard, the main PC200W window becomes visible. This window has several tabs. The Clock/Program tab displays information on the currently selected CR1000 with clock and program functions. Monitor Data and Collect Data tabs are also available. Icons across the top of the window access...
  • Page 49: Figure 4. Pc200W Main Window

    COM Port Selection change if the cable is moved to a different USB port. This will prevent data transfer between the software and CR1000. Should this occur, simply move the cable back to the original port. If this is not possible, close then reopen the PC200W software to refresh the available COM ports.
  • Page 50: Write Crbasic Program With Short Cut

    Section 4. System Quickstart 4.7.4 Write CRBasic Program with Short Cut Short Cut objectives: Create a program to measure the voltage of the CR1000 power supply, • temperature of the CR1000 wiring-panel, and ambient air temperature using a thermocouple. When program is downloaded to the CR1000, it takes samples once per •...
  • Page 51: Procedure: (Short Cut Steps 6 To 7)

    7. At the left portion of the main Short Cut window, click Wiring Diagram. Attach the physical type-T thermocouple to the CR1000 as shown in the diagram. Click on 3. Sensors in the left portion of the window to return to the...
  • Page 52: Procedure: (Short Cut Step 8)

    The joined end is the measurement junction; the junction that is created when the two wires of dissimilar metals are wired to CR1000 analog input terminals is the reference junction. When the two junctions are at different temperatures, a voltage proportional to the temperature difference is induced in the wires.
  • Page 53: Procedure: (Short Cut Steps 9 To 12)

    Section 4. System Quickstart 8. Click Next to advance to the Outputs tab, which displays the list Selected Sensors to the left and data storage tables to the right under Selected Outputs. Figure 7. Short Cut Outputs Tab 4.7.4.4 Procedure: (Short Cut Steps 9 to 12) 9.
  • Page 54: Procedure: (Short Cut Steps 13 To 14)

    Section 4. System Quickstart Figure 8. Short Cut Outputs Tab 4.7.4.5 Procedure: (Short Cut Steps 13 to 14) 13. Click Finish to compile the program. Give the program the name MyTemperature. A summary screen will appear showing the compiler results. Any errors during compiling will be displayed. Figure 9.
  • Page 55: Send Program And Collect Data

    Click OK to close the confirmation. 4. After sending a program to the CR1000, a good practice is to monitor the measurements to ensure they are reasonable. Select the Monitor Data tab.
  • Page 56: Procedure: (Pc200W Step 5)

    Section 4. System Quickstart Figure 11. PC200W Monitor Data Tab – Public Table 4.7.5.3 Procedure: (PC200W Step 5) 5. To view the OneMin table, select an empty cell in the display area. Click Add. In the Add Selection window Tables field, click on OneMin, then click Paste.
  • Page 57: Procedure: (Pc200W Step 6)

    Section 4. System Quickstart Figure 12. PC200W Monitor Data Tab — Public and OneMin Tables 4.7.5.4 Procedure: (PC200W Step 6) 6. Click on the Collect Data tab and select data to be collected and the storage location on the PC. Figure 13.
  • Page 58: Procedure: (Pc200W Steps 7 To 10)

    Section 4. System Quickstart 4.7.5.5 Procedure: (PC200W Steps 7 to 10) 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 data to be collected. 8.
  • Page 59: Procedure: (Pc200W Steps 11 To 12)

    Section 4. System Quickstart 4.7.5.6 Procedure: (PC200W Steps 11 to 12) 11. Click on to open a file for viewing. In the dialog box, select the CR1000_OneMin.dat file and click Open. 12. The collected data are now shown. Figure 15. PC200W View Data Table 4.7.5.7 Procedure: (PC200W Steps 13 to 14) 13.
  • Page 60: Figure 16. Pc200W View Line Graph

    Section 4. System Quickstart Figure 16. PC200W View Line Graph...
  • Page 61: System Overview

    • Quickstart (p. 41) • Specifications (p. 97) • Installation (p. 99) • Operation (p. 303) A Campbell Scientific data-acquisition system is made up of the following basic components: • Sensors • Datalogger, which includes: Clock Measurement and control circuitry...
  • Page 62: Measurements - Overview

    Section 5. System Overview Figure 17. Data-Acquisition System — Overview Measurements — Overview Related Topics: • Sensors — Quickstart (p. 42) • Measurements — Overview (p. 62) • Measurements — Details (p. 303) • Sensors — Lists (p. 649)
  • Page 63: Time Keeping - Overview

    (p. 303) Measurement of time is an essential function of the CR1000. Time measurement with the on-board clock enables the CR1000 to attach time stamps to data, measure the interval between events, and time the initiation of control functions. 5.1.2 Analog Measurements — Overview Related Topics: •...
  • Page 64: Figure 18. Analog Sensor Wired To Single-Ended Channel #1

    Section 5. System Overview ground. A differential measurement measures the high signal with reference to the low signal. Each configuration has a purpose, but the differential configuration is usually preferred. A differential configuration may significantly improve the voltage measurement. Following are conditions the often indicate that a differential measurement should be used: Ground currents cause voltage drop between the sensor and the signal-ground •...
  • Page 65: Single-Ended Measurements - Overview

    Rapid sampling is required. Single-ended measurement time is about half • that of differential measurement time. Sensor is not designed for differential measurements. Many Campbell • Scientific sensors are not designed for differential measurement, but the draw backs of a single-ended measurement are usually mitigated by large...
  • Page 66: Differential Measurements - Overview

    CR1000 is grounded, a measurement error will result. For example, if the difference in grounds is 1 mV, with a copper-constantan thermocouple, the error will be approximately 25 °C.
  • Page 67: Resistance Measurements - Overview

    Bridge resistance is determined by measuring the difference between a known voltage applied to the excitation (input) arm of a resistor bridge and the voltage measured on the output arm. The CR1000 supplies a precise-voltage excitation via Vx terminals . Return voltage is measured on H/L] terminals configured for single-ended or differential input.
  • Page 68: Strain Measurements - Overview

    The output signal generated by a pulse sensor is a series of voltage waves. The sensor couples its output signal to the measured phenomenon by modulating wave frequency. The CR1000 detects the state transition as each wave varies between voltage extremes (high-to-low or low-to-high). Measurements are processed and presented as counts, frequency, or timing data.
  • Page 69: Pulses Measured

    Section 5. System Overview Edge timing • Resolution — 540 ns Note A period-averaging sensor has a frequency output, but it is connected to a SE terminal configured for period-average input and measured with the PeriodAverage() instruction (see section Period Averaging — Overview (p.
  • Page 70: Pulse Sensor Wiring

    Connect the other wire to a P terminal. Sometimes the sensor will require power from the CR1000, so there may be two power wires — one of which will be power ground. Connect power ground to a G terminal. Do not confuse the pulse wire with the positive-power wire, or damage to the sensor or CR1000 may result.
  • Page 71: Vibrating-Wire Measurements - Overview

    A smart sensor is equipped with independent measurement circuitry that makes the basic measurement and sends measurement and measurement related data to the CR1000. Smart sensors vary widely in output modes. Many have multiple output options. Output options supported by the CR1000 include SDI-12 (p.
  • Page 72: Sensor Support - Overview

    (p. 555) SDI-12 is a smart-sensor protocol that uses one SDI-12 port and is powered by 12 Vdc. It is fully supported by the CR1000 datalogger. Refer to the chart CR1000 Terminal Definitions which indicates C terminals that can be configured for (p.
  • Page 73: Field Calibration - Overview

    Adjusting sensor output directly is preferred, but not always possible or practical. By adding FieldCal() or FieldCalStrain() instructions to the CR1000 CRBasic program, measurements of a linear sensor can be adjusted by modifying the...
  • Page 74: Cabling Effects - Overview

    • Synchronizing Measurements — Details (p. 365) Timing of a measurement is usually controlled relative to the CR1000 clock. When sensors in a sensor network are measured by a single CR1000, measurement times are synchronized, often within a few milliseconds, depending on sensor number and measurement type.
  • Page 75: Datalogger - Overview

    The CR1000 has the option of evaluating programmed instructions sequentially (sequential mode), or in the more efficient pipeline mode. In pipeline mode, the CR1000 determines the order of instruction execution. 5.3.1 Time Keeping — Overview Related Topics: •...
  • Page 76: Wiring Panel - Overview

    (p. 76) • Measurement and Control Peripherals (p. 366) The wiring panel of the CR1000 is the interface to most functions. These functions are introduced in the following sections while reviewing wiring-panel features illustrated in the figure Wiring Panel The table CR1000 Terminal (p.
  • Page 77: Table 4. Cr1000 Wiring Panel Terminal Definitions

    Section 5. System Overview Table 4. CR1000 Wiring Panel Terminal Definitions COM1 COM2 COM3 COM4 DIFF ┌ 1 ┐ ┌ 2 ┐ ┌ 3 ┐ ┌ 4 ┐ ┌ 5 ┐ ┌ 6 ┐ ┌ 7 ┐ ┌ 8 ┐...
  • Page 78: Switched Voltage Output - Overview

    See the section Measurement — Overview for a summary of (p. 62) measurement functions. Other functions include device-driven interrupts, asynchronous communications and SDI-12 communications. Table CR1000 Terminal Definitions summarizes available options. (p. 76) Figure Control and Monitoring with C Terminals illustrates a simple (p.
  • Page 79: Voltage Excitation - Overview

    • Voltage and Current Excitation — Specifications • Voltage Excitation — Overview (p. 79) The CR1000 has several terminals designed to supply switched voltage to peripherals, sensors, or control devices: Voltage Excitation (switched-analog output) — Vx terminals supply precise •...
  • Page 80: Grounding Terminals

    CR1000 as a power supply for sensors and peripheral devices. The CR1000 can be used as a power source for sensors and peripherals. The following voltages are available: 12V terminals: unregulated nominal 12 Vdc. This supply closely tracks the •...
  • Page 81: Communication Ports

    Data Retrieval and (p. 362), Telecommunications — Details and PakBus — Overview (p. 391), (p. 88). The CR1000 is equipped with hardware ports that allow communication with other devices and networks, such as: • Smart sensors • Modbus and DNP3 networks •...
  • Page 82: Ports

    One SDM port configured from C1, C2, and C3 terminals. • 5.3.2.5.6 CPI Port CPI is a new proprietary protocol that supports an expanding line of Campbell Scientific CDM modules. CDM modules are higher-speed input- and output- expansion peripherals. CPI ports also enable networking between compatible Campbell Scientific dataloggers.
  • Page 83: Ethernet Port

    The keyboard display is an essential installation, maintenance, and troubleshooting tool for many applications. It allows interrogation and programming of the CR1000 datalogger independent of other telecommunication links. More information on the use of the keyboard display is available in the section Custom Menus —...
  • Page 84: Custom Menus - Overview

    (p. 581) • Keyboard Display — Overview (p. 83) • CRBasic Editor Help for DisplayMenu() CRBasic programming in the CR1000 facilitates creation of custom menus for the CR1000KD Keyboard Display. Figure Custom Menu Example shows windows from a simple custom menu (p.
  • Page 85: Measurement And Control Peripherals - Overview

    (p. 101) • Troubleshooting — Power Supplies (p. 494) The CR1000 is powered by a nominal 12 Vdc source. Acceptable power range is 9.6 to 16 Vdc. External power connects through the green POWER IN connector on the face of the CR1000.
  • Page 86: Cr1000 Configuration - Overview

    A program is created on a PC and sent to the CR1000. The CR1000 can store a number of programs in memory, but only one program is active at a given time. Two Campbell Scientific software applications, Short Cut and CRBasic Editor, are used to create CR1000 programs.
  • Page 87: Memory - Overview

    • Memory — Overview (p. 87) • Memory — Details (p. 370) • Data Storage Devices — List (p. 653) Data concerning CR1000 memory are posted in the Status table. Memory (p. 603) is organized as follows: OS Flash •...
  • Page 88: Data Retrieval And Telecommunications - Overview

    Data consolidation — other PakBus dataloggers can be used as "sensors" to • consolidate all data into one CR1000. Routing — the CR1000 can act as a router, passing on messages intended for • another Campbell Scientific datalogger. PakBus supports automatic route...
  • Page 89: Telecommunications

    5.3.9.3 Mass-Storage Device Caution When removing a Campbell Scientific mass storage device (thumb drive) from the CR1000, do so only when the LED is not lit or flashing. Removing the device while it is active can cause data corruption. Data stored on a Campbell Scientific mass storage device are retrieved via a...
  • Page 90: Data-File Formats In Cr1000 Memory

    Section 5. System Overview Telecommunications The CR1000 accesses data on the card as needed to fill data-collection requests initiated with the datalogger support software Collect command. An (p. 509) alternative, if care is taken, is to collect data in binary form. Binary data are collected using the datalogger support software File Control | Retrieve (p.
  • Page 91: Modbus

    / or the slaves. The Modbus standard has two communication modes, RTU and ASCII. However, CR1000s communicate in RTU mode exclusively. Field instruments can be queried by the CR1000. Because Modbus has a set command structure, programming the CR1000 to get data from field instruments is much simpler than from serial sensors.
  • Page 92: Security - Overview

    (p. 467) The CR1000 is supplied void of active security measures. By default, RS-232, Telnet, FTP and HTTP services, all of which give high level access to CR1000 data and CRBasic programs, are enabled without password protection. You may wish to secure your CR1000 from mistakes or tampering. The following may be reasons to concern yourself with datalogger security: •...
  • Page 93: Maintenance - Overview

    It can be disabled by the CRBasic program when using the Calibrate() instruction. Note The CR1000 is equipped with an internal voltage reference used for calibration. The voltage reference should be periodically checked and re- calibrated by Campbell Scientific for applications with critical analog voltage measurement requirements.
  • Page 94: Protection From Voltage Transients

    5.3.12.2 Protection from Voltage Transients Read More See Grounding (p. 105). The CR1000 must be grounded to minimize the risk of damage by voltage transients associated with power surges and lightning-induced transients. Earth grounding is required to form a complete circuit for voltage-clamping devices internal to the CR1000.
  • Page 95: Datalogger Support Software - Overview

    • PC200W Datalogger Starter Software for Windows — Supports only direct serial connection to the CR1000 with hardwire or spread-spectrum radio. It supports sending a CRBasic program, data collection, and setting the CR1000 clock. PC200W is available at no charge at www.campbellsci.com/downloads (http://www.campbellsci.com/downloads).
  • Page 97: Specifications

    1.1 -- 8 10 30 CR1000 specifications are valid from ─25° to 50°C in non-condensing environments unless otherwise specified. Recalibration is recommended every two years. Critical specifications and system configurations should be confirmed with a Campbell Scientific application engineer before purchase.
  • Page 99: Installation

    Adequate desiccant should be placed in the instrumentation enclosure to provide added protection. Temperature Range The CR1000 is designed to operate reliably from –40 to 75 °C (–55 °C to 85 °C, optional) in non-condensing environments. Enclosures Enclosures — Details (p.
  • Page 100: Power Supplies - Details

    The CR1000 is internally protected against accidental polarity reversal on the power inputs. The CR1000 has a modest-input power requirement. For example, in low-power applications, it can operate for several months on non-rechargeable batteries.
  • Page 101: Cr1000 Power Requirement

    7.4.1 CR1000 Power Requirement The CR1000 is operable with power from 9.6 to 16 Vdc applied at the POWER IN terminals of the green connector on the face of the wiring panel.
  • Page 102: Vehicle Power Connections

    The main power for the CR1000 is provided by an external-power supply. 7.4.3.1 Vehicle Power Connections If a CR1000 is powered by a motor-vehicle power supply, a second power supply may be needed. When starting the motor of the vehicle, battery voltage often drops below the voltage required for datalogger operation.
  • Page 103: External Power Supply Installation

    Voltage on the 12V and SW12 terminals can vary widely and will fluctuate with the dc supply used to power the CR1000, so be careful to match the datalogger power supply to the requirements of the sensors. The 5V terminal is internally regulated to within ±4%, which is good regulation as a power source, but typically...
  • Page 104: Switched-Voltage Excitation

    5 Vdc power supply. It is not intended as an excitation source for bridge measurements. However, measurement of the 5V terminal output, by means of jumpering to an analog input on the same CR1000), will facilitate an accurate bridge measurement if 5V must be used.
  • Page 105: Switched Unregulated Voltage (Sw12 Terminal)

    CR1000 supply voltage. Two CRBasic instructions, SW12() and PortSet(), control the SW12 terminal. Each instruction is handled differently by the CR1000. SW12() is a processing task. Use it when controlling power to SDI-12 and serial sensors that use SDI12Recorder() or SerialIn() instructions respectively.
  • Page 106 Section 7. Installation The primary devices for protection against ESD are gas-discharge tubes (GDT). All critical inputs and outputs on the CR1000 are protected with GDTs or transient voltage suppression diodes. GDTs fire at 150 V to allow current to be diverted to the earth ground lug.
  • Page 107: Lightning Protection

    The system employs a lightening rod, metal mast, heavy-gage ground wire, and ground rod to direct damaging current away from the CR1000. This system, however, not infallible. Figure Lightning-Protection Scheme is a drawing of a typical (p.
  • Page 108: Single-Ended Measurement Reference

    Figure 34. Lightning-Protection Scheme 7.6.2 Single-Ended Measurement Reference Low-level, single-ended voltage measurements (<200 mV) are sensitive to ground potential fluctuation due to changing return currents from 12V, SW12, 5V, and C1 – C8 terminals. The CR1000 grounding scheme is designed to minimize these...
  • Page 109: Ground-Potential Differences

    1 mV greater at the sensor than at the point where the CR1000 is grounded, the measured voltage is 1 mV greater than the thermocouple output. With a copper-constantan thermocouple, 1 mV equates to approximately 25 °C measurement error.
  • Page 110: Figure 35. Model Of A Ground Loop With A Resistive Sensor

    Section 7. Installation and water provide an alternate path for the excitation to return to CR1000 ground. This example is modeled in the diagram Model of a Ground Loop with a Resistive Sensor With R in the resistor network, the signal measured from the sensor (p.
  • Page 111: Cr1000 Configuration - Details

    DevConfig Help guides you through connection and use. The simplest connection is to, connect a serial cable from the computer COM port or USB port to the RS- 232 port on the CR1000 as shown in figure Power and Serial Communication DevConfig updates are available at Connections (p.
  • Page 112: Network Planner

    Section 7. Installation Figure 36. Device Configuration Utility (DevConfig) 7.7.1.2 Network Planner Network Planner is a drag-and-drop application used in designing PakBus datalogger networks. You interact with Network Planner through a drawing canvas upon which are placed PC and datalogger nodes. Links representing various telecommunication options are drawn between nodes.
  • Page 113: Overview

    Section 7. Installation Figure 37. Network Planner Setup 7.7.1.2.1 Overview Network Planner allows you to • Create a graphical representation of a network, as shown in figure Network Planner Setup (p. 113), Determine settings for devices and LoggerNet, and • Program devices and LoggerNet with new settings.
  • Page 114: Basics

    (p. 604) • Status Table as Debug Resource (p. 485) The Status table, CR1000 settings, and the DataTableInfo table (collectively, Status/Settings/DTI) contain registers, settings, and information essential to setup, programming, and debugging of many advanced CR1000 systems. Status/Settings/DTI are numerous. Note the following: •...
  • Page 115: Configuration With Executable Cpu: Files

    Information presented in Station Status is not updated automatically. Click the Refresh button to update. Note Communication and processor bandwidth are consumed when generating the Status and DataTableInfo tables. If the CR1000 is very tight on processing time, as may occur in very long or complex operations, retrieving the Status table repeatedly may cause skipped scans (p.
  • Page 116: Default.cr1 File

    Powerup.ini has a different, limited programming language. 7.7.1.4.1 Default.cr1 File A file named default.cr1 can be stored on the CR1000 CPU: drive. At power up, the CR1000 loads default.cr1 if no other program takes priority (see Executable File Run Priorities .
  • Page 117: Cr1000 Configuration - Details

    CR1000 will attempt to run the program named default.cr1 on its CPU: drive. 6. If there is no default.cr1 file or it cannot be compiled, the CR1000 will not automatically run any program. 7.7.2 CR1000 Configuration — Details Following are a few common configuration actions: •...
  • Page 118: Os Update With Devconfig Send Os Tab

    Using this method results in the CR1000 being restored to factory defaults. The existing OS is over written as it is received. Failure to receive the complete new OS will leave the CR1000 in an unstable state. Use this method only with a direct hardwire serial connection.
  • Page 119: Os Update With Devconfig

    4. Follow the on-screen OS Download Instructions Pros/Cons This is a good way to recover a CR1000 that has gone into an unresponsive state. Often, an operating system can be loaded even if you are unable to communicate with the CR1000 through other means.
  • Page 120 CRBasic Editor and specify new run options. Pros/Cons This is the best way to load a new operating system on the CR1000 and have its settings retained (most of the time). This means that you will still be able to communicate with the station because the PakBus address is preserved and PakBusTCP client connections are maintained.
  • Page 121: Os Update With Devconfig

    DevConfig Send OS tab: If you are having trouble communicating with the CR1000 • • If you want to return the CR1000 to a known configuration Send Program or Send New... command: (p. 524) If you want to send an OS remotely •...
  • Page 122: Restoring Factory Defaults

    In DevConfig, clicking the Factory Defaults button at the base of the Settings Editor tab sends a command to the CR1000 to revert to its factory default settings. The reverted values will not take effect until the changes have been applied.
  • Page 123: Program Structure

    Define Aliases Assign aliases to variables. Assign engineering units to variable (optional). Define Units Units are strictly for documentation. The CR1000 makes no use of Units nor checks Unit accuracy. Define data tables. Define stored data tables. Set triggers when data should be stored. Triggers Process / store trigger may be a fixed interval, a condition, or both.
  • Page 124 Section 7. Installation CRBasic Program Structure 'Declarations 'Define Constants Const RevDiff = 1 Const Del = 0 'default Const Integ = 250 Declare constants Const Mult = 1 Const Offset = 0 'Define public variables Public RefTemp Public TC(6) 'Define Units Declare public variables, Declarations dimension array, and declare...
  • Page 125: Writing And Editing Programs

    Fundamental elements of CRBasic include the following: • Variables — named packets of CR1000 memory into which are stored values that normally vary during program execution. Values are typically the result of measurements and processing. Variables are given an alphanumeric name and can be dimensioned into arrays of related data.
  • Page 126: Inserting Comments Into Program

    (p. 282). 7.8.3 Sending CRBasic Programs The CR1000 requires that a CRBasic program file be sent to its memory to direct measurement, processing, and data-storage operations. The program file can have the extension cr1 or .dld and can be compressed using the GZip algorithm before sending it to the CR1000.
  • Page 127: Preserving Data At Program Send

    Section 7. Installation A good practice is to always retrieve data from the CR1000 before sending a program; otherwise, data may be lost. Read More See File Management and the Campbell Scientific mass (p. 382) storage device or memory card documentation available at www.campbellsci.com.
  • Page 128: Programming Syntax

    Section 7. Installation Table 10. Data Table Structures –Data table name(s) –Data-output interval or offset –Number of fields per record –Number of bytes per field –Field type, size, name, or position –Number of records in table 7.8.4 Programming Syntax 7.8.4.1 Program Statements CRBasic programs are made up of a series of statements.
  • Page 129: Single-Statement Declarations

    Section 7. Installation Note CRBasic statements are limited to 512 characters, whether or not a line continuation is used. Examples: Public A, B, _ C,D, E, F B) _ D) _ then ExitScan 7.8.4.2 Single-Statement Declarations Single-statements are used to declare variables, constants, variable and constant related elements, and the station name.
  • Page 130: Declaring Data Types

    Section 7. Installation Several variables can be declared on a single line, separated by commas: Public RefTemp, AirTemp2, Batt_Volt Variables can also be assigned initial values in the declaration. Following is an example of declaring a variable and assigning it an initial value. Public SetTemp = {35} In string variables, string size defaults to 24 characters (changed from 16 characters in April 2013, OS 26).
  • Page 131: Table 12. Data Types In Final-Data Memory

    Name Command Description Notes Resolution / Range (Bytes) See caution. String size is defined by the CR1000 operating system and CRBasic Minimum: 3 program. Unless declared otherwise, string size is 24 (4 with null When converting from STRING to bytes or characters. String size is allocated...
  • Page 132 1 nanosecond NSEC record and process time data. See NSEC Data Type (p. 202). See caution. String size is defined by the CR1000 operating system and CRBasic Minimum: 3 program. Unless declared otherwise, string size is 24 (4 with null When converting from STRING to bytes or characters.
  • Page 133 Section 7. Installation CRBasic Example 3. Data Type Declarations 'This program example demonstrates various data type declarations. 'Data type declarations associated with any one variable occur twice: first in a Public 'or Dim statement, then in a DataTable/EndTable segment. If not otherwise specified, data 'types default to floating point: As Float in Public or Dim declarations, FP2 in data 'table declarations.
  • Page 134: Dimensioning Numeric Variables

    , declaring the indices As (p. 134)) Long variables is recommended. Doing so allows for more efficient use of CR1000 resources. CRBasic Example 4. Using Variable Array Dimension Indices 'This program example demonstrates the use of dimension indices in arrays.
  • Page 135: Declaring Flag Variables

    'and the use of strings to report flag status. To run the demonstration, send this program 'to the CR1000, then toggle variables Flag(1) and Flag(2) to true or false to see how the 'program logic sets the words "High" or "Low" in variables FlagReport(1) and FlagReport(2).
  • Page 136: Declaring Local And Global Variables

    Section 7. Installation (x) on the variable name. X number of variables are created that differ in name only by the incrementing number in the suffix. For example, the four statements Public TempC1 Public TempC2 Public TempC3 Public TempC4 can simply be condensed to Public TempC(4).
  • Page 137: Initializing Variables

    Section 7. Installation are called local variables. Names of local variable can be identical to names of global variables and to names of local variables declared in other (p. 517) subroutines and functions. This feature allows creation of a CRBasic library of reusable subroutines and functions that will not cause variable name conflicts.
  • Page 138: Predefined Constants

    CRBasic program development. The compiler will catch the use of any reserved words. Following are listed predefined constants that are assigned a value: • LoggerType = 1000 (as in CR1000) These may be useful in programming. 7.8.4.8 Declaring Aliases and Units A variable can be assigned a second name, or alias, in the CRBasic program.
  • Page 139: Numerical Formats

    Scientific notation, binary, and hexadecimal formats can also be used, as shown in the table Formats for Entering Numbers in CRBasic (p. 139). Only standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 13. Formats for Entering Numbers in CRBasic...
  • Page 140: Multi-Statement Declarations

    The trigger that initiates data storage is tripped either by the CR1000 clock, or by an event, such as a high temperature. The number of data tables declared is limited only by the available CR1000 memory (prior to OS 28, the limit was 30 data tables).
  • Page 141: Table 14. Typical Data Table

    Each line consists of one or more fields. The first four lines constitute the file header. Subsequent lines contain data. Note Discrete data files (ASCII or binary) can also be written to a CR1000 memory drive using the TableFile() instruction.
  • Page 142 Definition and Use of a Data Table Units are strictly for (p. 142). documentation. The CR1000 does not make use of declared units, nor does it check their accuracy. The fourth line of the header reports abbreviations of the data process used to produce the field of data.
  • Page 143 Automatic allocation is preferred in most applications since the CR1000 sizes all tables such that they fill (and begin overwriting the oldest data) at about the same time. Approximately 2 kB of extra data-table space...
  • Page 144 Scan() / NextScan interval. Sometimes, usually because of a timing issue, program logic prevents a record from being written. If a record is not written, the CR1000 recognizes the omission as a "lapse" and increments the SkippedRecord counter in the Status table.
  • Page 145: Table 16. Datainterval() Lapse Parameter Options

    Scan() loop. See section Time Stamps (p. 303). OpenInterval() Instruction By default, the CR1000 uses closed intervals. Data output to a data table based on DataInterval() includes measurements from only the current interval. Intermediate memory that contains measurements is cleared the next time the data table is called regardless of whether or not a record was written to the data table.
  • Page 146 Section 7. Installation • Reps — number of sequential elements in the variable array for which averages are calculated. Reps is set to 1 to average PTemp, and set to 2 to average two thermocouple temperatures, both of which reside in the variable array Temp_C.
  • Page 147: Declaring Subroutines

    An alternative to a subroutine is an 'include' file. An 'include' file is a CRBasic program file that resides on the CR1000 CPU: drive and compiles as an insert to the CRBasic program. It may also run on its own It is essentially a (p.
  • Page 148 Section 7. Installation 2. Send the file to the CR1000 using tools in the File Control menu of datalogger support software (p. 95). 3. Enter the path and name of the file in the Include File setting using DevConfig or PakBusGraph.
  • Page 149: Figure 40. "Include File" Settings Via Devconfig

    An 'include' file is a CRBasic file that usually 'resides on the CPU: drive of the CR1000. It is essentially a subroutine that is 'stored in a file separate from the main program, but it compiles as an insert to the main 'program.
  • Page 150: Declaring Subroutines

    Including the SlowSequence instruction as the first statement is required, followed by any other code. '2. Send the 'include' file to the CPU: drive of the CR1000 using the File Control menu of the datalogger support software Be sure to de-select the Run Now and Run On (p.
  • Page 151: Execution And Task Priority

    These tasks are executed in either pipeline or sequential mode. When in pipeline mode, tasks run more or less in parallel. When in sequential mode, tasks run more or less in sequence. When a program is compiled, the CR1000 evaluates the program and automatically determines which mode to use. Using the PipelineMode or SequentialMode instruction at the beginning of the program will force the program into one mode or the other.
  • Page 152: Pipeline Mode

    Section 7. Installation Note A program can be forced to run in sequential or pipeline mode by placing the SequentialMode or PipelineMode instruction in the declarations section of the program. Some tasks in a program may have higher priorities than others. Measurement tasks generally take precedence over all others.
  • Page 153: Sequential Mode

    CRBasic program to make sure that the initializing sequence has completed before the dependent task can proceed. This can be done with a simple variable or even a delay, but understand that the CR1000 operating system will not do this handshaking between independent tasks.
  • Page 154: Execution Timing

    EndProg 7.8.4.12.1 Scan() / NextScan Simple CR1000 programs are often built entirely within a single Scan() / NextScan structure, with only variable and data-table declarations outside the scan. Scan() / NextScan creates an infinite loop; each periodic pass through the...
  • Page 155: Slowsequence / Endsequence

    Section 7. Installation of the period in 10 ms increments up to 24 hours. As shown in CRBasic example BeginProg / Scan() / NextScan / EndProg Syntax the CRBasic program (p. 155), may be relatively short. CRBasic Example 14. BeginProg / Scan() / NextScan / EndProg Syntax 'This program example demonstrates the use of BeginProg/EndProg and Scan()/NextScan syntax.
  • Page 156: Subscan() / Nextsubscan

    For example, a weather-measurement program may scan once per second, but program execution may only occupy 250 ms, leaving 75% of available scan time unused. The CR1000 can make efficient use of this interstitial- scan time to optimize program execution and communication control. Unless disabled, or crowded out by a too demanding schedule, self-calibration (see CR1000 Auto Calibration —...
  • Page 157 Any processing will be time sliced with (p. 157). processing from other sequences. Every time the program encounters WaitDigTrig(), it will stop and wait to be triggered. Note WaitDigTrig() can be used to program a CR1000 to control another CR1000.
  • Page 158: Programming Instructions

    Measurement and Data-Storage Processing CRBasic instructions have been created for making measurements and storing data. Measurement instructions set up CR1000 hardware to make measurements and store results in variables. Data-storage instructions process measurements into averages, maxima, minima, standard deviation, FFT, etc.
  • Page 159: Argument Types

    (p. 159). CRBasic Example 15. Measurement Instruction Syntax 'This program example demonstrates the use of a single measurement instruction. In this 'case, the program measures the temperature of the CR1000 wiring panel. Public RefTemp 'Declare variable to receive instruction BeginProg Scan(1,Sec,3,0) PanelTemp(RefTemp, 250) '<<<<<<Instruction to make measurement...
  • Page 160: Expressions In Arguments

    Section 7. Installation Table 20. Rules for Names Maximum Length Name (number of characters) Allowed characters Category or underscore. CRBasic is not case sensitive. Units Units are excepted from the above rules. Since Alias units are strings that ride along with the data, they are not subjected to the stringent syntax Station name checking that is applied to variables, constants,...
  • Page 161: Floating-Point Arithmetic

    Several sources discuss floating-point arithmetic thoroughly. One readily available source is the topic Floating Point at www.wikipedia.org. In summary, CR1000 programmers should consider at least the following: Floating-point numbers do not perfectly mimic real numbers.
  • Page 162: Expressions With Numeric Data Types

    Section 7. Installation CRBasic Example 16. Use of Move() to Conserve Code Space Move(counter(1),6,0,1) 'Reset six counters to zero. Keep array 'filled with the ten most current readings Move(TempC(2),9,TempC(1),9) 'Shift previous nine readings to make room 'for new measurement 'New measurement: TCDiff(TempC(1),1,mV2_5C,8,TypeT,PTemp,True,0,_60Hz,1.0,0) CRBasic Example 17.
  • Page 163 EndProg Constants Conversion Constants are not declared with a data type, so the CR1000 assigns the data type as needed. If a constant (either entered as a number or declared with CONST) can be expressed correctly as an integer, the compiler will use the type that is most efficient in each expression.
  • Page 164: Logical Expressions

    100% indicates a condensation event such as fog, rain, or dew. The CR1000 can render the state of the event into binary form for further processing, so the event is either occurring (true), or the event has not occurred (false).
  • Page 165: Table 21. Binary Conditions Of True And False

    If X >= 5 then Y = 0 Sets the variable Y to 0 if the expression "X >= 5" is true, i.e. if X is greater than or equal to 5. The CR1000 evaluates the expression (X >= 5) and registers in system memory a -1 if the expression is true, or a 0 if the expression is false.
  • Page 166: String Expressions

    Section 7. Installation Table 22. Logical Expression Examples The NOT operator complements every bit in the word. A Boolean can be FALSE (0 or all bits set to 0) or TRUE (-1 or all bits set to 1). “Complementing” a Boolean turns TRUE to FALSE (all bits complemented to 0). Example Program '(a AND b) = (26 AND 26) = (&b11010 AND &b11010) = '&b11010.
  • Page 167: Programming Access To Data Tables

    Section 7. Installation 'Program BeginProg Scan(1,Sec,0,0) 'Assign strings to String variables Word(1) = "Good" Word(2) = "morning" Word(3) = "Dave" Word(4) = "I'm" Word(5) = "sorry" Word(6) = "afraid" Word(7) = "I" Word(8) = "can't" Word(9) = "do" Word(10) = "that" Word(11) = "...
  • Page 168: Table 23. Data Process Abbreviations

    Section 7. Installation Fieldname Index is the array element number in fields that are arrays • (optional). Records Back is how far back into the table to go to get the value (optional). • If left blank, the most recent record is acquired. Table 23.
  • Page 169: Programming To Use Signatures

    Once in variable form, signatures can be sampled as part of another data 167). table for archiving. Programming Resource Library This library of notes and CRBasic code addresses a narrow selection of CR1000 applications. Consult a Campbell Scientific application engineer if other resources are needed. 7.9.1 Advanced Programming Techniques 7.9.1.1 Capturing Events...
  • Page 170: Conditional Output

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

    Section 7. Installation 'Declare Units Units PTemp_C = deg C Units AirTemp_C = deg C Units DeltaT_C = deg C 'Declare Output Table -- Output Conditional on Delta T >=3 'Table stores data at the Scan rate (once per second) when condition met 'because DataInterval instruction is not included in table declaration.
  • Page 172 Section 7. Installation CRBasic Example 24. Groundwater Pump Test 'This program example demonstrates the use of multiple scans in a program by running a 'groundwater pump test. Note that Scan() time units of Sec have been changed to mSec for 'this demonstration to allow the program to run its course in a short time.
  • Page 173 Section 7. Installation 'Minute 10 to 30 of test: 30-second data-output interval Scan(30,mSec,0,40)'There are 40 30-second scans in 20 minutes ScanCounter(2) = ScanCounter(2) + 1 'Included to show passes through this scan Battery(Batt_volt) PanelTemp(PTemp,250) Call MeasureLevel 'Call Output Tables CallTable LogTable NextScan 'Minute 30 to 100 of test: 60-second data-output interval...
  • Page 174: Miscellaneous Features

    CRBasic Example 25. Miscellaneous Program Features 'This program example demonstrates the use of a single measurement instruction. In this 'case, the program measures the temperature of the CR1000 wiring panel. Public RefTemp 'Declare variable to receive instruction BeginProg...
  • Page 175 Section 7. Installation 'Optional – Declare a Station Name into a location in the Status table. StationName(CR1000_on_desk) 'Optional -- Declare units. Units are not used in programming, but only appear in the 'data file header. Units Batt_Volt = Volts Units PTemp = deg C Units AirTemp = deg C...
  • Page 176 Section 7. Installation Scan(1,Sec,1,0) 'Measurements 'Battery Voltage Battery(Batt_Volt) 'Wiring Panel Temperature PanelTemp(PTemp_C,_60Hz) 'Type T Thermocouple measurements: TCDiff(AirTemp_C,1,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1,0) TCDiff(AirTemp_F,1,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1.8,32) 'Convert from degree C to degree F AirTemp2_F = AirTemp_C * 1.8 + 32 'Count the number of times through the program. This demonstrates the use of a 'Long integer variable in counters.
  • Page 177: Pulsecountreset Instruction

    Section 7. Installation 7.9.1.5 PulseCountReset Instruction PulseCountReset is used in rare instances to force the reset or zeroing of CR1000 pulse accumulators (see Measurements — Overview (p. 62)) PulseCountReset is needed in applications wherein two separate PulseCount() instructions in separate scans measure the same pulse-input terminal. While the compiler does not allow multiple PulseCount() instructions in the same scan to measure the same terminal, multiple scans using the same terminal are allowed.
  • Page 178: Signatures: Example Programs

    A program signature is a unique integer calculated from all characters in a given set of code. When a character changes, the signature changes. Incorporating signature data into a the CR1000 data set allows system administrators to track program changes and assure data quality. The following program signatures are available.
  • Page 179: Use Of Multiple Scans

    Section 7. Installation 'Define Data Table DataTable(Signatures,1,1000) DataInterval(0,1,Day,10) Sample(1,ProgSig,FP2) Sample(1,RunSig,FP2) Sample(2,ExeSig(),FP2) EndTable 'Program BeginProg ExeSig() = Signature 'initialize executable code signature 'function Scan(1,Sec,0,0) ProgSig = Status.ProgSignature 'Set variable to Status table entry '"ProgSignature" RunSig = Status.RunSignature 'Set variable to Status table entry '"RunSignature"...
  • Page 180: Compiling: Conditional Code

    EndProg 'End executable section of program 7.9.2 Compiling: Conditional Code When a CRBasic user program is sent to the CR1000, an exact copy of the program is saved as a file on the CPU: drive A binary version of the (p.
  • Page 181 Section 7. Installation by using -p <outfile name>. This feature allows the smallest size program file possible to be sent to the CR1000, which may help keep costs down over very expensive telecommunication links. CRBasic example Conditional Code shows a sample program that (p.
  • Page 182: Displaying Data: Custom Menus - Details

    'This instruction is used if the datalogger is a CR3000 VoltSe(ValueRead,1,mV1000,22,0,0,_50Hz,0.1,-30) #ElseIf LoggerType = 1000 'This instruction is used if the datalogger is a CR1000 VoltSe(ValueRead,1,mV2500,12,0,0,_50Hz,0.1,-30) #ElseIf LoggerType = 800 'This instruction is used if the datalogger is a CR800 Series VoltSe(ValueRead,1,mV2500,3,0,0,_50Hz,0.1,-30)
  • Page 183: Figure 43. Custom Menu Example — Home Screen

    Section 7. Installation immediately after MenuItem(). If variable is declared As Boolean, MenuPick() allows only True or False or declared equivalents. Otherwise, many items are allowed in the pick list. Order of items in list is determined by order of instruction; however, item displayed initially in MenuItem() is determined by the value of the item.
  • Page 184: Figure 45. Custom Menu Example — Make Notes Sub Menu

    Section 7. Installation Figure 45. Custom Menu Example — Make Notes Sub Menu Figure 46. Custom Menu Example — Predefined Notes Pick List Figure 47. Custom Menu Example — Free Entry Notes Window Figure 48. Custom Menu Example — Accept / Clear Notes Window...
  • Page 185: Figure 49. Custom Menu Example — Control Sub Menu

    Section 7. Installation Figure 49. Custom Menu Example — Control Sub Menu Figure 50. Custom Menu Example — Control LED Pick List Figure 51. Custom Menu Example — Control LED Boolean Pick List Note See figures Custom Menu Example — Home Screen through Custom (p.
  • Page 186 Section 7. Installation Const Cal_Done = "Cal Done" 'Word stored when Cal_Don selected Const Offst_Chgd = "Offset Changed" 'Word stored when Offst_Chgd selected Const Blank = "" 'Word stored when blank selected Public EnterNote As String * 30 'Variable to hold free entry note Public CycleNotes As String...
  • Page 187 Section 7. Installation SubMenu("Control ") 'Create Submenu named PanelTemps MenuItem("Count to LED",CountDown) 'Create menu item CountDown MenuPick(15,30,45,60) 'Create a pick list for CountDown MenuItem("Manual LED",toggleLED) 'Manual LED control Menu Item MenuPick(On,Off) EndSubMenu EndMenu 'End custom menu creation 'Main Program BeginProg CycleNotes = "??????"...
  • Page 188: Data Input: Loading Large Data Sets

    7.9.4 Data Input: Loading Large Data Sets Large data sets, such as look up tables or tag numbers, can be loaded in the CR1000 for use by the CRBasic program. This is efficiently accomplished by using the Data, DataLong, and Read instructions, as demonstrated in CRBasic example Loading Large Data Sets (p.
  • Page 189 Section 7. Installation Initialize • Transpose • Copy • Mathematical • Logical • Examples include: Process a variable array without use of For/Next • • Create boolean arrays based on comparisons with another array or a scalar variable Copy a dimension to a new location •...
  • Page 190: Table 24. Crbasic Example. Array Assigned Expression: Sum Columns And Rows

    Section 7. Installation Table 24. CRBasic Example. Array Assigned Expression: Sum Columns and Rows 'This example sums three rows and two columns of a 3x2 array. 'Source array image: '1.23,2.34 '3.45,4.56 '5.67,6.78 Public Array(3,2) = {1.23,2.34,3.45,4.56,5.67,6.78}'load values into source array Public RowSum(3) Public...
  • Page 191: Table 26. Crbasic Example. Array Assigned Expression: Comparison Boolean Evaluation

    Section 7. Installation Table 26. CRBasic Example. Array Assigned Expression: Comparison / Boolean Evaluation 'Example: Comparison / Boolean Evaluation 'Element-wise comparisons is performed through scalar expansion or by comparing each 'element in one array to a similarly located element in another array to generate a 'resultant boolean array to be used for decision making and control, such as 'an array input to a SDM-CD16AC.
  • Page 192: Data Output: Calculating Running Average

    Section 7. Installation Table 27. CRBasic Example. Array Assigned Expression: Fill Array Dimension 'Example: Fill Array Dimension Public A(3) Public B(3,2) Public C(4,3,2) Public Da(3,2) = {1,1,1,1,1,1} Public Db(3,2) Public DMultiplier(3) = {10,100,1000} Public DOffset(3) = {1,2,3} BeginProg Scan(1,Sec,0,0) A() = 1 'set all elements of 1D array or first dimension to 1 B(1,1)() = 100 'set B(1,1) and B(1,2) to 100...
  • Page 193 Section 7. Installation elements of the array, instead of performing an independent running average on each element of the array. The results will be a running average of a spatial average of the various source array elements. A running average is a digital low-pass filter; its output is attenuated as a function of frequency, and its output is delayed in time.
  • Page 194: Figure 52. Running-Average Frequency Response

    Section 7. Installation 36 Hz / 50 Hz = 0.72 SIN(0.72π) / (0.72π) = 0.34. So, the recorded amplitude was about 1/3 of the input-signal amplitude. A CRBasic program was written with variables Accel2 and Accel2RA. The raw measurement was stored in Accel2. Accel2RA held the result of performing a running average on the Accel2.
  • Page 195: Data Output: Triggers And Omitting Samples

    Section 7. Installation Figure 53. Running-Average Signal Attenuation 7.9.7 Data Output: Triggers and Omitting Samples TrigVar is the third parameter in the DataTable() instruction. It controls whether or not a data record is written to final memory. TrigVar control is subject to other conditional instructions such as the DataInterval() and DataEvent() instructions.
  • Page 196: Figure 54. Data From Trigvar Program

    Section 7. Installation Figure 54. Data from TrigVar Program CRBasic Example 32. Using TrigVar to Trigger Data Storage 'This program example demonstrates the use of the TrigVar parameter in the DataTable() 'instruction to trigger data storage. In this example, the variable Counter is 'incremented by 1 at each scan.
  • Page 197: Data Output: Two Intervals In One Data Table

    Section 7. Installation 7.9.8 Data Output: Two Intervals in One Data Table CRBasic Example 33. Two Data-Output Intervals in One Data Table 'This program example demonstrates the use of two time intervals in a data table. One time 'interval in a data table is the norm, but some applications require two. 'A table with two time intervals should be allocated memory as is done with a conditional table: 'rather than auto-allocate, set a fixed number of records.
  • Page 198: Data Output: Using Data Type Bool8

    DataTable() instruction must be divisible by two, since an odd number of bytes cannot be stored. Also note that when the CR1000 converts a LONG or FLOAT data type to BOOL8, only the least significant eight bits of the binary equivalent are used, i.e., only the binary representation of the decimal integer modulo divide...
  • Page 199: Figure 55. Alarms Toggled In Bit-Shift Example

    Section 7. Installation Figure 55. Alarms Toggled in Bit-Shift Example Figure 56. Bool8 Data from Bit-Shift Example (Numeric Monitor)
  • Page 200: Figure 57. Bool8 Data From Bit-Shift Example (Pc Data File)

    Section 7. Installation Figure 57. Bool8 Data from Bit-Shift Example (PC Data File) CRBasic Example 34. Programming with Bool8 and a Bit-Shift Operator 'This program example demonstrates the use of the Bool8 data type and the ">>" bit-shift 'operator. Public Alarm(32) Public Flags...
  • Page 201 Section 7. Installation 'If bit in OR bit in The result 'Flags Is Bin/Hex Is '---------- ---------- ---------- 'Binary equivalent of Hex: Alarm(1) Then Flags = Flags &h1 &b1 Alarm(2) Then Flags = Flags &h2 &b10 Alarm(3) Then Flags = Flags &h4 &b100 Alarm(4)
  • Page 202: Data Output: Using Data Type Nsec

    Section 7. Installation FlagsBool8(1) = Flags &HFF 'AND 1st 8 bits of "Flags" & 11111111 FlagsBool8(2) = (Flags >> &HFF 'AND 2nd 8 bits of "Flags" & 11111111 FlagsBool8(3) = (Flags >> &HFF 'AND 3rd 8 bits of "Flags" & 11111111 FlagsBool8(4) = (Flags >>...
  • Page 203 Section 7. Installation CRBasic Example 35. NSEC — One Element Time Array 'This program example demonstrates the use of NSEC data type to determine seconds since '00:00:00 1 January 1990. A time stamp is retrieved into variable TimeVar(1) as seconds 'since 00:00:00 1 January 1990.
  • Page 204 Section 7. Installation 'Program BeginProg Scan(1,Sec,0,0) PanelTemp(PTempC,250) MaxVar = FirstTable.PTempC_Max TimeOfMaxVar = FirstTable.PTempC_TMx CallTable FirstTable CallTable SecondTable NextScan EndProg CRBasic Example 37. NSEC — Seven and Nine Element Time Arrays 'This program example demonstrates the use of NSEC data type to sample a time stamp into 'final-data memory using an array dimensioned to 7 or 9.
  • Page 205: Data Output: Writing High-Frequency Data To Memory Cards

    'This program example demonstrates the use of NSEC data type to convert a data time stamp 'to universal time. 'Application: the CR1000 needs to display Universal Time (UT) in human readable 'string forms. The CR1000 can calculate UT by adding the appropriate offset to a 'standard time stamp.
  • Page 206: Tablefile() With Option 64

    The best rule is to collect data from the CR1000 only as often as you can afford to lose the data. In other words, if you can afford to lose a months worth of data, you can afford to collect the data only once a month.
  • Page 207: Tablefile() With Option 64 Programming

    The TOB3 format that is used to write data to memory cards saves disk space. However, the resulting binary files must be converted to another format to be read or used by other programs. The CardConvert software, included in Campbell Scientific datalogger support software will convert data files from one (p.
  • Page 208: Tablefile() With Option 64 Q & A

    Section 7. Installation 7.9.11.5 TableFile() with Option 64 Q & A Q: How does Option 64 differ from other TableFile() options? A: Pre-allocation of memory combines with TOB3 data format to give Option 64 two principal advantages over other TableFile() options. These are: increased runtime write performance •...
  • Page 209 Q: Which memory card should I use? A: Campbell Scientific recommends and supports only the use of FMJ brand CF cards. These cards are industrial-grade and have passed Campbell Scientific hardware testing.
  • Page 210: Field Calibration - Details

    CAL (.cal) files. These data become the source for calibration factors when requested by the LoadFieldCal() instruction. A file is created automatically on the same CR1000 memory drive and given the same name as the program that creates and uses it. For example, the CRBasic program file CPU:MyProg.cr1...
  • Page 211: Field Calibration Programming

    (not to the CAL file). FieldCal() and FieldCalStrain() use the following reserved Boolean variable: NewFieldCal — a reserved Boolean variable under CR1000 control used to • optionally trigger a data storage output table one time after a calibration has succeeded.
  • Page 212: One-Point Calibrations (Zero Or Offset)

    Be aware of the following precautions: • The CR1000 does not check for out-of-bounds values in mode variables. Valid mode variable entries are 1 or 4. • Before, during, and after calibration, one of the following codes will be stored in the CalMode variable: Table 28.
  • Page 213: Two-Point Calibrations (Gain And Offset)

    These demonstration programs are provided as an aid in becoming familiar with the FieldCal() features at a test bench without actual sensors. For the purpose of the demonstration, sensor signals are simulated by CR1000 terminals configured for excitation. To reset tests, use the support software File Control menu (p.
  • Page 214: Fieldcal() Zero Or Tare (Opt 0) Example

    -5 % -5.25 % 1. Send CRBasic example FieldCal() Zero to the CR1000. A terminal (p. 214) configured for excitation has been programmed to simulate a sensor output. 2. To place the simulated RH sensor in a simulated-calibration condition (in the field it would be placed in a desiccated chamber), place a jumper wire between terminals VX1 and SE1.
  • Page 215 'offset is added to the measurement: SimulatedRHSignal = 1000 'NOTE: This program places a .cal file on the CPU: drive of the CR1000. The .cal file must 'be erased to reset the demonstration. 'DECLARE SIMULATED SIGNAL VARIABLE AND SET INITIAL MILLIVOLT SIGNAL MAGNITUDE...
  • Page 216: Fieldcal() Offset (Opt 1) Example

    30 mg/l Salinity reading 1. Send CRBasic example FieldCal() Offset to the CR1000. A terminal (p. 217) configured for excitation has been programmed to simulate a sensor output. 2. To simulate the salinity sensor in a simulated-calibration condition, (in the field it would be placed in a 30 mg/l standard solution), place a jumper wire between terminals VX1 and SE1.
  • Page 217 'the simulated sensor signal and note how the new offset is added to the measurement: SimulatedSalinitySignal = 1345 'NOTE: This program places a .cal file on the CPU: drive of the CR1000. The .cal file must 'be erased to reset the demonstration.
  • Page 218: Fieldcal() Slope And Offset (Opt 2) Example

    1. Send CRBasic example FieldCal() Two-Point Slope and Offset to the (p. 219) CR1000. 2. To place the simulated flow sensor in a simulated calibration condition (in the field a real sensor would be placed in a condition of know flow), place a...
  • Page 219 -- Measure the 'sensor' signal. -- Calculate and apply a multiplier and offset. 'You can set up the simulation by loading this program into the CR1000 and interconnecting 'the following terminals with a jumper wire to simulate a flow sensor signal as follows:...
  • Page 220: Fieldcal() Slope (Opt 3) Example

    'how the new multiplier and offset scale the measurement: SimulatedFlowSignal = 1000 'NOTE: This program places a .cal file on the CPU: drive of the CR1000. The .cal file must 'be erased to reset the demonstration. 'DECLARE SIMULATED SIGNAL VARIABLE AND SET INITIAL MAGNITUDE...
  • Page 221: Table 32. Calibration Report For Water Content Sensor

    0.0476 %/mV The following procedure sets the sensitivity of a simulated soil water-content sensor. 1. Send CRBasic example FieldCal() Multiplier to the CR1000. (p. 221) 2. To simulate the soil-water sensor signal, place a jumper wire between terminals VX1 and SE1.
  • Page 222 'as follows and note how the new multiplier scales the measurement: SimulatedWaterContentSignal = 350 'NOTE: This program places a .cal file on the CPU: drive of the CR1000. The .cal file must 'be erased to reset the demonstration. 'DECLARE SIMULATED SIGNAL VARIABLE AND SET INITIAL MAGNITUDE...
  • Page 223: Fieldcal() Zero Basis (Opt 4) Example -- 8

    (p. 223) Strain-gage systems consist of one or more strain gages, a resistive bridge in which the gage resides, and a measurement device such as the CR1000 datalogger. The FieldCalStrain() instruction facilitates shunt calibration of strain-gage systems and is designed exclusively for strain applications wherein microstrain is the unit of measure.
  • Page 224: Field Calibration Strain Examples

    Strain-gage manufacturers typically specify and supply a range of resistors available for shunt calibration. 3. Shunt calibration verifies the function of the CR1000. 4. The zero function of FieldCalStrain() allows a particular strain to be set as an arbitrary zero, if desired.
  • Page 225: Figure 58. Quarter-Bridge Strain-Gage With Rc Resistor Shunt

    Section 7. Installation Figure 58. Quarter-Bridge Strain-Gage with RC Resistor Shunt CRBasic Example 44. FieldCalStrain() Calibration 'This program example demonstrates the use of the FieldCalStrain() instruction by measuring 'quarter-bridge strain-gage measurements. Public Raw_mVperV Public MicroStrain 'Variables that are arguments in the Zero Function Public Zero_Mode Public...
  • Page 226: Fieldcalstrain() Quarter-Bridge Shunt Example

    7.9.12.6.3 FieldCalStrain() Quarter-Bridge Shunt Example With CRBasic example FieldCalStrain() Calibration sent to the CR1000, (p. 225) and the strain gage stable, use the CR1000KD 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...
  • Page 227: Fieldcalstrain() Quarter-Bridge Zero

    Section 7. Installation Figure 60. Strain-Gage Shunt Calibration Finish 7.9.12.6.4 FieldCalStrain() Quarter-Bridge Zero Continuing from FieldCalStrain() Quarter-Bridge Shunt Example keep the (p. 226), 249 kΩ resistor in place to simulate a strain. Using the CR1000KD Keyboard Display or software numeric monitor, change the value in variable Zero_Mode to 1 to start the zero calibration as shown in figure Zero Procedure Start (p.
  • Page 228: Measurement: Excite, Delay, Measure

    Section 7. Installation 7.9.13 Measurement: Excite, Delay, Measure This example demonstrates how to make voltage measurements that require excitation of controllable length prior to measurement. Overcoming the delay caused by a very long cable length on a sensor is a common application for this technique.
  • Page 229: Measurement: Faster Analog Rates

    Section 7. Installation 7.9.14 Measurement: Faster Analog Rates Certain data acquisition applications require the CR1000 to make analog measurements at rates faster than once per second (> 1 Hz ). The CR1000 (p. 517) can make continuous measurements at rates up to 100 Hz, and bursts (p.
  • Page 230: Measurements From 1 To 100 Hz

    Section 7. Installation Table 33. Summary of Analog Voltage Measurement Rates Maximum 100 Hz 600 Hz 2000 Hz Rate Number of Multiple inputs Fewer inputs One input Simultaneous Inputs Maximum 100% < 100% < 100% Duty Cycle Maximum Measaurements Variable 65535 Per Burst Near simultaneous...
  • Page 231: Measurement Rate: 101 To 600 Hz

    Each burst lasts for some fraction of the scan interval. During the remainder of the scan interval, the CR1000 processor catches up on overhead tasks and processes data stored in the buffers. For example, the CR1000 can be programmed to measure VoltSE() on...
  • Page 232: Measurements From 101 To 600 Hz 2

    SkippedScan BuffDepth (p. 628), (p. 612), registers in the CR1000 Status table may give insight into MaxBuffDepth (p. 620) the use of buffer resources. Bear in mind that when the number of Scan() / NextScan buffers is exceeded, a skipped scan, and so a missed-data event, will occur.
  • Page 233: Measurement Rate: 601 To 2000 Hz

    Section 7. Installation follows: since all sub-scans have to complete before the task sequencer can set the delay for the main scan, processing is delayed until this point (20 ms in the above example). So more memory is required for the raw buffer space for the sub-scan mode to run at the same speed as the non-sub-scan mode, and there will be more delay before all the processing is complete for the burst.
  • Page 234: Measurement: Prt

    Section 7. Installation Table 34. 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 one input. For example, the command, FastTemp(500) Destination dimensions array FastTemp() to store 500 measurements (one second of data at 500 Hz, one-half second of data at 1000 Hz, etc.)
  • Page 235: Measuring Pt100S (100 Ω Prts)

    650 °C, a direct solution to the CVD equation results in errors < ±0.0005 °C (caused by rounding errors in CR1000 math). For the range of –200 to 0 °C, a fourth-order polynomial is used to convert resistance to temperature resulting in errors of <...
  • Page 236: Table 35. Prtcalc() Type-Code-1 Sensor

    Depending on the code entered for parameter Type, which specifies the platinum- resistance sensor type, coefficients are assigned values according to the following tables. Note Coefficients are rounded to the seventh significant digit to match the CR1000 math resolution. Alpha is defined as: α = (R – R ) / (100 •...
  • Page 237: Table 36. Prtcalc() Type-Code-2 Sensor

    Section 7. Installation Table 36. PRTCalc() Type-Code-2 Sensor US Industrial Standard, alpha = 0.00392 (Reference: Logan Enterprises) Constant Coefficient 3.9786300E-03 -2.3452400E-06 1.8174740E-05 -1.1726200E-06 1.7043690E+00 -2.7795010E+00 8.8078440E+00 2.5129740E+02 Table 37. PRTCalc() Type-Code-3 Sensor US Industrial Standard, alpha = 0.00391 (Reference: OMIL R84 (2003)) Constant Coefficient 3.9690000E-03...
  • Page 238: Pt100 In Four-Wire Half-Bridge

    Section 7. Installation Table 39. PRTCalc() Type-Code-5 Sensor Honeywell Industrial Sensors, alpha = 0.00375 (Reference: Honeywell) Constant Coefficient 3.8100000E-03 -2.4080000E-06 1.6924100E-05 -1.2040000E-06 2.1790930E+00 -5.4315860E+00 9.9196550E+00 2.6238290E+02 Table 40. PRTCalc() Type-Code-6 Sensor Standard ITS-90 SPRT, alpha = 0.003926 (Reference: Minco / Instrunet) Constant Coefficient 3.9848000E-03...
  • Page 239: Calculating The Excitation Voltage

    Next solve for V = I*(R ) = 2.21 V If the actual resistances were the nominal values, the CR1000 would not over range with V = 2.2 V. However, to allow for the tolerance in actual resistors, set equal to 2.1 V (e.g., if the 10 kΩ resistor is 5% low, i.e., )=115.54 / 9715.54, and V...
  • Page 240: Choosing Rf

    Section 7. Installation 7.9.15.2.3 Choosing Rf The fixed 100 Ω resistor must be thermally stable. Its precision is not important because the exact resistance is incorporated, along with that of the PRT, into the 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°...
  • Page 241: Pt100 In Three-Wire Half Bridge

    Section 7. Installation 7.9.15.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 terminals configured for analog input as four-wire half- • bridge. Disadvantages: May not be as accurate as four-wire half-bridge. •...
  • Page 242: Pt100 In Four-Wire Full-Bridge

    Section 7. Installation A terminal input module can be used to complete the circuit in figure PT100 in Three-Wire Half-Bridge Refer to the appendix Signal Conditioners (p. 242). (p. 647) for information concerning available TIM modules. Figure 64. PT100 in Three-Wire Half-Bridge CRBasic Example 51.
  • Page 243 Section 7. Installation BRFull(). In this example, the PRT is in a constant-temperature bath and the measurement is to be used as the input for a control algorithm. As described in table Resistive-Bridge Circuits with Voltage Excitation (p. 338), result of BRFull() is X, X = 1000 V where, = measured bridge-output voltage...
  • Page 244: Plc Control - Details

    Section 7. Installation The ±5 ppm per °C temperature coefficient of the fixed resistors was chosen because the ±0.01% accuracy tolerance would hold over the desired temperature range. Figure 65. PT100 in Four-Wire Full-Bridge CRBasic Example 52. PT100 in Four-Wire Full-Bridge 'This program example demonstrates the measurement of a 100-ohm four-wire full bridge.
  • Page 245: Serial I/O: Capturing Serial Data

    CR1000. The CR1000 receives and reconstructs these voltage levels as "11001010." Because an RS-232 or TTL standard is adhered to by both the instrument and the CR1000, the byte successfully passes between them.
  • Page 246: I/O Ports

    Procomm, are useful tools in serial I/O development since they handle this and other idiosyncrasies of serial communication. When a standardized serial protocol is supported by the CR1000, such as PakBus® or Modbus, translation of bytes is relatively easy and transparent.
  • Page 247: Protocols

    5 Vdc peripherals only) 7.9.17.3 Protocols PakBus is the protocol native to the CR1000 and transparently handles routine point-to-point and network communications among PCs and Campbell Scientific dataloggers. Modbus and DNP3 are industry-standard networking SCADA protocols that optionally operate in the CR1000 with minimal user configuration.
  • Page 248 Term. little endian "Little end first." Placing the most significant integer at the end of a numeric word, reading left to right. The processor in the CR1000 is MSB, or puts the most significant integer first. See the appendix Endianness (p.
  • Page 249: Serial I/O Crbasic Programming

    Is the end of the data bits. The stop bit can be 1, 1.5 or 2. Term. TX Transmit 7.9.17.5 Serial I/O CRBasic Programming To transmit or receive RS-232 or TTL signals, a serial port (see table CR1000 must be opened and configured through CRBasic with the Serial Ports (p. 247)) SerialOpen() instruction.
  • Page 250: Serial I/O Programming Basics

    Section 7. Installation from the buffer to variables. Once data are in variables, string manipulation instructions are used to format and parse the data. SerialClose() must be executed before SerialOpen() can be used again to reconfigure the same serial port, or before the port can be used to communicate with a PC.
  • Page 251: Serial I/O Input Programming Basics

    Will the sensor be sending multiple data strings? Multiple strings usually require filtering before parsing. How fast will data be sent to the CR1000? Is power consumption critical? Does the sensor compute a checksum? Which type? A checksum is useful to test for data corruption.
  • Page 252: Serial I/O Output Programming Basics

    Example: SerialOpen(Com1,9600,0,0,10000) Designate the correct port in CRBasic. Correctly wire the device to the CR1000. Match the port baud rate to the baud rate of the device in CRBasic. Use a fixed baud rate (rather than auto baud) when possible.
  • Page 253: Serial I/O Translating Bytes

    Binary — Bytes are processed on a bit-by-bit basis. Character 0 (Null, • &b00) is a valid part of binary data streams. However, the CR1000 uses Null terminated strings, so anytime a Null is received, a string is terminated. The termination is usually premature when reading binary data.
  • Page 254: Demonstration Program

    If the sensor sends multiple strings at once, consider declaring a single string variable and read incoming strings one at a time. The CR1000 adjusts upward 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 the length divisible by four.
  • Page 255 Section 7. Installation CRBasic Example 53. Receiving an RS-232 String 'This program example demonstrates CR1000 serial I/O features by: 1. Simulating a serial sensor 2. Transmitting a serial string via COM1 TX. 'The serial string is received at COM2 RX via jumper wire.
  • Page 256: Serial I/O Application Testing

    Section 7. Installation 'Receive serial data as a string '42 is ASCII code for "*", 35 is code for "#" SerialInRecord(Com2,SerialInString,42,0,35,"",01) 'Parse the serial string SplitStr(InStringSplit(),SerialInString,"",2,0) NextScan EndProg 7.9.17.6 Serial I/O Application Testing A common problem when developing a serial I/O application is the lack of an immediately available serial device with which to develop and test programs.
  • Page 257: Figure 67. Hyperterminal Connect-To Settings

    Section 7. Installation Figure 67. HyperTerminal Connect-To Settings Figure 68. HyperTerminal COM-Port Settings Tab Click File | Properties | Settings | ASCII Setup... and set as shown.
  • Page 258: Create Send-Text File

    HyperTerminal Send Text-File Example (p. 258) ® ® ® [2008:028:10:36:22]C to the CR1000. Use Notepad (Microsoft Windows utility) or some other text editor that will not place hidden characters in the file. Figure 70. HyperTerminal Send Text-File Example To send the file, click Transfer | Send Text File | Browse for file, then click OK.
  • Page 259: Serial I/O Example Ii

    Campbell Scientific time set C command. Exported data has the form of the legacy Campbell Scientific Printable ASCII format. Note The nine-pin RS-232 port can be used to download the CR1000 program if the SerialOpen() baud rate matches that of the datalogger support software (p.
  • Page 260 CRBasic Example 54. Measure Sensors / Send RS-232 Data 'This program example demonstrates the import and export serial data via the CR1000 RS-232 'port. Imported data are expected to have the form of the legacy Campbell Scientific 'time set C command:...
  • Page 261 Section 7. Installation 'Subroutine to convert date formats (day-of-year to month and date) DOY2MODAY 'Store Year, DOY, Hour, Minute and Second to Input Locations. Year = InStringSplit(1) DOY = InStringSplit(2) Hour = InStringSplit(3) Minute = InStringSplit(4) Second = InStringSplit(5) uSecond = 0 'Check if it is a leap year: 'If Year Mod 4 = 0 and Year Mod 100 <>...
  • Page 262 Section 7. Installation Case Is < 214 Month = 7 Date = DOY + -182 Case Is < 245 Month = 8 Date = DOY + -213 Case Is < 275 Month = 9 Date = DOY + -244 Case Is <...
  • Page 263 Section 7. Installation Case Is < 305 Month = 10 Date = DOY + -273 Case Is < 336 Month = 11 Date = DOY + -304 Case Is < 366 Month = 12 Date = DOY + -334 EndSelect EndIf EndSub '//////////////////////////// PROGRAM ////////////////////////////...
  • Page 264: Serial I/O Q & A

    EndIf NextScan EndProg 7.9.17.7 Serial I/O Q & A Q: I am writing a CR1000 program to transmit a serial command that contains a null character. The string to transmit is: CHR(02)+CHR(01)+"CWGT0"+CHR(03)+CHR(00)+CHR(13)+CHR(10) How does the logger handle the null character? Is there a way that we can get the logger to send this? A: Strings created with CRBasic are NULL terminated.
  • Page 265 For this reason SerialOpen() leaves the interface powered up so no incoming bytes are lost. When the CR1000 has data to send with the RS-232 port, if the data are not a response to a received packet, such as sending a beacon, it will power up the interface, send the data, and return to the "dormant"...
  • Page 266 Q: Tests with an oscilloscope showed the sensor was responding quickly, but the data were getting held up in the internals of the CR1000 somewhere for 30 ms or so. Characters at the start of a response from a sensor, which come out in 5 ms, were apparently not accessible by the program for 30 ms or so;...
  • Page 267: Serial I/O: Sdi-12 Sensor Support - Programming Resource

    SDI-12 standard v 1.3 sensors accept addresses 0 through 9, a through z, and A through Z. For a CRBasic programming example demonstrating the changing of an SDI-12 address on the fly, see Campbell Scientific publication PS200/CH200 12 V Charging Regulators, which is available at www.campbellsci.com.
  • Page 268: Transparent Mode Commands

    Section 7. Installation transparent mode is active and ready to transmit SDI-12 commands and display responses. Figure 72. Entering SDI-12 Transparent Mode 7.9.18.1.1 SDI-12 Transparent Mode Commands Commands have three components: Sensor address (a) — a single character, and is the first character of the •...
  • Page 269: Table 43. Sdi-12 Commands For Transparent Mode

    013CampbellCS1234003STD.03.01 means address = 0, SDI-12 protocol Send Identification version number = 1.3, manufacturer is Campbell Scientific, CS1234 is the sensor model number (fictitious in this example), 003 is the sensor version number, STD.03.01 indicates the sensor revision number is .01.
  • Page 270 Section 7. Installation aAb! Changes the sensor address. a is the current address and b is the new address. Response is the new address. Syntax: aAb! Requests the sensor identification. Response is defined by the sensor manufacturer, but usually includes the sensor address, SDI-12 version, manufacturer's name, and sensor model information.
  • Page 271 SDI-12 Send Data Command Send data commands are normally issued automatically by the CR1000 after the aMv! or aCv! measurement commands. In transparent mode through CR1000 terminal commands, you need to issue these commands in series. When in automatic mode, if the expected number of data values are not returned in response to a aD0! command, the datalogger issues aD1!, aD2!, etc., until all data...
  • Page 272: Recorder Mode

    Example Syntax: aR5! 7.9.18.2 SDI-12 Recorder Mode The CR1000 can be programmed to act as an SDI-12 recording device or as an SDI-12 sensor. For troubleshooting purposes, responses to SDI-12 commands can be captured in programmed mode by placing a variable declared As String in the variable parameter.
  • Page 273 Sensor: responds with data CR1000: issues aCv! command (to request data for next scan) CR1000: tests to see if ttt expired. If ttt not expired, loads 1e9 into first variable and Alternate Concurrent Measurement then moves to next CRBasic instruction. If ttt expired, issues aDv! command(s).
  • Page 274 The SDIRecorder() aCv command facilitates using the SDI-12 standard Start Concurrent command (aCv!) without the back-to-back measurement sequence normal to the CR1000 implementation of aCv!. Consider an application wherein four SDI-12 temperature sensors need to be near- simultaneously measured at a five minute interval within a program that scans every five seconds.
  • Page 275 EndProg A new problem introduced by the C! command, however, is that it causes high power usage by the CR1000. This application has a very tight power budget. Since the C! command reissues a measurement request immediately after receiving data, the sensors will be in a high power state continuously. To remedy...
  • Page 276 DataTable(Temp,True,0) DataInterval(0,5,Min,10) Sample(4,Temp(),FP2) EndTable BeginProg Scan(5,Sec,0,0) PanelTemp(Temp(1),250) 'Measure CR1000 wiring panel temperature to use as base for 'simulated temperatures Temp(2), Temp(3), and Temp(4). Temp(2) = Temp(1) + 5 Temp(3) = Temp(1) + 10 Temp(4) = Temp(1) + 15 CallTable Temp...
  • Page 277 Section 7. Installation SlowSequence SDI12SensorSetup(1,7,3,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(4)) Loop EndSequence EndProg CRBasic Example 56. Using Alternate Concurrent Command (aC) 'This program example demonstrates the use of the special SDI-12 concurrent measurement 'command (aC) when back-to-back measurements are not desired, as can occur in an application 'that has a tight power budget.
  • Page 278 Section 7. Installation 'Measure SDI-12 sensors SDI12Recorder(Temp_Tmp(1),1,0,cmd(1),1.0,0) SDI12Recorder(Temp_Tmp(2),1,1,cmd(2),1.0,0) SDI12Recorder(Temp_Tmp(3),1,2,cmd(3),1.0,0) SDI12Recorder(Temp_Tmp(4),1,3,cmd(4),1.0,0) 'Control Measurement Event X = 1 cmd(X) = "C!" Then Retry(X) = Retry(X) + 1 Retry(X) > 2 Then IndDone(X) = -1 'Test to see if ttt expired. If ttt not expired, load "1e9" into first variable 'then move to next instruction.
  • Page 279: Sensor Mode

    The SDI12SensorSetup() / SDI12SensorResponse() instruction pair programs the CR1000 to behave as an SDI-12 sensor. A common use of this feature is the transfer of data from the CR1000 to other Campbell Scientific dataloggers over a single-wire interface (terminal configured for SDI-12 to terminal configured for SDI-12), or to transfer data to a third-party SDI-12 recorder.
  • Page 280 The following rules apply: (p. 269) 1. A CR1000 can be assigned only one SDI-12 address per SDI-12 port. For example, a CR1000 will not respond to both 0M! AND 1M! on SDI-12 port C1. However, different SDI-12 ports can have unique SDI-12 addresses. Use a separate SlowSequence for each SDI-12 port configured as a sensor.
  • Page 281: Power Considerations

    7.9.18.4 SDI-12 Power Considerations When a command is sent by the CR1000 to an SDI-12 probe, all probes on the same SDI-12 port will wake up. However, only the probe addressed by the datalogger will respond. All other probes will remain active until the timeout period expires.
  • Page 282: String Operations

    Section 7. Installation Table 45. Example Power Usage Profile for a Network of SDI-12 Probes Time Probes Total Time (s) Command Awake Expires 1 mA 2 mA 3 mA 4 mA • • • • • • • • • •...
  • Page 283: String Concatenation

    Section 7. Installation Table 46. 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.
  • Page 284: Table 47. String Concatenation Examples

    Section 7. Installation + operation is performed. When working with strings, exclusive use of the & operator ensures that no string value will be converted to an integer. Table 47. String Concatenation Examples Expression Comments Result Add floats, concatenate strings Str(1) = 5.4 + 3 + "...
  • Page 285: String Null Character

    Section 7. Installation I += 1 Num(I) = 1 + 2 + "3" + 4 + 5 + "6" '= 33456 I += 1 Num(I) = 1 + 2 + "3" + (4 + 5) + "6" '= 3396 I += 1 Num(I) = 1 + 2 + "3"...
  • Page 286: Inserting String Characters

    Section 7. Installation but, StringVar(3) still = "123<NULL>56789", StringVar(5) = StringVar(3,1,4+1) '"56789" StringVar(6) = StringVar(3) + 4 + StringVar(3,1,4+1) '"123456789" Some smart sensors send strings containing NULL characters. To manipulate a string that has NULL characters within it (in addition to being terminated with another NULL), use MoveBytes() instruction.
  • Page 287: String Use Of Ascii / Ansii Codes

    CRBasic Example 60. Formatting Strings 'This program example demonstrates the formatting of string variables. To run the 'demonstration, send this program to the CR1000. String formatting will occur 'automatically. 'Objective: 'Extract "12.4 Volts" from the string "The battery is 12.4 Volts"...
  • Page 288: Formatting String Hexadecimal Variables

    Section 7. Installation 7.9.19.8 Formatting String Hexadecimal Variables Table 52. Formatting Hexadecimal Variables — Examples Expression Comment Result Add leading zero to hex step 1 3338 CRLFNumeric(1) = &H0d0a Add leading zero to hex step 2 0D0A StringVar(20) = "0" & Hex(CRLFNumeric) Convert Hex string to Float 3338.00 CRLFNumeric(2) = HexToDec(Strings(20))
  • Page 289: Tcp/Ip - Details

    Section 7. Installation CRBasic Example 61. Subroutine with Global and Local Variables 'This program example demonstrates the use of global and local variables with subroutines. 'Global variables are those declared anywhere in the program as Public or Dim. 'Local variables are those declared in the Sub() instruction. 'Program Function: Passes two variables to a subroutine.
  • Page 290: Pakbus Over Tcp/Ip And Callback

    TCP/IP (p. 593). Read More Specific information concerning the use of digital-cellular modems for TCP/IP can be found in Campbell Scientific manuals for those modems. For information on available TCP/IP/PPP devices, refer to the appendix Network Links for model numbers. Detailed information on use of TCP/IP/PPP (p.
  • Page 291: Default Http Web Server

    Section 7. Installation 7.9.21.2 Default HTTP Web Server The CR1000 has a default home page built into the operating system. The home page can be accessed using the following URL: http:\\ipaddress:80 Note Port 80 is implied if the port is not otherwise specified.
  • Page 292: Figure 74. Home Page Created Using Webpagebegin() Instruction

    Home Page Created using WebPageBegin() Instruction (p. 292). The Campbell Scientific logo in the web page comes from a file called SHIELDWEB2.JPG that must be transferred from the PC to the CR1000 CPU: drive using File Control in the datalogger support software.
  • Page 293: Figure 75. Customized Numeric-Monitor Web

    'This program example demonstrates the creation of a custom web page that resides in the 'CR1000. In this example program, the default home page is replaced by using WebPageBegin to 'create a file called default.html. The graphic in the web page (in this case, the Campbell 'Scientific logo) comes from a file called SHIELDWEB2.JPG.
  • Page 294: Ftp Server

    Files can be deleted through FTP. 7.9.21.5 FTP Client The CR1000 can act as an FTP client to send a file or get a file from an FTP server, such as another datalogger or web camera. This is done using the CRBasic FTPClient() instruction.
  • Page 295: Telnet

    7.9.21.8 Ping (IP) Ping can be used to verify that the IP address for the network device connected to the CR1000 is reachable. To use the Ping tool, open a command prompt on a computer connected to the network and type in: ping xxx.xxx.xxx.xxx <Enter>...
  • Page 296: Dns

    Section 7. Installation 7.9.21.12 The CR1000 provides a Domain Name Server (DNS) client that can query a DNS server to determine if an IP address has been mapped to a hostname. If it has, then the hostname can be used interchangeably with the IP address in some datalogger instructions.
  • Page 297: Wind Vector Processing

    WVc(1): Unit vector mean wind direction (Θ1) WVc(2): Standard deviation of wind direction σ(Θu). This standard deviation is calculated using Campbell Scientific's wind speed weighted algorithm. Use of the resultant mean horizontal wind direction is not recommended for straight-line Gaussian dispersion models, but may be used to model transport direction in a variable-trajectory model.
  • Page 298: Measured Raw Data

    Section 7. Installation The EPA recommends hourly standard deviation of horizontal wind direction (sigma theta) be computed from four fifteen-minute sub-intervals. 7.9.22.2.1 Measured Raw Data : horizontal wind speed • Θ : horizontal wind direction • • : east-west component of wind •...
  • Page 299: Figure 77. Mean Wind-Vector Graph

    Section 7. Installation where or, in the case of orthogonal sensors where Standard deviation of wind direction (Yamartino algorithm) where, and Ux and Uy are as defined above. Mean Wind Vector Resultant mean horizontal wind speed, Ū: Figure 77. Mean Wind-Vector Graph where for polar sensors:...
  • Page 300: Figure 78. Standard Deviation Of Direction

    Section 7. Installation 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, as shown in the figure Standard...
  • Page 301 0 if the deviations in speed are not correlated with the deviation in direction. This assumption has been verified in tests on wind data by Campbell Scientific; the Air Resources Laboratory, NOAA, Idaho Falls, ID; and MERDI, Butte, MT.
  • Page 303: Operation

    The time stamp in common CRBasic programs matches the time at the beginning of the current scan as measured by the real-time clock in the CR1000. If a scan starts at 15:00:00, data output during that scan will have a time stamp of 15:00:00 regardless of the length of the scan or when in the scan a measurement is made.
  • Page 304 Skew can be avoided by • Making measurements in the scan before time-consuming code. Programming the CR1000 such that the time stamp reflects the system time • rather than the scan time. When CallTable() is executed from within the Scan() / NextScan construct, as is normally done, the time stamp reflects scan time.
  • Page 305: Analog Measurements - Details

    8.1.2 Analog Measurements — Details Related Topics: • Analog Measurements — Overview (p. 63) • Analog Measurements — Details (p. 305) The CR1000 measures the following sensor analog output types: Voltage • Single-ended Differential Current (using a resistive shunt) •...
  • Page 306: Figure 79. Simplified Voltage Measurement Sequence

    Section 8. Operation FIGURE. Simplified Voltage Measurement Sequence -- 8 10 30 Figure 79. Simplified voltage measurement sequence Voltage measurements are made using a successive approximation A-to-D (p. 507) converter to achieve a resolution of 14 bits. Prior to the A-to-D, a high impedance programmable-gain instrumentation amplifier (PGIA) amplifies the signal.
  • Page 307: Table 54. Crbasic Parameters Varying Measurement Sequence And Timing

    Section 8. Operation The CR1000 measures analog voltage by integrating the input signal for a fixed duration and then holding the integrated value during the successive approximation analog-to-digital (A-to-D) conversion. The CR1000 can make and store measurements from up to eight differential or 16 single-ended channels...
  • Page 308: Voltage Measurement Limitations

    Section 8. Operation numbered SE terminals on the CR1000 wiring panel. The single-ended configuration is used with the following CRBasic instructions: VoltSE() • BrHalf() • BrHalf3W() • TCSE() • • Therm107() • Therm108() Therm109() • Thermistor() • Related Topics: • Differential Measurements — Overview (p.
  • Page 309: Table 55. Analog Voltage Input Ranges And Options

    An approximate 9% range overhead exists on fixed input voltage ranges. In other words, over-range on the ±2500 mV input range occurs at approximately 2725 mV and –2725 mV. The CR1000 indicates a measurement over-range by returning a NAN (not a number) for the measurement.
  • Page 310 • Common-mode range is not a fixed number. It varies with respect to the magnitude of the input voltage. • The CR1000 has features that help mitigate some of the effects of signals that exceed the Input Limits specification or the common-mode range.
  • Page 311: Voltage Measurement Quality

    Section 8. Operation Figure 81. PGIA with Input-Signal Decomposition – 8.1.2.1.3 Voltage Measurement Quality Read More Consult the following technical papers at www.campbellsci.com/app- notes (http://www.campbellsci.com/app-notes) for in-depth treatments of several topics addressing voltage measurement quality: • Preventing and Attacking Measurement Noise Problems •...
  • Page 312 Because a single-ended measurement is referenced to CR1000 ground, any difference in ground potential between the sensor and the CR1000 will result in an error in the measurement. For example, if the measuring junction of a copper-...
  • Page 313: Table 56. Analog-Voltage Measurement Accuracy 1

    Measurement Offsets (p. 313). Note Error discussed in this section and error-related specifications of the CR1000 do not include error introduced by the sensor or by the transmission of the sensor signal to the CR1000. Table 56. Analog-Voltage Measurement Accuracy 0 to 40 °C...
  • Page 314: Measurement With Input Reversal At A Temperature Between 0 To 40 °C

    Section 8. Operation 0.33 0.67 Note — see Specifications for a complete tabulation of measurement resolution (p. 97) As an example, figure Voltage Measurement Accuracy Band Example (p. 314) shows changes in accuracy as input voltage changes on the ±2500 input range. Percent-of-reading is the principle component, so accuracy improves as input voltage decreases.
  • Page 315 Therefore, accuracy = ±1.5 mV + 1.00 mV = ±2.5 mV Integration The CR1000 incorporates circuitry to perform an analog integration on voltages to be measured prior to the A-to-D conversion. Integrating the the analog (p. 507) signal removes noise that creates error in the measurement. Slow integration removes more noise than fast integration.
  • Page 316: Figure 83. Ac-Power Noise-Rejection Techniques

    FIGURE. Ac power line noise rejection techniques -- 8 10 30 Figure 83. Ac-Power Noise-Rejection Techniques The CR1000 rejects ac power line noise on all voltage ranges except mV5000 and mV2500 by integrating the measurement over exactly one full ac cycle before A-...
  • Page 317: Table 60. Ac Noise Rejection On Small Signals 1

    3. Excitation is switched on again for one-half cycle, then the second measurement is made. Restated, when the CR1000 is programmed to use the half-cycle 50 Hz or 60 Hz rejection techniques, a sensor does not see a continuous excitation of the length entered as the settling time before the second measurement — if the settling time entered is greater than one-half cycle.
  • Page 318: Figure 84. Input-Voltage Rise And Transient Decay

    Measurement time of a given instruction increases with increasing settling time. For example, a 1 ms increase in settling time for a bridge instruction with input reversal and excitation reversal results in a 4 ms increase in time for the CR1000 to perform the instruction.
  • Page 319 (p. 319). Measuring Settling Time Settling time for a particular sensor and cable can be measured with the CR1000. Programming a series of measurements with increasing settling times will yield data that indicate at what settling time a further increase results in negligible change in the measured voltage.
  • Page 320 Measuring Settling Time 'This program example demonstrates the measurement of settling time using a single 'measurement instruction multiple times in succession. In this case, the program measures 'the temperature of the CR1000 wiring panel. Public RefTemp 'Declare variable to receive instruction BeginProg...
  • Page 321: Figure 85. Settling Time For Pressure Transducer

    Open-Input Detect Note Much of the information in the following section is highly technical and is not necessary for the routine operation of the CR1000. The information is included to foster a deeper understanding of the open-input detection feature of the CR1000.
  • Page 322: Table 64. Range-Code Option C Over-Voltages

    Section 8. Operation Appending the Range code with a C results in a 50 µs internal connection of the V+ input of the PGIA to a large over-voltage. The V– input is connected to ground. Upon disconnecting the inputs, the true input signal is allowed to settle and the measurement is made normally.
  • Page 323 Currents >5 mA are usually undesirable. The error can be avoided by routing power grounds from these other devices to a power ground G terminal on the CR1000 wiring panel, rather than using a signal ground ( ) terminal.
  • Page 324 PGIA inputs grounded. For differential measurements without input reversal, this offset voltage measurement is performed as part of the routine auto-calibration of the CR1000. Single-ended measurement instructions VoltSE() and TCSe() MeasOff parameter determines whether the offset voltage measured is done at the beginning of measurement instruction, or as part of self-calibration.
  • Page 325: Table 65. Offset Voltage Compensation Options

    5.003 mV – (–4.997 mV) = 10.000 mV 10.000 mV / 2 = 5.000 mV When the CR1000 reverses differential inputs or excitation polarity, it delays the same settling time after the reversal as it does before the first sub-measurement.
  • Page 326 Excitation Reversal for Voltage Measurements" is available at www.campbellsci.com. Ground Reference Offset Voltage When MeasOff is enabled (= True), the CR1000 measures the offset voltage of the ground reference prior to each VoltSe() or TCSe() measurement. This offset voltage is subtracted from the subsequent measurement.
  • Page 327: Thermocouple Measurements - Details

    To facilitate thermocouple measurements, a thermistor is integrated into the CR1000 wiring panel for measurement of the reference junction temperature by means of the PanelTemp() instruction.
  • Page 328 In a typical installation where the CR1000 is in a weather-tight enclosure not subject to violent swings in temperature or uneven solar radiation loading, the temperature difference between the terminals and the thermistor is likely to be less than 0.2 °C.
  • Page 329: Figure 86. Panel-Temperature Error Summary

    Section 8. Operation Figure 86. Panel-Temperature Error Summary Figure 87. Panel-Temperature Gradients (low temperature to high)
  • Page 330: Figure 88. Panel-Temperature Gradients (High Temperature To Low)

    ANSI limits of error for standard and special (p. 331) grade thermocouple wire of the types accommodated by the CR1000. When both junctions of a thermocouple are at the same temperature, no voltage is generated, a result of the law of intermediate metals. A consequence of this is that a thermocouple cannot have an offset error;...
  • Page 331: Table 66. Limits Of Error For Thermocouple Wire (Reference Junction At 0°C)

    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 CR1000, accuracy and sensitivity are compromised. Table Voltage Range for Maximum Thermocouple lists high resolution ranges available for various thermocouple Resolution (p.
  • Page 332: Figure 89. Input Error Calculation

    Input Error Examples: Type T Thermocouple @ 45°C These examples demonstrate that in the environmental temperature range, input- offset error is much greater than input-gain error because a small input range is used. Conditions: CR1000 module temperature, –25 to 50 °C Temperature = 45 °C...
  • Page 333 These examples demonstrate that at temperature extremes, input offset error is much less than input gain error because the use of a larger input range is required. Conditions CR1000 module temperature, –25 to 50 °C Temperature = 1300 °C Reference temperature = 25 °C Delta T (temperature difference) = 1275 °C...
  • Page 334: Table 68. Limits Of Error On Cr1000 Thermocouple Polynomials

    NIST Monograph 175 gives high-order polynomials for computing the output voltage of a given thermocouple type over a broad range of temperatures. To speed processing and accommodate the CR1000 math and storage capabilities, four separate 6th-order polynomials are used to convert from volts to temperature over the range covered by each thermocouple type.
  • Page 335: Table 69. Reference-Temperature Compensation Range And Error

    The reference-junction temperature measurement can come from a PanelTemp() instruction or from any other temperature measurement of the reference junction. The standard and extended (-XT) operating ranges for the CR1000 are –25 to 50 °C and –55 to 85 °C, respectively. These ranges also apply to the reference- junction temperature measurement using PanelTemp().
  • Page 336: Use Of External Reference Junction

    CR1000. This is only a factor when using type K thermocouples, since the upper limit of the reference compensation polynomial fit range is 100 °C and the upper limit of the extension grade wire is 200 °C.
  • Page 337: Current Measurements - Details

    Section 8. Operation junction box wherein the reference junction is the CR1000. Terminal strips are a different metal than the thermocouple wire. Thus, if a temperature gradient exists between A and A' or B and B', the junction box will act as another thermocouple in series, creating an error in the voltage measured by the CR1000.
  • Page 338 BrFull6W() — six-wire full-bridge Read More Available resistive-bridge completion modules are listed in the appendix Signal Conditioners (p. 647). The CR1000 has five CRBasic bridge-measurement instructions. Table Resistive- Bridge Circuits with Voltage Excitation shows ideal circuits and related (p. 338) equations.
  • Page 339: Table 71. Resistive-Bridge Circuits With Voltage Excitation

    Section 8. Operation Table 71. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and CRBasic Instruction and Other Circuit Diagram Fundamental Relationship Relationships Half-Bridge CRBasic Instruction: BrHalf() Fundamental Relationship Three-Wire Half-Bridge CRBasic Instruction: BrHalf3W() Fundamental Relationship Four-Wire Half-Bridge CRBasic Instruction: BrHalf4W() Fundamental Relationship...
  • Page 340 Section 8. Operation Table 71. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and CRBasic Instruction and Other Circuit Diagram Fundamental Relationship Relationships These relationships apply to BrFull() and Full-Bridge BrFull6W(). CRBasic Instruction: BrFull() Fundamental Relationship Six-Wire Full-Bridge CRBasic Instruction: BrFull6W() Fundamental Relationship Key: V = excitation voltage;...
  • Page 341: Ac Excitation

    Section 8. Operation CRBasic Example 65. Four-Wire Full-Bridge Measurement and Processing 'This program example demonstrates the measurement and processing of a four-wire resistive 'full bridge. In this example, the default measurement stored in variable X is 'deconstructed to determine the resistance of the R1 resistor, which is the variable 'resistor in most sensors that have a four-wire full-bridge as the active element.
  • Page 342: Strain Measurements - Details

    Section 8. Operation Note Error discussed in this section and error-related specifications of the CR1000 do not include error introduced by the sensor or by the transmission of the sensor signal to the CR1000. The accuracy specifications for ratiometric-resistance measurements are summarized in the tables Ratiometric-Resistance Measurement Accuracy (p.
  • Page 343: Table 73. Straincalc() Instruction Equations

    Section 8. Operation sets the polarity of V to negative. Table 73. StrainCalc() Instruction Equations StrainCalc() BrConfig Code Configuration Quarter-bridge strain gage: Half-bridge strain gage. One gage parallel to strain, the other at 90° to strain. Half-bridge strain gage. One gage parallel to + , the other parallel to - Full-bridge strain gage.
  • Page 344: Auto-Calibration - Details

    It can be disabled by the CRBasic program when using the Calibrate() instruction. Note The CR1000 is equipped with an internal voltage reference used for calibration. The voltage reference should be periodically checked and re- calibrated by Campbell Scientific for applications with critical analog voltage measurement requirements.
  • Page 345 Section 8. Operation worst-case is (91 segments) • (4 s / segment) = 364 s per complete self-calibration. During instrument power-up, the CR1000 computes calibration coefficients by averaging ten complete sets of self-calibration measurements. After power up, newly determined G and B values are low-pass filtered as follows: Next_Value = (1/5) •...
  • Page 346: Table 74. Auto Calibration Gains And Offsets

    Section 8. Operation Table 74. Auto Calibration Gains and Offsets Descriptions of Status Table Elements Status Table Element Differential (Diff) ±mV Input Offset or Gain Integration Single-Ended (SE) Range CalGain(1) Gain 5000 250 ms CalGain(2) Gain 2500 250 ms CalGain(3) Gain 250 ms CalGain(4)
  • Page 347: Table 75. Calibrate() Instruction Results

    Section 8. Operation Table 74. Auto Calibration Gains and Offsets Descriptions of Status Table Elements Status Table Element Differential (Diff) ±mV Input Offset or Gain Integration Single-Ended (SE) Range CalSeOffset(16) Offset 50 Hz Rejection CalSeOffset(17) Offset 50 Hz Rejection CalSeOffset(18) Offset 50 Hz Rejection CalDiffOffset(1)
  • Page 348 Section 8. Operation Table 75. Calibrate() Instruction Results Descriptions of Array Elements Array Cal() Typical Value Differential (Diff) ±mV Input Element Offset or Gain Integration Single-Ended (SE) Range Offset 250 ms ±5 LSB Diff Offset 250 ms ±5 LSB Gain 250 ms –0.0067 mV/LSB Offset...
  • Page 349: Pulse Measurements - Details

    CRBasic Editor Help for the PulseCount() and TimerIO() instructions. Note Peripheral devices are available from Campbell Scientific to expand the number of pulse-input channels measured by the CR1000. Refer to the appendix for more information. Measurement and Control Peripherals Lists (p.
  • Page 350: Figure 91. Pulse-Sensor Output-Signal Types

    Section 8. Operation Figure 91. Pulse-Sensor Output-Signal Types Figure 92. Switch-Closure Pulse Sensor...
  • Page 351: Figure 93. Terminals Configurable For Pulse Input

    Section 8. Operation Figure 93. Terminals Configurable for Pulse Input Table 76. Pulse Measurements:, Terminals and Programming CRBasic Measurement Terminals Terminals Instruction Low-level ac, counts  Low-level ac, Hz  Low-level ac, running average  High frequency, counts   High frequency, Hz ...
  • Page 352: Pulse Measurement Terminals

    Input voltage range = –20 to 20 V • If pulse input voltages exceed ±20 V, third-party external-signal conditioners should be employed. Contact a Campbell Scientific application engineer if assistance is needed. Under no circumstances should voltages greater than 50 V be measured.
  • Page 353: High-Frequency Measurements

    Section 8. Operation P Terminals Maximum input frequency is dependent on input voltage: • 1.0 to 20 Hz at 20 mV RMS 0.5 to 200 Hz at 200 mV RMS 0.3 to 10 kHz at 2000 mV RMS 0.3 to 20 kHz at 5000 mV RMS CRBasic instruction: PulseCount() •...
  • Page 354: Frequency Measurement Q & A

    Section 8. Operation where FR = resolution of the frequency measurement (Hz) S = scan interval of CRBasic program Resolution of a frequency measurement made with the TimerIO() instruction is where FR = frequency resolution of the measurement (Hz) R = timing resolution of the TimerIO() measurement = 540 ns P = period of input signal (seconds).
  • Page 355: Switch-Closure And Open-Collector Measurements

    Switch-closure and open-collector signals can be measured on P or C terminals. Mechanical-switch closures have a tendency to bounce before solidly closing. Unless filtered, bounces can cause multiple counts per event. The CR1000 automatically filters bounce. Because of the filtering, the maximum switch- closure frequency is less than the maximum high-frequency measurement frequency.
  • Page 356: Edge Counting

    Section 8. Operation C Terminals Maximum input frequency <1 kHz • CRBasic instruction: TimerIO() • • Rising or falling edges of a square-wave signal are detected: Rising edge — transition from <1.5 Vdc to >3.5 Vdc. Falling edge — transition from >3.5 Vdc to <1.5 Vdc. Edge-timing resolution is approximately 540 ns.
  • Page 357: Table 79. Switch Closures And Open Collectors On P Terminals

    Section 8. Operation Table 79. Switch Closures and Open Collectors on P Terminals Switch Closure on P Terminal Open Collector on on P Terminal Table 80. Switch Closures and Open Collectors on C Terminals Switch Closure on C Terminal: No Pull-Up Switch Closure on C Terminal: Open Collector on C Terminal: 5 Vdc Pull-Up...
  • Page 358: Table 81. Three Specifications Differing Between P And C Terminals

    Switch Closure on C Terminal: Open Collector on C Terminal: 12 Vdc Pull-Up 12 Vdc pull-up Internal CR1000 circuitry that supports open-collector and switch-closure measurements (FYI) Pay attention to specifications. Take time to understand the signal to be • measured and compatible input terminals and CRBasic instructions. The table Three Differing Specifications Between P and C Terminals (p.
  • Page 359: Timerio() Nan Conditions

    CR1000 operating system disables the interrupt that is capturing the precise time until the next scan is serviced. This is done so that the CR1000 processor does not get occupied by excessive interrupts. A small RC filter retrofitted to the sensor switch should fix the problem.
  • Page 360: Period Averaging - Details

    • Period Averaging — Details (p. 360) The CR1000 can measure the period of a signal on a SE terminal. The specified number of cycles is timed with a resolution of 136 ns, making the resolution of the period measurement 136 ns ns divided by the number of cycles chosen.
  • Page 361: Vibrating-Wire Measurements - Details

    For sensor amplitudes less than 20 mV peak-to-peak, a dc blocking capacitor is recommended to center the signal at CR1000 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.
  • Page 362: Time-Domain Measurement

    Read More Serial Input / Output Instructions and Serial I/O (p. 583) (p. 245). The CR1000 can receive and record most TTL (0 to 5 Vdc) and true RS-232 data from devices such as smart sensors. See the table CR1000 Terminal Definitions...
  • Page 363: Sensor Support - Details

    C terminal configured as Rx, the sensor power consumption may increase by a few milliamps due to voltage clamps in the CR1000. An external resistor may need to be added in series to the Rx line to limit the current drain, although this is not advisable at very high baud rates.
  • Page 364: Cabling Effects

    RS-232 sensor cable lengths should be limited to 50 feet. 8.1.8.4 SDI-12 Sensors The SDI-12 standard allows cable lengths of up to 200 feet. Campbell Scientific does not recommend SDI-12 sensor lead lengths greater than 200 feet; however, longer lead lengths can sometimes be accommodated by increasing the wire gage or powering the sensor with a second 12 Vdc power supply placed near the sensor.
  • Page 365: Synchronizing Measurements

    Care should be taken when a clock-change operation is planned. Any time the CR1000 clock is changed, the deviation of the new time from the old time may be sufficient to cause a skipped record in data tables. Any command used to synchronize clocks should be executed after any CallTable() instructions and timed so as to execute well clear of data-output intervals.
  • Page 366: Measurement And Control Peripherals - Details

    PakBusClock() instruction. Note Use of PakBus clock functions re-synchronizes the Scan() instruction. Use should not exceed once per minute. CR1000 clocks drift at a slow enough rate that a ClockReport() once per minute should be sufficient to keep clocks within 30 ms of each other.
  • Page 367: Pulse-Input Modules

    8.2.6 Analog-Output Modules Read More For more information see appendix Continuous-Analog-Output (CAO) Modules List (p. 649). The CR1000 can scale measured or processed values and transfer these values in digital form to an analog output device. The analog output device performs a...
  • Page 368: Plc Control Modules - Overview

    • Switched Voltage Output — Details (p. 103) Controlling power to an external device is a common function of the CR1000. On-board control terminals and peripheral devices are available for binary (on / off) or analog (variable) control. A switched, 12 Vdc terminal (SW12V) is also available.
  • Page 369: Relays And Relay Drivers

    Read More For more information see appendix Relay Drivers Modules List 649). Several relay drivers are manufactured by Campbell Scientific. Compatible, inexpensive, and reliable single-channel relay drivers for a wide range of loads are also available from electronic vendors such as Crydom, Newark, and Mouser 534).
  • Page 370: Memory

    • Memory — Overview (p. 87) • Memory — Details (p. 370) • Data Storage Devices — List (p. 653) 8.3.1 Storage Media CR1000 memory consists of four non-volatile storage media: Internal battery-backed SRAM • Internal flash • Internal serial flash •...
  • Page 371: Table 84. Cr1000 Memory Allocation

    CR1000 SRAM Memory (p. 371) (p. 372) illustrate the structure of CR1000 memory around these media. The CR1000 uses and maintains most memory features automatically. However, users should periodically review areas of memory wherein data files, CRBasic program files, and image files reside.
  • Page 372 Serial flash is rated for 100,000 overwrites (50,000 overwrites on 128 kB units). Care should be taken in programs that overwrite memory to use the CRD: or USR: drives so as not to wear-out the CPU: drive. ∙The CR1000 changed from 128 to 512 kB serial flash in May 2007. SNs ≥ 9452 are 512 kB.
  • Page 373: Table 85. Cr1000 Main Memory

    Section 8. Operation Table 85. CR1000 Main Memory Comments Static Memory Operational memory used by the operating system. Rebuilt at power-up, program re-compile, and watchdog events. ———————————— Operating Settings and Properties memory. Stores settings such as PakBus address, station name, "Keep"...
  • Page 374: Memory Drives - On-Board

    RAM. The CRD: drive is a CompactFlash card attached to the CR1000 by use of a CF card storage module Cards should be formatted as FAT32 for optimal performance.
  • Page 375: Usr: Drive

    512 bytes, the size is rounded up. Maximum size of USR: is the total RAM size less 400 kB; i.e., for a CR1000 with 4 MB memory, the maximum size of USR: is about 3.6 MB.
  • Page 376: Memory Card (Crd: Drive) - Details

    If no card is present, or if space is inadequate, the CR1000 will warn that the card is not being used. However, the CRBasic program runs anyway and data are stored...
  • Page 377: Data-File Formats

    The CR1000 accepts memory cards formatted as FAT or FAT32; however, FAT32 is recommended. Otherwise, some functionality, such as the ability to manage large numbers of files (>254) is lost. Older CR1000 operating systems formatted cards as FAT or FAT32. Newer operating systems always format cards as FAT32.
  • Page 378: Table 88. Tablefile() Instruction Data-File Formats

    Fully compatible formats are indicated with an asterisk. A more detailed discussion of data-file formats is available in the Campbell Scientific publication LoggerNet Instruction Manual, which is available at www.campbellsci.com. Table 88. TableFile() Instruction Data-File Formats...
  • Page 379 Section 8. Operation Data-File Format Examples TOB1 TOB1 files may contain an ASCII header and binary data. The last line in the example contains cryptic text which represents binary data. Example: "TOB1","11467","CR1000","11467","CR1000.Std.20","CPU:file format.CR1","61449","Test" "SECONDS","NANOSECONDS","RECORD","battfivoltfiMin","PTemp" "SECONDS","NANOSECONDS","RN","","" "","","","Min","Smp" "ULONG","ULONG","ULONG","FP2","FP2" }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp'...
  • Page 380 Line 3 – Data Units Includes the units associated with each field in the record. If no units are programmed in the CR1000 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 CR1000 to produce corresponding data, e.g., Smp indicates samples, Min indicates...
  • Page 381: Resetting The Cr1000

    68 years (yes, years). 8.3.3 Resetting the CR1000 A reset is referred to as a "memory reset." Be sure to backup the current CR1000 configuration before a reset in case you need to revert to the old settings.
  • Page 382: Manual Data-Table Reset

    , web API FileControl Send OS tab; DevConfig File Control tab; DevConfig Sending an OS to the CR1000. Reset CR1000 settings. Campbell Scientific mass storage device or memory card Send ; DevConfig File Control tab; power-up with Campbell Sending an OS to the CR1000. Preserve CR1000 settings.
  • Page 383: File Attributes

    (p. 111) Manual with Campbell Scientific mass storage device or memory card. See Data Storage (p. 374) Automatic with Campbell Scientific mass storage device or memory card and Powerup.ini. See Power-up (p. 386) CRBasic instructions (commands). See Data-Table Declarations and File Management and CRBasic Editor Help (p.
  • Page 384: Files Manager

    Support software File Control See software Help & Preserving Data at Program Send (p. 515). (p. 127). Automatic on power-up of CR1000 with Campbell Scientific mass storage device or memory card and Powerup.ini. See Power-up (p. 386). 8.3.4.2 Files Manager FilesManager := { "("...
  • Page 385: Data Preservation

    5 KB in size, and then new data will begin overwriting old data. 8.3.4.3 Data Preservation Associated with file attributes is the option to preserve data in CR1000 memory ® when a program is sent. This option applies to data table SRAM, CompactFlash...
  • Page 386: Powerup.ini File - Details

    OS or CRBasic program file. 2. Connect the external device to the CR1000 and then cycle power to the datalogger. This simple process results in the file uploading to the CR1000 with optional run attributes, such as Run Now, Run on Power Up, or Run Always set for individual files.
  • Page 387: Creating And Editing Powerup.ini

    8.3.4.4.1 Creating and Editing Powerup.ini Powerup.ini is created with a text editor on a PC, then saved on a memory drive of the CR1000. The file is saved to the memory drive, along with the operating File system or user program file, using the datalogger support software (p.
  • Page 388: Table 92. Powerup.ini Commands And Applications

    'Device = device to which File is copied. Defaults to CPU: 'Command,File,Device 13,Write2CRD_2.cr1,cpu: Table 94. Powerup.ini Example. Run Program on Power-up 'Copy program file pwrup.cr1 from the external drive to CPU: 'File will run only when CR1000 powered-up later. 2,pwrup.cr1,cpu:...
  • Page 389: File Management Q & A

    If neither run-on-power-up nor run-now programs are changed, the previous run-on-power-up program runs. 8.3.4.5 File Management Q & A Q: How do I hide a program file on the CR1000 without using the CRBasic FileManage() instruction? A: Use the CoraScript File-Control command, or the web API (p.
  • Page 390: Table 100. File System Error Codes

    Section 8. Operation available drives. All occurrences are rare, but they are most likely to occur when using the CRD: drive. Table 100. File System Error Codes Error Code Description Invalid format Device capabilities error Unable to allocate memory for file operation Max number of available files exceeded No file entry exists in directory Disk change occurred...
  • Page 391: Memory Q & A

    A: The program does not run from the memory card. However, a very large program (too large to fit on the CPU: drive) can be compiled into CR1000 main memory from the card if the binary form of the compiled program does not exceed the available main memory (p.
  • Page 392: Protocols

    10 single values (requires 10 transactions). • Set the CR1000 to be a PakBus router only as needed. When the CR1000 is a router, and it connects to another router like LoggerNet, it exchanges routing information with that router and, possibly (depending on your settings), with other routers in the network.
  • Page 393: Pakbus® Communications - Details

    This activity is the datalogger querying to see if the CR1000KD Keyboard Display is available. When DevConfig and PakBus Graph retrieve settings, the CR1000 queries to determine what SDC devices are connected. Results of the query can be seen in the DevConfig and PakBusGraph settings tables.
  • Page 394: Nodes: Leaf Nodes And Routers

    Routers can be router-capable dataloggers or communication devices. The CR1000 is a leaf node by factory default. It can be configured as a router by setting IsRouter in its Status table to 1 or True. The network shown in figure PakBus Network Addressing contains six routers and eight leaf nodes.
  • Page 395: Linking Pakbus Nodes: Neighbor Discovery

    Transparent Device Leaf Node Router Aware CR200X Datalogger • CR6 CS I/O Datalogger • • Port CR800 Datalogger • • CR1000 Datalogger • • CR3000 Datalogger • • CR5000 Datalogger • • LoggerNet Software • CR6 Ethernet Network link Port...
  • Page 396: Hello-Message

    8.5.3.4 Neighbor Lists PakBus devices in a network can be configured with a neighbor list. The CR1000 sends out a hello-message to each node in the list whose CVI has expired at (p.
  • Page 397: Maintaining Links

    8.5.4.1.1 Automatic Packet-Size Adjustment The BMP5 file-receive transaction allows the BMP5 client (LoggerNet) to specify the size of the next fragment of the file that the CR1000 sends. Note PakBus uses the file-receive transaction to get table definitions from the datalogger.
  • Page 398: Ping (Pakbus)

    This is the main reason why the Max Packet Size setting exists. The CR1000 can look at this setting at the point where it is forming a response message and cut short the amount of data that it would normally send if the setting limits the message size.
  • Page 399: Figure 103. Flat Map

    The difference between the two configurations is that the flat map configures the router with static routes that report that all of the dataloggers are neighbours to the server. The tree map configures static routes wherein "CR1000" is configured as a neighbour and "CR1000_2", "CR1000_3", and "CR1000_4" are configured to use "CR1000"...
  • Page 400: Pakbus Lan Example

    Cable length between any two CR1000s must (p. 400). be less than 25 feet (7.6 m). COM1 Tx (transmit) and Rx (receive) are CR1000 terminals C1 and C2, respectively; COM2 Tx and Rx are terminals C3 and C4, respectively. Tx from a CR1000 is connected to Rx of an adjacent CR1000.
  • Page 401: Lan Setup

    Configure CR1000s before connecting them to the LAN: 1. Start Device Configuration Utility (DevConfig). Click on Device Type: select CR1000. Follow on-screen instructions to power CR1000s and connect them to the PC. Close other programs that may be using the PC COM port, such as LoggerNet, PC400, PC200W, HotSync, etc.
  • Page 402: Figure 107. Devconfig Deployment | Comports Settings Tab

    Section 8. Operation Figure 107. DevConfig Deployment | ComPorts Settings Tab DevConfig Deployment | Advanced Tab Figure 108.
  • Page 403: Loggernet Setup

    8.5.6.3 LoggerNet Setup Figure 109. LoggerNet Network-Map Setup: COM port In LoggerNet Setup, click Add Root and add a ComPort. Then Add a PakBusPort, and (4) CR1000 dataloggers to the device map as shown in figure LoggerNet Device-Map Setup (p. 403).
  • Page 404 PakBusPort maximum baud rate to 115200. Leave other settings at the defaults. Figure 111. LoggerNet Network-Map Setup: Dataloggers As shown in figure LoggerNet Device-Map Setup: Dataloggers set the (p. 404), ® PakBus address for each CR1000 as listed in table PakBus-LAN Example Datalogger-Communication Settings (p. 402).
  • Page 405: Route Filters

    PakBusRoutes() lists the routes (in the case of a router), or the router neighbors (in the case of a leaf node), that were known to the CR1000 at the time the setting was read. Each route is represented by four components separated by commas...
  • Page 406: Neighbors

    Com4 (C7,C8) 101,102,… If the value of the port number is ≥ 101, the connection is made through PakBus/TCP, either by the CR1000 executing a TCPOpen() instruction or by having a connection made to the PakBus/TCP CR1000 service. via neighbor adr Specifies address of neighbor / router to be used to send messages for this route.
  • Page 407: Alternate Telecommunications - Details

    Section 8. Operation receive only encrypted commands and data. Header level information needed for routing is not encrypted. An encrypted CR1000 can also communicate with an unencrypted datalogger. Use an EncryptExempt() instruction in the CRBasic program to define one or more PakBus addresses to which encrypted messages will not be sent.
  • Page 408: Dnp3 - Details

    Distributed Network Protocol (DNP) is an open protocol used in applications to ensure data integrity using minimal bandwidth. DNP implementation in the CR1000 is DNP3 Level-2 Slave Compliant with some of the operations found in a Level-3 implementation. A standard CR1000 program with DNP instructions will take arrays of real time or processed data and map them to DNP arrays in integer or binary format.
  • Page 409: Crbasic Instructions (Dnp3)

    (event data). Must be included once within a Scan() / NextScan for the DNP slave to update its arrays. Typically placed in a program after the elements in the array are updated. The CR1000 will respond to any DNP master regardless of its address.
  • Page 410: Programming For Dnp3 Data Acquisition

    As shown in CRBasic example Implementation of DNP3 program the (p. 410), CR1000 to return data when polled by the DNP3 master using the following three actions: 1. Place DNP() at the beginning of the program between BeginProg and Scan().
  • Page 411: Modbus - Details

    'DNPVariable(Source,Swath,DNPObject,DNPVariation,DNPClass,DNPFlag,DNPEvent,DNPNumEvents) DNPVariable(IArray,4,30,2,0,&B00000000,0,0) 'Object group 30, variation 2 is used to return analog data when the CR1000 'is polled. Flag is set to an empty 8 bit number(all zeros), DNPEvent is a 'reserved parameter and is currently always set to zero. Number of events is 'only used for event data.
  • Page 412: Modbus Terminology

    / or the slaves. The Modbus standard has two communication modes, RTU and ASCII. However, CR1000s communicate in RTU mode exclusively. Field instruments can be queried by the CR1000. Because Modbus has a set command structure, programming the CR1000 to get data from field instruments is much simpler than from serial sensors.
  • Page 413: Programming For Modbus

    Term. holding registers 40001 to 49999 Hold values resulting from a programming action. Holding registers in the Modbus domain are read / write. In the Campbell Scientific domain, the leading digit in Modbus registers is ignored, and so are assigned together to a single Dim or Public variable array (read / write).
  • Page 414: Crbasic Instructions (Modbus)

    8.6.2.2.2 CRBasic Instructions (Modbus) Complete descriptions and options of commands are available in CRBasic Editor Help. ModbusMaster() Sets up a CR1000 as a Modbus master to send or retrieve data from a Modbus slave. Syntax ModbusMaster(ResultCode, ComPort, BaudRate, ModbusAddr, Function, Variable, Start, Length, Tries, TimeOut) ModbusSlave() Sets up a CR1000 as a Modbus slave device.
  • Page 415: Supported Modbus Function Codes

    Some Modbus devices require reverse byte order words (CDAB vs. ABCD). This can be true for either floating point, or integer formats. Since a slave CR1000 uses the ABCD format, either the master has to make an adjustment, which is sometimes possible, or the CR1000 needs to output reverse-byte order words.
  • Page 416: Modbus Over Ip

    Section 8. Operation 8.6.2.4 Modbus over IP Modbus over IP functionality is an option with the CR1000. Contact Campbell Scientific for details. 8.6.2.5 Modbus Q and A Q: Can Modbus be used over an RS-232 link, 7 data bits, even parity, one stop bit? A: Yes.
  • Page 417: Tcp/Ip - Details

    Section 8. Operation Scan(1,Sec,0,0) 'In the case of the CR1000 being the ModBus master then the 'ModbusMaster instruction would be used (instead of fixing 'the variables as shown between the BeginProg and SCAN instructions). ModbusMaster(Result,COMRS232,-115200,5,3,Register(),-1,2,3,100) 'MoveBytes(DestVariable,DestOffset,SourceVariable,SourceOffSet, 'NumberOfBytes) MoveBytes(Combo,2, Register_LSW,2,2) MoveBytes(Combo,0, Register_MSW,2,2)
  • Page 418: Pakbus Over Tcp/Ip And Callback

    Network Links (p. 652). 8.6.3.2 Default HTTP Web Server The CR1000 has a default home page built into the operating system. The home page can be accessed using the following URL: http:\\ipaddress:80 Note Port 80 is implied if the port is not otherwise specified.
  • Page 419: Custom Http Web Server

    It can be copied to a CR1000 drive with File Control. Deleting default.html will cause the CR1000 to use the original, default home page. The CR1000 can be programmed to generate HTML or XML code that can be viewed by a web browser. CRBasic example HTML shows how to use the (p.
  • Page 420 Section 8. Operation Home Page Created Using WebPageBegin() Instruction Figure 113. Figure 114. Customized Numeric-Monitor Web Page...
  • Page 421 'This program example demonstrates the creation of a custom web page that resides in the 'CR1000. In this example program, the default home page is replaced by using WebPageBegin to 'create a file called default.html. The graphic in the web page (in this case, the Campbell 'Scientific logo) comes from a file called SHIELDWEB2.JPG.
  • Page 422: Ftp Server

    Files can be deleted through FTP. 8.6.3.5 FTP Client The CR1000 can act as an FTP client to send a file or get a file from an FTP server, such as another datalogger or web camera. This is done using the CRBasic FTPClient() instruction.
  • Page 423: Ping (Ip)

    8.6.3.8 Ping (IP) Ping can be used to verify that the IP address for the network device connected to the CR1000 is reachable. To use the Ping tool, open a command prompt on a computer connected to the network and type in: ping xxx.xxx.xxx.xxx <Enter>...
  • Page 424: Authentication

    Apply after entering user names and passwords encrypts .csipasswd and saves it to the CR1000 CPU: drive. A check box is available to set the file as hidden. If hidden when saved, the file cannot be accessed for editing.
  • Page 425: Command Syntax

    (default security level can be changed in DevConfig). If an invalid user name or password is entered in .csipasswd, the CR1000 web server will default to the level of access assigned to anonymous.
  • Page 426 Section 8. Operation Table 109. API Commands, Parameters, and Arguments Commands in which the Parameter parameter is used Function of parameter Argument(s) Specifies response format. format • • BrowseSymbols html, xml, json: apply to all • DataQuery commands listed in column 2.
  • Page 427: Time Syntax

    8.6.3.14.4 Data Management — BrowseSymbols Command BrowseSymbols allows a web client to poll the host CR1000 for its data memory structure. Memory structure is made up of table name(s), field name(s), and array sub-scripts. These together constitute "symbols." BrowseSymbols takes the form: http://ip_address/?command=BrowseSymbols&uri=source:tablename.fi...
  • Page 428: Table 111. Browsesymbols Api Command Response

    Section 8. Operation Examples: Command for a response wherein symbols for all tables are returned as HTML http://192.168.24.106/?command=BrowseSymbols&uri=dl:public&fo rmat=html Command for a response wherein symbols for all fields in a single table (MainData) are returned as HTML http://192.168.24.106/?command=BrowseSymbols&uri=dl:MainData& format=html Command for a response wherein symbols for a single field (Cond41) are returned as HTML http://192.168.24.106/?command=BrowseSymbols&uri=dl:MainData.
  • Page 429 Section 8. Operation HTML tabular response: HTML page source: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>BrowseSymbols Response</title> </head> <body> <h1>BrowseSymbols Response</h1> <table border="1"> <tr> <th>name</th><th>uri</th><th>type</th><th>is_enabled</th><th>is_ read_only</th><th>can_expand</th></tr><tr> <td>Status</td><td>dl:Status</td><td>6</td><td>true</td><td>fals e</td><td>true</td></tr><tr> <td>MainData</td><td>dl:MainData</td><td>6</td><td>true</td><td> false</td><td>true</td></tr><tr> <td>BallastTank1</td><td>dl:BallastTank1</td><td>6</td><td>true< /td><td>false</td><td>true</td></tr><tr> <td>BallastTank2</td><td>dl:BallastTank2</td><td>6</td><td>true< /td><td>false</td><td>true</td></tr><tr> <td>BallastTank3</td><td>dl:BallastTank3</td><td>6</td><td>true< /td><td>false</td><td>true</td></tr><tr> <td>BallastTank4</td><td>dl:BallastTank4</td><td>6</td><td>true< /td><td>false</td><td>true</td></tr><tr> <td>BallastLine</td><td>dl:BallastLine</td><td>6</td><td>true</t d><td>false</td><td>true</td></tr><tr>...
  • Page 430 Section 8. Operation Example page source output: <BrowseSymbolsResponse> ..<symbol name="Status" uri="dl:Status" type="6" is_enabled="true" is_read_only="false" can_expand="true"/><symbol name="MainData" uri="dl:MainData" type="6" is_enabled="true" is_read_only="false" can_expand="true"/><symbol name="BallastTank1" uri="dl:BallastTank1" type="6" is_enabled="true" is_read_only="false" can_expand="true"/><symbol name="BallastTank2" uri="dl:BallastTank2" type="6" is_enabled="true" is_read_only="false" can_expand="true"/><symbol name="BallastTank3" uri="dl:BallastTank3" type="6" is_enabled="true" is_read_only="false" can_expand="true"/><symbol name="BallastTank4" uri="dl:BallastTank4"...
  • Page 431: Data Management - Dataquery Command

    The record number is specified (p. 525) by p1. If the record number is not present in the table, the CR1000 will return all data starting mode with the oldest record. date-range returns data in a certain date range. The date range is specified using p1 and p2. Data returned include data from date specified by p1 but not by p2 (half-open interval).
  • Page 432 Section 8. Operation Optional. Specifies: • maximum number of records (most-recent) • beginning date and/or time (since-time, date-range). See Time Syntax (p. 427) format. • beginning record number (since-record) • interval in seconds (backfill) Optional. Specifies: • ending date and/or time (date-range). See Time Syntax for format.
  • Page 433 Section 8. Operation Command: http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=backfill&p1=7200 Response: backfill all records since 3600 seconds ago DataQuery Response The DataQuery format parameter determines the format of the response. For more detail concerning data response formats, see the Data File Formats (p. 377) section.
  • Page 434 When xml is entered in the DataQuery format parameter, the response will be formatted as CSIXML. Following is an example response. <?xml version="1.0" standalone="yes"?> <csixml version="1.0"> <head> <environment> <station-name>Q2</station-name> <table-name>BallastLine</table-name> <model>CR1000</model> <serial-no>18583</serial-no> <os-version>CR1000.Std.25</os-version> <dld-name>CPU:IndianaHarbor_081712.CR1</dld-name> <dld-sig>33322</dld-sig> </environment> <fields> <field name="Induced_Water" type="xsd:float" process="Smp"/>...
  • Page 435 .."vals": [66] .."time": "2012-08-21T22:42:30", .."no": 108, .."vals": [66] TOA5 Response When toa5 is entered in the DataQuery format parameter, the response will be formated as Campbell Scientific TOA5. Following is an example response: "TOA5","TXSoil","CR1000","No_SN","CR1000.Std.25","TexasRun_1b.CR 2","12645","_1Hr" "TIMESTAMP","RECORD","ID","_6_inch","One","Two","Three","Temp_F_ Avg","Rain_in_Tot" "TS","RN","","","","","","","" "","","Smp","Smp","Smp","Smp","Smp","Avg","Tot" "2012-05-03 17:00:00",0,0,-0.8949984,-0.95232,-0.8949984,- 0.8637322,2.144136,0.09999999...
  • Page 436: Control - Setvalueex Command

    Campbell Scientific TOB1. Following is an example response. Example: "TOB1","11467","CR1000","11467","CR1000.Std.20","CPU :file format.CR1","61449","Test" "SECONDS","NANOSECONDS","RECORD","battfivoltfiMin"," PTemp" "SECONDS","NANOSECONDS","RN","","" "","","","Min","Smp" "ULONG","ULONG","ULONG","FP2","FP2" }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' 8.6.3.14.6 Control — SetValueEx Command SetValueEx allows a web client to set a value in a host CR1000 CRBasic variable. http://ip_address/?command=SetValueEx&uri=dl:table.variable&valu e=x.xx...
  • Page 437: Table 113. Setvalueex Api Command Parameters

    Section 8. Operation SetValueEx requires a minimum .csipasswd access level of 2 (set variables allowed). Table 113. SetValueEx API Command Parameters Specifies the variable that should be set in the following format: dl:tablename.fieldname Specifies the value to set value The following table lists optional output formats for SetValueEx result codes. If not specified, result codes output as HTML.
  • Page 438 Section 8. Operation HTML Response When html is entered in the SetValueEx format parameter, the response will be HTML Following are example responses. HTML tabular response: HTML page source: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>SetValueExResponse</title> </head> <body> <h1>SetValueExResponse</h1> <table border="1">...
  • Page 439: Clock Functions - Clockset Command

    Section 8. Operation 8.6.3.14.7 Clock Functions — ClockSet Command ClockSet allows a web client to set the CR1000 real time clock. ClockSet takes the form: http://ip_address/?command=ClockSet&format=html&time=YYYY-MM- DDTHH:MM:SS.MS ClockSet requires a minimum .csipasswd access level of 1 (all access allowed). Table 115. ClockSet API Command Parameters If this parameter is excluded, or if it is set to "datalogger"...
  • Page 440: Clock Functions - Clockcheck Command

    Table 117. ClockCheck API Command Parameters If this parameter is excluded, or if it is set to "datalogger" (uri=dl) or an empty string (uri=), the host CR1000 real-time clock is returned. Specifies the format of the response. The values html, json, and xml are recognized.
  • Page 441: Table 118. Clockcheck Api Command Response

    Section 8. Operation Example: http://192.168.24.106/?command=ClockCheck&format=html Response: checks the host CR1000 real time clock and requests the response be an HTML table. ClockCheck Response The ClockCheck format parameter determines the format of the response. If a format is not specified, the format defaults to HTML. For more detail concerning data response formats, see the Data File Formats section.
  • Page 442: File Management - Sending A File To A Datalogger

    8.6.3.14.9 File Management — Sending a File to a Datalogger A file can be sent to the CR1000 using an HTTPPut request. Sending a file requires a minimum .csipasswd access level of 1 (all access allowed). Unlike other web API commands, originating a PUT request from a browser address bar is not possible.
  • Page 443 When a file with extension .OBJ is uploaded to the CR1000 CPU: drive, the CR1000 sees the file as a new operating system (OS) and does not actually upload it to CPU:. Rather, it captures it. When capture is complete, the CR1000 reboots...
  • Page 444: File Management - Filecontrol Command

    Both operations can be combined in a batch file. 8.6.3.14.10 File Management — FileControl Command FileControl allows a web client to perform file system operations on a host CR1000. FileControl takes the form: http://ip_address/?command=FileControl&file=drive:filename.dat&a ction=x FileControl requires a minimum .csipasswd access level of 1 (all access allowed).
  • Page 445: File Management - Listfiles Command

    This parameter is needed because many of the commands will cause the CR1000 to perform a reset. In the case holdoff of sending an operating system, it can take tens of seconds for...
  • Page 446: Table 122. Listfiles Api Command Parameters

    The format of the response depends on the value of the format parameter in the command request. The response provides information for each of the files or directories that can be reached through the CR1000 web server. The information for each file includes the following: Table 123.
  • Page 447 Section 8. Operation HTML tabular response: HTML page source: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>ListFiles Response</title></head> <body><h1>ListFiles Response</h1><table border="1"> <tr><td><b>Path</b></td> <td><b>Is Directory</b></td> <td><b>Size</b></td> <td><b>Last Write</b></td> <td><b>Run Now</b></td> <td><b>Run On Power Up</b></td> <td><b>Read Only</b></td> <td><b>Paused</b></td></tr><tr>...
  • Page 448 Section 8. Operation <td>CPU/untitled.CR1</td> <td>false</td> <td>1097</td> <td>2012-08-07T10:48:20</td> <td>false</td> <td>false</td> <td>false</td> <td>false</td></tr><tr> </table> Page source template: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>ListFiles Response</title> </head> <body> <h1>ListFiles Response</h1> <table border="1"> <tr> <td><b>Path</b></td> <td><b>Is Directory</b></td> <td><b>Size</b></td> <td><b>Last Write</b></td> <td><b>Run Now</b></td> <td><b>Run On Power Up</b></td> <td><b>Read Only</b></td>...
  • Page 449: File Management - Newestfile Command

    NewestFile allows a web client to request a file, such as a program or image, from the host CR1000. If a wildcard (*) is included in the expression, the most recent in a set of files whose names match the expression is returned. For instance, a web page may be designed to show the newest image taken by a camera attached to the CR1000.
  • Page 450: Datalogger Support Software - Details

    PC200W Starter Software is available at no charge at • www.campbellsci.com/downloads (http://www.campbellsci.com/downloads). It supports a transparent RS-232 connection between PC and CR1000, and includes Short Cut for creating CR1000 programs. Tools for setting the datalogger clock, sending programs, monitoring sensors, and on-site viewing and collection of data are also included.
  • Page 451: Keyboard Display - Details

    Some keys have special functions as outlined below. Note Although the keyboard display is not required to operate the CR1000, it is a useful diagnostic and debugging tool. Table 125. Special Keyboard-Display Key Functions...
  • Page 452 Section 8. Operation Table 125. Special Keyboard-Display Key Functions Special Function Move cursor to bottom of the list [End] [Pg Up] Move cursor up one screen [Pg Dn] Move cursor down one screen [BkSpc] Delete character to the left [Shift] Change alpha character selected Change to numeric entry [Num Lock]...
  • Page 453 Section 8. Operation Figure 115. Using the Keyboard / Display...
  • Page 454: Data Display

    Section 8. Operation 8.8.1 Data Display Figure 116. Displaying Data with the Keyboard / Display...
  • Page 455: Real-Time Tables And Graphs

    8.8.1.2 Real-Time Custom The CR1000KD Keyboard Display can be configured with a customized real-time display. The CR1000 will keep the setup as long as the defining program is running. Read More Custom menus can also be programmed. See Custom Menus (p.
  • Page 456 Section 8. Operation Figure 118. Real-Time Custom...
  • Page 457: Final-Memory Tables

    Section 8. Operation 8.8.1.3 Final-Memory Tables Figure 119. Final-Memory Tables...
  • Page 458: Run/Stop Program

    Section 8. Operation 8.8.2 Run/Stop Program Figure 120. Run/Stop Program...
  • Page 459: File Display

    Remember that the only copy of changes is in the CR1000 until the program is retrieved using datalogger support software or removable memory.
  • Page 460 Section 8. Operation Figure 122. File: Edit...
  • Page 461: Pccard (Memory Card) Display

    Section 8. Operation 8.8.4 PCCard (Memory Card) Display Figure 123. PCCard (CF Card) Display...
  • Page 462: Ports And Status

    Section 8. Operation 8.8.5 Ports and Status Read More See the appendix Registers. C Terminals (Ports) Status Figure 124. 8.8.6 Settings Figure 125. Settings...
  • Page 463: Set Time / Date

    A: While similar, Gzip and zip use different file compression formats and algorithms. Only program files and OSs compressed with Gzip are compatible with the CR1000. Q: Why compress a program or operating system before sending it to a CR1000 datalogger?
  • Page 464 OSs over low-baud rate terrestrial radio, satellite, or restricted cellular-data plans. Q: Does my CR1000 support Gzip? A: Version 25 of the standard CR1000 operating system supports receipt of Gzip compressed program files and OSs. Q: How do I Gzip a program or operating system? A: Many utilities are available for the creation of a Gzip file.
  • Page 465: Table 126. Typical Gzip File Compression Results

    (.cr1, .obj) as shown. Q: How do I send a compressed file to the CR1000? A: A Gzip compressed file can be sent to a CR1000 datalogger by clicking the Send Program command in the datalogger support software Compressed (p.
  • Page 466: Memory Cards And Record Numbers

    2. In the table definitions advertised to datalogger support software (p. 95), CR1000 advertises the greater of the number of records recorded in the Status table, if the tables are not fill-and-stop. 3. If either data area is flagged for fill-and-stop, then whichever area stops first...
  • Page 467: Security - Details

    For example — on a CR1000 storing a four-byte value at a 10 ms rate, the CPU not set to fill-and-stop, CRD: set to fill-and-stop after 500 records — after...
  • Page 468: Vulnerabilities

    Note Older CR1000 operating systems are more vulnerable to attack than recent updates. Updates can be obtained free of charge at www.campbellsci.com. The following bullet points outline vulnerabilities: CR1000KD Keyboard Display •...
  • Page 469: Pass-Code Lockout

    Note Although a pass code can be set to a negative value, a positive code must be entered to unlock the CR1000. That positive code will equal 65536 + (negative security code). For example, a security code of -1111 must be entered as 64425 to unlock the CR1000.
  • Page 470: Pass-Code Lockout By-Pass

    Pass-code lockouts can be bypassed at the datalogger using a CR1000KD Keyboard Displaykeyboard display. Pressing and holding the Del key while powering up a CR1000 will cause it to abort loading a program and provide a 120 second window to begin changing or disabling security codes in the settings editor (not Status table) with the keyboard display.
  • Page 471: Tcp/Ip Instructions

    .CR<X> files, or files specified by the Include() instruction, can be hidden using the FileHide() instruction. The CR1000 can locate and use hidden files on the fly, but a listing of the file or the...
  • Page 472: Signatures

    Section 8. Operation file name are not available for viewing. See File Management for more (p. 382) information. 8.11.7 Signatures Recording and monitoring system and program signatures are important components of a security scheme. Read more about use of signatures in Programming to Use Signatures and Signatures: Example Programs (p.
  • Page 473: Maintenance - Details

    CR1000 electronics can result. Effective humidity control is the responsibility of the user. The CR1000 module is protected by a packet of silica gel desiccant, which is installed at the factory. This packet is replaced whenever the CR1000 is repaired at Campbell Scientific.
  • Page 474 Routing and communication logs (relearned without user intervention). Time. Clock will need resetting when the battery is replaced. Final-memory data tables. A replacement lithium battery can be purchased from Campbell Scientific or another supplier. Table Internal Lithium-Battery Specifications lists battery (p.
  • Page 475 Section 9. Maintenance — Details Figure 128. Pull Edge Away from Panel Pull one edge of the canister away from the wiring panel to loosen it from three internal connector seatings. Figure 129. Remove Nuts to Disassemble Canister...
  • Page 476: Factory Calibration Or Repair Procedure

    • Factory Calibration or Repair Procedure (p. 476) If sending the CR1000 to Campbell Scientific for calibration or repair, consult first with a Campbell Scientific application engineer. If the CR1000 is malfunctioning, be prepared to perform some troubleshooting procedures while on the phone with the application engineer.
  • Page 477 A completed form must be either emailed to repair@campbellsci.com or faxed to 435-227- 9579. Campbell Scientific is unable to process any returns until we receive this form. If the form is not received within three days of product receipt or is incomplete, the product will be returned to the customer at the customer's expense.
  • Page 479: Troubleshooting

    When using sensors, peripheral devices, or telecommunication hardware, look to the manuals for those products for additional help. Note If a Campbell Scientific product needs to be returned for repair or recalibration, a Return Materials Authorization number is first required.
  • Page 480 Section 10. Troubleshooting the principle of independent verification, the root cause of most errors can be determined and remedies put into effect. Errors are indicated by multiple means, a few of which actually communicate using the word Error. Things that indicate that a closer look should be taken include: Error •...
  • Page 481: Troubleshooting - Status Table

    That the USR: drive, if created, is not too large. The USR: drive may be using memory needed for the program. that a program written for a 4 MB CR1000 is being loaded into a 2 MB CR1000. that a memory card (CF) is not available when a program is attempting to access the CRD: drive.
  • Page 482: Nan And ±Inf

    10.5.3.1.1 Voltage Measurements The CR1000 has the following user-selectable voltage ranges: ±5000 mV, ±2500 mV, ±250 mV, and ±25 mV. Input signals that exceed these ranges result in an over-range indicated by a NAN for the measured result. With auto range to automatically select the best input range, a NAN indicates that either one or both of the two measurements in the auto-range sequence over ranged.
  • Page 483: Data Types, Nan, And ±Inf

    Section 10. Troubleshooting 10.5.3.3 Data Types, NAN, and ±INF NAN and ±INF are presented differently depending on the declared-variable data type. Further, they are recorded differently depending on the final-memory data type chosen compounded with the declared-variable data type used as the source (table Variable and FS Data Types with NAN and ±INF ).
  • Page 484: Output Processing And Nan

    Section 10. Troubleshooting Table 129. Variable and Final-Memory Data Types with NAN and ±INF Final-Memory Data Type & Associated Stored Values Variable Test Public / Type Expression IEEE4 UINT2 UNIT4 STRING BOOL BOOL8 LONG Variables As FLOAT 1 / 0 4294967295 +INF TRUE...
  • Page 485: Status Table As Debug Resource

    (p. 604) • Status Table as Debug Resource (p. 485) Consult the CR1000 Status table when developing a program or when a problem with a program is suspected. Critical Status table registers to review include CompileResults, SkippedScan, SkippedSlowScan, SkippedRecord, ProgErrors, MemoryFree, VarOutOfBounds, WatchdogErrors and Calibration.
  • Page 486: Table 130. Warning Message Examples

    Mem3 fail messages are not caused by user error, and only rarely by a hardware fault. Report any occurrence of this error to a Campbell Scientific application engineer, especially if the problem is reproducible. Any program generating these errors is unlikely to be running correctly.
  • Page 487: Skippedscan

    10.5.4.3 SkippedSlowScan The CR1000 automatically runs a slow sequence to update the calibration table. When the calibration slow sequence skips, the CR1000 will try to repeat that step of the calibration process next time around. This simply extends calibration time.
  • Page 488: Skippedrecord

    Status table. For example, the CR1000 may detect that ExArray() is not large enough and write Warning:Variable ExArray out of bounds to the CompileErrors register. The CR1000 does not catch all out-of-bounds errors, so take care that all arrays are sized as needed. 10.5.4.8 Watchdog Errors Watchdog errors indicate the CR1000 has crashed and reset itself.
  • Page 489: Status Table Watchdogerrors

    Section 10. Troubleshooting If any of the previous are not the apparent cause, contact a Campbell Scientific application engineer for assistance. Causes that require assistance include the following: Memory corruption. Check for memory failures with M command in • terminal mode (p.
  • Page 490: Troubleshooting - Operating Systems

    Once communications are established, CR1000 baud rate settings can be changed. Clues as to what the baud rate may be set at can be found by analyzing current and previous CR1000 programs for the SerialOpen() instruction, since SerialOpen() specifies a baud rate.
  • Page 491: Communicating With Multiple Pcs

    10.8.2 Communicating with Multiple PCs The CR1000 can communicate with multiple PCs simultaneously. For example, the CR1000 may be a node of an internet PakBus network communicating with a distant instance of LoggerNet. An onsite technician can communicate with the CR1000 using PC200W with a serial connection, so long as the PakBus addresses of the host PCs are different.
  • Page 492: Commsmemfree(2)

    Section 10. Troubleshooting The following expressions are used to pick the individual values from CommsMemFree(1): tiny = CommsMemFree(1) % 100 lil = (CommsMemFree(1) / 100) % 100 mid = (CommsMemFree(1) / 10000) % 100 med = (CommsMemFree(1) / 1000000) % 100 lrg = (CommsMemFree(1) / 100000000) % 100 Table 131.
  • Page 493: Commsmemfree(3)

    30 seconds as lilfreeq, bigfreeq, and recvdq. If lilfreeq or bigfreeq free packets drop and stay near zero, or if the number in rcvdq climbs and stays high (all are rare occurrences), please contact a Campbell Scientific application engineer as the operating system may need adjustment.
  • Page 494: Troubleshooting - Power Supplies

    All components may need to be checked if the power supply is not functioning properly. The section Diagnosis and Fix Procedures includes the following (p. 495) flowcharts for diagnosing or adjusting power equipment supplied by Campbell Scientific: Battery-voltage test • Charging-circuit test (when using an unregulated solar panel) •...
  • Page 495: Troubleshooting Power Supplies - Procedures

    PS100 charging regulator, or a sealed-rechargeable battery attached to a CH100 charging regulator. If a need for repair is indicated after following the procedure, see Warranty and Assistance for information on (p. 3) sending items to Campbell Scientific.
  • Page 496: Charging Regulator With Solar-Panel Test

    Recharge battery* Is the battery voltage > 12 Vdc? Battery voltage is adequate for CR1000 operation. However, if the CR1000 is to function for a long period, Campbell Scientific recommends replacing, or, if using a sealed, rechargeable battery, recharging the battery so the voltage is > 12 Vdc.
  • Page 497 See Adjusting Charging Voltage (p. 499) to calibrate the charging regulator, or 1) Switch the power switch to return the charging regulator to Campbell 2) Disconnect the power source (transformer / solar panel). Scientific for calibration. 3) Remove the 5 kΩ resistor 4) Place a 50 Ω, 1 W resistor between a...
  • Page 498: Charging Regulator With Transformer Test

    The procedure outlined in this flow chart tests PS100 and CH100 charging regulators that use ac/ac or ac/dc transformers as power source. If a need for repair is indicated after following the procedure, see Warranty and Assistance (p. 3) for information on sending items to Campbell Scientific.
  • Page 499: Adjusting Charging Voltage

    The charger is functioning properly. Remove the 50 Ω resistor. 10.9.3.4 Adjusting Charging Voltage Note Campbell Scientific recommends that a qualified electronic technician perform the following procedure. The procedure outlined in this flow chart tests and adjusts PS100 and CH100 charging regulators.
  • Page 500 Section 10. Troubleshooting Adjusting Charging Circuit 1) Place a 5 kΩ resistor between a terminal and a (ground) ground terminal on the charging regulator. Use a voltmeter to measure the voltage across the 5 kΩ resistor. 2) Connect a power source that supplies a voltage >17 V to the input terminals of the charging regulator.
  • Page 501: Terminal Mode

    C command, terminal options are not necessary to routine CR1000 operations. To enter terminal mode, connect a PC to the CR1000 with the same hard-wire serial connection used in the What You Will Need section. Open a terminal (p.
  • Page 502: Table 133. Cr1000 Terminal Commands

    Lists technical data concerning program scans. Serial FLASH data dump Campbell Scientific engineering tool Read clock chip Lists binary data concerning the CR1000 clock chip. Status Lists the CR1000 Status table. Card status and compile errors Lists technical data concerning an installed CF card.
  • Page 503: Serial Talk Through And Comms Watch

    PakBus characters on the nine-pin RS-232 port or CS I/O port, unless the port is first opened with the SerialOpen() command. If the CR1000 attempts to enter a terminal session on the nine-pin RS-232 port or CS I/O port because of an incoming non-PakBus character, and that port was not opened using the SerialOpen() command, any currently running terminal function, including the comms watch, will immediately stop.
  • Page 504: Logs

    Once you have run through the recovery procedure, consider the following: If a CRD: drive (memory card) or a USB: drive (Campbell Scientific mass storage device) has been removed since the data was originally stored, then the Datalogger Data Recovery is run, the memory pointer will likely be in the wrong...
  • Page 505 Section 10. Troubleshooting or USB: drive back in place and re-run the Datalogger Data Recovery wizard before restarting the CRBasic program. In any case, even when the recovery runs properly, the result will be that good data is recovered mixed with sections of empty or old junk. With the entire data dump in one file, you can sort through the good and the bad.
  • Page 507: Glossary

    11. Glossary 11.1 Terms Term. ac See Vac (p. 532). Term. accuracy A measure of the correctness of a measurement. See also the appendix Accuracy, Precision, and Resolution (p. 533). Term. A-to-D Analog-to-digital conversion. The process that translates analog voltage levels to digital values.
  • Page 508 Section 11. Glossary Term. asynchronous The transmission of data between a transmitting and a receiving device occurs as a series of zeros and ones. For the data to be "read" correctly, the receiving device must begin reading at the proper point in the series. In asynchronous communication, this coordination is accomplished by having each character surrounded by one or more start and stop bits which designate the beginning and ending points of the information (see synchronous...
  • Page 509 Scientific dataloggers and Campbell Scientific CDM peripheral devices. It consists of a physical layer definition and a data protocol. CDM devices are similar to Campbell Scientific SDM devices in concept, but the use of the CPI bus enables higher data-throughput rates and use of longer cables. CDM devices require more power to operate in general than do SDM devices.
  • Page 510 See terminal (p. 530). Term. constant A packet of CR1000 memory given an alpha-numeric name and assigned a fixed number. Term. control I/O C terminals configured for controlling or monitoring a device.
  • Page 511 Section 11. Glossary Term. CPU Central processing unit. The brains of the CR1000. Also refers to two the following two memory areas: CPU: memory drive Memory used by the CPU to store table data. Term. CR1000KD An optional hand-held keyboard display for use with the CR1000 datalogger.
  • Page 512 Term. data table A concept that describes how data are organized in CR1000 memory, or in files that result from collecting data in CR1000 memory. The fundamental data table is created by the CRBasic program as a result of the DataTable() instruction and resides in binary form in main-memory SRAM.
  • Page 513 Term. DCE Data Communication Equipment. While the term has much wider meaning, in the limited context of practical use with the CR1000, it denotes the pin configuration, gender, and function of an RS-232 port. The RS-232 port on the CR1000 is DCE. Interfacing a DCE device to a DCE device requires a null-modem cable.
  • Page 514 CR1000, it denotes the pin configuration, gender, and function of an RS-232 port. The RS-232 port on the CR1000 is DCE. Attachment of a null-modem cable to a DCE device effectively converts it to a DTE device. See Term. DCE (p.
  • Page 515 Term. File Retrieval tab A feature of LoggerNet Setup Screen. In the Setup Screen network map (Entire Network), click on a CR1000 datalogger node. The File Retieval tab should be one of several tabs presented at the right of the screen.
  • Page 516 The more frequently data are written, the shorter the life expectancy. Term. FLOAT Four-byte floating-point data type. Default CR1000 data type for Public or Dim variables. Same format as IEEE4. Term. fN1 fN1 or F .
  • Page 517 Section 11. Glossary Term. garbage The refuse of the data communication world. When data are sent or received incorrectly (there are numerous reasons why this happens), a string of invalid, meaningless characters (garbage) often results. Two common causes are: 1) a baud-rate mismatch and 2) synchronous data being sent to an asynchronous device and vice versa.
  • Page 518 Files Manager setting is now modified to (p. 603) allow for creation of a file on a CR1000 memory drive, such as USR:, to store information in ring memory. Term. isolation Hardwire telecommunication devices and cables can serve as alternate paths to earth ground and entry points into the CR1000 for electromagnetic noise.
  • Page 519 Term. leaf node A PakBus node at the end of a branch. When in this mode, the CR1000 is not able to forward packets from one of its communication ports to another. It will not maintain a list of neighbors, but it still communicates with other PakBus dataloggers and wireless sensors.
  • Page 520 (PLCs). See section Modbus (p. 91). Term. modem/terminal Any device that has the following: Ability to raise the CR1000 ring line or be used with an optically isolated interface (see the appendix CS I/O Serial Interfaces ) to raise the (p. 652) ring line and put the CR1000 in the telecommunication command state.
  • Page 521 Section 11. Glossary Term. mV The SI abbreviation for millivolts. Term. NAN Not a number. A data word indicating a measurement or processing error. Voltage over-range, SDI-12 sensor error, and undefined mathematical results can produce NAN. See the section NAN and ±INF (p.
  • Page 522 Term. operating system The operating system (also known as "firmware") is a set of instructions that controls the basic functions of the CR1000 and enables the use of user written CRBasic programs. The operating system is preloaded into the CR1000 at the factory but can be re-loaded or upgraded by you using Device software.
  • Page 523 Sensors commonly measured with period average include water-content reflectometers. Term. peripheral Any device designed for use with the CR1000 (or another Campbell Scientific datalogger). A peripheral requires the CR1000 to operate. Peripherals include measurement, control and data-retrieval and (p.
  • Page 524: Table 135. Program Send Command

    Section 11. Glossary Term. PreserveVariables CRBasic instruction that protects Public variables from being erased when a program is recompiled. Term. print device Any device capable of receiving output over pin 6 (the PE line) in a receive- only mode. Printers, "dumb" terminals, and computers in a terminal mode fall in this category.
  • Page 525 A measure of the fineness of a measurement. See also Accuracy, Precision, and Resolution (p. 533). Term. ring line Ring line is pulled high by an external device to notify the CR1000 to commence RS-232 communications. Ring line is pin 3 of a DCE (p. 513) 232 port.
  • Page 526 Device configured as a router is able to forward PakBus packets from one port to another. To perform its routing duties, a CR1000 configured as a router maintains its own list of neighbors and sends this list to other routers in the PakBus network.
  • Page 527 When time functions are run inside the Scan() / NextScan construct, time stamps are based on when the scan was started according to the CR1000 clock. Resolution of scan time is equal to the length of the scan. See system time (p.
  • Page 528 See sections Security — Overview and Signatures (p. 92) (p. 472). Term. single-ended A serial communication protocol. One-direction data only. Serial communications between a serial sensor and the CR1000 may be simplex. Reading list: simplex and full-duplex duplex half-duplex (p. 528), (p.
  • Page 529 Section 11. Glossary Term. Station Status command A command available in most datalogger support software (p. 95). following figure is a sample of station status output. Term. string A datum or variable consisting of alphanumeric characters. Term. support software See Term. datalogger support software (p.
  • Page 530 (p. 527). Term. task Two definitions: Grouping of CRBasic program instructions automatically by the CR1000 compiler. Tasks include measurement, SDM or digital, and processing. Tasks are prioritized when the CRBasic program runs in pipeline mode. A user-customized function defined through LoggerNet Task Master.
  • Page 531 The CR1000 needs and external charge controller. Term. user program The CRBasic program written by you in Short Cut program wizard. Term. USR: drive A portion of CR1000 memory dedicated to the storage of image or other files.
  • Page 532 Term. Vdc Volts direct current. Also VDC. Two definitions: The CR1000 operates with a nominal 12 Vdc. The CR1000 can supply nominal 12 Vdc, regulated 5 Vdc, regulated 3.3 Vdc, and variable excitation in the ±2.5 Vdc range. The CR1000 measures analog voltage in the ±5.0 Vdc range and pulse voltage in the ±20 Vdc range.
  • Page 533: Concepts

    (p. 603). of concern, but normally indicates that the situation should just be monitored. A large number of errors (>10) accumulating over a short period indicates a hardware or software problem. Consult with a Campbell Scientific application engineer. Term. weather-tight Describes an instrumentation enclosure impenetrable by common environmental conditions.
  • Page 534 Section 11. Glossary practice" as an analogy. Table Accuracy, Precision, and Resolution shows (p. 533) four targets. The bull's eye on each target represents the absolute correct measurement. Each shot represents an attempt to make the measurement. The diameter of the projectile represents resolution. The objective of a data- acquisition system should be high accuracy, high precision, and to produce data with resolution as high as appropriate for a given application.
  • Page 535: Attributions

    12. Attributions Use of the following trademarks in the CR1000 Operator's Manual does not imply endorsement by their respective owners of Campbell Scientific: Crydom • Newark • Mouser • MicroSoft • WordPad • HyperTerminal • • LI-COR...
  • Page 537: Crbasic Programming Instructions

    Defines one or more PakBus addresses to which the datalogger will not send encrypted PakBus messages, even though PakBus encryption is enabled. Syntax EncryptExempt(BeginPakBusAddr, EndPakBusAddr) PipelineMode Configures the CR1000 to perform measurement tasks separate from, but concurrent with, processing tasks. Syntax PipelineMode SequentialMode Configures datalogger to perform tasks sequentially.
  • Page 538: Variable Declarations & Modifiers

    Sets numeric password for datalogger security levels 1, 2, and 3. Executes at compile time. Syntax SetSecurity(security[1], security[2], security[3]) StationName Sets the station name internal to the CR1000. Does not affect data files created by datalogger support software. See sections Miscellaneous Features (p. 174) Conditional Output (p. 170).
  • Page 539: Constant Declarations

    Used in conjunction with ESSInitialize. Syntax ESSVariables NewFieldNames Assigns a new name to a generic variable or array. Designed for use with Campbell Scientific wireless sensor networks. Syntax NewFieldNames(GenericName, NewNames) PreserveVariables Retains values in Dim or Public variables when the CRBasic program restarts after a power failure, manual stop, or other operations that cause the program to recompile.
  • Page 540: Data-Table Declarations

    Appendix A. CRBasic Programming Instructions Syntax Const [constant name] = [value or expression] ConstTable / EndConstTable Declares constants, the value of which can be changed using the CR1000KD Keyboard Display or terminal C option. The program is recompiled with the new values when values change.
  • Page 541: Data Destinations

    Sets time-series processing to include all measurements since the last time data storage occurred. Syntax OpenInterval TableHide Suppresses the display and data collection of a data table in CR1000 memory. Syntax TableHide A.2.2 Data Destinations Note TableFile() with Option 64 is the preferred instruction to write data to a Campbell Scientific mass storage device or memory card in most applications.
  • Page 542: Processing For Output To Final-Data Memory

    Appendix A. CRBasic Programming Instructions TableFile Writes a file from a data table to a CR1000 memory drive. Syntax TableFile("FileName", Options, MaxFiles, NumRecs / TimeIntoInterval, Interval, Units, OutStat, LastFileName) A.2.3 Processing for Output to Final-Data Memory Read More See Data Output-Processing Instructions (p.
  • Page 543 Appendix A. CRBasic Programming Instructions Syntax Median(Reps, Source, MaxN, DataType, DisableVar) Minimum Stores the minimum value over the data-output interval. Syntax Minimum(Reps, Source, DataType, DisableVar, Time) Moment Stores the mathematical moment of a value over the data-output interval. Syntax Moment(Reps, Source, Order, DataType, DisableVar) PeakValley Detects maxima and minima in a signal.
  • Page 544: Multiple-Source

    Appendix A. CRBasic Programming Instructions A.2.3.2 Multiple-Source ETsz Stores evapotranspiration (ETsz) and solar radiation (RSo). Syntax ETsz(Temp, RH, uZ, Rs, Longitude, Latitude, Altitude, Zw, Sz, DataType, DisableVar) RainFlowSample Stores a sample of the CDM_VW300RainFlow into a data table. Syntax RainFlowSampe(Source, DataType) WindVector Processes wind speed and direction from either polar or orthogonal sensors.
  • Page 545: Program Control Instructions

    Appendix A. CRBasic Programming Instructions Syntax PulseCountReset A.4 Program Control Instructions A.4.1 Common Program Controls BeginProg / EndProg Marks the beginning and end of a program. Syntax BeginProg [program code] EndProg Call Transfers program control from the main program to a subroutine. Syntax Call subname (list of variables) CallTable...
  • Page 546 Appendix A. CRBasic Programming Instructions [ExitDo] [statementblock] Loop [{While | Until} condition] EndSequence Ends a sequence that starts at BeginProg or SlowSequence. An optional instruction in many applications. Syntax EndSequence Exit Exits program. Syntax Exit For / To / Step / ExitFor / Next Repeats a group of instructions for a specified number of times.
  • Page 547 Appendix A. CRBasic Programming Instructions Syntax Scan(Interval, Units, Option, Count) [statement block] ExitScan [statement block] ContinueScan [statement block] NextScan Select Case / Case / Case Is / Case Else / EndSelect Executes one of several statement blocks depending on the value of an expression. CaseElse is optional.
  • Page 548: Advanced Program Controls

    Defines a list of LONG constants to be read (using Read) into a variable array later in the program. Syntax DataLong [list of constants] Read [Variable Expression] Restore IfTime Returns a number indicating True (-1) or False (0) based on the CR1000 real- time clock. Syntax If (IfTime(TintoInt, Interval, Units)) Then -or-...
  • Page 549 Appendix A. CRBasic Programming Instructions Variable = IfTime(TintoInt, Interval, Units) Read Reads constants from the list defined by Data or DataLong into a variable array. Syntax Read [Variable Expression] Restore Resets the location of the Read pointer back to the first value in the list defined by Data or DataLong.
  • Page 550: Measurement Instructions

    Appendix A. CRBasic Programming Instructions If TimeIntoInterval(TintoInt, Interval, Units) TimeIsBetween Determines if the CR1000 real-time clock falls within a range of time. Syntax TimeIsBetween(BeginTime, EndTime, Interval, Units) A.5 Measurement Instructions Read More For information on recording data from RS-232 and TTL output...
  • Page 551: Voltage

    Appendix A. CRBasic Programming Instructions A.5.2 Voltage VoltDiff Measures the voltage difference between high and low inputs of a differential analog-input channel. Syntax VoltDiff(Dest, Reps, Range, DiffChan, RevDiff, SettlingTime, Integ, Mult, Offset) VoltSe Measures the voltage at a single-ended input with respect to ground. Syntax VoltSe(Dest, Reps, Range, SEChan, MeasOfs, SettlingTime, Integ, Mult, Offset)
  • Page 552: Excitation

    Appendix A. CRBasic Programming Instructions Syntax BrFull(Dest, Reps, Range, DiffChan, Vx/ExChan, MeasPEx, ExmV, RevEx, RevDiff, SettlingTime, Integ, Mult, Offset) BrFull6W Measures ratio of V of a six-wire full-bridge. Reports 1000 • (V diff2 diff1 diff2 diff1 Syntax BrFull6W(Dest, Reps, Range1, Range2, DiffChan, Vx/ExChan, MeasPEx, ExmV, RevEx, RevDiff, SettlingTime, Integ, Mult, Offset) BrHalf...
  • Page 553: Pulse And Frequency

    Appendix A. CRBasic Programming Instructions SW12 Sets a SW12 switched 12 Vdc terminal high or low. Syntax SW12(Port) A.5.6 Pulse and Frequency Related Topics: • Pulse Measurements — Specifications • Pulse Measurements — Overview (p. 68) • Pulse Measurements — Details (p.
  • Page 554: Digital I/O

    Appendix A. CRBasic Programming Instructions A.5.7 Digital I/O CheckPort Returns the status of a C terminal configured for control. Syntax X = CheckPort(Port) PortGet Reads the status of a C terminal configured for control. Syntax PortGet(Dest, Port) PortsConfig Configures C terminals for input or output. Syntax PortsConfig(Mask, Function) ReadIO...
  • Page 555: Measurement

    Issues commands to, and retrieves results from, an SDI-12 sensor. Syntax SDI12Recorder(Dest, Terminal, SDIAddress, SDICommand, Multiplier, Offset) SDI12SensorSetup Sets up the CR1000 to act as an SDI-12 sensor. SDI12SensorSetup(Repetitions, SDIPort, SDIAddress, ResponseTime) SDI12SensorResponse Manages data being held by the CR1000 for transfer to an SDI-12 recorder. Syntax SDI12SensorResponse(SDI12Source)
  • Page 556: Specific Sensors

    ChanI, IMult, MaxIrms, Reps) DANGER Ac mains power can kill. You are responsible for ensuring connections to ac mains power conforms to applicable electrical codes. Contact a Campbell Scientific application engineer for information on available isolation transformers. CS110 Measures electric field by means of a CS110 electric-field meter.
  • Page 557 Syntax EC100Configure(Result, SDMAddress, ConfigCmd, DestSource) Used with a GPS device to keep the CR1000 clock correct or provide other information from the GPS such as location and speed. Proper operation of this instruction may require a factory upgrade of on-board memory.
  • Page 558: Wireless Sensor Network

    ArrayIndex Returns the index of a named element in an array. Syntax ArrayIndex(Name) CWB100 Sets up the CR1000 to request and accept measurements from the CWB100 wireless sensor base. Syntax CWB100(ComPort, CWSDest, CWSConfig) CWB100Diagnostics Sets up the CR1000 to request and accept measurements from the CWB100 wireless sensor base.
  • Page 559: Peripheral Device Support

    Appendix A. CRBasic Programming Instructions Syntax CWB100RSSI(CWBPort) A.5.10 Peripheral Device Support Multiple SDM instructions can be used within a program. AM25T Controls the AM25T analog-voltage input multiplexer. Syntax AM25T(Dest, Reps, Range, AM25TChan, DiffChan, TCType, Tref, ClkPort, ResPort, VxChan, RevDiff, SettlingTime, Integ, Mult, Offset) AVW200 Controls and collects VSPECT...
  • Page 560 Controls an SDM-CD16AC, SDM-CD16, or SDM-CD16D control device. Syntax SDMCD16AC(Source, Reps, SDMAddress) SDMCD16Mask Controls an SDM-CD16AC, SDM-CD16, or SDM-CD16D control device. Unlike the SDMCD16AC, it allows the CR1000 to select the ports to activate via a mask. Commonly used with TimedControl(). Syntax SDMCD16Mask(Source, Mask, SDMAddress)
  • Page 561 Controls, transmits, and receives data from an SDM-SIO4 I/O expansion module. Syntax SDMSIO4(Dest, Reps, SDMAddress, Mode, Command, Param1, Param2, ValuesPerRep, Multiplier, Offset) SDMSpeed Changes the rate the CR1000 uses to clock SDM device data. Syntax SDMSpeed(BitPeriod) SDMSW8A Controls and reads an SDM-SW8A switch-closure expansion module.
  • Page 562: Plc Control - Instructions

    Appendix A. CRBasic Programming Instructions Syntax SDMTrigger SDMX50 Controls the SDM-X50 coaxial multiplexer independent of the TDR100() instruction. Syntax SDMX50(SDMAddress, Channel) TDR100 Measures TDR probes connected to the TDR100 time-domain reflectometer directly or through a SDMX50 coaxial multiplexer. Syntax TDR100(Dest, SDMAddress, Option, Mux/ProbeSelect, WaveAvg, Vp, Points, CableLength, WindowLength, ProbeLength, ProbeOffset, Mult, Offset) TimedControl...
  • Page 563: Processing And Math Instructions

    Appendix A. CRBasic Programming Instructions SDMCV04() SDMIO16() TimedControl() ProcHiPri/EndProcHiPri DNP() DNPUpdate() DNPVariable() ModbusMaster() ModbusSlave() A.7 Processing and Math Instructions A.7.1 Mathematical Operators Note Program declaration AngleDegrees() (see Program Declarations (p. 537)) sets math functions to use degrees instead of radians. A.7.2 Arithmetic Operators Table 136.
  • Page 564: Bitwise Operations

    Appendix A. CRBasic Programming Instructions Less than or equal <= A.7.3 Bitwise Operations Bitwise shift operators (<< and >>) allow CRBasic to manipulate the position of bits within a variable declared As Long (integer). Following are example expressions and expected results: &B00000001 <<...
  • Page 565: Compound-Assignment Operators

    Appendix A. CRBasic Programming Instructions CRBasic Example 70. Using Bit-Shift Operators 'This program example demonstrates the unpacking of a packed integer. The binary value in 'variable input_val is unpacked resulting in three integers individually stored in variables 'value(1), value(2), and value(3). The information that is unpacked into value(1) is stored 'in 'bits 7 to 6 of input_val, value(2) is unpacked from bits 5 to 4, and value(3) from bits '3 to 0, zero being the LSB or least-significant bit.
  • Page 566: Trigonometric Functions

    Appendix A. CRBasic Programming Instructions Performs a logical equivalence on two expressions. Syntax result = expr1 EQV expr2 Performs a logical negation on an expression. Syntax result = NOT expression Performs a logical disjunction on two expressions. Syntax result = expr1 OR expr2 Performs a logical exclusion on two expressions.
  • Page 567 Appendix A. CRBasic Programming Instructions ASIN Returns the arcsin of a number. Syntax x = ASIN(source) Returns the arctangent of a number. Syntax x = ATN(source) ATN2 Returns the arctangent of y / x. Syntax x = ATN(y , x) Returns the cosine of an angle specified in radians.
  • Page 568: Derived Trigonometric Functions

    Appendix A. CRBasic Programming Instructions TANH Returns the hyperbolic tangent of an expression or value. Syntax x = TANH(Source) A.7.6.2 Derived Trigonometric Functions Table Derived Trigonometric Functions lists trigonometric functions that (p. 568) can be derived from intrinsic trigonometric functions. Table 138.
  • Page 569 Appendix A. CRBasic Programming Instructions Returns e (the base of natural logarithms) raised to a power. Syntax x = EXP(source) Floor Rounds a value to a lower integer. Syntax variable = Floor(Number) FRAC Returns the fractional part of a number. Syntax x = FRAC(source) INT or FIX...
  • Page 570: Integrated Processing

    Appendix A. CRBasic Programming Instructions Syntax result = operand1 MOD operand2 Performs an exponentiation on a variable. Same functionality as ^ operator. See section Arithmetic Operators (p. 563). Syntax PWR(X, Y) RectPolar Converts from rectangular to polar coordinates. Syntax RectPolar(Dest, Source) Round Rounds a value to a higher or lower number.
  • Page 571: Spatial Processing

    Appendix A. CRBasic Programming Instructions Syntax PRT(Dest, Reps, Source, Mult) PRTCalc Calculates temperature from the resistance of an RTD according to a range of alternative standards, including IEC. Supercedes PRT() in most applications. Syntax PRTCalc(Dest, Reps, Source, PRTType, Mult, Offset) SolarPosition Calculates solar position.
  • Page 572: Other Functions

    Appendix A. CRBasic Programming Instructions CovSpa Computes the spatial covariance of sets of data. Syntax CovSpa(Dest, NumOfCov, SizeOfSets, CoreArray, DatArray) FFTSpa Performs a Fast Fourier Transform on a time series of measurements. Syntax FFTSpa(Dest, N, Source, Tau, Units, Option) MaxSpa Finds the maximum value in an array.
  • Page 573: Histograms

    Appendix A. CRBasic Programming Instructions Syntax AddPrecise(PrecisionVariable, X) AvgRun Stores a running average of a measurement. Syntax AvgRun(Dest, Reps, Source, Number) Note AvgRun() should not be inserted within a For / Next construct with the Source and Dest parameters indexed and Reps set to 1. In essence, doing so will perform a single running average, using the values of the different elements of the array, instead of performing an independent running average on each element of the array.
  • Page 574: String Functions

    Appendix A. CRBasic Programming Instructions Syntax Histogram4D(BinSelect, Source, DataType, DisableVar, Bins1, Bins2, Bins3, Bins4, Form, WtVal, LoLim1, UpLim1, LoLim2, UpLim2, LoLim3, UpLim3, LoLim4, UpLim4) LevelCrossing Processes data into a one- or two-dimensional histogram using a level-crossing counting algorithm. Syntax LevelCrossing(Source, DataType, DisableVar, NumLevels, 2ndDim, CrossingArray, 2ndArray, Hysteresis, Option) RainFlow Processes data with the Rainflow counting algorithm, essential to estimating...
  • Page 575: String Commands

    Appendix A. CRBasic Programming Instructions Table 139. String Operations String comparison operators The comparison operators =, >,<,<>, >= and <= operate on strings. String final-data output processing The Sample() instruction will convert data types if the source data type is different than the Sample() data type.
  • Page 576 Appendix A. CRBasic Programming Instructions Syntax String = FormatLong(Long, FormatString) FormatLongLong Converts a 64-bit LONG integer into a decimal value in the format of a string variable. Syntax FormatLongLong(LongLongVar(1)) Returns a hexadecimal string representation of an expression. Syntax Variable = HEX(Expression) HexToDec Converts a hexadecimal string to a float or integer.
  • Page 577 Appendix A. CRBasic Programming Instructions LowerCase Converts a string to all lowercase characters. Syntax String = LowerCase(SourceString) Returns a substring that is within a string. Syntax String = Mid(SearchString, Start, Length) Replace Searches a string for a substring and replaces that substring with a different string. Syntax variable = Replace(SearchString, SubString, ReplaceString) Right...
  • Page 578: Time Keeping - Instructions

    (p. 75) • Time Keeping — Instructions (p. 578) Within the CR1000, time is stored as integer seconds and nanoseconds into the second since midnight, January 1, 1990. ClockChange Returns milliseconds of clock change due to any setting of the clock that occurred since the last execution of ClockChange.
  • Page 579 Determine if US daylight saving time has begun or ended. Optionally advance or turn back the CR1000 clock one hour. Syntax variable = DaylightSavingUS(DSTSet) IfTime Returns a number indicating True (-1) or False (0) based on the CR1000 real- time clock. Syntax If (IfTime(TintoInt, Interval, Units)) Then -or-...
  • Page 580: Voice-Modem Instructions

    Defines the dialing string for a COM310 voice modem. Syntax DialVoice(DialString) VoiceBeg / EndVoice Marks the beginning and ending of voice code that is executed when the CR1000 detects a ring from a voice modem. Syntax VoiceBeg [voice code to be executed]...
  • Page 581: Custom Menus - Instructions

    Appendix A. CRBasic Programming Instructions VoiceNumber Returns one or more numbers (1 to 9) terminated by the # or * key. Syntax VoiceNumber(TimeOut*IDH_POPUP_VoiceKey_Timeout) VoicePhrases Provides a list of phrases for VoiceSpeak(). Syntax VoicePhrases(PhraseArray, Phrases) VoiceSetup Controls the hang-up of the COM310 voice modem. Syntax VoiceSetup(HangUpKey, ExitSubKey, ContinueKey, SecsOnLine, UseTimeout, CallOut)
  • Page 582 Appendix A. CRBasic Programming Instructions Syntax: DisplayLine(Value) DisplayMenu / EndMenu Marks the beginning and ending of a custom menu. Syntax: DisplayMenu("MenuName", AddToSystem) [menu definition] EndMenu DisplayValue Defines the name and associated data-table value or variable for an item in a custom menu.
  • Page 583: Serial Input / Output

    See the appendix Endianness (p. 643). Syntax MoveBytes(Destination, DestOffset, Source, SourceOffset, NumBytes) SerialBrk Sends a break signal with a specified duration to a CR1000 serial port. Syntax SerialBrk(Port, Duration) SerialClose Closes a communication port that was previously opened by SerialOpen(). Syntax...
  • Page 584: Peer-To-Peer Pakbus® Communications

    • PakBus Networking Guide (available at www.campbellsci.com/manuals (http://www.campbellsci.com/manuals)) PakBus is a proprietary networking communication protocol designed to optimize communications between Campbell Scientific dataloggers and peripherals. PakBus features auto-discovery and self-healing. Following is a list of CRBasic instructions that control PakBus processes. Some PakBus instructions specify a PakBus address (PakBusAddr) or a COM port (ComPort).
  • Page 585 This will make the instruction execute faster; however, any data that it retrieves, and the result code, will be posted only after the communication is complete. AcceptDataRecords Sets up a CR1000 to accept and store records from a remote PakBus datalogger. Syntax AcceptDataRecords(PakBusAddr, TableNo, DestTableName) Broadcast Sends a broadcast message to a PakBus network.
  • Page 586 Syntax EncryptExempt(BeginPakBusAddr, EndPakBusAddr) GetDataRecord Retrieves the most recent record from a data table in a remote PakBus datalogger and stores the record in the CR1000. Syntax GetDataRecord(ResultCode, ComPort, NeighborAddr, PakBusAddr, Security, Timeout, Tries, TableNo, DestTableName) Note CR200, CR510PB, CR10XPB, and CR23XPB dataloggers do not respond to a GetDataRecord request from other PakBus dataloggers.
  • Page 587 Returns the neighbor address of (or the route to) a PakBus datalogger. Syntax variable = Route(PakBusAddr) RoutersNeighbors Returns a list of all PakBus routers and their neighbors known to the CR1000. Syntax RoutersNeighbors(DestArray(MaxRouters, MaxNeighbors+1)) Routes Returns a list of known dynamic routes for a PakBus datalogger that has been configured as a router in a PakBus network.
  • Page 588: Table 140. Asynchronous-Port Baud Rates

    Appendix A. CRBasic Programming Instructions Syntax SendGetVariables(ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, SendVariable, SendSwath, GetVariable, GetSwath) SendTableDef Sends the table definitions from a data table to a remote PakBus device. Syntax SendTableDef(ComPort, RouterAddr, PakBusAddr, DataTable) SendVariables Sends value(s) from a variable or variable array to a data table in a remote datalogger.
  • Page 589: Variable Management

    File Management Commands to access and manage files stored in CR1000 memory. CalFile Stores variable data, such as sensor calibration data, from a program into a non- volatile CR1000 memory file. CalFile() pre-dates and is not used with the FieldCal() function.
  • Page 590 Appendix A. CRBasic Programming Instructions Syntax CalFile(Source/Dest, NumVals, "Device:filename", Option) FileCopy Copies a file from one drive to another. Syntax FileCopy(FromFileName, ToFileName) FileClose Closes a file handle created by FileOpen(). Syntax FileClose(FileHandle) FileEncrypt Performs an encrypting algorithm on the file. Allows distribution of CRBasic files without exposing source code.
  • Page 591 Inserts code from a file (Filename) at the position of the Include() instruction at compile time. Include() cannot be nested. Syntax Include("Device:Filename") NewFile Determines if a file stored on the CR1000 has been updated since the instruction was last run. Typically used with image files. Syntax NewFile(NewFileVar, "FileName") RunProgram Calls a secondary CRBasic program file from the current active program.
  • Page 592: Data-Table Access And Management

    Appendix A. CRBasic Programming Instructions A.16 Data-Table Access and Management Commands to access and manage data stored in data tables, including Public and Status tables. FileMark Inserts a filemark into a data table. Syntax FileMark(TableName) GetRecord Retrieves one record from a data table and stores the results in an array. May be used with SecsSince1990().
  • Page 593: Tcp/Ip - Instructions

    • TCP/IP — Instructions (p. 593) • TCP/IP Links — List (p. 652) These instructions address use of email, SMS, web pages, and other IP services. These services are available only when the CR1000 is used with a network link-...
  • Page 594 Appendix A. CRBasic Programming Instructions device that has the PPP/IP key enabled, such as when the CR1000 IP stack is used. DHCPRenew Restarts DHCP on the ethernet interface. Syntax DHCPRenew EMailRecv Polls an SMTP server for email messages and stores the message portion of the email in a string variable.
  • Page 595 IPNetPower Controls power state of individual Ethernet devices. Syntax IPNetPower( IPInterface, State) IPRoute Sets the interface to be used (Ethernet or PPP) when the CR1000 sends an outgoing packet and both interfaces are active. Syntax IPRoute(IPAddr, IPInterface) IPTrace Writes IP debug messages to a string variable.
  • Page 596 Appendix A. CRBasic Programming Instructions PingIP Pings IP address. Syntax variable = PingIP(IPAddress, Timeout) PPPOpen Establishes a PPP connection with a server. Syntax variable = PPPOpen PPPClose Closes an opened PPP connection with a server. Syntax variable = PPPClose SNMPVariable Defines a custom MIB (Management Information Base) hierarchy for SNMP.
  • Page 597: Modem Control

    Appendix A. CRBasic Programming Instructions WebPageBegin / WebPageEnd Declares a web page that is displayed when a request for the defined HTML page comes from an external source. Syntax WebPageBegin("WebPageName", WebPageCmd) HTTPOut("<p>html string to output " + variable + " additional string to output</p>") HTTPOut("<p>html string to output "...
  • Page 598: Calibration Functions

    Appendix A. CRBasic Programming Instructions Sets up a CR1000 as a DNP slave (outstation/server) device. Third parameter is optional. Syntax DNP(ComPort, BaudRate, DisableLinkVerify) DNPUpdate Determines when the DNP slave will update arrays of DNP elements. Specifies the address of the DNP master to send unsolicited responses.
  • Page 599: Satellite Systems

    Syntax FieldCalStrain(Function, MeasureVar, Reps, GFAdj, ZeromV/V, Mode, KnownRS, Index, Avg, GFRaw, uStrainDest) LoadFieldCal Loads values from the .cal file into variables in the CR1000. Syntax LoadFieldCal(CheckSig) NewFieldCal Triggers storage of calibration values when a new .cal file has been written.
  • Page 600: Goes

    Initiates a single transmission to an ARGOS satellite when the instruction is executed. Syntax ArgosTransmit(ResultCode, ST20Buffer) A.21.2 GOES GOESData Sends data to a Campbell Scientific GOES satellite data transmitter. Syntax GOESData(Dest, Table, TableOption, BufferControl, DataFormat) GOESGPS Stores GPS data from the GOES satellite into two variable arrays. Syntax...
  • Page 601: Omnisat

    Appendix A. CRBasic Programming Instructions GOESStatus Requests status and diagnostic information from a Campbell Scientific GOES satellite transmitter. Syntax GOESStatus(Dest, StatusCommand) A.21.3 OMNISAT OmniSatData Sends a table of data to the OMNISAT transmitter for transmission via the GOES or METEOSAT satellite.
  • Page 602: User-Defined Functions

    Appendix A. CRBasic Programming Instructions INSATSetup Configures the OMNISAT-I transmitter for sending data over the INSAT-1 satellite. Syntax INSATSetup(ResultCode, PlatformID, RFPower) INSATStatus Queries the transmitter for status information. Syntax INSATStatus(ResultCode) A.22 User-Defined Functions Function / Return / Exit Function / EndFunction Creates a user-defined CRBasic instruction Syntax Function...
  • Page 603: Status, Settings, And Data Table Information (Status/Settings/Dti)

    Information presented in Station Status is not updated automatically. Click the Refresh button to update. Note Communication and processor bandwidth are consumed when generating the Status and DataTableInfo tables. If the CR1000 is very tight on processing time, as may occur in very long or complex operations, retrieving the Status table repeatedly may cause skipped scans (p.
  • Page 604: Status/Settings/Dti Directories

    (p. 609) Auto-Calibration (p. 608) Table 143. Status/Settings/DTI: Frequently Used Action Status/Setting/DTI Table Where Located Find the PakBus address of the CR1000 PakBusAddress Communications, PakBus (p. 623) See messages pertaining to compilation of the CRBasic program running in the CompileResults CRBasic Program I (p.
  • Page 605: Table 144. Status/Settings/Dti: Alphabetical Listing Of Keywords

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Table 144. Status/Settings/DTI: Alphabetical Listing of Keywords pppIPAddr (p. 625) Battery ErrorCalib MaxBuffDepth pppIPMask TCPClientConnections (p. 611) (p. 616) (p. 620) (p. 625) (p. 629) Baudrate() EthernetEnable MaxPacketSize pppPassword TCPPort (p. 611) (p.
  • Page 606: Table 145. Status/Settings/Dti: Status Table Entries On Cr1000Kd Keyboard Display

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Table 145. Status/Settings/DTI: Status Table Entries on CR1000KD Keyboard Display RecNum VarOutOfBound PortConfig() (p. 626) (p. 631) (p. 624) TimeStamp SkippedScan SW12Volts() (p. 630) (p. 628) (p. 629) OSVersion SkippedSystemScan PakBusRoutes (p.
  • Page 607: Table 147. Status/Settings/Dti: Settings (Comport) On Cr1000Kd Keyboard Display

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Table 147. Status/Settings/DTI: Settings (comport) on CR1000KD Keyboard Display Baudrate() Neighbors() (p. 611) (p. 622) Beacon() Verify() (p. 612) (p. 632) Table 148. Status/Settings/DTI: Settings (TCP/IP) on CR1000KD Keyboard Display IPInfo pppIPAddr (p.
  • Page 608: Table 151. Status/Settings/Dti: Auto-Calibration

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Table 151. Status/Settings/DTI: Auto-Calibration CalDiffOffset() SkippedSystemScan (p. 612) (p. 628) CalGain() ErrorCalib SystemProcTime (p. 613) (p. 616) (p. 629) LastSystemScan (p. 619) CalSeOffset() MaxSystemProcTime (p. 613) (p. 621) Table 152. Status/Settings/DTI: Communications, General Baudrate() CommsMemFree(2) RS232Handshaking...
  • Page 609: Table 156. Status/Settings/Dti: Communications, Tcp_Ip Iii

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Table 156. Status/Settings/DTI: Communications, TCP_IP III pppDial pppIPAddr pppUsername (p. 624) (p. 625) (p. 625) pppDialResponse pppIPMask (p. 625) (p. 625) pppInterface pppPassword (p. 625) (p. 625) Table 157. Status/Settings/DTI: CRBasic Program I BuffDepth MaxBuffDepth MeasureTime...
  • Page 610: Table 163. Status/Settings/Dti: Os And Hardware Versioning

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Table 163. Status/Settings/DTI: OS and Hardware Versioning OSDate OSVersion SerialNumber (p. 622) (p. 622) (p. 628) OSSignature RevBoard (p. 622) (p. 626) Table 164. Status/Settings/DTI: Power Monitors Battery Low5VCount (p. 611) (p.
  • Page 611: Status/Settings/Dti Descriptions (Alphabetical)

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) B.2 Status/Settings/DTI Descriptions (Alphabetical) Table 167. Status/Settings/DTI: B Alias, Read/Write, Access, DataType, Default Normal Keyword Description Units Value Range Station Status: Battery Voltage Keyboard: Status Table ≈ line 1 CRBasic: variable = status.keyword read only voltage of Voltage of the battery connected to the POWER IN...
  • Page 612: Table 169. Beacon() Array, Keywords, And Default Settings

    Alias: Communication Ports Beacon Intervals Keyboard: Settings (comports) CRBasic: variable = settings.keyword; SetSettings() Governs the rate at which the CR1000 broadcasts PakBus messages on the associated port to discover new neighboring nodes. It also governs the default verification interval if the value of Verify() (p.
  • Page 613 SetSettings() Array of eight PakBus addresses for routers that can act as central routers. By specifying a non-empty list for this setting, the CR1000 is configured as a branch read/write router meaning that it will not be required to keep...
  • Page 614 • 30 little allocates for maintaining PakBus routing • nothing in information. Represents roughly the maximum receive number of PakBus nodes that the CR1000 is able to queue track in its routing tables (see section CommsMemFree(2) (p. 492) TLS Not Keyboard: Status Table ≈...
  • Page 615: Table 171. Status/Settings/Dti: D

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Keyboard: Settings (General) ≈ line 16 CRBasic: variable = settings.keyword; SetSettings() read-only CPUDriveFree integer Bytes remaining on the CPU: drive. This drive resides in the serial FLASH and is always present. CRBasic programs are normally stored here.
  • Page 616: Table 172. Status/Settings/Dti: E

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Specifies the addresses of up to two domain name servers that the CR1000 can use to resolve domain names to IP addresses. Note that if DHCP is used to resolve IP information, the addresses obtained via DHCP are appended to this list.
  • Page 617: Table 174. Status/Settings/Dti: H

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Settings Editor: FTP Service Port Keyboard: Settings (TCP/IP) ≈ line 17 CRBasic: variable = settings.keyword; SetSettings() read/write 0 to 65535 FTPPort Configures the TCP port on which the FTP service is UINT2 offered.
  • Page 618 255.0–255.0– 4B STRING Specifies the address of the IP router to which the CR1000 will forward all non-local IP packets for which it has no route. A change will cause the CRBasic program to recompile. Settings Editor: CS I/O Default Gateway read/write 0–255.0–...
  • Page 619: Table 176. Status/Settings/Dti: L

    Keyboard: Settings (General) ≈ line 6 True = router CRBasic: variable = settings.keyword; read/write IsRouter False False=leaf SetSettings() BOOLEAN node Controls configuration of CR1000 as a router or leaf node. Table 176. Status/Settings/DTI: L Alias, Read/Write, Access, DataType, Default Normal Keyword...
  • Page 620: Table 177. Status/Settings/Dti: M

    Range Keyboard: Status Table ≈ line 43 read/write CRBasic: variable = status.keyword MaxBuffDepth LONG Maximum number of buffers the CR1000 will use to no units process lagged measurements. Settings Editor: Max Packet Size Keyboard: Settings (General) ≈ line 8 read/write CRBasic: variable = settings.keyword;...
  • Page 621 Keyboard: Status Table ≈ line 31 read only CRBasic: variable = status.keyword MemorySize LONG 4194304 4194304 bytes Total SRAM in the CR1000. See the table CR1000 Memory Allocation (p. 371). Keyboard: Status Table ≈ line 54 read/write CRBasic: variable = status.keyword Messages STRING...
  • Page 622: Table 178. Status/Settings/Dti: N

    CRBasic: variable = status.keyword LONG Signature of the operating system. Station Status: OS Version Settings Editor: OS Version read only Keyboard: Status Table ≈ line 3 OSVersion STRING CRBasic: variable = status.keyword Version of the operating system in the CR1000.
  • Page 623: Table 180. Status/Settings/Dti: P

    PakBus address for this CR1000. Assign a unique PakBusAddress 1 to 3999 LONG address if this CR1000 is to be placed in a PakBus network. Addresses 1 to 4094 are valid, but those ≥ 4000 are usually reserved for datalogger support software Many Campbell Scientific devices, (p.
  • Page 624 Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) Settings Editor: ??? Keyboard: Settings (TCP/IP) ≈ line 39 Aliased from: ServicesEnabled() read/write CRBasic: variable = settings.keyword; PakBusTCPEnabled True True or False BOOLEAN SetSettings() Enables (True) or disables (False) the PakBus TCP service.
  • Page 625 SetSettings() read/write pppInterface 0 (inactive) Controls which CR1000 communication port PPP LONG service is configured for. Warning: if this value is set to CS I/O ME, do not attach any other devices to the CS I/O port. A change will cause the CRBasic program to recompile.
  • Page 626: Table 181. Status/Settings/Dti: R

    Appendix B. Status, Settings, and Data Table Information (Status/Settings/DTI) SkippedScan MaxProcTime 620), (p. 628), (p. 620). Keyboard: Status Table ≈ line 25 read-only CRBasic: variable = status.keyword ProgErrors LONG ≥ 0 Number of compile or runtime errors for the running counts program.
  • Page 627: Table 182. Status/Settings/Dti: S

    See ProgSignature The pre-compiler can get the program text, but 626). generating the binary signature is not feasible due to endian, data size, and compiler structure layout differences between the PC and the CR1000. Table 182. Status/Settings/DTI: S Alias, Read/Write, Access,...
  • Page 628 Settings Editor: Serial Number Keyboard: Status Table ≈ line 7 read only CRBasic: variable = status.keyword SerialNumber LONG CR1000 serial number assigned by the factory. Stored in flash memory. Obsolete. Replaced by/aliased to HTTPEnabled, PakBusTCPEnabled, PingEnabled, ServicesEnabled() TelnetEnabled, TLSEnabled Station Status: Skipped Records in XXXX Keyboard/display: DataTableInfo ≈...
  • Page 629: Table 183. Status/Settings/Dti: T

    Time required to process auto (background) SystemProcTime FLOAT calibration calibration. See LastSystemScan (p. 619), μs runs MaxSystemProcTime SystemProcTime (p. 621), and section CR1000 Auto Calibration — 629), Overview (p. 92). Table 183. Status/Settings/DTI: T Alias, Read/Write, Access, DataType, Default Normal...
  • Page 630 SetSettings() 0 to 255 TLSConnections LONG Relates to the CR1000 being a server and the maximum number of concurrent TLS clients that can be connected. Settings Editor: TLS Private Key Password Keyboard: Settings (TCP/IP) ≈ line 42 CRBasic: variable = settings.keyword;...
  • Page 631: Table 184. Status/Settings/Dti: U

    -43200 to UTCOffset LONG -1 (disabled) 43200 Difference between local time (CR1000 clock) and seconds (-1=disable) UTC. Used in email and HTML headers (these protocols require the time stamp to be UTC), and by GPS(), NetworkTimeProtocol(), and DaylightSavingTime() instructions.
  • Page 632: Table 186. Status/Settings/Dti: W

    Array of integers indicating the interval that is reported as the link verification interval in the PakBus hello transaction messages. Indirectly governs the rate at which the CR1000 attempts to start a hello transaction with a neighbor if no other communication has taken place within the interval.
  • Page 633: Serial Port Pinouts

    Appendix C. Serial Port Pinouts C.1 CS I/O Communication Port Pin configuration for the CR1000 CS I/O port is listed in table CS I/O Pin Description (p. 633). Table 187. CS I/O Pin Description ABR: Abbreviation for the function name.
  • Page 634: Power States

    Appendix C. Serial Port Pinouts connect the computer DTE device to the CR1000 DCE device. The following table describes RS-232 pin function with standard DCE-naming notation. Note Pins 1, 4, 6, and 9 function differently than a standard DCE device. This is to accommodate a connection to a modem or other DCE device via a null modem.
  • Page 635: Table 189. Standard Null-Modem Cable Or Adapter-Pin Connections

    Appendix C. Serial Port Pinouts send the data, and return to sleep mode with no 40 second timeout. Table 189. Standard Null-Modem Cable or Adapter-Pin Connections DB9 Socket # DB9 Socket # 1 & 6 ——————————— ——————————— ——————————— ——————————— 1 & 6 ———————————...
  • Page 637: Ascii / Ansi Table

    • Term. ASCII / ANSI (p. 507) • ASCII / ANSI table (p. 637) American Standard Code for Information Interchange (ASCII) / American National Standards Institute (ANSI) Table 190. Decimal and hexadecimal Codes and Characters Used with CR1000 Tools Keyboard Hyper Keyboard Hyper LoggerNet...
  • Page 638 Appendix D. ASCII / ANSI Table Table 190. Decimal and hexadecimal Codes and Characters Used with CR1000 Tools Keyboard Hyper Keyboard Hyper Display LoggerNet Terminal Display LoggerNet Terminal ∟ œ £ ↔ ¥ ▲ ž ▼ Ÿ ƒ á ¡...
  • Page 639 Appendix D. ASCII / ANSI Table Table 190. Decimal and hexadecimal Codes and Characters Used with CR1000 Tools Keyboard Hyper Keyboard Hyper Display LoggerNet Terminal Display LoggerNet Terminal ¿ ┐ À └ Á ┴ Â ┬ Ã ├ Ä ─...
  • Page 640 Appendix D. ASCII / ANSI Table Table 190. Decimal and hexadecimal Codes and Characters Used with CR1000 Tools Keyboard Hyper Keyboard Hyper Display LoggerNet Terminal Display LoggerNet Terminal ã π ä Σ å σ æ µ ç τ è Φ...
  • Page 641: Fp2 Data Format

    Largest 13-bit magnitude is 8191, but (p. 249). D - P Campbell Scientific defines the largest-allowable magnitude as 7999 Decimal locaters can be viewed as a negative base-10 exponent with decimal locations as shown in table FP2 Decimal-Locater Bits (p. 641).
  • Page 643: Endianness

    A good discussion of endianness can be found at Wikipedia.com. Issues surrounding endianness in an instrument such as the CR1000 datalogger are usually hidden by the operating system. However, the following CR1000 functions bring endianness to the surface and may require some programming to accommodate differences: •...
  • Page 645: Supporting Products Lists

    (p. 645) Other Campbell Scientific datalogging devices can be used in networks with the CR1000. Data and control signals can pass from device to device with the CR1000 acting as a master, peer, or slave. Dataloggers communicate in a network ®...
  • Page 646: Sensor-Input Modules Lists

    • Measurement and Control Peripherals — Lists (p. 645) G.3 Sensor-Input Modules Lists Input peripherals expand sensor input capacity of the CR1000, condition sensor signals, or distribute the measurement load. G.3.1 Analog-Input Modules List Analog-input modules increase CR1000capacity. Some multiplexers allow multiplexing of excitation (analog output) terminals.
  • Page 647: Vibrating-Wire Input Modules List

    Two-channel static VSPECT vibrating-wire measurement AVW200 Series device G.3.5 Passive Signal Conditioners Lists Signal conditioners modify the output of a sensor to be compatible with the CR1000. G.3.5.1 Resistive-Bridge TIM Modules List Table 199. Resistive Bridge TIM Modules Model Description 4WFBS120 120 Ω, four-wire, full-bridge TIM module...
  • Page 648: Transient-Voltage Suppressors List

    Terminal strips cover and insulate input terminals to improve thermocouple measurements. Table 203. Terminal-Strip Covers Datalogger Terminal-Strip Cover Part Number No cover available CR800 No cover available CR1000 17324 CR3000 18359 G.4 PLC Control Modules — Lists Related Topics: • PLC Control — Overview (p. 74) •...
  • Page 649: Continuous-Analog-Output (Cao) Modules List

    Appendix G. Supporting Products Lists G.4.2 Continuous-Analog-Output (CAO) Modules List CAO modules enable the CR1000 to output continuous, adjustable voltages that may be required for strip charts and variable-control applications. Table 205. Continuous-Analog-Output (CAO) Modules Model Description SDM-AO4A Four-channel, continuous analog voltage output...
  • Page 650: Wired-Sensor Types List

    Appendix G. Supporting Products Lists Most electronic sensors, regardless of manufacturer, will interface with the CR1000. Some sensors require external signal conditioning. The performance of some sensors is enhanced with specialized input modules. G.5.1 Wired-Sensor Types List The following wired-sensor types are available from Campbell Scientific for integration into CR1000 systems.
  • Page 651: Data Retrieval And Telecommunication Peripherals - Lists

    • Data Retrieval and Telecommunications — Details (p. 391) • Data Retrieval and Telecommunication Peripherals — Lists (p. 651) Many telecommunication devices are available for use with the CR1000 datalogger. G.6.1 Keyboard Display — List Related Topics: • Keyboard Display — Overview (p.
  • Page 652: Hardwire, Single-Connection Comms Devices List

    Wireless network link interface, connects to CS I/O port. NL240 NL201 Network link interface, connects to CS I/O port. Connects to Peripheral port. Uses the CR1000 IP stack. NL115 Includes CF card slot. Connects to Peripheral port. Uses the CR1000 IP stack.
  • Page 653: Private-Network Radios List

    (p. 653) Data-storage devices allow you to collect data on-site with a small device and carry it back to the PC ("sneaker net"). Campbell Scientific mass-storage devices attach to the CR1000 CS I/O port. Table 218. Mass-Storage Devices Model Description...
  • Page 654: Datalogger Support Software - Lists

    Android, and Linux applications are also available. Note More information about software available from Campbell Scientific can be found at www.campbellsci.com http://www.campbellsci.com. Please consult with a Campbell Scientific application engineer for a software recommendation to fit a specific application. G.8.1 Starter Software List Short Cut, PC200W, and VisualWeather are designed for novice integrators but still have features useful in advanced applications.
  • Page 655: Loggernet Suite List

    Generates displays of real-time or historical data, post-processes data files, and generates reports. LoggerNetData It includes Split, RTMC, View Pro, and Data Filer. Campbell Scientific OPC Server. Feeds PC-OPC datalogger data into third-party, OPC-compatible graphics packages. Bundled with LoggerNet. Maps and provides PakBus Graph access to the settings of a PakBus network.
  • Page 656: Software Tools List

    Device Configuration Utility PC, Windows www.campbellsci.com. Used (DevConfig) to configure settings and update operating systems for Campbell Scientific devices. G.8.4 Software Development Kits List Table 224. Software Development Kits Software Compatibility Description Allows software developers to...
  • Page 657: Power Supplies - Products

    • Power Sources (p. 101) • Troubleshooting — Power Supplies (p. 494) Several power supplies are available from Campbell Scientific to power the CR1000. G.9.1 Battery / Regulator Combinations List Read More Information on matching power supplies to particular applications can be found in the Campbell Scientific Application Note "Power Supplies",...
  • Page 658: Batteries List

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

    Appendix G. Supporting Products Lists SP90-L 90 watt solar panel (requires regulator) 12 Vdc to 18 Vdc boost regulator (allows automotive DCDC18R supply voltages to recharge sealed, rechargeable batteries) G.9.5 24 Vdc Power Supply Kits List Table 229. 24 Vdc Power Supply Kits Model Description 28370...
  • Page 660: Enclosures List

    Enclosures List Table 233. Protection from Moisture — Products Model Description Desiccant 4 Unit Bag (Qty 20). Usually used 6714 in ENC enclosures to protect the CR1000. Single Sensor Terminal Case, Vented A150-L w/Desiccant. Desiccant 0.75g Bag. Normally used with 4091 Sentek water content probes.
  • Page 661: Index

    Index Analog-to-Digital Conversion ....305, 326, 337, 507 AND Operator .......... 200, 565 12 Volt Supply ......... 104 Anemometer ..........70 12V Terminal ........... 80, 105 ANSI ............507, 637 API ............92, 423 Argos ............599 5 Volt Pin ..........633 Arithmatic ..........
  • Page 662 Index Bridge ............67, 337, Common Mode Null ......... 308, 309 Bridge — Quarter-Bridge Shunt ....226 Communication ........47, 55, 90, Bridge Measurement ....... 104, 341, 391, 408, 490, 491 Buffer Depth ..........603 communication Ports ....... 603 Buffer Size ..........249 Communications Memory Errors .....
  • Page 663 Index Default.CR1 ..........116 Current ............ 103 Desiccant ..........93, 99, 513 Current Loop Sensor ....... 66, 80, 337 DevConfig ..........111, 112, Current Sourcing Limit ......105, 368 Custom Display ........455 Device Configuration ....... 111, 112 Custom Menu .......... 84, 581 Device Map ..........
  • Page 664 Index 337, 482, Fixed Voltage Range ........ 309 483, 491 Flag ............135, 414 Error — Analog Measurement ....108, 109, Floating Point .......... 161 Format — Numerical ........ 139 Error — Programming ......481 Forward ........... 33 Error — Soil Temperature Thermocouple .... 109 Fragmentation .........
  • Page 665 Index 474, 495, 550, 603 Instructions — BeginProg / EndProg ..545 I/O Port ............ 78 Instructions — BrFull ....... 551 IEEE4 ............130, 517 Instructions — BrFull6W ......551 Include File ..........147, 603 Instructions — BrHalf ......551 INF ............
  • Page 666 Index Instructions — DialModem ...... 597 Instructions — FormatFloat ..... 575 Instructions — DialSequence / EndDialSequence Instructions — FormatLong ..... 575 .... 585 Instructions — FormatLongLong ..... 575 Instructions — DialVoice ......580 Instructions — FP2 ........130, 516, Instructions — Dim ........513, 538 Instructions —...
  • Page 667 Index Instructions — LONG ......130, 162, Instructions — Public ....... 524, 538 163, 483, Instructions — PulseCount ...... 553 Instructions — PulseCountReset .... 544 Instructions — LowerCase ...... 575 Instructions — PulsePort ......554 Instructions — LTrim ....... 575 Instructions —...
  • Page 668 Index EndSelect Instructions — TableName.FieldName ... 592 .... 545 Instructions — TableName.Output ..592 Instructions — SemaphoreGet ....153, 548 Instructions — TableName.Record ..592 Instructions — SemaphoreRelease ..548 Instructions — TableName.TableFull ..592 Instructions — SendData ......585 Instructions —...
  • Page 669 Index Instructions — XOR ........ 565 Long Lead ..........317 Instrumentation Amplifier ......305 Loop ............519 Integer ............. 163, 518 Loop Counter ........... 519 Integrated Processing ......570 Low 12-V Counter ........603 Integration ..........315, 316 Low-Level Ac ........... 352, 367 Intermediate Memory ......
  • Page 670 Index Moisture ........... 93, 99 OR Operator ..........200 Monitoring Data ........48, 55 OS Date ........... 603 Mounting ..........43, 99 OS Signature ........... 603 MSB ............248, 249, OS Version ..........603 Output ............522 Multi-meter ..........520 Output Array ..........
  • Page 671 Index Polarity ............ 47 Program — Dimension ......134 Polarity Reversal ........325 Program — Documenting ......126 Polarized Sensor ........341 Program — Execution ......151 Polynomial — Thermocouple ....334 Program — Expression ......160 Port ............78, 462 Program —...
  • Page 672 Index 97, 249, 490, 526, Quarter-Bridge ........223, 337 RS-232 Pin Out ........633 Quarter-Bridge Shunt ......226 RS-232 Port ..........81 Quarter-Bridge Zero ........ 227 RS-232 Power States ......634 Quickstart Tutorial ........41 RS-232 Recording ........362 RS-232 Sensor ........245, 364 RTDAQ ............
  • Page 673 Index Sequence — Modem Hangup ....151 Spatial Processing ........571 Sequence — Shut Down ......151 Specifications .......... 97 Sequence — Web Page ......151 Square Wave ........... 69 Sequential Mode ........105, 153 SRAM ............370, 374 Serial ............62, 527 Standard Deviation ........
  • Page 674 Index TCP/IP ............. 290, 530 TVS ............101 TCP/IP Information ........603 TX ............249 Telecommunication ......... 48, 55, 89, TX Pin ............633 90, 391, Telnet ............295, 530 UDP ............593 Telnet Settings ........603 UINT2 ............130, 531 Temperature Range ........
  • Page 675 Index Web Page..........593 Web Page Sequence ......151 Web Server ..........291 Wheatstone Bridge ........337 Wind Vector ..........296, 298, Wind Vector Processing ......297 Wireless Sensor Network ......558 Wiring ............43, 47, 76, Wiring Panel ..........43, 44, 47, 76, 328 Writing Program ........
  • Page 678 • info@campbellsci.com.cn • info@campbellsci.de www.campbellsci.com www.campbellsci.de Campbell Scientific do Brasil Ltda. (CSB) Campbell Scientific Spain, S. L. (CSL Spain) Rua Apinagés, nbr. 2018 ─ Perdizes Avda. Pompeu Fabra 7-9, local 1 CEP: 01258-00 ─ São Paulo ─ SP 08024 Barcelona...

Table of Contents