Page 1
CR1000 Measurement and Control System Operator’s Manual Issued: 16.7.13 Copyright 2000-2013 Campbell Scientific Inc. Printed under Licence by Campbell Scientific Ltd. CSL 531...
Page 3
Quotations for repairs can be given on request. It is the policy of Campbell Scientific to protect the health of its employees and provide a safe working environment, in support of this policy a “Declaration of Hazardous Material and Decontamination”...
PLEASE READ FIRST About this manual Please note that this manual was originally produced by Campbell Scientific Inc. primarily for the North American market. Some spellings, weights and measures may reflect this origin. Some useful conversion factors: Area: 1 in...
4.1.1 Components of a Data-Acquisition System........33 4.1.1.1 Sensors ................. 33 4.1.1.2 Datalogger................33 4.1.1.3 Data Retrieval ..............33 4.1.2 CR1000 Module and Power Supply ..........34 4.1.2.1 Wiring Panel ................ 34 4.1.2.2 Power Supply ............... 35 4.1.2.3 Backup Battery..............35 4.1.3 Sensors...................
Page 8
5.1.8 Data Retrieval ................67 5.1.8.1 Via Telecommunications............67 5.1.8.2 Via Mass-Storage Device............. 67 5.1.8.3 Via CF Card ................. 68 5.1.8.4 Data File-Formats in CR1000 Memory........ 68 5.1.8.5 Data Format on Computer............ 68 5.1.9 Communications ................68 5.1.9.1 PakBus ................. 69 5.1.9.2 Modbus.................
Page 9
7.1 Moisture Protection................. 81 7.2 Temperature Range ................. 81 7.3 Enclosures ....................81 7.4 Power Sources..................82 7.4.1 CR1000 Power Requirement ............83 7.4.2 Calculating Power Consumption ........... 83 7.4.3 Power Supplies ................83 7.4.3.1 External Batteries..............83 7.4.4 Vehicle Power Connections............83 7.4.5 Powering Sensors and Devices............
Page 10
Table of Contents 7.7.3.4 Single-Line Declarations............ 115 7.7.3.4.1 Variables..............115 7.7.3.4.2 Constants ..............122 7.7.3.4.3 Alias and Unit Declarations........124 7.7.3.5 Declared Sequences ............125 7.7.3.5.1 Data Tables............... 125 7.7.3.5.2 Subroutines ............... 132 7.7.3.5.3 Incidental Sequences ..........132 7.7.3.6 Execution and Task Priority..........132 7.7.3.6.1 Pipeline Mode............
Page 16
Table of Contents Section 10. Troubleshooting........423 10.1 Status Table..................423 10.2 Operating Systems................423 10.3 Programming..................423 10.3.1 Status Table as Debug Resource..........423 10.3.1.1 CompileResults ..............424 10.3.1.2 SkippedScan..............425 10.3.1.3 SkippedSlowScan............. 425 10.3.1.4 SkippedRecord ..............425 10.3.1.5 ProgErrors ................ 426 10.3.1.6 MemoryFree..............
Page 17
Table of Contents A.2.2 Data Destinations................ 476 A.2.3 Final Data Storage (Output) Processing ........477 A.2.3.1 Single-Source ..............477 A.2.3.2 Multiple-Source ..............478 A.3 Single Execution at Compile..............479 A.4 Program Control Instructions ............... 479 A.4.1 Common Program Controls ............479 A.4.2 Advanced Program Controls............
Page 18
C.2.1 Pin-Out..................549 C.2.2 Power States................550 Appendix D. ASCII / ANSI Table ........553 Appendix E. FP2 Data Format........557 Appendix F. Other Campbell Scientific Products ..559 F.1 Sensors ....................559 F.1.1 Wired Sensors Types..............559 F.1.2 Wireless Sensor Network ............560 F.2 Sensor Input Modules ................
Page 20
Table of Contents Figure 49: Quarter-bridge strain-gage schematic with RC-resistor shunt ... 163 Figure 50: Strain-gage shunt calibration started.......... 165 Figure 51: Strain-gage shunt calibration finished........165 Figure 52: Starting zero procedure.............. 166 Figure 53: Zero procedure finished ............. 166 Figure 54: Preconfigured HTML Home Page ..........
Page 21
Table of Contents Figure 104: Current limiting resistor in a rain gage circuit ......325 Figure 105: Control port current sourcing........... 328 Figure 106: Relay driver circuit with relay ..........329 Figure 107: Power switching without relay ..........329 Figure 108: PakBus network addressing ............. 352 Figure 109: Flat Map...................
Page 22
0°C) ....................305 Table 65. Voltage Range for Maximum Thermocouple Resolution ... 306 Table 66. Limits of Error on CR1000 Thermocouple Polynomials .... 309 Table 67. Reference-Temperature Compensation Range and Error.... 310 Table 68. Thermocouple Error Examples ........... 311 Table 69.
Page 23
Table 87. DNP3 Implementation — Data Types Required to Store Data in Public Tables for Object Groups............365 Table 88. Modbus to Campbell Scientific Equivalents ....... 368 Table 89. CRBasic Ports, Flags, Variables, and, Modbus Registers ... 369 Table 90. Supported Modbus Function Codes ..........370 Table 91.
Page 25
Table of Contents CRBasic Example 15. BeginProg / Scan() / NextScan / EndProg Syntax .. 136 CRBasic Example 16. Scan Syntax............. 136 CRBasic Example 17. Measurement Instruction Syntax......140 CRBasic Example 18. Use of Expressions in Arguments ......141 CRBasic Example 19. Use of Arrays as Multipliers and Offsets ....142 CRBasic Example 20.
Page 26
Table of Contents CRBasic Example 68. Using NAN in Expressions ........428 CRBasic Example 69. Using NAN to Filter Data ........431 CRBasic Example 70. Using Bit-Shift Operators ........495 CRBasic Example 71. Retries in PakBus Communications......514 ...
(435) 753-2342 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 28
Section 1. Introduction Italic — titles of publications, software, sections, tables, figures, and examples. Bold italic — CRBasic instruction parameters and arguments within the body text. Blue — CRBasic instructions when set on a dedicated line. Italic teal — CRBasic program comments Lucida Sans Typewriter font —...
Section 2. Cautionary Statements The CR1000 is a rugged instrument and will give years of reliable service if a few precautions are observed: • Protect from over-voltage • Protect from water • Protect from ESD Disuse accelerates depletion of the internal battery, which backs up several functions.
1 each pn 3315 five-inch long, type-T thermocouple for use as a tutorial device One datalogger program pre-loaded into the CR1000 4 each pn 505 screws for use in mounting the CR1000 to an enclosure backplate. 4 each pn 6044 nylon hardware inserts for use in mounting the CR1000 to a Campbell Scientific enclosure backplate.
CR1000 measures electrical signals and convert the measurement to engineering units, perform calculations and reduce data to statistical values. Every measurement does not need to be stored. The CR1000 will store data in memory awaiting transfer to the PC via external storage devices or telecommunications.
Figure 1: Data-acquisition system components 4.1.2 CR1000 Module and Power Supply 4.1.2.1 Wiring Panel As shown in figure CR1000 Wiring Panel the wiring panel provides (p. 35), terminals for connecting sensors, power and communications devices. Internal surge protection is incorporated with the input channels.
Section 4. Quickstart Tutorial Figure 2: Wiring panel 4.1.2.2 Power Supply The CR1000 is powered by a nominal 12 Vdc source. Acceptable power range is 9.6 to 16 Vdc. External power connects through the green POWER IN on the face of the CR1000.
Section 4. Quickstart Tutorial 4.1.3 Sensors Most electronic sensors, whether or not manufactured or sold by Campbell Scientific, can be interfaced to the CR1000. Check for on-line content concerning interfacing sensors at www.campbellsci.com, or contact a Campbell Scientific applications engineer for assistance.
4.1.3.2.1 Voltage Excitation Bridge resistance is determined by measuring the difference between a known voltage applied to a bridge and the measured return voltage. The CR1000 supplies a precise scalable voltage excitation via excitation terminals. Return voltage is measured on analog terminals. Examples of bridge sensor wiring using...
The sensor couples its output signal to the measured phenomenon by modulating wave frequency. The CR1000 detects each wave as the wave transitions between voltage extremes (high to low or low to high). This is termed “state transition”.
• State 4.1.3.3.3 Pulse Sensor Wiring Wiring a pulse sensor to a CR1000 is straight forward, as shown in figure Pulse- Input Wiring -- Anemometer Switch Pulse sensors have two active wires, (p. 40). one of which is always ground. Connect the ground wire to a (ground) ...
Connect the other wire to a pulse channel. Sometimes the sensor will require power from the CR1000, so there will be two more wires – one of which is always ground. Connect power ground to a G channel. Do not confuse the pulse wire with the positive power wire, or damage to the sensor or CR1000 may result.
Figure 10: Use of RS-232 and digital I/O when reading RS-232 devices 4.1.4 Digital I/O Ports The CR1000 has eight digital I/O ports selectable as binary inputs or control outputs. These are multi-function ports. Edge timing, switch closure, and high-...
I/O ports C1, C2, and C3 C3. 4.1.6 Input Expansion Modules Modules are available from Campbell Scientific to expand the number of input and digital I/O ports on the CR1000. The appendix Digital I/O (Control Port) Expansion lists available modules.
6. After confirming the correct polarity on the wire connections, insert the green power connector into its receptacle on the CR1000. 7. Connect the RS-232 cable between the RS-232 port on the CR1000 and the RS-232 port on the PC (or to the USB-to-RS-232 cable).
2. Open the PC200W software (figure PC200W Main Window ). When the (p. 45) software is first run, the EZSetup Wizard will run automatically in a new window. This will configure the software to communicate with the CR1000. Table PC200W EZSetup Wizard Example Selections indicates what (p. 45) information needs to be entered on each screen.
Communication Setup Provides a summary of settings in previous screens. Summary A communications test between the CR1000 and PC can be Communications Test performed in this screen. For this tutorial, the test is not required. Press Finish to exit the...
This portion of the tutorial will use Short Cut to create a program that measures the CR1000 power supply voltage, wiring-panel temperature, and ambient air temperature. The CR1000 will take samples once per second and store averages of these values at one minute intervals.
Set Reference Temperature Measurement to "Ptemp_C," then click OK. 9. Click on Wiring Diagram to view the sensor wiring diagram. Attach the type T thermocouple to the CR1000 as shown in the diagram. ...
This value was then looked up on the appropriate table in the reference book to determine the temperature. Then along came Eric and Evan Campbell. Campbell Scientific designed the first CR7 datalogger to make thermocouple measurements without the need for vacuum flasks, third junctions, or reference books.
Section 4. Quickstart Tutorial 11. Outputs displays the list Selected Sensors on the left and data storage tables, under Selected Outputs, on the right. Figure 16: Short Cut outputs tab 4.2.4.4 Procedure: (Short Cut Steps 12 to 16) 12. By default, there are two tables initially available. Both tables have a Store Every field and a along with a drop-down list from which to select the time units.
Section 4. Quickstart Tutorial Figure 17: Short Cut output table definition 4.2.4.5 Procedure: (Short Cut Step 17 to 18) 17. Click Finish to compile the program. Give the program the name QuickStart. A summary screen will appear showing the compiler results. Any errors during compiling will also be displayed.
4.2.5 Send Program and Collect Data PC200W Support Software Objectives: This portion of the tutorial will use PC200W to send the program to the CR1000, collect data from the CR1000, and store the data on the PC. 4.2.5.1 Procedure: (PC200W Step 1) 1.
Section 4. Quickstart Tutorial CR1000. To view the OneMin table, select an empty cell in the display area, then click Add. Figure 20: PC200W Monitor Data tab – Public table 4.2.5.3 Procedure: (PC200W Step 5) 5. In the Add Selection window Tables field, click on OneMin, then click Paste.
Section 4. Quickstart Tutorial 4.2.5.4 Procedure: (PC200W Step 6) 6. Click on the Collect Data tab. From this window, data are chosen to be collected as well as the location where the collected data will be stored. Figure 22: PC200W Collect Data tab 4.2.5.5 Procedure: (PC200W Steps 7 to 9) 7.
Section 4. Quickstart Tutorial Figure 23: PC200W View data utility 4.2.5.6 Procedure: (PC200W Steps 10 to 11) 10. Click on to open a file for viewing. In the dialog box, select the CR1000_OneMin.dat file and click Open. 11. The collected data are now shown. 54 ...
Section 4. Quickstart Tutorial Figure 24: PC200W View data table 4.2.5.7 Procedure: (PC200W Steps 12 to 13) 12. Click on any data column. To display the data in a new line graph, click on Figure 25: PC200W View line graph ...
Page 56
Section 4. Quickstart Tutorial 13. Close the Graph and View windows, and then close the PC200W program. 56 ...
Section 5. System Overview A Campbell Scientific data-acquisition system is made up of the following basic components: • Sensors • Datalogger Clock Measurement and control circuitry Telecommunications circuitry User-entered CRBasic program • Telecommunications device • Datalogger support software (computer or mobile) (p.
Figure 26: Features of a data-acquisition system 5.1 CR1000 Datalogger The CR1000 datalogger is one part of a data acquisition system. It is a precision instrument designed for demanding, low-power measurement applications. CPU, analog and digital measurements, analog and digital outputs, and memory usage are controlled by the operating system in conjunction with the user program and on-board clock.
Midnight on Monday morning. 5.1.2 Sensor Support Read More! See Measurements (p. 273). The following sensor types are supported by the CR1000 datalogger. Refer to the appendix Sensors for information on sensors available from Campbell (p. 559) Scientific.
Campbell Scientific applications engineer for assistance in measuring unfamiliar sensors. 5.1.3 CR1000 Wiring Panel The wiring panel of the CR1000 is the interface to many CR1000 functions. These functions are best introduced by reviewing features of the CR1000 wiring panel. The figure Wiring Panel illustrates the wiring panel and some CR1000 (p.
Serial Input / Output Peripherals (p. 560), for information on available input-expansion modules. (p. 561) 5.1.3.2 Voltage Outputs The CR1000 has several terminals capable of supplying switched voltage to peripherals, sensors, or control devices. Read More! See Control Outputs (p. 327). •...
• External Power Supply — one green plug (POWER IN): for connecting power from an external power source to the CR1000. This is the only terminal used to input power; other 12V terminals and the SW-12 terminal are output only terminals for supplying power to other devices. Review...
(p. 351). The CR1000 is equipped with six communications ports. Communication ports allow the CR1000 to communicate with other computing devices, such as a PC, or with other Campbell Scientific dataloggers. Note RS-232 communications normally operate well up to a transmission cable capacitance of 2500 picofarads, or approximately 50 feet of commonly available serial cable.
Read More! See Power Sources (p. 82). The CR1000 operates from a power supply with voltage ranging from 9.6 to 16 Vdc, and is internally protected against accidental polarity reversal. The CR1000 has modest-input power requirements. In low-power applications, it can operate for several months on non-rechargeable batteries.
When the OS is sent via DevConfig, most settings are cleared, whereas, when sent via datalogger support software, most settings are retained. OS files can also be sent to the CR1000 with a CF card (CRD: drive) or Campbell Scientific mass-storage media (USB: drive). ...
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.
Caution When removing a CS mass storage device (thumb drive) from the CR1000, do so only when the LED is not lit or flashing. Removing a Campbell Scientific mass storage device from the CR1000 while the device is active can cause data corruption.
"removal button" (NOT the eject button), wait for the green LED, and then turn CR1000 power off. Removing a card or card module from the CR1000 while the CF card is active can cause data corruption and can damage the card.
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 logger. PakBus supports automatic route detection and selection. •...
5.1.9.4.1 Custom Menus Read More! To implement custom menus, see CRBasic Editor Help for the DisplayMenu() instruction. CRBasic programming in the CR1000 facilitates creation of custom menus for the external keyboard / display. Figure Custom Menu Example shows windows from a simple custom menu (p.
Section 5. System Overview supplied void of active security measures. By default, RS-232, Telnet, FTP and HTTP services, all of which give high level access to CR1000 data and programs, are enabled without password protection. Campbell Scientific encourages CR1000 users who are concerned about security, especially those with exposure to IP threats, to send the latest operating system to the CR1000 (available at www.campbellsci.com) and to disable un-used services...
5.1.10.2 Pass-code Lockout Pass-code lockouts (historically known simply as "security codes") are the oldest method of securing a Campbell Scientific datalogger. Pass-code lockouts can effectively lock out innocent tinkering and discourage wannabe hackers on non-IP based telecommunications links. However, any serious hacker with physical access to the datalogger or to the telecommunications hardware can, with only minimal trouble, overcome the five-digit pass-codes blocking access.
Page 73
Note If a pass code is set to a negative value, a positive code must be entered to unlock the CR1000. That positive code will equal 65536 + (negative security code). For example, a security code of -1111 must be entered as 64425 to unlock the CR1000.
Security can be bypassed at the datalogger using a external keyboard / displaykeyboard display. Pressing and holding the "Del" key while powering up a CR1000 will cause it to abort loading a program and provide a 120 second window to begin changing or disabling security codes in the settings editor (not Status table) with the keyboard display.
.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 file name are not available for viewing. See File Management for more (p.
5.1.11.2 Protection from Voltage Transients Read More! See Grounding (p. 86). 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.
• PCONNECT Palm Datalogger Software supports communications, program send, data collection, and real time monitoring of a CR1000 using a light- weight Palm OS-based PDA. • PCONNECTCE PocketPC Datalogger Software supports communications, program send, data collection, and real time monitoring of a CR1000 using a light-weight PocketPC or Windows Mobile devicePalm OS-based PDA.
Section 6. CR1000 Specifications 1.1 CR1000 specifications are valid from ─25° to 50°C in non‐condensing environments unless otherwise specified. Recalibration is recommended every two years. Critical specifications and system configurations should be confirmed with a Campbell Scientific applications engineer before purchase. 2.0 3.5.0 7.0 PROGRAM EXECUTION RATE PERIOD AVERAGE DIGITAL I/O PORTS (C 1‐8) 2.1 3.5.0a 7.0.1 10 ms to one day at 10 ms increments Any of the 16 SE analog inputs can be used for period Eight ports software selectable as binary inputs or control 3.0 averaging. Accuracy is ±(0.01% of reading + resolution), where outputs. Provide on/off, pulse width modulation, edge timing, ANALOG INPUTS (SE 1–16, DIFF 1–8) 3.0.1 resolution is 136 ns divided by the specified number of cycles subroutine interrupts / wake up, switch‐closure pulse counting, Eight differential (DIFF) or 16 single‐ended (SE) individually to be measured. high‐frequency pulse counting, asynchronous communications configured input channels. Channel expansion provided by INPUT AMPLITUDE AND FREQUENCY: (UARTs), and SDI‐12 communications. SDM communications are optional analog multiplexers. 3.5.1 ‐‐ 8 10 also supported. 3.1.0 Input ...
Adequate desiccant should be placed in the instrumentation enclosure to prevent corrosion on the CR1000 wiring panel. 7.2 Temperature Range The CR1000 is designed to operate reliably from -25 to +50°C (-40°C to +85°C, optional) in non-condensing environments. 7.3 Enclosures...
The CRBasic standard deviation instruction, SDEV(), can be used to evaluate measurement noise. Power supplies available from Campbell Scientific can be reviewed in the appendix Power Supplies or at www.campbellsci.com. Contact a Campbell (p.
7.4.1 CR1000 Power Requirement The CR1000 operates on dc voltage ranging from 9.6 to 16 Vdc. It is internally protected against accidental polarity reversal. A transient voltage suppressor (TVS) diode on the 12-Vdc power input terminal provides transient (p.
12V and SW-12 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 not adequate...
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.
SW-12 terminal will change with CR1000 supply voltage. Two CRBasic instructions, SW12() and PortSet(), control a SW-12 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 87
In the field, at a minimum, a proper earth ground will consist of a 6- to 8-foot copper-sheathed grounding rod driven into the earth and connected to the CR1000 Ground Lug with a 12-AWG wire. In low-conductive substrates, such as sand, very dry soil, ice, or rock, a single ground rod will probably not provide an adequate earth ground.
Campbell Scientific, for many years, has employed a simple and inexpensive design that protects most systems in most circumstances. It is, however, not infallible. Note Lightning strikes may damage or destroy the CR1000 and associated sensors and power supplies. In addition to protections discussed in ESD Protection use of a simple (p.
(p. 89) lightning-protection scheme utilizing a lightning rod, metal mast, heavy-gage ground wire, and ground rod to direct damaging current away from the CR1000. Figure 32: Lightning-protection scheme 7.5.2 Single-Ended Measurement Reference Low-level, single-ended voltage measurements are sensitive to ground potential fluctuations.
7.5.3 Ground Potential Differences Because a single-ended measurement is referenced to CR1000 ground, any difference in ground potential between the sensor and the CR1000 will result in a measurement error. Differential measurements MUST be used when the input ground is known to be at a different ground potential from CR1000 ground.
(soil moisture) sensor, a ground loop arises because soil and water provide an alternate path for the excitation to return to CR1000 ground. This example is modeled in the diagram, figure Model of a Ground Loop with a...
CR1000. It is made available as part of LoggerNet, PC400, RTDAQ, or at www.campbellsci.com. Prior to running DevConfig, connect a serial cable from the computer COM port or USB port to the RS-232 port on the CR1000 as shown previously in figure Power and RS-232 Connections (p.
CR1000, the button will change from Connect to Disconnect. Figure 34: Device Configuration Utility (DevConfig) 7.6.2 Sending the Operating System The CR1000 is shipped with the operating system pre-loaded. However, OS updates are made available at www.campbellsci.com and can be sent to the CR1000.
Section 7. Installation Note Beginning with OS 25, the OS has become large enough that a CR1000 with serial number ≤ 11831, which has only 2 MB of SRAM, may not have enough memory to receive it under some circumstances. If problems are encountered with a 2 MB CR1000, sending the OS over a direct RS-232 connection is usually successful.
Section 7. Installation Figure 35: DevConfig OS download window Figure 36: Dialog box confirming OS download 7.6.2.2 Sending OS with Program Send Operating system files can be sent using the Program Send command. Beginning with the OS indicated in table OS Version Introducing Preserve Settings via ...
7.6.2.3 Sending OS with External Memory Refer to File Management (p. 340). 7.6.3 Settings 7.6.3.1 Settings via DevConfig ® The CR1000 has several settings, some of which are specific to the PakBus communications protocol. ® ® ® Read More! PakBus...
Section 7. Installation Clicking the Factory Defaults button on the settings editor will send a command to the device to revert to its factory default settings. The reverted values will not take effect until the final changes have been applied. This button will remain disabled if the device does not support the DevConfig protocol messages.
Section 7. Installation Figure 38: Summary of CR1000 configuration 7.6.3.1.1 Deployment Tab Illustrated in figure DevConfig Deployment Tab the Deployment tab allows (p. 99), the user to configure the datalogger prior to deploying it. Deployment tab settings can also be accessed through the Setting Editor tab and the Status table.
Section 7. Installation Figure 39: DevConfig Deployment tab Datalogger Sub-Tab • Serial Number displays the CR1000 serial number. This setting is set at the factory and cannot be edited. • OS Version displays the operating system version that is in the CR1000.
Page 100
Section 7. Installation • Beacon Interval sets the interval (in seconds) on which the datalogger will broadcast beacon messages on the port specified by Selected Port. • Verify Interval specifies the interval (in seconds) at which the datalogger will expect to have received packets from neighbors on the port specified by Selected Port.
PakBus Nodes Allocation indicates the maximum number of PakBus ® devices the CR1000 will communicate with if it is set up as a router. This setting is used to allocate memory in the CR1000 to be used for its routing table.
7.6.3.1.2 Logger Control Tab • Clocks in the PC and CR1000 are checked every second and the difference displayed. The System Clock Setting allows entering what offset, if any, to use with respect to standard time (Local Daylight Time or UTC, Greenwich mean time).
12) channel. SW-12 is normally off, so, if the program controlling SW-12 is disabled, such as by replacing it with a program that neglects SW-12 control, the cell modem is switched off and the remote CR1000 drops out of telecommunications.
2. send the Include file to the CR1000 using tools in the File Control menu of datalogger support software (p. 77). 3. enter the path and name of the file in the Include File setting in the CR1000 using DevConfig or PakBusGraph. Figures "Include File" Settings via DevConfig and "Include File"...
CRBasic Example 1. Using an "Include File" to Control SW‐12 'Assumes that the Include file in CRBasic example "Include File" to Control SW-12 (p. 105) 'is loaded onto the CR1000 CPU: Drive. 'The Include file will control power to the cellular phone modem. Public PTemp, batt_volt DataTable(Test,1,-1) DataInterval(0,15,Sec,10)
7.6.3.3.2 Default.cr1 File 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 Program Run Priorities ). Default.cr1 can be edited to preserve critical datalogger settings such as 106) communication settings, but cannot be more than a few lines of code.
Section 7. Installation 6. If there is no default.cr1 file or it cannot be compiled, the CR1000 will not automatically run any program. 7.6.3.5 Network Planner Figure 45: Network Planner Setup 7.6.3.5.1 Overview Network Planner allows the user to: •...
Section 7. Installation • It does not understand distances or topography; that is, it does not warn the user when broadcast distances are exceeded or identify obstacles to radio transmission. For more detailed information on Network Planner, please consult the LoggerNet manual, which is available at www.campbellsci.com.
(p. 77) Fundamental elements of CRBasic include: • 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.
7.7.2 Sending 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.
Section 7. Installation Regardless of the program-upload tool used, if any change occurs to data table structures listed in table Data Table Structures data will be erased when a (p. 111), new program is sent. Table 6. Program Send Options that Reset Memory* LoggerNet | Connect | Program Send PC400 | Clock/Program | Send Program...
Scientific notation, binary, and hexadecimal formats may also be used, as shown in table Formats for Entering Numbers in CRBasic Only (p. 112). standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 8. Formats for Entering Numbers in CRBasic Format...
Process / store trigger may be a fixed interval, a condition, or both. Table size Set the size of a data table. Send data to a CF card (CRD: drive) or Campbell Other on-line storage devices Scientific mass-storage media (USB: drive) if available.
Section 7. Installation 'Define public variables Public RefTemp Public TC(6) 'Define Units Declare public variables, Declarations Units RefTemp = degC dimension array, and declare Units TC = DegC units. 'Define data tables DataTable(Temp,1,2000) DataInterval(0,10,min,10) Average(1,RefTemp,FP2,0) Define data table Average(6,TC(),FP2,0) EndTable 'Begin Program BeginProg 'Set scan interval...
Section 7. Installation operator is located in the Help files of CRBasic Editor, which is included with LoggerNet, PC400, and RTDAQ datalogger support software suites. 7.7.3.3.1 Multiple Statements on One Line Multiple short statements can be placed on a single text line if they are separated with a colon.
Page 116
Section 7. Installation variables can be viewed through the external keyboard / display or software numeric monitors. Dim variables cannot. All user defined variables are initialized once when the program starts. Additionally, variables that are used in the Function() or Sub() declaration,or that are declared within the body of the function or subroutine are local to that function or subroutine.
Page 117
When using variables in place of integers as the dimension indices, e.g., CRBasic example Using variable array dimension indices declaring the indices As (p. 117), Long variables is recommended as doing so allows for more efficient use of CR1000 resources. CRBasic Example 8. Using Variable Array Dimension Indices As Long As Long...
Page 118
Section 7. Installation BeginProg Scan() aaa = 3 bbb = 2 ccc = 4 VariableName(aaa,bbb,ccc) = 2.718 NextScan EndProg Dimensioning Strings Strings can be declared to a maximum of two dimensions. The third "dimension" is used for accessing characters within a string. See String Operations (p.
Resolution / Range Word Size Argument Zero Minimum Maximum 0.000 ±0.001 ±7999. Campbell Absolute Value Decimal Location Default final storage data type. Use Scientific floating for stored data requiring 3 or 4 point / Final data storage 0 -- 7.999 X.XXX significant digits.
Page 120
1 nanosecond 8 byte record and process time data. See NSEC Data Type (p. 223). Size is defined by the CR1000 operating system. When converting from STRING to FLOAT, numerics at the beginning of a string convert, but conversion stops when a non-numeric is Unless declared otherwise, the minimum Dim &...
Page 121
Section 7. Installation DataTable(TableName,True,-1) 'FP2 Data Storage Example Sample(1,Z,FP2) 'IEEE4 / Float Data Storage Example Sample(1,X,IEEE4) 'UINT2 Data Storage Example Sample(1,PosCounter,UINT2) 'LONG Data Storage Example Sample(1,PosNegCounter,Long) 'STRING Data Storage Example Sample(1,FirstName,String) 'BOOLEAN Data Storage Example Sample(8,Switches(),Boolean) 'BOOL8 Data Storage Example Sample(2,FLAGS(),Bool8) 'NSEC Data Storage Example Sample(1,CR1000Time,Nsec)
Section 7. Installation Variable Initialization By default, variables are set equal to zero at the time the datalogger program compiles. Variables can be initialized to non-zero values in the declaration. Examples of syntax are shown in CRBasic example Initializing Variables (p.
Section 7. Installation Table 11. Predefined Constants and Reserved Words mv50cR mv500c mv7_5 mv7_5c mvX10500 mv50R NSEC PROG SCAN mvX1500 Select STRING TABLE TRUE TypeB SUBSCAN TypeJ TypeK TypeN TypeE TypeS TypeT UINT2 TypeR usec Until vX15 vX105 While 7.7.3.4.3 Alias and Unit Declarations A variable can be assigned a second name, or alias, by which it can be called throughout the program.
The trigger that initiates data storage is tripped either by the CR1000's clock, or by an event, such as a high temperature. Up to 30 data tables can be created by the program. The data tables may store individual measurements, individual calculated values, or summary data such as averages, maxima, or minima to data tables.
Table Typical Data Table shows a data file as it appears after the associated (p. 127) data table has been downloaded from a CR1000 programmed with the code in CRBasic example Definition and Use of a Data Table The data file (p.
Definition and Use of a Data Table Units are strictly for (p. 127). documentation. The CR1000 does not make use of declared units, nor does it check their accuracy. The fourth line of the header reports the data process used to produce the field of data, e.g., avg (average), his (historgram), etc.
Page 128
Section 7. Installation 'Define Data Tables DataTable(OneMin,True,-1) DataInterval(0,1,Min,10) Average(1,Batt_Volt,FP2,False) Average(1,PTemp_C,FP2,False) Average(2,Temp_C(1),FP2,False) EndTable DataTable(Table1,True,-1) DataInterval(0,1440,Min,0) Minimum(1,Batt_Volt,FP2,False,False) EndTable 'Main Program BeginProg Scan(5,Sec,1,0) 'Default Datalogger Battery Voltage measurement Batt_Volt: Battery(Batt_Volt) 'Wiring Panel Temperature measurement PTemp_C: PanelTemp(PTemp_C,_60Hz) 'Type T (copper-constantan) Thermocouple measurements Temp_C: TCDiff(Temp_C(),2,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1,0) 'Call Data Tables and Store Data CallTable(OneMin) CallTable(Table1)
Page 129
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.
Scan() loop. See section Time Stamps (p. 273). 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 a record was written to the data table.
Page 131
Temp_C() (an array of 2) are used. • DataType — Data type for the stored average (the example uses data type FP2, which is the Campbell Scientific two-byte floating point data type). Read More! See Data Types for more information on available data types. (p. 118) •...
Note A particular subroutine can be called by multiple program sequences simultaneously. To preserve measurement and processing integrity, the CR1000 queues calls on the subroutine, allowing only one call to be processed at a time in the order calls are received. This may cause unexpected pauses in the conflicting program sequences.
I/O communication. The CR1000 executes these tasks in either pipeline or sequential mode. When a program is compiled, the CR1000 evaluates the program and determines which mode to use.
CF card (CRD: drive) or Campbell Scientific mass-storage media (USB: drive), occur. When running in sequential mode, the datalogger uses a queuing system for processing tasks similar to the one used in pipeline 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.
EndProg 7.7.3.7.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() / NextScan structure. In these simple programs, Scan() / NextScan creates an infinite loop, each periodic pass through the loop being synchronized to the CR1000 clock.
Section 7. Installation allows the processing in the scan to lag behind measurements at times without affecting measurement timing. Use of the CRBasic Editor default size is normal. Refer to section SkippedScan for troubleshooting tips. (p. 425) • Count — number of scans to make before proceeding to the instruction following NextScan.
Page 138
For example, a weather-measurement program may scan once per second, but program execution may only occupy 250 ms, leaving 75% of available scan time unused. The CR1000 can make efficient use of this interstitial scan time to optimize program execution and communications control. Unless...
7.7.3.8.1 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.
Section 7. Installation PanelTemp is the keyword. Two parameters follow: Dest, a destination variable name in which the temperature value is stored; and Integ, a length of time to integrate the measurement. To place the panel temperature measurement in the variable RefTemp, using a 250-µs integration time, the syntax is as shown in CRBasic example Measurement Instruction Syntax (p.
Section 7. Installation Table 18. Rules for Names Maximum Length Name (number of characters) Allowed characters Category and other names. Data-table name Field name Field-name description Variables, constants, units, aliases, station names, field names, data table names, and file names can share identical names;...
Section 7. Installation CRBasic Example 19. Use of Arrays as Multipliers and Offsets Public Pressure(3), Mult(3), Offset(3) DataTable(AvgPress,1,-1) DataInterval(0,60,Min,10) Average(3,Pressure(),IEEE4,0) EndTable BeginProg 'Calibration Factors: Mult(1)=0.123 : Offset(1)=0.23 Mult(2)=0.115 : Offset(2)=0.234 Mult(3)=0.114 : Offset(3)=0.224 Scan(1,Sec,10,0) 'VoltSe instruction using array of multipliers and offsets: VoltSe(Pressure(),3,mV5000,1,True,0,_60Hz,Mult(),Offset()) CallTable AvgPress NextScan EndProg 7.7.3.9 Expressions An expression is a series of words, operators, or numbers that produce a value or result.
Floating-point arithmetic is common in many electronic, computational systems, but it has pitfalls high-level programmers should be aware of. 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: •...
Page 144
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.
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, i.e., the event is either occurring (true), or the event has not occurred (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.
Section 7. Installation Table 20. Logical Expression Examples If X >= 5 AND Z = 2 then Y = 0 Sets Y = 0 only if both X >= 5 and Z = 2 are true. If 6 then Y = 0. If 6 is true since 6 (a non-zero number) is returned, so Y is set to 0 every time the statement is executed.
Page 149
Section 7. Installation Table 21. Abbreviations of Names of Data Processes Abbreviation Process Name Maximum Minimum Sample at Max or Min Standard Deviation Moment No abbreviation Sample Histogram Histogram4D Covariance RainFlow Histogram Level Crossing WindVector Median ETsz Solar Radiation (from ET) Time of Max Time of Min Hst is reported in the form...
Section 7. Installation 7.7.3.11 System Signatures Signatures help assure system integrity and security. The following resources provide information on using signatures. • Signature() instruction in Diagnostics (p. 483). • RunSignature entry in table Status Table Fields and Descriptions (p. 528). •...
CAL files. These data become the source for calibration factors when requested by the LoadFieldCal() instruction. A CAL file is created automatically on the same CR1000 memory drive and given the same name (with .cal extension) as the program that creates and uses it. For example, the CRBasic program file CPU:MyProg.cr1 generates the CAL file CPU:MyProg.cal.
(not to the CAL file). and a 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.
CR1000 excitation channel. To reset tests, use the support software File Control menu commands to (p. 454) delete .cal files, and then send the demonstration program again to the CR1000. Term equivalents are as follows: ...
1. Send CRBasic example FieldCal Zeroing Demonstration Program to the (p. 155) CR1000. An excitation channel has been programmed to simulate a sensor output. 2. To place the simulated RH sensor in a simulated-calibration condition (in the field it would be placed in a desiccated chamber), place a jumper wire between channels VX1/EX1 and SE6 (3L).
Section 7. Installation 5. To simulate conditions for a 30-day, service-calibration, again with desiccated chamber conditions, set variable KnownRH to 0.0. Change the value in variable CalMode to 1 to start calibration. When CalMode increments to 6, simulated 30-day, service zero calibration is complete. Calibrated Offset will equal -52.5%.
30 mg/l 1. Send the program in CRBasic example FieldCal Offset Demo Program (p. 156) to the CR1000. An excitation channel has been programmed to simulate a sensor output. 2. To simulate the salinity sensor in deployment-calibration conditions (30 mg/l standard solution), place a jumper wire between channels VX1/EX1 and SE6 (3L).
Section 7. Installation BeginProg Multiplier = .05 Offset = 0 LoadFieldCal(true) 'Load the CAL File, if possible Scan(100,mSec,0,0) 'Simulate measurement by exciting channel VX1/EX1 ExciteV(Vx1,mV,0) 'Make the calibrated measurement VoltSE(SaltContent,1,mV2500,6,1,0,250,Multiplier,Offset) 'Perform a calibration if CalMode = 1 FieldCal(1,SaltContent,1,Multiplier,Offset,CalMode,KnownSalt,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg...
Page 158
1. Send CRBasic example FieldCal() Zero Basis Demo Program to the (p. 158) CR1000. 2. To simulate the pressure transducer in zero conditions: • Digits_Measured is set to 8746 automatically • Temp_Measured is set to 21.4 automatically • BP_Measured to 991 3.
53.92 L Offset 1. Send the program in CRBasic example FieldCal Multiplier and Offset Demonstration Program to the CR1000. (p. 160) 2. To simulate the flow sensor, place a jumper wire between channels VX1/EX1 and SE6 (3L). 3. Simulate deployment-calibration conditions (output @ 30 l/s = 300 mV, output @ 10 l/s = 550 mV) in two stages.
Page 160
Section 7. Installation 4. When variable CalMode increments to 6, the deployment calibration is complete. Calibrated multiplier is -0.08. Calibrated offset is 53.978. 5. To continue this example, simulate a two-stage, 7-day service calibration wherein both multiplier and offset drift (output @ 30 l/s = 285 mV, output @ 10 l/s = 522 mV).
The following procedure sets the sensitivity of a simulated soil water-content sensor. 1. CRBasic example FieldCal Multiplier-Only Demonstration Program (p. 161) the CR1000. 2. To simulate the soil-water sensor, place a jumper wire between channels VX1/EX1 and SE6 (3L). 3. Simulate deployment-calibration conditions (output @ 10% = 175 mV, output @ 35% = 700 mV) in two stages.
7.8.1.6 FieldCalStrain() Demonstration Program 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.
Zeroing is normally done after the shunt calibration. Zero and shunt options can be combined through a single CR1000 program. The following program is provided to demonstrate use of FieldCalStrain() features. If a strain gage configured as shown in figure Quarter-Bridge Strain-...
Page 164
Section 7. Installation CRBasic Example 31. FieldCalStrain() Calibration Demonstration 'Program to measure quarter bridge strain gage 'Measurements Public Raw_mVperV Public MicroStrain 'Variables that are arguments in the Zero Function Public Zero_Mode Public Zero_mVperV 'Variables that are arguments in the Shunt Function Public Shunt_Mode Public KnownRes Public GF_Adj...
(p. 164) CR1000, and the strain gage stable, use the external keyboard / display or software numeric monitor to change the value in variable KnownRes to the nominal resistance of the gage, 1000 Ω, as shown in figure Strain-Gage Shunt...
Support of information services (FTP, HTTP, XML, POP3, SMTP, Telnet, NTCIP, NTP, HTML) is extensive in the CR1000, to the point of requiring another manual at least as thick as the CR1000 manual so fully cover applicable topics. This section only nicks the surface. The most up-to-date information on implementing IS services is contained in CRBasic Editor Help.
Network Links (p. 567). 7.8.2.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.
Files can be deleted through FTP. 7.8.2.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.
Dynamic Host Configuration Protocol (DHCP). Once the address is assigned, use DevConfig, PakBusGraph, Connect, or the external keyboard / display to look in the CR1000 Status table to see the assigned IP address. This is shown under the field name IPInfo.
Transparent mode may need to wait for commands issued by the programmed mode to finish before sending responses. While in transparent mode, CR1000 programs may not execute. CR1000 security may need to be unlocked before transparent mode can be activated.
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 175
Section 7. Installation Table 25. Standard SDI-12 Command and Response Set Command Name Command Syntax Response Start Concurrent Measurement atttnn<CR><LF> aC1! atttnn<CR><LF> atttnn<CR><LF> Additional Concurrent atttnn<CR><LF> Measurements atttnn<CR><LF> aC9! atttnn<CR><LF> Additional Concurrent aCC1! ... aCC9! atttnn<CR><LF> Measurements and Request CRC Continuous Measurements aR0! ...
Page 176
Start Concurrent Measurement Command (aC!) Concurrent measurement allows the CR1000 to request a measurement, continue program execution, and pick up the requested data on the next pass through the program. A measurement request is then sent again so data are ready on the next scan.
<CR><LF> must be preceded by the CRC. 7.8.3.2 SDI-12 Programmed Modes 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.
Section 7. Installation is programmed with the M! command (note that the SDI-12 address is a separate instruction parameter), the CR1000 issues the aM! AND aD0! commands with proper elapsed time between the two. The CR1000 automatically issues retries and performs other services that make the SDI-12 measurement work as trouble free as possible.
Page 179
The SDIRecorder() aCv (not C!) command facilitates using the SDI-12 standard Start Concurrent command (aCv!) without the back-to-back measurement sequence normal to the CR1000 implementation of aCv!. Consider an application wherein four SDI-12 temperature sensors need to be near- simultaneously measured at a 5 minute interval within a program that scans every 5 seconds.
Page 180
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 181
Section 7. Installation CRBasic Example 33. Using Alternate Concurrent Command (aC) 'Code to use when back to back SDI-12 concurrent measurement commands not desired 'Main Program BeginProg 'Preset first measurement command to C! X = 1 cmd(X) = "C!" Next 'Set 5 s scan rate Scan(5,Sec,0,0) 'Other measurements here 'Set 5 minute measurement rate TimeIntoInterval(0,5,Min)
Page 182
Section 7. Installation Else 'C!/C command sequence complete Move(Temp_Meas(X),1,Temp_Tmp(X),1) 'Copy measurements to SDI_Val(10) cmd(X) = "C!" 'Start next measurement with "C!" IndDone(X) = -1 EndIf Next 'Summarize Measurement Event Success X = 1 GroupDone = GroupDone + IndDone(X) Next 'Stop current measurement event, reset controls GroupDone = -4 Then RunSDI12 = False...
7.8.3.2.2 SDI-12 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 (SDI-12 port to SDI-12 port), or to transfer data to a third- party SDI-12 recorder.
7.8.3.3 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.
Section 7. Installation Example: Probe: Water Content Power Usage: • Quiescent: 0.25 mA • Measurement: 120 mA • Measurement Time: 15 s • Active: 66 mA • Timeout: 15 s Probes 1, 2, 3, and 4 are connected to SDI-12 / Control Port 1. The time line in table Example Power Usage Profile for a Network of SDI-12 Probes shows a 35-second power-usage profile example.
Section 7. Installation 7.8.4 Subroutines A subroutine is a group of programming instructions that is called by, but runs outside of, the main program. Subroutines are used for the following reasons: • To reduce program length. Subroutine code can be executed multiple times in a program scan.
7.8.5.1 OutputOpt Parameters OutputOpt In the CR1000 WindVector() instruction, the parameter defines the processed data that are stored. All output options result in an array of values, the elements of which have _WVc(n) as a suffix, where n is the element number. The...
WVc(3): Resultant mean wind direction (Θu) WVc(4): Standard deviation of wind direction σ(Θu). This standard deviation is calculated using Campbell Scientific's wind speed weighted algorithm. Use of the resultant mean horizontal wind direction is not recommended for straight-line Gaussian dispersion models, but may be used to model transport direction in a variable-trajectory model.
Section 7. Installation Standard deviation of horizontal wind fluctuations from sub-intervals is calculated as follows: where: is the standard deviation over the data-storage interval, and are sub-interval standard deviations. A sub-interval is specified as a number of scans. The number of scans for a sub-interval is given Desired sub‐interval (secs) / scan rate (secs) ...
Resultant mean wind direction, Θu: Standard deviation of wind direction, σ (Θu), using Campbell Scientific algorithm: The algorithm for σ (Θu) is developed by noting (FIGURE. Standard Deviation of...
0 if the deviations in speed are not correlated with the deviation in direction. This assumption has been verified in tests on wind data by Campbell Scientific; the Air Resources Laboratory, NOAA, Idaho Falls, ID; and MERDI, Butte, MT.
Section 7. Installation have never been greater than a few degrees. The final form is arrived at by converting from radians to degrees (57.296 degrees/radian). 7.8.6 Custom Menus Read More! More information concerning use of the keyboard is found in sections Using the Keyboard Display and Custom Keyboard and Display (p.
Section 7. Installation SubMenu() / EndSubMenu Defines the beginning and end of a second‐level menu. Note SubMenu() label must be at least 6 characters long to mask default display clock. CRBasic example Custom Menus lists CRBasic programming for a custom (p. 196) menu that facilitates viewing data, entering notes, and controlling a device. figure Custom Menu Example —...
Section 7. Installation Figure 63: Custom menu example — Predefined-notes pick list Figure 64: Custom menu example — Free-Entry notes window Figure 65: Custom menu example — Accept / Clear notes window Figure 66: Custom menu example — Control sub menu ...
Section 7. Installation Figure 67: Custom menu example — control-LED pick list Figure 68: Custom menu example — control-LED Boolean pick list Note See figures Custom Menu Example — Home Screen through Custom (p. 194) Menu Example — Control LED Boolean Pick List in reference to the (p.
Page 197
Section 7. Installation Const Off = false 'Assign "Off" as Boolean False Public StartFlag As Boolean 'LED Control Process Variable Public CountDown As Long 'LED Count Down Variable Public ToggleLED As Boolean 'LED Control Variable 'Define Note DataTable 'Set up Notes data table, written DataTable(Notes,1,-1) 'to when a note is accepted Sample(1,SelectNote,String)
NextScan EndProg 7.8.7 Conditional Compilation 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. 330). program, the "operating program", is created by the CR1000 compiler and written to Operating Memory This is the program version that runs the CR1000.
Page 199
This option can also be used at the pre-compiler command line 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 telecommunications links.
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.
7.8.8.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 configuration by the user.
Section 7. Installation Note If an instrument or sensor optionally supports SDI-12, Modbus, or DNP3, consider using these protocols before programming a custom protocol. These higher-level protocols are standardized among many manufacturers and are easy to use, relative to a custom protocol. SDI-12, Modbus, and DNP3 also support addressing systems that allow multiplexing of several sensors on a single communications port, which makes for more efficient use of resources.
Is the end of the data bits. The stop bit can be 1, 1.5 or 2. TX Transmit 7.8.8.5 CRBasic Programming To transmit or receive RS-232 or TTL signals, a serial port (see table CR1000 Serial Ports ) must be opened and configured through CRBasic with the (p. 202) SerialOpen() instruction. The SerialClose() instruction can be used to close the serial port.
Section 7. Installation • BaudRrate — Baud rate mismatch is frequently a problem when developing a new application. Check for matching baud rates. Some developers prefer to use a fixed baud rate during initial development. When set to -nnnn (where nnnn is the baud rate) or 0, auto baud-rate detect is enabled.
Section 7. Installation • Buffer-size margin (one extra record + one byte). SerialOutBlock() • Binary • Can run in pipeline mode inside the digital measurement task (along with SDM instructions) if the COMPort parameter is set to a constant argument such as , or , and the number of bytes is also...
Page 207
Note SerialIn() and SerialInRecord() receive the same data. SerialInRecord() is generally used for data streaming into the CR1000, while SerialIn() is used for data that is received in discrete blocks. 4. Parse (split up) the serial string (CRBasic SplitStr() command).
R = the letter R, and 2 = decimal 2. This is the easiest protocol to translate since the literal translation is what is received from the transmitting instrument. Normally, the CRBasic program receiving the transmission will be written to parse (split) the string up and place the values in CR1000 variables. 208 ...
• 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. To remedy this problem, the SerialInBlock() or SerialInRecord() instruction is required when reading binary data from the serial port buffer to a variable.
(p. 210) serial input / output programming. The example only requires the CR1000 and a single wire jumper between COM1 Tx and COM2 Rx. The program simulates a temperature and relative humidity sensor transmitting RS-232 (simulated data comes out of COM1 as an alpha-numeric string).
Section 7. Installation Scan(5,Sec, 3, 0) 'Serial Out Code 'Transmits string "*27.435,56.789#" out COM1 SerialOpen(Com1,9600,0,0,10000) 'Open a serial port 'Build the output string SerialOutString = "*" & TempOut & "," & RhOut & "#" 'Output string via the serial port SerialOut(Com1,SerialOutString,"",0,100) 'Serial In Code 'Receives string "27.435,56.789"...
CR1000 serial I/O features. Problem: An energy company has a large network of older CR510 dataloggers into which new CR1000 dataloggers are to be incorporated. The CR510 dataloggers are programmed to output data in the legacy Campbell Scientific Printable ASCII format, which satisfies requirements of the customer's data- acquisition system.
Page 215
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 216
Section 7. Installation 'One Minute Data Table DataTable(OneMinTable,true,-1) OpenInterval 'sets interval same as found in CR510 DataInterval(0,1,Min,10) Totalize(1, KWHH,FP2,0) Sample(1, KWHHold,FP2) Totalize(1, KvarH,FP2,0) Sample(1, KVarHold,FP2) Sample(1, StationID,FP2) EndTable 'Clock Set Record Data Table DataTable(ClockSetRecord,True,-1) Sample(7,ClkSet(),FP2) EndTable 'Subroutine to convert date formats (day-of-year to month and date) DOY2MODAY 'Store Year, DOY, Hour, Minute and Second to Input Locations.
Page 217
Section 7. Installation 'If it is a leap year, use this section. (LeapYear = True) Then Select Case Case Is < 32 Month = 1 Date = DOY Case Is < 61 Month = 2 Date = DOY + -31 Case Is <...
Page 218
Section 7. Installation Case Is < 121 Month = 4 Date = DOY + -90 Case Is < 152 Month = 5 Date = DOY + -120 Case Is < 182 Month = 6 Date = DOY + -151 Case Is <...
Page 219
'Note: ClkSet array requires year, month, date, hour, min, sec, msec ClockSet(ClkSet()) CallTable(ClockSetRecord) EndIf '/////////////////Serial Output Section///////////////////// 'Construct old Campbell Scientific Printable ASCII data format and output to COM1 'Read datalogger clock RealTime(rTime) TimeIntoInterval(0,5,Sec) Then 'Load OneMinData table data for processing into printable ASCII...
For this reason SerialOpen() leaves the interface powered up so no incoming bytes are lost. When the CR1000 has data to send via 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 221
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;...
Section 7. Installation A: A common caution is, “The destination variable should not be used in more than one sequence to avoid using the variable when it contains old data.” However, there are more elegant ways to handle the root problem. There is nothing unique about SerialIn() with regard to understanding how to correctly write to and read from global variables using multiple sequences.
Section 7. Installation Figure 75: Data from TrigVar program CRBasic Example 42. Using TrigVar to Trigger Data Storage 'In this example, the variable "counter" is incremented by 1 each scan. The data table 'is called every scan, which includes the Sample(), Average(), and Totalize() 'instructions. TrigVar is true when counter = 2 or counter = 3. Data are stored when 'TrigVar is true.
Section 7. Installation produce a time stamp that may be accessed from the program after being written to a data table. The time of other events, such as alarms, can be stored using the RealTime() instruction. • Accessing and storing a time stamp from another datalogger in a PakBus network.
Page 225
Section 7. Installation CRBasic Example 44. NSEC — Two Element Time Array 'TimeStamp is retrieved into variables TimeOfMaxVar(1) and TimeOfMaxVar(2). Because 'the variable is dimensioned to 2, NSEC assumes, '1) TimeOfMaxVar(1) = seconds since 00:00:00 1 January 1990, and '2) TimeOfMaxVar(2) = μsec into a second. 'Declarations Public PTempC Public...
Page 226
EndProg CRBasic Example 46. NSEC —Convert Timestamp 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. Adding offsets requires the time stamp be converted to numeric 'form, the offset applied, then the new time be converted back to string forms.
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...
Section 7. Installation Variable aliasing can be employed in the CRBasic program to make the (p. 124) data more understandable. Figure 76: Alarms toggled in bit-shift example Figure 77: Bool8 data from bit-shift example (numeric monitor) 228 ...
Section 7. Installation Figure 78: Bool8 data from bit-shift example (PC data file) CRBasic Example 47. Programming with Bool8 and a bit‐shift operator Public Alarm(32) Public Flags As Long Public FlagsBool8(4) As Long DataTable(Bool8Data,True,-1) DataInterval(0,1,Sec,10) 'store bits 1 through 16 in columns 1 through 16 of data file Sample(2,FlagsBool8(1),Bool8) 'store bits 17 through 32 in columns 17 through 32 of data file Sample(2,FlagsBool8(3),Bool8)
Page 230
Section 7. Installation 'If bit in OR bit in The result 'Flags Is Bin/Hex Is '---------- ---------- ---------- 'Binary equivalent of Hex: Alarm(1) Then Flags = Flags &h1 &b10 Alarm(3) Then Flags = Flags &h4 &b100 Alarm(4) Then Flags = Flags &h8 &b1000 Alarm(5)
NextScan EndProg 7.8.12 Faster Measurement Rates Certain data acquisition applications require the CR1000 to make analog measurements at rates faster than once per second (> 1 Hz ). The CR1000 (p. 456) can make continuous measurements at rates up to 100 Hz, and bursts (p.
Section 7. Installation Table 32. TABLE. Summary of Analog Voltage Measurement Rates Maximum 100 Hz 600 Hz 2000 Hz Rate Number of Simultaneous Multiple channels Fewer channels One channel Channels Maximum 100% < 100% < 100% Duty Cycle Maximum Measaurements Variable 65535 Per Burst...
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 8 channels at 200 Hz with a 95% duty cycle as follows: Table 35.
MaxBuffDepth registers in the CR1000 Status table may give insight into 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.
Section 7. Installation • One more way to view sub-scans is that they are a convenient (and only) way to put a loop around a set of measurements. SubScan() / NextSubScan specifies a timed loop for so many times around a set of measurements that can be driven by the task sequencer.
Section 7. Installation Table 37. Parameters for Analog Burst Mode (601 to 2000 Hz) CRBasic Analog Voltage Description when in Burst Mode Input Parameters A variable array dimensioned to store all measurements from a single channel. For example, the command, FastTemp(500) Destination FastTemp()
Section 7. Installation 7.8.13.1 String Operators The table String Operators list and describes available string operators. (p. 237) String operators are case sensitive. Table 38. String Operators Operator Description Concatenates strings. Forces numeric values to strings before concatenation. & Example 1 &...
NextScan EndProg 7.8.15 PulseCountReset Instruction PulseCountReset is used in rare instances to force the reset or zeroing of CR1000 pulse accumulators (see Measurement Inputs (p. 60) PulseCountReset is needed in applications wherein two separate PulseCount() instructions in separate scans use the same pulse-input channel. While the compiler does not allow multiple PulseCount() instructions in the same scan to use the same channel, multiple scans using the same channel are allowed.
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.
'Two data storage tables are created. Table “OneMin” is an interval driven table that 'stores data every minute as determined by the CR1000 clock. Table “Event” is an event 'driven table that only stores data when certain conditions are met.
Page 244
Section 7. Installation 'Declare Public (viewable) Variables Public Batt_Volt As FLOAT 'Declared as Float Public PTemp_C 'Float by default Public AirTemp_C 'Float by default Public AirTemp_F 'Float by default Public AirTemp2_F 'Float by default Public DeltaT_C 'Float by default Public HowMany 'Float by default Public...
Page 245
Section 7. Installation Minimum(1,AirTemp_C,FP2,0,False) 'Stores temperature minimum in low 'resolution format Sample(1,DeltaT_C, FP2) 'Stores temp difference sample in low 'resolution format Sample(1,HowMany, FP2) 'Stores how many data events in low 'resolution format EndTable BeginProg 'A second way of naming a station is to load the name into a string variable. The is 'place here so it is executed only once, which saves a small amount of program 'execution time.
Section 7. Installation 'Count how many times the DataEvent “DeltaT_C>=3” has occurred. 'TableName.EventCount syntax is used to return the number of data storage events 'that have occurred for an event driven table. This example looks in the data 'table “Event”, which is declared above, and reports the event count. The (1,1) 'after EventCount just needs to be included.
Section 7. Installation 'Main Program BeginProg 'Begin executable section of program Scan(1,Sec,0,0) 'Begin main scan PanelTemp(PTemp,250) Counter1 = Counter1 + 1 NextScan 'End main scan SlowSequence 'Begin slow sequence 'Declare Public Variables for Secondary Scan (can be declared at head of program) Public Batt_Volt Public...
Page 248
Section 7. Installation 'Declare Variables Public PTemp, Batt_Volt, Level, TimeIntoTest Public Counter(10) Public Flag(8) As Boolean 'Define Data Tables DataTable(LogTable,1,-1) Minimum(1,Batt_Volt,FP2,0,False) Sample(1,PTemp,FP2) Sample(1,Level,FP2) Sample(1,TimeIntoTest, FP2) EndTable 'Main Program BeginProg Scan(1,Sec,0,0) TimeIntoInterval(0,1,Min) Then Flag(1) = True Flag(1) = True Then ExitScan NextScan '10 Second Data Interval Flag(1) = True...
Mult(10) = 1 : Offset(10) = 10 Scan(5,Sec,1,0) 'Measure reference temperature PanelTemp(PTemp_C,_60Hz) 'Measure 5 thermocouples on CR1000 'Note: because of the use of repetitions, an array can be used for the 'destination, multiplier and offset. TCDiff(Temp_C(),5,mV2_5C,1,TypeT,PTemp_C,True ,0,250,Mult(),Offset()) 'Measure 5 thermocouples on an AM16/32 Multiplexer (2x32 mode)
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.
NextScan EndProg 7.8.18 PRT Measurement PRTs (platinum resistance thermometers) are high-accuracy resistive devices used in measuring temperature. 7.8.18.1 PRT Calculation Standards Two CR1000 instructions are provided to facilitate PRT measurement. PRT(): an obsolete instruction. It calculates temperature from RTD resistance using DIN standard 43760. It is superseded in probably all cases by PRTCalc(). PRTCalc(): calculates temperature from RTD resistance according to one of several supported standards. PRTCalc() supersedes PRT() in probably all cases. For industrial grade RTDs, the relationship between temperature and resistance is characterized by the Callendar-Van Dusen (CVD) equation.
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 <...
Section 7. Installation Table 45. PRTCalc() Type-Code-1 Sensor IEC 60751:2008 (IEC 751), alpha = 0.00385. Now internationally adopted and written into standards ASTM E1137-04, JIS 1604:1997, EN 60751 and others. This type code is also used with probes compliant with older standards DIN43760, BS1904, and others. (Reference: IEC 60751.
PRT is separated from bridge resistors by a lead length having more than a few thousandths of an ohm resistance. In this example, the measurement range is -10 to 40°C. The length of the cable from the CR1000 and the bridge resistors to the PRT is 500 feet.
Page 258
+ R + 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...
Section 7. Installation 0.15°C over the -10 to 40°C temperature range. Because the measurement is ratiometric (R ), the properties of the 10-kΩ resistor do not affect the result. A terminal-input module (TIM) can be used to complete the circuit shown in figure PT100 in Four-Wire Half-Bridge Refer to the appendix Signal (p.
Page 260
Section 7. Installation Example PRT specifications: • Alpha = 0.00385 (PRTType 1) The temperature measurement requirements in this example are the same as in PT100 in Four-Wire Half-Bridge In this case, a three-wire half-bridge and (p. 257). CRBasic instruction BRHalf3W() are used to measure the resistance of the PRT. The diagram of the PRT circuit is shown in figure PT100 in Three-Wire Half- Bridge (p.
Section 7. Installation Figure 80: PT100 in three-wire half-bridge CRBasic Example 60. PT100 in Three‐wire Half‐bridge 'See FIGURE. PT100 in Three-Wire Half-Bridge for wiring diagram. (p. 260) Public Rs_Ro Public Deg_C BeginProg Scan(1,Sec,0,0) 'BrHalf3W(Dest,Reps,Range1,SEChan,ExChan,MPE,Ex_mV,True,0,250,100.93,0) BrHalf3W(Rs_Ro,1,mV25,1,Vx1,1,2200,True,0,250,100.93,0) 'PRTCalc(Destination,Reps,Source,PRTType,Mult,Offset) PRTCalc(Deg_C,1,Rs_Ro,1,1.0,0) NextScan EndProg 7.8.18.2.4 PT100 in Four-Wire Full-Bridge Example Shows: •...
Page 262
Section 7. Installation where, = measured bridge‐output voltage = excitation voltage X = 1000 (R )‐R )). With reference to figure PT100 in Four-Wire Full-Bridge ( ), the resistance of p. 263 the PRT (R ) is calculated as: = R X' / (1‐X') where X' = X / 1000 + R ) Thus, to obtain the value R , (R @ 0°C) for the temperature calculating instruction PRTCalc(), the multiplier and offset used in BRFull() are 0.001 and...
Section 7. Installation Figure 81: PT100 in four-wire full-bridge CRBasic Example 61. PT100 in Four‐Wire Full‐Bridge 'See FIGURE. PT100 in Four-Wire Full-Bridge for wiring diagram. (p. 263) Public BrFullOut Public Rs_Ro Public Deg_C BeginProg Scan(1,Sec,0,0) 'BrFull(Dst,Reps,Range,DfChan,Vx1,MPS,Ex,RevEx,RevDf,Settle,Integ,Mult,Offset) BrFull(BrFullOut,1,mV25,1,Vx1,1,2500,True,True,0,250,.001,.02344) 'BrTrans = Rf*(X/(1-X)) Rs_Ro = 50 * (BrFullOut/(1 - BrFullOut)) 'PRTCalc(Destination,Reps,Source,PRTType,Mult,Offset) PRTCalc(Deg_C,1,Rs_Ro,2,1.0,0) NextScan...
Page 264
Section 7. Installation where X is the most recent value of the source variable and X is the previous value (X is the oldest value included in the average, i.e., N-1 values back from the most recent). NANs are ignored in the processing of AvgRun() unless all values in the population are NAN.
Section 7. Installation Note N = Number of points in running average) To calculate the delay in time, multiply the result from the above equation by the period at which the running average is executed (usually the scan period): Delay in time = (scan period) (N ‐ 1) / 2 For the example above, the delay is: Delay in time = (1 ms) (4 ‐ 1) / 2 = 1.5 ms ...
7.8.20 Writing High-Frequency Data to CF An advanced method for writing high-frequency time-series data to CompactFlash (CF) cards is now available for CR1000 dataloggers. It supports 16-GB or smaller CF cards. It improves the user interface by allowing smaller, user- determined file sizes.
The CRD: drive is a memory drive created when a CF card is connected to the datalogger through the appropriate peripheral device. The CR1000 is adapted for CF use by addition of the NL115 or CFM100 modules. NL115 and CFM100 modules are available at additional cost from Campbell Scientific.
The TOB3 format that is used to write data to CF 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 269
Q: Which CF memory card should I use? A: Campbell Scientific recommends and supports only the use of FMJ brand CF cards. These CF cards are industrial-grade and have passed Campbell Scientific hardware testing. Following are listed advantages FMJ brand CF cards have over less expensive commercial-grade cards: •...
Page 270
Section 7. Installation • better vibration and shock resistance • longer life spans (more read/write cycles) Note More CF card recommendations are presented in the application note, CF Card Information, which is available at www.campbellsci.com. Q: Why not use SD cards? A: CF cards offer advantages over Secure Digital (SD) cards, including ruggedness, ease of handling, and connection reliability.
Page 271
Section 7. Installation "rings": the datalogger has a ring memory. In other words, once filled, rather than stopping when full, oldest data are overwritten by new data. In this context, "rings" designates when new data begins to overwrite the oldest data. Status CPU data table fill times can be confirmed in the datalogger table.
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.
Other time-processing CRBasic instructions are governed by these same rules. Consult CRBasic Editor Help for more information on specific instructions. 8.1.2 Voltage The CR1000 incorporates a programmable gain input instrumentation amplifier (PGIA), as illustrated in figure PGI Amplifier The voltage gain of the (p.
The input limits specification is the voltage range, relative to CR1000 ground, which both H and L input voltages must be within to be processed correctly by the PGIA. Input limits for the CR1000 are ±5 Vdc. Input voltages in which V or V are beyond the ±5 Vdc input limits may suffer from undetected measurement...
Warning Sustained voltages in excess of ±16 V input to the analog channels will damage CR1000 circuitry. 8.1.2.2 Reducing Error Read More! Consult the following white papers at www.campbellsci.com for in- depth treatment of the advantages of differential and single-ended measurements:...
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- constantan thermocouple being used to measure soil temperature is not insulated,...
CR1000 analog-measurement error is calculated as Error = Gain Error (%) + Offset Error Gain error is expressed as ±% of reading and is a function of CR1000 temperature. Between 0°C and 40°C, gain error is ±0.06% of input voltage. This gain error assumes factory recalibration every two years.
Section 8. Operation where Gain Error = ± (2500 * 0.0006) = ±1.5 mV Offset Error = 1.5 • 667 µV + 1 µV = 1.00 mV Therefore, Error = Gain Error + Offset Error = ±1.5 mV + 1.00 µV = ±2.50 mV In contrast, the error for a 500‐mV input under the same constraints is ±1.30 mV. The figure Voltage Measurement Accuracy illustrates (p. 279) the total error with respect to voltage measurements for the ±2500‐mV range. Figure 87: Voltage measurement accuracy (0° to 40°C) ...
In general, a voltage measurement should use the smallest fixed-input range that will accommodate the full-scale output of the sensor being measured. This results in the best measurement accuracy and resolution. The CR1000 has fixed input ranges for voltage measurements and an auto range to automatically determine the appropriate input voltage range for a given measurement.
An approximate 9% range overhead exists on fixed input voltage ranges. For example, over-range on the ±2500 mV-input range occurs at approximately +2725 mV and -2725 mV. The CR1000 indicates a measurement over-range by returning a NAN (not a number) for the measurement.
Secondary sources of offset voltages are return currents incident to powering external devices through the CR1000. Return currents create voltage drop at the ground terminals that may be used as signal references. CR1000 measurement instructions incorporate techniques to cancel these unwanted offsets.
4. reverses the excitation, reverses the inputs, settles, measures, 5. reverses the excitation, settles, measures. There are four delays per channel measured. The CR1000 processes the four sub- measurements into a single reported value. In cases of excitation reversal, excitation "on time" for each polarity is exactly the same to ensure that ionic sensors do not polarize with repetitive measurements.
(filter) 50-Hz or 60-Hz related noise. ac Noise Rejection on Small Signals mV5000 The CR1000 rejects ac power line noise on all voltage ranges except mV2500 by integrating the measurement over exactly one ac cycle before A/D conversion as illustrated in table ac Noise Rejection on Small Signals (p.
The CR1000 does not prevent or warn against setting a settling time beyond the one-half-cycle limit. For example, a settling time of up to 50000 µs can be programmed, but the CR1000 will execute the measurement as follows: 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.
3 ms (default) >100 μs entered Minimum settling time required to allow the input to settle to CR1000 resolution specifications. X is an integer >100. A settling time is required for voltage measurements to minimize the effects of the following sources of error: •...
Page 288
Section 8. Operation steady-state conditions so changes in measured voltage are attributable to settling time rather than changes in pressure. Reviewing the section Programming (p. 108) may help in understanding the CRBasic code in the example. The first six measurements are shown in table First Six Values of Settling-Time Data Each trace in figure Settling Time for Pressure Transducer (p.
That is, over the extended temperature range of -40°C to 85°C, the accuracy specification of ±0.12% of reading can degrade to ±1% of reading with self- calibration disabled. If the temperature of the CR1000 remains the same, there is little calibration drift with self-calibration disabled.
Page 290
The composite transfer function of the instrumentation amplifier, integrator, and analog-to-digital converter of the CR1000 is described by the following equation: COUNTS = G * Vin + B where COUNTS is the result from an analog-to-digital conversion, G is the voltage gain for a given input range, and B is the internally measured offset voltage.
Section 8. Operation measurements (B) to be determined during CR1000 self-calibration (maximum of 54 values). These values can be viewed in the Status table, with entries identified as listed in table Status Table Calibration Entries (p. 291). Automatic self-calibration can be overridden with the Calibrate() instruction, which forces a calibration for each execution, and does not employ any low-pass filtering on the newly determined G and B values.
Page 292
Section 8. Operation Table 59. Status Table Calibration Entries Descriptions of Status Table Elements Status Table Element Differential (Diff) ±mV Input Offset or Gain Integration Single-Ended (SE) Range CalGain(18) Gain 50-Hz Rejection CalSeOffset(1) Offset 5000 250 ms CalSeOffset(2) Offset 2500 250 ms CalSeOffset(3) Offset...
Section 8. Operation Table 59. Status Table Calibration Entries Descriptions of Status Table Elements Status Table Element Differential (Diff) ±mV Input Offset or Gain Integration Single-Ended (SE) Range CalDiffOffset(16) Diff Offset 50-Hz Rejection CalDiffOffset(17) Diff Offset 50-Hz Rejection CalDiffOffset(18) Diff Offset 50-Hz Rejection ...
Read More! Available resistive bridge completion modules are listed in the appendix Signal Conditioners (p. 561). Five bridge measurement instructions are features of the CR1000. Table Resistive Bridge Circuits -- Voltage Excitation (p. 296) show circuits that are typically measured with these instructions. In the diagrams, resistors labeled R...
Section 8. Operation Table 61. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and CRBasic Instruction and Circuit Diagram Fundamental Relationship Relationships Half-Bridge CRBasic Instruction: BrHalf() Fundamental Relationship Three-Wire Half-Bridge CRBasic Instruction: BrHalf3W() Fundamental Relationship Four-Wire Half-Bridge CRBasic Instruction: BrHalf4W() Fundamental Relationship These relationships apply to BrFull() Full-Bridge and BrFull6W().
Section 8. Operation Table 61. Resistive-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and CRBasic Instruction and Circuit Diagram Fundamental Relationship Relationships Key: V = excitation voltage; V = sensor return voltages; R = "fixed", "bridge" or "completion" resistor; R = "variable" or "sensing"...
CR1000 bridge measurements can reverse excitation polarity to provide ac excitation and avoid ion polarization. Note Sensors requiring ac excitation require techniques to minimize or eliminate ground loops.
Section 8. Operation • Effects due to the following are not included in the specification: Bridge-resistor errors Sensor noise Measurement noise The ratiometric-accuracy specification is applied to a three-wire half-bridge measurement that uses the BrHalf() instruction as follows: The relationship defining the BrHalf() instruction is X = V1/Vx, where V1 is the voltage measurement and Vx is the excitation voltage. The estimated accuracy of X is designated as ∆X, where ∆X = ∆V1/Vx. ∆V1 is ...
Section 8. Operation 8.1.3.3 Strain Calculations Read More! The FieldCalStrain() Demonstration Program section has (p. 153) more information on strain calculations. A principal use of the four-wire full bridge is the measurement of strain gages in structural stress analysis. StrainCalc() calculates microstrain, με, from an appropriate formula for the particular strain bridge configuration used.
StrainCalc Example: See FieldCalStrain() Demonstration Program (p. 162) 8.1.4 Thermocouple Note Thermocouples are easy to use with the CR1000. They are also inexpensive. However, they pose several challenges to the acquisition of accurate temperature data, particularly when using external reference junctions. Campbell...
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.
(p. 304) shows the results when going from high temperature to low. During rapid temperature changes, the panel thermistor will tend to lag behind terminal temperature because it is mounted deeper in the CR1000. Figure 92: Panel-temperature error summary ...
Section 8. Operation Figure 93: Panel-temperature gradients (low temperature to high) Figure 94: Panel-temperature gradients (high temperature to low) 8.1.4.1.2 Thermocouple Limits of Error The standard reference that lists thermocouple output voltage as a function of temperature (reference junction at 0°C) is the NIST (National Institute of 304 ...
8.1.4.1.3 Thermocouple Voltage Measurement Error Thermocouple outputs are extremely small — 10 to 70 µV per °C. Unless high resolution input ranges are used when programming, the CR1000, accuracy and sensitivity are compromised. Table Voltage Range for Maximum Thermocouple ...
Section 8. Operation Resolution lists high resolution ranges available for various thermocouple (p. 306) types and temperature ranges. The following four example calculations of thermocouple input error demonstrate how the selected input voltage range impacts the accuracy of measurements. Figure Input Error Calculation (p.
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 Reference temperature = 25°C Delta T (temperature difference) = 20°C ‐1 Thermocouple output multiplier at 45°C = 42.4 µV °C ...
Page 308
K (chromel-alumel) thermocouples are used to measure temperatures around 1300°C. 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 ‐1 Thermocouple output multiplier at 1300°C = 34.9 µV °C...
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.
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().
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.
(p. 312) 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.
(p. 560) on peripheral modules available to convert low-level ac signals to square-wave signals. Read More! Review digital I/O channel specifications in CR1000 Specifications Caution Contact Campbell Scientific for signal conditioning information if a pulse input < -8.0 or > +16 Vdc is to be measured. Under no circumstances should voltages greater than ±50 V be connected to channels C1 –...
Using a Pull-up Resistor on Digital I/O Channels C1 - C8 Alternatively, if the switch is to close ground through a digital I/O port, (p. 318). connect the sensor to the CR1000 as diagrammed in figure Connecting Switch Closures to Digital I/O (p. 317).
Section 8. Operation 8.1.5.3 Pulse Measurement Tips • The PulseCount() instruction, whether measuring pulse inputs on pulse channels (P1 through P2) or on digital I/O channels (C1 – C8), uses dedicated 24-bit counters to accumulate all counts over the user-specified scan interval.
Section 8. Operation Using a pull-up resistor on digital I/O channels C1 - C8 8.1.5.3.1 Frequency Resolution Frequency resolution of a PulseCount() frequency measurement is calculated as where: FR = Resolution of the frequency measurement (Hz) S = Scan Interval of CRBasic Program Resolution of TimerIO() instruction is: where: FR = Frequency resolution of the measurement (Hz) R = Timing resolution of the TimerIO() measurement = P = Period of input signal (seconds). For example, P = 1 / 1000 Hz = 0.001 s E = Number of rising edges per scan or 1, whichever is greater. ...
Section 8. Operation Table 70. Example. E for a 10 Hz input signal Scan Rising Edge / Scan 0.05 TimerIO() instruction measures frequencies of ≤ 1 kHz with higher frequency resolution over short (sub-second) intervals. In contrast, sub-second frequency measurement with PulseCount() produce measurements of lower resolution. Consider a 1-kHz input.
Section 8. Operation 8.1.5.4 Pulse Measurement Problems 8.1.5.4.1 Pay Attention to Specifications The table Example of Differing Specifications for Pulse Input Channels (p. 320) compares specifications for pulse-input channels to emphasize the need for matching the proper device to application. Take time to understand signals to be measured and compatible channels.
It is a simple protocol, requiring only a single communication wire. Typically, the data-acquisition unit also supplies power (12 Vdc and ground) to the SDI-12 sensor. The CR1000 is equipped with 4 SDI-12 channels (C1, C3, C5, C7) and an SDI12Recorder() CRBasic instruction.
Adjusting a sensor output directly is preferred, but not always possible or practical. By adding FieldCal() or FieldCalStrain() instructions to the CR1000 program, a user can easily adjust the measured output of a linear sensors by modifying multipliers and offsets.
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.
When programs are running in pipeline mode, measurements can be synchronized to within a few microseconds (see WaitDigTrig Scans ). 3. PakBus commands – the CR1000 is a PakBus device, so it is capable of being a node in a PakBus network. Node clocks in a PakBus network are synchronized using the SendGetVariable(), ClockReport(), or PakBusClock() commands.
8.2.4 Control Outputs 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 channel is also available.
Section 8. Operation Figure 105: Control port current sourcing 8.2.4.2 Relays and Relay Drivers Several relay drivers are manufactured by Campbell Scientific. For more information, see the appendix Relay Drivers contact a Campbell Scientific (p. 563), applications engineer, or go to www.campbellsci.com.
Figure 107: Power switching without relay 8.2.5 Analog Control / Output Devices The CR1000 can scale measured or processed values and transfer these values in digital form to an analog output device. The analog output device performs a digital-to-analog conversion to output an analog voltage or current. The output level is maintained until updated by the CR1000.
8.2.8 Low-level ac Low-level ac input modules increase the number of low-level ac signals a CR1000 can monitor by converting low-level ac to high-frequency pulse. Refer to the appendix Pulse / Frequency Input-Expansion Modules for information (p.
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. ...
Data-storage drives are listed in table CR1000 Memory Drives Data-table (p. 332). SRAM and the CPU: drive are automatically partitioned for use in the CR1000. The USR: drive can be partitioned as needed. The USB: drive is automatically partitioned when a Campbell Scientific mass-storage device is connected.The CRD: drive is automatically partitioned when a CF card is installed.
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.
CRD: use. Caution When installing or removing card-storage modules, first turn off CR1000 power. Removing a card from the module while the CF card is active can cause data corruption and may damage the card. Always press the removal button to disable the card and wait for the green LED before removing the card or switching off power prior to removal of the card.
If no card is present, or if space is inadequate, the CR1000 will warn that the card is not being used. However, the user program runs anyway and data are stored to SRAM.
Section 8. Operation Table 78. TableFile()-Instruction Data-File Formats Elements Included TableFile() Base Format File Header Time Record Option Format Stamp Number Information TOB1 TOB1 TOB1 TOB1 TOB1 TOB1 TOB1 TOB1 TOA5 TOA5 TOA5 TOA5 TOA5 TOA5 TOA5 TOA5 CSIXML CSIXML CSIXML CSIXML CSIJSON...
Page 337
Section 8. Operation Example: "TOB1","11467","CR1000","11467","CR1000.Std.20","CPU:file format.CR1","61449","Test" "SECONDS","NANOSECONDS","RECORD","battfivoltfiMin","PTemp" "SECONDS","NANOSECONDS","RN","","" "","","","Min","Smp" "ULONG","ULONG","ULONG","FP2","FP2" }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' TOA5 TOA5 files contain ASCII header and comma‐separated data. (p. 447) Example: "TOA5","11467","CR1000","11467","CR1000.Std.20","CPU:file format.CR1","26243","Test" "TIMESTAMP","RECORD","battfivoltfiMin","PTemp" "TS","RN","","" "","","Min","Smp" "2010-12-20 11:31:30",7,13.29,20.77 "2010-12-20 11:31:45",8,13.26,20.77 "2010-12-20 11:32:00",9,13.29,20.8 CSIXML CSIXML files contain header information and data in an XML (p. 471) format. Example: <?xml version="1.0" standalone="yes"?> <csixml version="1.0">...
Page 338
File headers provide metadata that describe the data in the file. A TOA5 header contains the metadata described below. Other data formats contain similar information unless a non-header format option is selected in the TableFile() instruction in the CR1000 CRBasic program. Line 1 – Data Origins Includes the following metadata series: file type, station name, CR1000 ...
Four features are available for complete or selective reset of CR1000 memory. 8.3.3.1 Full Memory Reset Full memory reset occurs when an operating system is sent to the CR1000 using DevConfig or when entering 98765 in the Status table field FullMemReset. A full memory reset does the following: •...
CRD:. Operating systems can also be sent using the program Send feature in datalogger support software Beginning with CR1000 operating system v.16, settings (p. 77). and status are preserved when sending a subsequent operating system by this method;...
, FileManage() instruction , web API FileControl DevConfig , automatic with CF card (CRD: Sending an OS to the CR1000. Reset CR1000 drive) or Campbell Scientific mass-storage settings media (USB: drive) Send , power-up with CF card (CRD: drive) or Sending an OS to the CR1000.
("run now"), and b) when power is cycled on the CR1000 ("run on power-up'). This functionality is invoked because Program Send sets two CR1000 file attributes on the program file, i.e., Run Now and Run on Power-up. When together, Run Now and Run on Power-up are tagged as Run Always.
Support software File Control See software Help & Preserving Data at Program Send (p. 454). 110). Automatic on power-up of CR1000 with CF card (CRD: drive) or Campbell Scientific mass- storage media (USB: drive) and Powerup.ini. See Power-up (p. 343). ...
For instance, if the CR1000 loses power, do you want it to power back up with the same program, or another one? with variables intact or erased? with data intact or erased? The powerup.ini file enables the power-up function.
22 characters long. • Device: the CR1000 memory drive to which the accompanying operating system or user program file is copied (usually CPU:). If left blank or with an invalid option, default device will be CPU:. Use the same drive designation as the transporting external device if the preference is to not copy the file.
Page 346
'Device = device to which File is copied. Defaults to CPU: 'Command,File,Device 13,Write2CRD_2.cr1,cpu: Powerup.ini Example 'Copy program file pwrup.cr1 from the external drive to CPU: 'File will run only when CR1000 powered-up later. 2,pwrup.cr1,cpu: Powerup.ini Example 'Format the USR: drive 5,,usr: ...
Section 8. Operation 8.3.4.4 File Management Q & A Q: How do I hide a program file on the CR1000 without using the CRBasic FileManage() instruction? A: Use the CoraScript File-Control command, or the Web API FileControl command. 8.3.5 File Names The maximum size of the file name that can be stored, run as a program, or FTP transferred in the CR1000 is 59 characters.
The information can be programs, data, files, or control commands. Telecommunications systems require three principal components: hardware, carrier signal, and protocol. For example, a common way to communicate with the CR1000 is with PC200W software by way of a PC COM port. In this example, 348 ...
Section 8. Operation hardware are the PC COM port, the CR1000 RS-232 port, and a serial cable. The carrier signal is RS-232, and the protocol is PakBus®. Of these three, a user most often must come to terms with only the hardware, since the carrier signal and protocol are transparent in most applications.
(p. 569) the CR1000. For example, if a fruit grower wants a frost alarm, the CR1000 can contact him by calling a PC, sending an email, text message, or page, or calling him with synthesized-voice over telephone. Callback has been utilized in applications including Ethernet, land-line telephone, digital cellular, and direct connection.
PakBus addresses are set using DevConfig, PakBusGraph, CR1000 Status table, or with an external keyboard / display. DevConfig (Device Configuration Utility) is the primary settings editor for Campbell Scientific equipment. It requires a hardwire RS-232 connection to a PC and allows backup of settings on the PC hard drive.
Routers can be router-capable dataloggers or communications 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.
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 a random interval . If a node responds, a hello-message is exchanged and the node becomes a neighbor.
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.
Section 8. Operation 8.5.4.2 Ping Link integrity can be verified with the following procedure by using PakBusGraph Ping Node. Nodes can be pinged with packets of 50, 100, 200, or 500 bytes. Note Do not use packet sizes greater than 90 when pinging with 100 mW radio modems and radio enabled dataloggers (see the appendix Telecommunications Hardware ).
25 feet (7.6 m). COM1 Tx (transmit) and Rx (receive) are CR1000 digital I/O ports C1 and C2 respectively; COM2 Tx and Rx are digital I/O ports C3 and C4, respectively. Tx from a CR1000 COM port is connected to Rx of the COM port of an adjacent CR1000.
PC. Close other programs that may be using the PC COM port, such as LoggerNet, PC400, PC200W, HotSync, etc. 2. Click on the Connect button at the lower left. 3. Set CR1000 settings using DevConfig as outlined in table PakBus-LAN Example Datalogger-Communications Settings Leave unspecified (p.
8.5.6.3 LoggerNet Setup Figure 115: LoggerNet Network-Map Setup: COM port In LoggerNet Setup, click Add Root and add a ComPort. Then Add a PakBusPort, and (4) CR1000 dataloggers to the device map as shown in figure LoggerNet Device-Map Setup (p. 361).
Page 362
Section 8. Operation Figure 116: LoggerNet Network-Map Setup: PakBusPort As shown in figure LoggerNet Device Map Setup: PakBusPort set the (p. 362), PakBusPort maximum baud rate to 115200. Leave other settings at the defaults. Figure 117: LoggerNet Network-Map Setup: Dataloggers 362 ...
Routers and other leaf nodes do not need to be set for encryption. The CR1000 has a setting accessed through DevConfig that sets it to send / receive only encrypted commands and data. LoggerNet, likewise, has a setting attached to the specific station that enables it to send and receive only encrypted commands and data.
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.
Analog output status Analog output block Time and date Time and date CTO 8.6.1.2.2 CRBasic Instructions Complete descriptions and options of commands are available in CRBasic Editor Help. DNP() Sets the CR1000 as a DNP slave (outstation/server) with an address and DNP3‐ dedicated COM port. Normally resides between BeginProg and Scan(), so it is executed only once. Example at CRBasic example Implementation of DNP3 (p. 366), line 20. Syntax DNP(ComPort, BaudRate, DNPSlaveAddr) DNPVariable() ...
As shown in CRBasic example Implementation of DNP3 program the (p. 366), 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().
Section 8. Operation 'Object group 30, variation 2 is used to return analog data when the CR1000 'is polled. Flag is set to an empty 8 bit number(all zeros), DNPEvent is a 'reserved parameter and is currently always set to zero. Number of events is 'only used for event data.
8.6.2.2 Terminology Table Modbus to Campbell Scientific Equivalents lists terminology (p. 368) equivalents to aid in understanding how CR1000s fit into a SCADA system. Table 88. Modbus to Campbell Scientific Equivalents Modbus Domain Data Form Campbell Scientific Domain Coils Single Bit...
40001 to 40041* or Variable Public ArrayV(20)* 30001 to 30041* *Because of byte-number differences, each CR1000 domain variable translates to two Modbus domain input / holding registers. 8.6.2.3.2 CRBasic Instructions - Modbus Complete descriptions and options of commands are available in CRBasic Editor Help.
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.
8.6.2.7 Converting 16-bit to 32-bit Longs Concatenation of two Modbus long 16‐bit variables to one Modbus long 32 bit number is shown in the following example. CRBasic Example 67. Concatenating Modbus Long Variables 'Requires CR800 OS v.3, CR1000 OS v.12, or CR3000 OS v.5 or higher 'CR1000 uses Big-endien word order. 'Declarations Public Combo As Long 'Variable to hold the combined 32-bit...
Send programs Send files Collect files The full command set is available in the most recent CR1000 operating system (see operating system in the glossary). API commands are also used with Campbell Scientific’s RTMC web server datalogger support software (p. 77).
Editor dialog box, pressing 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.
Section 8. Operation and arguments and the commands wherein they are used. Parameters and arguments for specific commands are listed in the following sections. Table 91. API Commands, Parameters, and Arguments Commands in which the Parameter parameter is used Function of parameter Argument(s) Specifies the data source.
8.6.3.4 Data Management 8.6.3.4.1 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...
CR1000, and fieldname are optional. If source is not specified, (CR1000) is assumed. A field name is always specified in association with a table name. If the field name is not specified, all fields are output. If fieldname refers to an array without a subscript, all fields associated with that array will be output.
Page 377
Section 8. Operation Boolean value that is set to true if the symbol is considered to be read-only. A value of false would indicate an expectation is_read_only that the symbol value can be changed using the SetValueEx command. Boolean value that is set to true if the symbol has child values can_expand that can be listed using the BrowseSymbols command.
Page 378
Section 8. Operation <td>BallastLine</td><td>dl:BallastLine</td><td>6</td><td>true</t d><td>false</td><td>true</td></tr><tr> <td>Public</td><td>dl:Public</td><td>6</td><td>true</td><td>fals e</td><td>true</td></tr> </table> </body> </html> XML Response format When is entered in the BrowseSymbols parameter, the response will be formated as CSIXML with a BrowseSymbolsResponse root element (p. 68) name. Following is an example response. Example page source output: <BrowseSymbolsResponse>...
6,"is_enabled": true,"is_read_only": false,"can_expand": true}, {"name": "Public","uri": "dl:Public","type": 6,"is_enabled": true,"is_read_only": false,"can_expand": true} 8.6.3.4.2 DataQuery Command DataQuery allows a web client to poll the CR1000 for data. DataQuery typically takes the form: http://ip_address/?command=DataQuery&uri=dl:tablename.fieldname& format=_&mode=_&p1=_&p2=_ DataQuery requires a minimum .csipasswd access level of 3 (read-only).
The record number is specified (p. 463) If the record number is not present in the table, the CR1000 will return all data starting mode with the oldest record. date-range and p2. Data returns data in a certain date range.
Page 381
Section 8. Operation http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=most-recent&p1=70 Response: collect the five most recent records from table MainData* http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=since-time&p1=2012-09-14T8:00:00 Response: collect all records of field Cond41 since the specified date and time* http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=since-record&p1=4700 Response: collect all records since the specified record* http://192.168.24.106/?command=DataQuery&uri=dl:MainData.Cond41& format=html&mode=backfill&p1=7200 Response: backfill all records since 3600 seconds ago* DataQuery Response The DataQuery format parameter determines the format of the response. For more detail concerning data response formats, see the Data File Formats section. When html is entered in the DataQuery...
Page 382
DataQuery 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"/> </fields> </head>...
Page 383
.."no": 108, .."vals": [66] TOA5 Response toa5 format When is entered in the DataQuery parameter, the response will be formated as Campbell Scientific TOA5. Following is an example response: "TOA5","TXSoil","CR1000","No_SN","CR1000.Std.25","TexasRun_1b.CR 2","12645","_1Hr" "TIMESTAMP","RECORD","ID","_6_inch","One","Two","Three","Temp_F_ Avg","Rain_in_Tot" "TS","RN","","","","","","","" "","","Smp","Smp","Smp","Smp","Smp","Avg","Tot" "2012-05-03 17:00:00",0,0,-0.8949984,-0.95232,-0.8949984,- 0.8637322,2.144136,0.09999999 "2012-05-03 18:00:00",1,0,-0.9106316,-0.9731642,-0.9210536,- 0.8845763,72.56885,0...
Page 384
"2012-05-05 22:00:00",11,5,-0.9132372,-0.9653476,-0.908026,- 0.8611265,70.0032,0 "2012-05-05 23:00:00",12,5,-0.9353842,-0.9822836,-0.930173,- 0.8936957,69.83805,0 TOB1 Response tob1 format When is entered in the DataQuery parameter, the response will be formated as Campbell Scientific TOB1. Following is an example response. Example: "TOB1","11467","CR1000","11467","CR1000.Std.20","CPU :file format.CR1","61449","Test" "SECONDS","NANOSECONDS","RECORD","battfivoltfiMin"," PTemp" 384 ...
CRBasic program language logic can be configured to allow remote access to many control functions by means of changing the value of a variable. 8.6.3.5.1 SetValueEx Command SetValueEx allows a web client to set a value in a host CR1000 CRBasic variable. http://ip_address/?command=SetValueEx&uri=dl:table.variable&valu e=x.xx...
Section 8. Operation SetValueEx Response format The SetValueEx parameter determines the format of the response.. If a format is not specified, the format defaults to HTML For more detail concerning data response formats, see the Data File Formats section. Responses contain two fields. In the XML output, the fields are attributes. Table 96.
CSIJSON. Following is an example response: "outcome": outcome-code, "description": description 8.6.3.6 Clock Functions Clock functions allow a web client to monitor and set the host CR1000 real time clock. Read the Time Syntax section for more information. (p. 375) 8.6.3.6.1 ClockSet Command ClockSet allows a web client to set the CR1000 real time clock.
5 — Communication with the CR1000 failed outcome 6 — Communication with the CR1000 is disabled 8 — An invalid URI was specified. time Specifies the value of the CR1000 clock before it was changed. description A string that describes the outcome code. HTML Response...
Responses contain three fields as described in the following table: Table 100. ClockCheck API Command Response Codes that specifies the outcome of the ClockCheck command. Codes in grey text are not valid inputs for the CR1000: 1 — The clock was checked 2 — The clock was set 3 —...
Page 390
Section 8. Operation Specifies the current value of the CR1000 real-time clock . This value will only be valid if the value of outcome is set to 1. This time value will be formatted in the same way that record time stamps are formatted for the DataQuery response.
8.6.3.7.1 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.
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...
Specifies the format of the response. The values html, json, and xml are recognized. If this format parameter is omitted, or if the value is html, empty, or invalid, the response is HTML. Example: http://192.168.24.106/?command=FileControl&file=USR:APITest.dat& action=4 Response: APITest.dat is deleted from the CR1000 USR: drive. http://192.168.24.106/?command=FileControl&file=CPU:IndianaJones _090712_2.CR1&action=1 Response: Set program file to Run Now. http://192.168.24.106/?command=FileControl&file=USR:FileCopy.dat &file2=USR:FileName.dat&action=18 Response: Copy from file2 to file. ...
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...
The format of the response depend on the value of the parameter in the command request. The response provides information for each of the files or directories that can be reached through the CR1000 web server. The information for each file includes the following: Table 105. ListFiles API Command Response path Specifies the path to the file relative to the URL path.
Page 396
Section 8. Operation HTML page source: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>ListFiles Response</title></head> <body><h1>ListFiles Response</h1><table border="1"> <tr><td><b>Path</b></td> <td><b>Is Directory</b></td> <td><b>Size</b></td> <td><b>Last Write</b></td> <td><b>Run Now</b></td> <td><b>Run On Power Up</b></td> <td><b>Read Only</b></td> <td><b>Paused</b></td></tr><tr> <td>CPU/</td> <td>true</td>...
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.
(p. 567) illustrates the use of the keyboard display using default menus. 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. ...
Section 8. Operation Table 107. Special Keyboard-Display Key Functions Special Function [2] and [8] Navigate up and down through the menu list one line at a time [Enter] Selects the line or toggles the option of the line the cursor is on Back up one level in the menu [Esc] [Home]...
Page 401
Section 8. Operation Figure 118: Using the keyboard / display ...
8.8.1.2 Real-Time Custom The external keyboard / display can be configured with a user-defined, real-time display. The CR1000 will keep the setup if the same program is running, or until it is changed by the user. Read More! Custom menus can also be programmed. See Custom Menus (p.
Section 8. Operation 8.8.3 File Display Figure 124: File display 8.8.3.1 File: Edit The CRBasic Editor is recommended for writing and editing datalogger programs. When making minor changes in the field with the external keyboard / display, restart the program to activate the changes. ...
Section 8. Operation 8.8.4 PCCard (CF Card) Display Figure 126: PCCard (CF Card) display 8.8.5 Ports and Status Read More! See the appendix Status Table and Settings (p. 527). ...
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 412
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.
(.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.
2. In the table definitions advertised to datalogger support software (p. 77), 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 415
CPU buffer before final-data storage stops altogether, resulting in a few more records than advertised able to be collected. For example — on a CR1000 storing a four-byte value at a 10-ms rate, the CPU not fill-and-stop, CRD: set to fill-and-stop after 500 records — after final-data storage stopped,...
CR1000 is not powered. The CR1000 does not draw power from the lithium battery while it is powered by a 12-Vdc supply. In a CR1000 stored at room temperature, the lithium battery should last approximately 3 years (less at temperature extremes).
Section 9. Maintenance Time. Clock will need resetting when the battery is replaced. Final-storage data tables. A replacement lithium battery (pn 13519) can be purchased from Campbell Scientific or another supplier. Table Internal Lithium-Battery Specifications (p. 418) lists battery specifications.
Page 419
Section 9. Maintenance Figure 131: Pulling edge away from panel Pull one edge of the canister away from the wiring panel to loosen it from three connector seatings. Figure 132: Removing nuts to disassemble canister ...
To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 227-2342. After an applications engineer determines the nature of the problem, an RMA number will be issued. Please write this number clearly on the outside of the shipping container. Campbell Scientific's shipping address is: CAMPBELL SCIENTIFIC, INC. ...
Page 421
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.
"bugs." 10.3.1 Status Table as Debug Resource Consult the CR1000 Status table when developing a program or when a problem with a program is suspected. Critical Status table registries to review include CompileResults, SkippedScan, SkippedSlowScan, SkippedRecord, ProgErrors, MemoryFree, VarOutOfBounds, and WatchdogErrors.
Section 10. Troubleshooting 10.3.1.1 CompileResults Reports messages generated by the CR1000 at program upload and compile-time. A message will report that the program compiled OK, provide warnings about possible problems, or indicate there are run-time errors. Error messages may not be obvious because the display column is too short.
Skipped scans may compromise frequency measurements made with pulse channels. The error occurs because counts from a scan and subsequent skipped scans are regarded by the CR1000 as having occurred during a single scan. The measured frequency can be much higher than actual.
Status table each time the absence of a sixteenth element is encountered. The CR1000 attempts to catch VarOutOfBound errors at compile time (not to be confused with the CRBasic Editor pre-compiler, which does not). When a...
Neither CRBasic Editor nor the CR1000 compiler attempt to check whether the CR1000 is fast enough to do all that the program specifies in the time allocated. If a program is tight on time, look further at the execution times. Check...
A NAN indicates an invalid measurement. 10.3.4.1.1 Voltage Measurements The CR1000 has the following user-selectable voltage ranges: ±5000 mV, ±2500 mV, ±250 mV, ±25 mV, ±7.5 mV, ±2.5 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.
Section 10. Troubleshooting 10.3.4.2 Floating-Point Math, NAN, and ±INF Table Math Expressions and CRBasic Results lists math expressions, their (p. 429) CRBasic form, and IEEE floating point-math result loaded into variables declared as FLOAT or STRING. 10.3.4.3 Data Types, NAN, and ±INF NAN and ±INF are presented differently depending on the declared-variable data type.
Baud rate mis-match between the CR1000 and datalogger support software is often the root of communication problems through the RS-232 port. By default, the CR1000 attempts to adjust its baud rate to that of the software. However, settings changed in the CR1000 to accommodate a specific RS-232 device, such as a smart sensor, display or modem, may confine the RS-232 port to a single baud rate.
10.4.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 via a serial connection, so long as the PakBus addresses of the host PCs are different.
Section 10. Troubleshooting mid = (CommsMemFree(1) / 10000) % 100 med = (CommsMemFree(1) / 1000000) % 100 lrg = (CommsMemFree(1) / 100000000) % 100 Table 113. CommsMemFree(1) Defaults and Use Example, TLS Not Active Example Condition: Condition: reset, TLS not active. in use, TLS not active.
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.
All components may need to be checked if the power supply is not functioning properly. Diagnosis and Fix Procedures includes the following flowcharts for (p. 435) diagnosing or adjusting power equipment supplied by Campbell Scientific: • Battery-voltage test • Charging-circuit test (when using an unregulated solar panel) •...
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. 436 ...
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 438
1) Switch the power switch to or return the charging regulator to 2) Disconnect the power source (transformer / solar panel). Campbell Scientific for calibration. 3) Remove the 5-kΩ resistor 4) Place a 50-Ω, 1-Watt resistor between a terminal and a (ground) terminal on the charging regulator.
The procedure outlined in this flow chart tests PS100 and CH100 charging regulators that use ac/ac or ac/dc transformers as power source. If a need for repair is indicated after following the procedure, see Warranty and Assistance (p. 3) for information on sending items to Campbell Scientific. ...
The charger is functioning properly. Remove the 50-Ω resistor. 10.5.3.4 Adjusting Charging Voltage Note Campbell Scientific recommends that a qualified electronic technician perform the following procedure. The procedure outlined in this flow chart tests and adjusts PS100 and CH100 charging regulators.
Page 441
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.
With exception of perhaps the C command, terminal options are not necessary to routine CR1000 operations. To enter terminal mode, connect a PC to the nine-pin RS-232 port on the CR1000 via serial cable or USB-to-serial cable. Open a terminal emulator program.
As shown in figure DevConfig Terminal Emulator after entering a terminal (p. 445), emulator, press Enter a few times until the prompt CR1000> is returned. Terminal commands consist of a single character and Enter. Sending an H and Enter will return the terminal emulator menu (p.
Page 444
1. Download the old program back into memory. 2. Go into terminal mode and select option U. 3. When asked “OK? Reenter? Skip?”, select Y (=OK). This procedure will put the "filled" flag in the CR1000 for that data table and so allow datalogger support software to collect the whole table.
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 communication sniffer, will immediately stop.
Section 11. Glossary 11.1 Terms ac See Vac (p. 470). accuracy A measure of the correctness of a measurement. See also the appendix Accuracy, Precision, and Resolution (p. 471). A/D Analog‐to‐digital conversion. The process that translates analog voltage levels to digital values. Amperes (Amps) Base unit for electric current. Used to quantify the capacity of a power source or the requirements of a power‐consuming device. analog Data presented as continuously variable electrical signals. argument See parameter (p. 461). ASCII / ANSI Abbreviation for American Standard Code for Information Interchange / American National Standards Institute. An encoding scheme in which numbers from 0‐127 (ASCII) or 0‐255 (ANSI) are used to represent pre‐ defined alphanumeric characters. Each number is usually stored and transmitted as 8 binary digits (8 bits), resulting in 1 byte of storage per character of text. asynchronous The transmission of data between a transmitting and a receiving device occurs as a series of zeros and ones. For the data to be "read" correctly, the receiving device must begin reading at the proper point in the series. In asynchronous communication, this coordination is accomplished by having each character surrounded by one or more start and stop bits which designate the beginning and ending points of the information (see synchronous ). ...
Page 448
Section 11. Glossary Asynchronous Accepted abbreviation for "gauge." AWG is the accepted unit when identifying wire diameters. Larger AWG values indicate smaller cross‐ sectional diameter wires. Smaller AWG values indicate large‐diameter wires. For example, a 14 AWG wire is often used for grounding because it can carry large currents. 22 AWG wire is often used as sensor leads since only tiny currents are carried when measurements are made. baud rate The speed of transmission of information across a serial interface. Beacon A signal broadcasted to other devices in a PakBus® network to identify "neighbor" devices. A beacon in a PakBus® network ensures that all devices in the network are aware of other devices that are viable. If configured to do so, a clock‐set command may be transmitted with the beacon. This function can be used to synchronize the clocks of devices within the PakBus® network. See also PakBus and neighbor device (p. 461) (p. 459). binary Describes data represented by a series of zeros and ones. Also describes the state of a switch, either being on or off. BOOL8 A one‐byte data type that hold 8 bits (0 or 1) of information. BOOL8 uses less space than 32‐bit BOOLEAN data type. Boolean Name given a function, the result of which is either true or false. Boolean data type Typically used for flags and to represent conditions or hardware that have only two states (true or false) such as flags and control ports. Boolean data type Refers to a burst of measurements. Analogous to a burst of light, a burst of measurements is intense, such that it features a series of measurements in rapid succession, and is not continuous. 448 ...
Page 449
Section 11. Glossary Cache Data The data cache is a set of binary files kept on the hard disk of the computer running the datalogger support software. A binary file is created for each table in each datalogger. These files are set up to mimic the storage areas in datalogger memory, and by default are two times the size of the storage area. When the software collects data from a CR1000, the data are stored in the binary file for that CR1000. Various software functions retrieve data from the data cache instead of the CR1000 directly. This allows the simultaneous sharing of data among software functions. Similar in function to CR1000 final storage tables, the binary file for a datalogger is set up as ring memory. This means that as the file reaches its maximum size, the newest data will begin overwriting the oldest data. Calibration Wizard Software The calibration wizard facilitates the use of the CRBasic field calibration instructions FieldCal() and FieldCalStrain(). It is found in LoggerNet (4.0 or higher) or RTDAQ. Callback A name given to the process by which the CR1000 initiates telecommunication with a PC running appropriate CSI datalogger support software. Also known as "Initiate Telecommunications." CardConvert Software A utility to retrieve CR1000 final storage data from Compact Flash (CF) cards and convert the data to ASCII or other useful formats. CD100 An optional enclosure mounted keyboard display for use with the CR1000 and CR800 dataloggers. See the appendix Keyboard Display (p. 567). CF See CompactFlash (p. 450). code A CRBasic program, or a portion of a program. ...
Page 450
Section 11. Glossary Com port COM is a generic name given to physical and virtual serial communications ports. CompactFlash ® CompactFlash (CF) is a memory‐card technology utilized by Campbell ® Scientific card‐storage modules. CompactFlash is a registered ® trademark of the CompactFlash Association. Compile The software process of converting human‐readable program code to binary machine code. CR1000 user programs are compiled internally by the CR1000 operating system. constant A connector is a device that allows one or more electron conduits (wires, traces, leads, etc) to be connected or disconnected as a group. A connector consists of two parts — male and female. For example, a common household ac power receptacle is the female portion of a connector. The plug at the end of a lamp power cord is the male portion of the connector. See terminal (p. 468). constant A packet of CR1000 memory given an alpha‐numeric name and assigned a fixed number. control I/O Terminals C1 ‐ C8 or processes utilizing these terminals. CoraScript CoraScript is a command‐line interpreter associated with LoggerNet datalogger support software. Refer to the LoggerNet manual, available at www.campbellsci.com, for more information. CPU Central processing unit. The brains of the CR1000. ...
Page 451
Section 11. Glossary CR10X Older generation Campbell Scientific datalogger replaced by the CR1000. cr Carriage return CRBasic Editor Compile, Save and Send CRBasic Editor menu command that compiles, saves, and sends the program to the datalogger. CRD An optional memory drive that resides on a CF card. See CompactFlash (p. 450). CS I/O Campbell Scientific Input / Output. A proprietary serial communications protocol. CVI Communications verification interval. The interval at which a PakBus® device verifies the accessibility of neighbors in its neighbor list. If a neighbor does not communicate for a period of time equal to 2.5 x the CVI, the device will send up to four Hellos. If no response is received, the neighbor is removed from the neighbor list. datalogger support software Campbell Scientific software that includes at least the following functions: Datalogger telecommunications Downloading programs Clock setting Retrieval of measurement data Includes PC200W, PC400, RTDAQ, and LoggerNet suite. For more information, see Datalogger Support Software and the appendix ...
Page 452
Section 11. Glossary data point A data value which is sent to final storage as the result of an (p. 454) output processing (data storage) instruction. Strings of data points output at the same time make up a record in a data table. dc See Vdc (p. 470). DCE Data communications 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 and on many third‐party telecommunications devices, such as a digital cellular modems, are DCE. Interfacing a DCE device to a DCE device requires a null‐modem cable. desiccant A material that absorbs water vapor to dry the surrounding air. DevConfig Device Configuration Utility available with LoggerNet, RTDAQ, (p. 92), PC400, or a www.campbellsci.com. DHCP Dynamic Host Configuration Protocol. A TCP/IP application protocol. differential A sensor or measurement terminal wherein the analog voltage signal is carried on two leads. The phenomenon measured is proportional to the difference in voltage between the two leads. digital Numerically presented data. Dim A CRBasic command for declaring and dimensioning variables. Variables declared with Dim remain hidden during datalogger operations. 452 ...
Page 453
Section 11. Glossary dimension To code for a variable array. DIM example(3) creates the three variables example(1), example(2), and example(3). DIM example(3,3) creates nine variables. DIM example (3,3,3) creates 27 variables. DNS Domain name system. A TCP/IP application protocol. DTE Data terminal equipment. While the term has much wider meaning, in the limited context of practical use with the CR1000, it denotes the pin configuration, gender, and function of an RS‐232 port. The RS‐232 port on the CR1000 and on many third‐party telecommunications devices, such as a digital cellular modems, are DCE. Attachment of a null‐modem cable to a DCE device effectively converts it to a DTE device. Duplex Can be half or full. Full‐duplex is simultaneous, bidirectional data. Duplex The percentage of available time a feature is in an active state. For example, if the CR1000 is programmed with 1 second scan interval, but the program completes after only 100 millisecond, the program can be said to have a 10% duty cycle. Earth Ground A grounding rod or other suitable device that electrically ties a system or device to the earth. Earth ground is a sink for electrical transients and possibly damaging potentials, such as those produced by a nearby lightning strike. Earth ground is the preferred reference potential for analog voltage measurements. Note that most objects have a "an electrical potential" and the potential at different places on the earth ‐ even a few meters away ‐ may be different. engineering units Units that explicitly describe phenomena, as opposed to the CR1000 measurement units of milliVolts or counts. ESD Electrostatic discharge ...
Page 454
Glossary. File Control File Control is a feature of LoggerNet, PC400 and RTDAQ (p. 77) datalogger support software. It provides a view of the CR1000 file system and a menu of file management commands: Delete facilitates deletion of a specified file Send facilitates transfer of a file (typically a CRBasic program file) from PC memory to CR1000 memory.
Page 455
Section 11. Glossary FLOAT Four‐byte floating‐point data type. Default CR1000 data type for Public or Dim variables. Same format as IEEE4. IEEE4 is the name used when declaring data type for stored data table data. FP2 Two‐byte floating‐point data type. Default CR1000 data type for stored data. While IEEE four‐byte floating point is used for variables and internal calculations, FP2 is adequate for most stored data. FP2 provides three or four significant digits of resolution, and requires half the memory as IEEE4. FTP File Transfer Protocol. A TCP/IP application protocol. full duplex Systems allow communications simultaneously in both directions. 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. global variable A variable available for use throughout a CRBasic program. The term is usually used in connection with subroutines, differentiating global variables (those declared using Public or Dim) from local variables, which are declared in the Sub() and Function() instructions. ground Being or related to an electrical potential of 0 Volts. half duplex Systems allow bi‐directional communications, but not simultaneously. handshake, handshaking The exchange of predetermined information between two devices to assure each that it is connected to the other. When not used as a clock ...
Page 456
Section 11. Glossary line, the CLK/HS (pin 7) line in the datalogger CS I/O port is primarily used to detect the presence or absence of peripherals. Hello Exchange The process of verifying a node as a neighbor. Hertz Abbreviated "Hz." Unit of frequency described as cycles or pulses per second. HTML Hypertext Markup Language. A programming language used for the creation of web pages. HTTP Hypertext Transfer Protocol. A TCP/IP application protocol. IEEE4 Four‐byte, floating‐point data type. IEEE Standard 754. Same format as Float. Float is the name used when declaring data type for Public or Dim declared variables. Glossary. Include file a file to be implicitly included at the end of the current CRBasic program, or it can be run as the default program. See Include File Name setting in table CR1000 Settings (p. 540). INF A data word indicating the result of a function is infinite or undefined. Initiate telecommunication A name given to a processes by which the CR1000 initiates telecommunications with a PC running appropriate Campbell Scientific datalogger support software. Also known as "Callback." input/output instructions Used to initiate measurements and store the results in input storage or to set or read control/logic ports. 456 ...
Page 457
Section 11. Glossary integer A number written without a fractional or decimal component. 15 and 7956 are integers; 1.5 and 79.56 are not. intermediate storage The portion of memory allocated for the storage of results of intermediate calculations necessary for operations such as averages or standard deviations. Intermediate storage is not accessible to the user. IP Internet Protocol. A TCP/IP internet protocol. IP address A unique address for a device on the internet. IP Trace IP trace is a CR1000 function associated with IP data transmissions. In the evolution of the CR1000 operating system, IP trace information was originally accessed through the CRBasic instruction IPTrace() and (p. 166) stored in a string variable. As the operating system progressed, the need for a more convenient repository arose. As a result, the Files Manager setting was modified to allow for the creation of a file on (p. 540) a CR1000 memory drive, such as USR:, to store IP trace information in a ring memory format. "Keep" Memory Memory preserved through reset due to power‐up and program start‐ up. keyboard display The CR1000KD is the optional keyboard display for use with the CR1000 datalogger. lf Line feed local variable A variable available for use only by the subroutine wherein it was declared. The term differentiates local variables, which are declared in the Sub() and Function() instructions, from global variables, which are declared using Public or Dim. ...
Page 458
Communication protocol published by Modicon in 1979 for use in programmable logic controllers (PLCs). modem/terminal Any device which: has the ability to raise the CR1000 ring line or be used with an optically isolated interface (see the appendix CS I/O Serial Interfaces ) to (p. 567) raise the ring line and put the CR1000 in the telecommunications command state.
Page 459
Section 11. Glossary MSB Most significant bit (the leading bit). multi‐meter An inexpensive and readily available device useful in troubleshooting data‐acquisition system faults. multipler a term, often a parameter in a CRBasic measurement instruction, to designate the slope, scaling factor, or gain in a linear function. For example, when converting °C to °F, the equation is °F = °C*1.8 + 32. The factor 1.8 is the multiplier. mV The SI abbreviation for milliVolts. 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. Neighbor Device Devices in a PakBus® network that can communicate directly with an individual device without being routed through an intermediate device. See PakBus (p. 461). NIST National Institute of Standards and Technology Node Part of the description of a datalogger network when using LoggerNet. Each node represents a device that the communications server will dial through or communicate with individually. Nodes are organized as a hierarchy with all nodes accessed by the same device (parent node) entered as child nodes. A node can be both a parent and a child. NSEC Eight‐byte data type divided up as four bytes of seconds since 1990 and four bytes of nanoseconds into the second. ...
Page 460
Section 11. Glossary Null‐modem A device, usually a multi‐conductor cable, which converts an RS‐232 port from DCE to DTE or from DTE to DCE. offset a term, often a parameter in a CRBasic measurement instruction, to designate the y‐intercept, shifting factor, or zeroing factor in a linear function. For example, when converting °C to °F, the equation is °F = °C*1.8 + 32. The factor 32 is the offset. Ohm The unit of resistance. Symbol is the Greek letter Omega (Ω). 1.0 Ω equals the ratio of 1.0 Volt divided by 1.0 Amp. Ohm's Law Describes the relationship of current and resistance to voltage. Voltage equals the product of current and resistance (V = I*R). on‐line data transfer Routine transfer of data to a peripheral left on‐site. Transfer is controlled by the program entered in the datalogger. 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 the CR1000 user using Device Configuration Utility software. The most (p. 92) recent CR1000 operating system file is available at www.campbellsci.com output A loosely applied term. Denotes a) the information carrier generated by an electronic sensor, b) the transfer of data from variable storage to final storage, or c) the transfer of power from the CR1000 or a peripheral to another device. output array A string of data values output to final storage. Output occurs when the data table output trigger is true. 460 ...
Page 461
Section 11. Glossary output interval The time interval between initiations of a particular data‐table record. output processing instructions Process data values and generate output arrays. Examples of output processing instructions include Totalize(), Maximize(), Minimize(), Average(). The data sources for these instructions are values in variables. The results of intermediate calculations are stored in memory to await the output trigger. The ultimate destination of data generated by output processing instructions is usually final storage, but it may be output to variables for further processing. The transfer of processed summaries to final storage takes place when the output trigger is set to True. PakBus A proprietary telecommunications protocol similar in concept to internet protocol (IP). It has been developed by Campbell Scientific to facilitate communications between Campbell Scientific instrumentation. PakBus Graph software Shows the relationship of various nodes in a PakBus network, and allows for adjustment of many settings in each node. A PakBus node is typically a datalogger, a PC, or a telecommunications device. parameter Argument or parameter? These terms are frequently interchanged, but have a useful distinction. A parameter is part of a procedure (or command) definition; an argument is part of a procedure call (or command execution). An argument is place in a parameter. For example, in the CRBasic command Battery(dest), dest is a parameter and so defines what is to be put in its place. If a variable named BattV is meant to hold the result of the battery measurement made by Battery(), BattV is the argument placed in dest. Example: Battery(BattV) BattV is the argument. period average A measurement technique utilizing a high‐frequency digital clock to measure time differences between signal transitions. Sensors commonly measured with period average include vibrating‐wire transducers and water‐content reflectometers. ...
Page 462
Section 11. Glossary peripheral Any device designed for use with, and requiring, the CR1000 (or another Campbell Scientific datalogger) to operate. Ping A software utility that attempts to contact another specific device in a network. Poisson Ratio A ratio used in strain measurements equal to transverse strain divided by extension strain. v = ‐(ε / ε ). trans axial precision A measure of the repeatability of a measurement. Also see the appendix Accuracy, Precision, and Resolution (p. 471). PreserveVariables PreserveVariables instruction protects Public variables from being erased when a program is recompiled. print device Any device capable of receiving output over pin 6 (the PE line) in a receive‐only mode. Printers, "dumb" terminals, and computers in a terminal mode fall in this category. print peripheral See print device (p. 462). processing instructions These instructions allow the user to further process input data values and return the result to a variable where it can be accessed for output processing. Arithmetic and transcendental functions are included in these instructions. program control instructions Used to modify the execution sequence of instructions contained in program tables; also used to set or clear flags. ...
Page 463
Section 11. Glossary Public A CRBasic command for declaring and dimensioning variables. Variables declared with Public can be monitored during datalogger operation. pulse An electrical signal characterized by a sudden increase in voltage follow by a short plateau and a sudden voltage decrease. regulator A record is a complete line of data in a data table or data file. All data on the line share a common time stamp. regulator A device for conditioning an electrical power source. Campbell Scientific regulators typically condition ac or dc voltages greater than 16 Vdc to about 14 Vdc. resistance A feature of an electronic circuit that impedes or redirects the flow of electrons through the circuit. resistor A device that provides a known quantity of resistance. resolution A measure of the fineness of a measurement. See also Accuracy, Precision, and Resolution (p. 471). ring line (Pin 3) Line pulled high by an external device to "awaken" the CR1000. Ring Memory A memory configuration for data tables allowing the oldest data to be overwritten. This is the default setting for data tables. ringing Oscillation of sensor output (voltage or current) that occurs when sensor excitation causes parasitic capacitances and inductances to resonate. ...
Page 464
RS‐232 Recommended Standard 232. A loose standard defining how two computing devices can communicate with each other. The implementation of RS‐232 in Campbell Scientific dataloggers to PC communications is quite rigid, but transparent to most users. Implementation of RS‐232 in Campbell Scientific datalogger to RS‐232 smart‐sensor communications is quite flexible. sample rate The rate at which measurements are made. The measurement sample rate is primarily of interest when considering the effect of time skew (i.e., how close in time are a series of measurements). The maximum sample rates are the rates at which measurements are made when initiated by a single instruction with multiple repetitions. scan interval The time interval between initiating each execution of a given Scan() of a CRBasic program. If the Scan() Interval is evenly divisible into 24 hours (86,400 seconds), it is synchronized with the 24‐hour clock, so that the program is executed at midnight and every Scan() Interval thereafter. The program is executed for the first time at the first occurrence of the Scan() Interval after compilation. If the Scan() Interval does not divide evenly into 24 hours, execution will start on the first even second after compilation. scan time When time functions are run inside the Scan() / NextScan construct, time stamps are based on when the scan was started according to the CR1000 clock. Resolution of scan time is equal to the length of the scan. See system time (p. 468). SDI‐12 Serial Data Interface at 1200 bps. Communication protocol for transferring data between data recorders and sensors. SDM Synchronous device for measurement. A processor‐based peripheral device or sensor that communicates with the CR1000 via hardwire over a short distance using a proprietary protocol. 464 ...
Page 465
Section 11. Glossary Seebeck Effect Induces micro‐Volt level thermal electromotive forces (EMF) across junctions of dissimilar metals in the presence of temperature gradients. This is the principle behind thermocouple temperature measurement. It also causes small, correctable voltage offsets in CR1000 measurement circuitry. Semaphore (Measurement Semaphore) In sequential mode, when the main scan executes, it locks the resources associated with measurements, i.e., it acquires the measurement semaphore. This is at the scan level, so all subscans within the scan (whether they make measurements or not), will lock out measurements from slow sequences (including the system background calibration). Locking measurement resources at the scan level gives non‐interrupted measurement execution of the main scan. Send The Send button in datalogger support software The Send (p. 77). command sends a CRBasic program, or an operating system, to a CR1000. serial A loose term denoting output or a device that outputs an electronic series of alphanumeric characters. Short Cut software A CRBasic program generator suitable for many CR1000 applications. Knowledge of CRBasic is not required. Short Cut is available at no charge at www.campbellsci.com. SI (Système Internationale) The International System of Units. signature A number which is a function of the data and the sequence of data in memory. It is derived using an algorithm which assures a 99.998% probability that if either the data or the data sequence changes, the signature changes. ...
Page 466
Section 11. Glossary single‐ended Denotes a sensor or measurement terminal wherein the analog voltage signal is carried on a single lead, which is measured with respect to ground. skipped scans Occurs when the CR1000 program is too long for the scan interval. Skipped scans can cause errors in pulse measurements. slow sequence A usually slower secondary scan in the CR1000 CRBasic program. The main scan has priority over a slow sequence. SMTP Simple Mail Transfer Protocol. A TCP/IP application protocol. SNP Snapshot file SP Space state Whether a device is on or off. 466 ...
Page 467
Section 11. Glossary Station Status command A command available in most datalogger support software available from Campbell Scientific. The following figure is a sample of the Station Status output. string A datum consisting of alphanumeric characters. ...
Page 468
Scientific can be found in the appendix Software Software (p. 569). manuals can be found at www.campbellsci.com. synchronous The transmission of data between a transmitting and a receiving device occurs as a series of zeros and ones. For the data to be "read" correctly, the receiving device must begin reading at the proper point in the series. In synchronous communication, this coordination is accomplished by synchronizing the transmitting and receiving devices to a common clock signal (see Asynchronous ). (p. 447) system time When time functions are run outside the Scan() / NextScan construct, the time registered by the instruction will be based on the system clock, which has a 10‐ms resolution. See scan time (p. 464). task 1) Grouping of CRBasic program instructions by the CR1000. Tasks include measurement, SDM, and processing. Tasks are prioritized by a CR1000 operating in pipeline mode. 2) A user‐customized function defined through LoggerNet Task Master. TCP/IP Transmission Control Protocol / Internet Protocol. Telnet A software utility that attempts to contact and interrogate another specific device in a network. constant A terminal is the point at which a single wire connects to a wiring panel or connector. Terminals are usually secured with small screw‐ or spring‐ loaded clamps. See connector (p. 450). terminal emulator A command‐line shell that facilitates the issuance of low‐level commands to a datalogger or some other compatible device. A 468 ...
Page 469
Section 11. Glossary terminal emulator is available in most datalogger support software available from Campbell Scientific. thermistor A thermistor is a resistive element whose change in resistance with temperature is wide, stable, and well‐characterized. It can be used as a device to measure temperature. The output of a thermistor is usually non‐linear, so measurement requires linearization, usually by means of the Steinhart‐Hart or another polynomial equation. Campbell Scientific thermistors, models 107, 108, and 109, are linearized by Steinhart‐Hart as implemented in the Therm107(), Therm108(), and Therm109() instructions. throughput The throughput rate is the rate at which a measurement can be taken, scaled to engineering units, and the reading stored in a data table. The CR1000 has the ability to scan sensors at a rate exceeding the throughput rate. The primary factor affecting throughput rate is the amount of processing specified by the user. In sequential‐mode operation, all processing called for by an instruction must be completed before moving on to the next instruction. TTL Transistor‐transistor logic. A serial protocol using 0 Vdc and 5 Vdc as logic signal levels. TLS Transport layer security. An Internet communications security protocol. toggle To reverse the current power state. UINT2 Data type used for efficient storage of totalized pulse counts, port status (status of 16 ports stored in one variable, for example) or integer values that store binary flags. UPS Uninterrubtable power supply. A UPS can be constructed for most datalogger applications using ac line power, an ac/ac or ac/dc wall adapter, a charge controller, and a rechargeable battery. ...
Page 470
Section 11. Glossary User Program The CRBasic program written by the CR1000 user in the CRBasic Editor or the Short Cut program generator. USR: A portion of CR1000 memory dedicated to the storage of image or other files. URI uniform resource identifier URL uniform resource locater variable A packet of CR1000 memory given an alphanumeric name, which holds a potentially changing number or string. Vac Volts alternating current. Also VAC. Mains or grid power is high‐level Vac, usually 110 Vac or 220 Vac at a fixed frequency of 50 Hz or 60 Hz. High‐level Vac is used as a primary power source for Campbell Scientific power supplies. Do not connect high‐level Vac directly to the CR1000. The CR1000 measures varying frequencies of low‐level Vac in the range of ±20 Vac. Vdc Volts direct current. Also VDC. The CR1000 operates with a nominal 12‐ Vdc power supply. It can supply nominal 12 Vdc, regulated 5 Vdc, and variable excitation in the ±2.5 Vdc range. It measures analog voltage in the ±5.0‐Vdc range and pulse voltage in the ±20‐Vdc range. Volt meter An inexpensive and readily available device useful in troubleshooting data acquisition system faults. Volts SI unit for electrical potential. 470 ...
Glossary. Wild Card a character or expression that substitutes for any other character or expression. XML Extensible markup language. User Program The CRBasic program written by the CR1000 user in CRBasic Editor or Short Cut. 11.2 Concepts 11.2.1 Accuracy, Precision, and Resolution Three terms often confused are accuracy, precision, and resolution. Accuracy is a measure of the correctness of a single measurement, or the group of measurements in the aggregate. Precision is a measure of the repeatability of a...
Page 472
Section 11. Glossary group of measurements. Resolution is a measure of the fineness of a measurement. Together, the three define how well a data-acquisition system performs. To understand how the three relate to each other, consider "target practice" as an analogy. Figure Accuracy, Precision, and Resolution shows (p.
CRBasic Editor Help. (p. 109) All CR1000 CRBasic instructions are listed in the following sub-sections. Select instructions are explained more fully, some with example code, in Programming Resource Library Example code is throughout the CR1000 manual. Refer (p.
Syntax Dim [variable] AS [data type] Dim Declares and dimensions private variables. Dimensions are optional. Syntax Dim [variable name (x,y,z)] ESSVariables Automatically declares all the variables required for the datalogger when used in an Environmental Sensor Station application. Used in conjunction with ESSInitialize. Syntax ESSVariables NewFieldNames Assigns a new name to a generic variable or array. Designed for use with Campbell Scientific wireless sensor networks. Syntax NewFieldNames(GenericName, NewNames) PreserveVariables Retains values in Dim or Public variables when program restarts after a power failure or manual stop. Syntax PreserveVariables Public Declares and dimensions public variables. Dimensions are optional. Syntax Public [variable name (x,y,z)] 474 ...
Appendix A. CRBasic Programming Instructions ReadOnly Flags a comma separated list of variables (Public or Alias name) as read‐only. Syntax ReadOnly [variable1, variable2, ...] Units Assigns a unit name to a field associated with a variable. Syntax Units [variable] = [unit name] A.1.2 Constant Declarations Const Declares symbolic constants for use in place of numeric entries. Syntax Const [constant name] = [value or expression] ConstTable / EndConstTable Declares constants, the value of which can be changed using the external keyboard / display or terminal C option. The program is recompiled with the new values when values change. See Constants (p. 122). Syntax ConstTable [constant a] = [value] [constant b] = [value]...
Option 64 Note TableFile() with is now the preferred way to write data to a CF card in most applications. See TableFile() with Option 64 for more (p. 330) information. CardFlush Immediately writes any buffered data from CR1000 internal memory and file system to resident CF card (CRD: drive) or Campbell Scientific mass‐storage 64 is often a preferred alternative to media (USB: drive). TableFile() with Option this instruction. Syntax CardFlush CardOut 64 is often a ...
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 Final Data Storage (Output) Processing Read More! See Data Output Processing Instructions (p. 131). FieldNames Immediately follows an output processing instruction to change default field names. Syntax FieldNames("Fieldname1 : Description1, Fieldname2 : Description2…")
Appendix A. CRBasic Programming Instructions Moment Stores the mathematical moment of a value over the output interval. Syntax Moment(Reps, Source, Order, DataType, DisableVar) PeakValley Detects maxima and minima in a signal. Syntax PeakValley(DestPV, DestChange, Reps, Source, Hysteresis) Sample Stores the current value at the time of output. Syntax Sample(Reps, Source, DataType) SampleFieldCal Writes field calibration data to a table. See Calibration Functions (p. 522). SampleMaxMin Samples a variable when another variable reaches its maximum or minimum for the defined output period. Syntax SampleMaxMin(Reps, Source, DataType, DisableVar) StdDev ...
Appendix A. CRBasic Programming Instructions WindVector Processes wind speed and direction from either polar or orthogonal sensors. To save processing time, only calculations resulting in the requested data are performed. Syntax WindVector(Repetitions, Speed/East, Direction/North, DataType, DisableVar, Subinterval, SensorType, OutputOpt) Read More! See Wind Vector (p. 188). A.3 Single Execution at Compile Reside between BeginProg and Scan Instructions. ESSInitialize Placed after the BeginProg instruction but prior to the Scan instruction to initialize ESS variables at compile time. Syntax ESSInitialize MovePrecise ...
Page 480
Appendix A. CRBasic Programming Instructions CallTable Calls a data table, typically for output processing. Syntax CallTable [TableName] Delay Delays the program. Syntax Delay(Option, Delay, Units) Do / Loop Repeats a block of statements while a condition is true or until a condition becomes true. Syntax [{While | Until} condition] [statementblock] [ExitDo] [statementblock] Loop -or- [statementblock] [ExitDo] [statementblock] Loop [{While | Until} condition] EndSequence Ends the current sequence that started at BeginProg or after a SlowSequence and accompanying declaration sequences. Syntax ...
Page 481
Appendix A. CRBasic Programming Instructions -or- [condition 1] Then [then statements] ElseIf [condition 2] Then [elseif then statements] Else [else statements] EndIf Scan / ExitScan / ContinueScan / NextScan Establishes the program scan rate. ExitScan and ContinueScan are optional. See Faster Measurement Rates for information on use of Scan() / NextScan in (p. 231) burst measurements. Syntax Scan(Interval, Units, Option, Count) [statement block] ExitScan [statement block] ContinueScan [statement block] NextScan Select Case / Case / Case Is / Case Else / EndSelect ...
Appendix A. CRBasic Programming Instructions TriggerSequence Used with WaitTriggerSequence to control the execution of code within a slow sequence. Syntax TriggerSequence(SequenceNum, Timeout) WaitTriggerSequence Used with TriggerSequence to control the execution of code within a slow sequence. Syntax WaitTriggerSequence WaitDigTrig Triggers a measurement scan from an external digital trigger. Syntax WaitDigTrig(ControlPort, Option) While / Wend Execute a series of statements in a loop as long as a given condition is true. Syntax While [condition] [StatementBlock] Wend A.4.2 Advanced Program Controls Data / Read / Restore Defines a list of Float constants to be read (using Read) into a variable array later in the program. Syntax Data [list of constants] Read [VarExpr] Restore...
Read More! For information on recording data from RS-232 and TTL output sensors, see Serial Input / Output and Serial I/O (p. 509) (p. 200). A.5.1 Diagnostics Battery Measures input voltage. Syntax Battery(Dest) ComPortIsActive Returns a Boolean value, based on whether or not activity is detected on the specified COM port. Syntax variable = ComPortIsActive(ComPort) InstructionTimes Returns the execution time of each instruction in the program. Syntax InstructionTimes(Dest) MemoryTest Performs a test on the CR1000 CPU and Task memory and store the results in a variable array. Syntax MemoryTest(Dest) ...
Appendix A. CRBasic Programming Instructions PanelTemp This instruction measures the panel temperature in °C. Syntax PanelTemp(Dest, Integ) Signature Returns the signature for program code in a datalogger program. Syntax variable = Signature A.5.2 Voltage VoltDiff Measures the voltage difference between H and L inputs of a differential channel Syntax VoltDiff(Dest, Reps, Range, DiffChan, RevDiff, SettlingTime, Integ, Mult, Offset) VoltSe Measures the voltage at a single‐ended input with respect to ground. Syntax VoltSe(Dest, Reps, Range, SEChan, MeasOfs, SettlingTime, Integ, Mult, Offset) A.5.3 Thermocouples Read More! See Thermocouple (p.
X = CheckPort(Port) PortGet Reads the status of a control port. Syntax PortGet(Dest, Port) PortsConfig Configures control ports as input or output. Syntax PortsConfig(Mask, Function) ReadIO Reads the status of selected control I/O ports. Syntax ReadIO(Dest, Mask) A.5.7.1 Control PortSet Sets the specified port high or low. Syntax PortSet(Port, State) PulsePort Toggles the state of a control port, delays the specified amount of time, toggles the port, and delays a second time. Syntax PulsePort(Port, Delay) WriteIO WriteIO is used to set the status of selected control I/O channels (ports) on the CR1000. Syntax WriteIO(Mask, Source) 486 ...
ACPower(DestAC, ConfigAC, LineFrq, ChanV, VMult, MaxVrms, ChanI, IMult, MaxIrms, Reps) DANGER ac power can kill. User is responsible for ensuring connections to ac power mains conforms to applicable electrical codes. Contact a Campbell Scientific applications engineer for information on available isolation transformers.
Page 488
Syntax EC100(Dest, SDMAddress, EC100Cmd) EC100Configure Configures the EC150 Open Path and EC155 Closed Path IR Gas Analyzers. Syntax EC100Configure(Result, SDMAddress, ConfigCmd, DestSource) GPS Used with a GPS device to keep the 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. Syntax GPS(GPS_Array, ComPort, TimeOffsetSec, MaxErrorMsec, NMEA_Sentences) Note To change from the GPS default baud rate of 38400, specify the new baud rate in the SerialOpen() instruction.
Mult, Offset) Therm109 Measures a Campbell Scientific 109 thermistor. Syntax Therm109(Dest, Reps, SEChan, Vx/ExChan, SettlingTime, Integ, Mult, Offset) A.5.9.1 Wireless Sensor Network ArrayIndex 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. Syntax CWB100(ComPort, CWSDest, CWSConfig) CWB100Routes Returns diagnostic information from a wireless network. Syntax CWB100Diagnostics(CWBPort, CWSDiag)
Multiple SDM instructions can be used within a program. AM25T Controls the AM25T Multiplexer. Syntax AM25T(Dest, Reps, Range, AM25TChan, DiffChan, TCType, Tref, ClkPort, ResPort, VxChan, RevDiff, SettlingTime, Integ, Mult, Offset) AVW200 Enables CR1000 to get measurements from an AVW200 Vibrating Wire Spectrum Analyzer. Syntax AVW200(Result, ComPort, NeighborAddr, PakBusAddr, Dest, AVWChan, MuxChan, Reps, BeginFreq, EndFreq, ExVolt, Therm50_60Hz, Multiplier, Offset) CDM_VW300Config Configures the CDM_VW300 Dynamic Vibrating Wire Module. ...
Page 491
SDMAO4A(Source, Reps, SDMAdress) SDMCAN Reads and controls an SDM‐CAN interface. Syntax SDMCAN(Dest, SDMAddress, TimeQuanta, TSEG1, TSEG2, ID, DataType, SDMCD16AC Controls an SDM‐CD16AC, SDM‐CD16, or SDM‐CD16D control device. Syntax SDMCD16AC(Source, Reps, SDMAddress) SDMCD16Mask Controls an SDM‐CD16AC, SDM‐CD16, or SDM‐CD16D control device. Unlike the SDMCD16AC, it allows the CR1000 to select the ports to activate via a mask. Commonly used with TimedControl(). Syntax SDMCD16Mask(Source, Mask, SDMAddress) SDMCVO4 Control the SDM‐CVO4 four‐channel, current/voltage output device. Syntax SDMCVO4(CVO4Source, CVO4Reps, SDMAddress, CVO4Mode) SDMGeneric Sends commands to an SDM device that is otherwise unsupported in the operating system. Syntax SDMGeneric(Dest, SDMAddress, CmdByte, NumvaluesOut, Source, NumValuesIn, BytesPerValue, BigEndian, DelayByte) SDMINT8 ...
Page 492
SDMIO16(Dest, Status, Address, Command, Mode Ports 16-13, Mode Ports 12-9, Mode Ports 8-5, Mode Ports 4-1, Mult, Offset) SDMSIO4 Controls and transmits / receives data from an SDM‐SIO4 Interface. Syntax SDMSIO4(Dest, Reps, SDMAddress, Mode, Command, Param1, Param2, ValuesPerRep, Multiplier, Offset) SDMSpeed Changes the rate the CR1000 uses to clock SDM data. Syntax SDMSpeed(BitPeriod) SDMSW8A Controls and reads an SDM‐SW8A. Syntax SDMSW8A(Dest, Reps, SDMAddress, FunctOp, SW8AStartChan, Mult, Offset) SDMTrigger ...
Appendix A. CRBasic Programming Instructions A.6 Processing and Math Instructions A.6.1 Mathematical Operators Note Program declaration AngleDegrees() (see Program Declarations (p. 473) sets math functions to use degrees instead of radians. A.6.2 Arithmetic Operators Table 116. Arithmetic Operators Symbol Name Notes Result is always promoted to a float to avoid problems that...
Appendix A. CRBasic Programming Instructions The result of these operators is the value of the left hand operand with all of its bits moved by the specified number of positions. The resulting "holes" are filled with zeroes. Consider a sensor or protocol that produces an integer value that is a composite of various "packed"...
Appendix A. CRBasic Programming Instructions CRBasic Example 70. Using Bit‐Shift Operators input_val As Long value_1 As Long value_2 As Long value_3 As Long 'read input_val somehow value_1 = (input_val AND &B11000000) >> 6 value_2 = (input_val AND &B00110000) >> 4 'note that value_3 does not need to be shifted value_3 = (input_val AND &B00001111) ...
Appendix A. CRBasic Programming Instructions A.6.6 Trigonometric Functions A.6.6.1 Derived Functions Table Derived Trigonometric Functions is a list of trigonometric functions (p. 496) that can be derived from functions intrinsic to CRBasic. Table 118. Derived Trigonometric Functions Function CRBasic Equivalent Secant Sec = 1 / Cos(X) Cosecant...
Appendix A. CRBasic Programming Instructions COS Returns the cosine of an angle specified in radians. Syntax x = COS(source) COSH Returns the hyperbolic cosine of an expression or value. Syntax x = COSH(source) SIN Returns the sine of an angle. Syntax x = SIN(source) SINH Returns the hyperbolic sine of an expression or value. Syntax x = SINH(Expr) TAN Returns the tangent of an angle. Syntax x = TAN(source) TANH Returns the hyperbolic tangent of an expression or value. Syntax x = TANH(Source) A.6.7 Arithmetic Functions ABS ...
Page 498
Appendix A. CRBasic Programming Instructions Floor Rounds a value to a lower integer. Syntax variable = Floor(Number) FRAC Returns the fractional part of a number. Syntax x = FRAC(source) INT or FIX Return the integer portion of a number. Syntax x = INT(source) x = Fix(source) INTDV Performs an integer division of two numbers. Syntax X INTDV Y LN or LOG Returns the natural logarithm of a number. Ln and Log perform the same function. Syntax x = LOG(source) x = LN(source) Note LOGN = LOG(X) / LOG(N) LOG10 ...
Appendix A. CRBasic Programming Instructions Round Rounds a value to a higher or lower number. Syntax variable = Round (Number, Decimal) SGN Finds the sign value of a number. Syntax x = SGN(source) Sqr Returns the square root of a number. Syntax x = SQR(number) A.6.8 Integrated Processing DewPoint Calculates dew point temperature from dry bulb and relative humidity. Syntax DewPoint(Dest, Temp, RH) PRT Calculates temperature from the resistance of an RTD. This instruction has been superseded by PRTCalc() in most applications. Syntax PRT(Dest, Reps, Source, Mult) PRTCalc ...
Appendix A. CRBasic Programming Instructions VaporPressure Calculates vapor pressure from temperature and relative humidity. Syntax VaporPressure(Dest, Temp, RH) WetDryBulb Calculates vapor pressure (kPa) from wet‐ and dry‐bulb temperatures and barometric pressure. Syntax WetDryBulb(Dest, DryTemp, WetTemp, Pressure) A.6.9 Spatial Processing AvgSpa Computes the spatial average of the values in the source array. Syntax AvgSpa(Dest, Swath, Source) CovSpa Computes the spatial covariance of sets of data. Syntax CovSpa(Dest, NumOfCov, SizeOfSets, CoreArray, DatArray) FFTSpa Performs a Fast Fourier Transform on a time series of measurements. Syntax FFTSpa(Dest, N, Source, Tau, Units, Option) MaxSpa ...
Appendix A. CRBasic Programming Instructions A.6.10 Other Functions AddPrecise Used in conjunction with MovePrecise, allows high‐precision totalizing of variables or manipulation of high‐precision variables. Syntax AddPrecise(PrecisionVariable, X) AvgRun Stores a running average of a measurement. Syntax AvgRun(Dest, Reps, Source, Number) Note AvgRun() should not be inserted within a For / Next construct with the Source and Dest parameters indexed and Reps set to 1. In essence this would be performing a single running average, using the values of the different elements of the array, instead of performing an independent running average on each element of the array.
Appendix A. CRBasic Programming Instructions LevelCrossing Processes data into a one‐ or two‐dimensional histogram using a level‐crossing counting algorithm. Syntax LevelCrossing(Source, DataType, DisableVar, NumLevels, 2ndDim, CrossingArray, 2ndArray, Hysteresis, Option) RainFlow Processes data with the Rainflow counting algorithm, essential to estimating cumulative damage fatigue to components undergoing stress / strain cycles (see Downing S. D., Socie D. F. (1982) Simple Rainflow Counting Algorithms. International Journal of Fatigue Volume 4, Issue 1). Syntax RainFlow(Source, DataType, DisableVar, MeanBins, AmpBins, Lowlimit, Highlimit, MinAmp, Form) A.7 String Functions Read More! See String Operations (p.
Appendix A. CRBasic Programming Instructions String Output Processing The Sample() instruction will convert data types if the source data type is different than the Sample() data type. Strings are disallowed in all output processing instructions except Sample(). A.7.2 String Commands ArrayLength Returns the length of a variable array. Syntax ArrayLength(Variable) ASCII Returns the ASCII / ANSI code of a character in a string. Syntax Variable = ASCII(ASCIIString(1,1,X)) CheckSum Returns a checksum signature for the characters in a string. Syntax Variable = CheckSum(ChkSumString, ChkSumType, ChkSumSize) CHR Inserts an ANSI character into a string. Syntax CHR(Code) FormatFloat Converts a floating‐point value into a string. Replaced by SPrintF(). Syntax String = FormatFloat(Float, FormatString) FormatLong ...
Page 504
Appendix A. CRBasic Programming Instructions HexToDec Converts a hexadecimal string to a float or integer. Syntax Variable = HexToDec(Expression) InStr Finds the location of a string within a string. Syntax Variable = InStr(Start, SearchString, FilterString, SearchOption) LTrim Returns a copy of a string with no leading spaces. Syntax variable = LTrim(TrimString) Left Returns a substring that is a defined number of characters from the left side of the original string. Syntax variable = Left(SearchString, NumChars) Len Returns the number of bytes in a string. Syntax Variable = Len(StringVar) LowerCase ...
Syntax variable = Trim(TrimString) UpperCase Converts a string to all uppercase characters Syntax String = UpperCase(SourceString) A.8 Clock Functions 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. Syntax variable = ClockChange ClockReport ...
Page 506
Appendix A. CRBasic Programming Instructions Date Returns a formatted date/time string of type Long derived from seconds since 1990. Syntax Date(SecsSince1990, Option) DaylightSaving Defines daylight saving time. Determines if daylight saving time has begun or ended. Optionally advances or turns‐back the datalogger clock one hour. Syntax variable = DaylightSaving(DSTSet, DSTnStart, DSTDayStart, DSTMonthStart, DSTnEnd, DSTDayEnd, DSTMonthEnd, DSTHour) DaylightSavingUS Determine if US daylight saving time has begun or ended. Optionally advance or turn‐back the datalogger clock one hour. Syntax variable = DaylightSavingUS(DSTSet) IfTime Returns a number indicating True (‐1) or False (0) based on the datalogger's real‐ time clock. Syntax If (IfTime(TintoInt, Interval, Units)) Then -or- Variable = IfTime(TintoInt, Interval, Units) PakBusClock ...
Appendix A. CRBasic Programming Instructions Timer Returns the value of a timer. Syntax variable = Timer(TimNo, Units, TimOpt) A.9 Voice-Modem Instructions Note Refer to the Campbell Scientific voice-modem manuals for complete information. DialVoice Defines the dialing string for a COM310 voice modem. Syntax DialVoice(DialString) VoiceBeg, EndVoice Marks the beginning and ending of voice code executed when the CR1000 detects a ring from a voice modem. Syntax VoiceBeg [voice code to be executed] EndVoice VoiceHangup ...
Read More! To implement (p. 399) custom menus, see CRBasic Editor Help for the DisplayMenu() instruction. CRBasic programming in the CR1000 facilitates creation of custom menus for the external keyboard / display. Figure Custom Menu Example shows windows from a simple custom menu (p.
[menu definition] EndSubMenu EndMenu A.11 Serial Input / Output Read More! See Serial I/O (p. 200). MoveBytes Moves binary bytes of data into a different memory location when translating big‐endian to little‐endian data. 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 communications port that was previously opened by SerialOpen. Syntax SerialClose(ComPort) SerialFlush Clears any characters in the serial input buffer. Syntax SerialFlush(ComPort) SerialIn Sets up a communications port for receiving incoming serial data. ...
Campbell Scientific PakBus® Networking Guide available at www.campbellsci.com. PakBus ® is a proprietary network communications protocol designed to maximize synergies between Campbell Scientific dataloggers and peripherals. It features auto-discovery and self-healing. Following is a list of CRBasic instructions that ® ® control PakBus processes.
Page 511
-ComME, which will cause the instruction not to wait for a response or timeout. 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 512
Syntax DialSequence(PakBusAddr) DialSuccess = DialModem(ComPort, DialString, ResponseString) EndDialSequence(DialSuccess) GetDataRecord Retrieves the most recent record from a data table in a remote PakBus datalogger and stores the record in the 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. GetFile ...
Page 513
Appendix A. CRBasic Programming Instructions Route Returns the neighbor address of (or the route to) a PakBus datalogger. Syntax variable = Route(PakBusAddr) RoutersNeighbors Returns a list of all PakBus routers and their neighbors known to the datalogger. Syntax RoutersNeighbors( DestArray(MaxRouters, MaxNeighbors+1)) Routes Returns a list of known dynamic routes for a PakBus datalogger that has been configured as a router in a PakBus network. Syntax Routes(Dest) SendData Sends the most recent record from a data table to a remote PakBus device. Syntax SendData(ComPort, RouterAddr, PakBusAddr, DataTable) SendFile Sends a file to another PakBus datalogger. Syntax SendFile(ResultCode, ComPort, NeighborAddr, PakBusAddr, Security, TimeOut, "LocalFile", "RemoteFile") SendGetVariables ...
0 (autobaud starting at 9600) 1200 4800 9600 (default) 19200 38400 57600 115200 autobaud: measurements are mode on the communications signal and the baud rate is determined by the CR1000. CRBasic Example 71. Retries in PakBus Communications. I = 1 GetVariables(ResultCode,….) ResultCode = 0 Exit For Next ...
FindSpa Searches a source array for a value and returns the value's position in the array. Syntax FindSpa(SoughtLow, SoughtHigh, Step, Source) Move Moves the values in a range of variables into different variables or fills a range of variables with a constant. Syntax Move(Dest, DestReps, Source, SourceReps) A.14 File Management Commands to access and manage files stored in 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. Syntax CalFile(Source/Dest, NumVals, "Device:filename", Option) Encryption Encrypts / decrypts a message (string variable) shared between two devices. Syntax ...
Page 516
Opens an ASCII text file or a binary file for writing or reading. Syntax FileHandle = FileOpen("FileName", "Mode", SeekPoint) FileRead Reads a file referenced by FileHandle and stores the results in a variable or variable array. Syntax FileRead(FileHandle, Destination, Length) FileReadLine Reads a line in a file referenced by a FileHandle and stores the result in a variable or variable array. Syntax FileReadLine(FileHandle, Destination, Length) FileRename Changes the name of file on a CR1000 drive. Syntax FileRename(drive:OldFileName, drive:NewFileName) FileSize Returns the size of a file stored in CR1000 memory. Syntax FileSize(FileHandle) FileTime Returns the time the file specified by the FileHandle was created. Syntax Variable = FileTime(FileHandle) FileWrite Writes ASCII or binary data to a file referenced in the program by FileHandle. Syntax FileWrite(FileHandle, Source, Length) Include ...
Appendix A. CRBasic Programming Instructions NewFile Determines if a file stored on the datalogger has been updated since the instruction was last run. Typically used with image files. Syntax NewFile(NewFileVar, "FileName") RunProgram Runs a datalogger program file from the active program file. Syntax RunProgram("Device:FileName", Attrib) A.15 Data-Table Access and Management Commands to access and manage data stored in data tables, including Public and Status tables. FileMark Inserts a filemark into a data table. Syntax FileMark(TableName) GetRecord ...
These instructions address use of email, SMS, Web Pages, and other IP services. These services are available only when the CR1000 is used with network link- devices that have the PPP/IP key enabled, i.e., when the CR1000 IP stack is used. See the appendix Network Links (p.
Page 519
Appendix A. CRBasic Programming Instructions EMailRecv Polls an SMTP server for email messages and stores the message portion of the email in a string variable. Syntax variable = EMailRecv("ServerAddr", "ToAddr", "FromAddr", "Subject", Message, "Authen", "UserName", "PassWord", Result) EMailSend Sends an email message to one or more email addresses via an SMTP server. Syntax variable = EMailSend("ServerAddr", "ToAddr", "FromAddr", "Subject", "Message", "Attach", "UserName", "PassWord", Result) EthernetPower Controls power state of all Ethernet devices. Syntax EthernetPower(state) FTPClient Sends or retrieves a file via FTP. Syntax ...
Page 520
Appendix A. CRBasic Programming Instructions IPNetPower Controls power state of individual Ethernet devices. Syntax IPNetPower( IPInterface, State) IPRoute Sets the interface to be used (Ethernet or PPP) when the datalogger sends an outgoing packet and both interfaces are active. Syntax IPRoute(IPAddr, IPInterface) IPTrace Writes IP debug messages to a string variable. Syntax IPTrace(Dest) NetworkTimeProtocol Synchronizes the datalogger clock with an Internet time server. Syntax variable = NetworkTimeProtocol(NTPServer, NTPOffset, NTPMaxMSec) PingIP Pings IP address. Syntax variable = PingIP(IPAddress, Timeout) PPPOpen Establishes a PPP connection with a server. Syntax variable = PPPOpen PPPClose ...
Appendix A. CRBasic Programming Instructions UDPOpen Opens a port for transferring UDP packets. Syntax UDPOpen(IPAddr, UDPPort, UDPBuffsize) WebPageBegin / WebPageEnd Declares a web page that is displayed when a request for the defined HTML page comes from an external source. Syntax WebPageBegin("WebPageName", WebPageCmd) HTTPOut("<p>html string to output " + variable + " additional string to output</p>") HTTPOut("<p>html string to output " + variable + " additional string to output</p>") WebPageEnd XMLParse() ...
Appendix A. CRBasic Programming Instructions DNP Sets up a 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. Syntax DNPUpdate(DNPAddr) DNPVariable Sets up the DNP implementation in a DNP slave CR1000. Syntax DNPVariable(Array, Swath, Object, Variation, Class, Flag, Event Expression, Number of Events) ModBusMaster Sets up a datalogger as a ModBus master to send or retrieve data from a ModBus slave. Syntax ModBusMaster(ResultCode, ComPort, BaudRate, ModBusAddr, Function, Variable, Start, Length, Tries, TimeOut) ModBusSlave ...
Appendix A. CRBasic Programming Instructions LoadFieldCal Loads values from the FieldCal file into variables in the datalogger. Syntax LoadFieldCal(CheckSig) NewFieldCal Triggers storage of FieldCal values when a new FieldCal file has been written. Syntax DataTable(TableName, NewFieldCal, Size) SampleFieldCal EndTable SampleFieldCal Stores the values in the FieldCal file to a data table. Syntax DataTable(TableName, NewFieldCal, Size) SampleFieldCal EndTable A.20 Satellite Systems Instructions for GOES, ARGOS, INMARSAT-C, OMNISAT. Refer to satellite transmitter manuals available at www.campbellsci.com. A.20.1 Argos ArgosData ...
Appendix A. CRBasic Programming Instructions ArgosTransmit Initiates a single transmission to an Argos satellite when the instruction is executed. Syntax ArgosTransmit(ResultCode, ST20Buffer) A.20.2 GOES GOESData Sends data to a Campbell Scientific GOES satellite data transmitter. Syntax GOESData(Dest, Table, TableOption, BufferControl, DataFormat) GOESGPS Stores GPS data from the satellite into two variable arrays. Syntax GOESGPS(GoesArray1(6), GoesArray2(7)) GOESSetup Programs the GOES transmitter for communication with the satellite. Syntax GOESSetup(ResultCode, PlatformID, MsgWindow, STChannel, STBaud, RChannel, RBaud, STInterval, STOffset, RInterval) GOESStatus ...
Appendix A. CRBasic Programming Instructions OmniSatSTSetup Sets up the OMNISAT transmitter to send data over the GOES or METEOSAT satellite at a self‐timed transmission rate. Syntax OmniSatSTSetup(ResultCodeST, ResultCodeTX, OmniPlatformID, OmniMsgWindow, OmniChannel, OmniBaud, STInterval, STOffset) A.20.4 INMARSAT-C INSATData Sends a table of data to the OMNISAT‐I transmitter for transmission via the INSAT‐1 satellite. Syntax INSATData(ResultCode, TableName, TX_Window, TX_Channel) INSATSetup Configures the OMNISAT‐I transmitter for sending data over the INSAT‐1 satellite. Syntax INSATSetup(ResultCode, PlatformID, RFPower) INSATStatus Queries the transmitter for status information. Syntax INSATStatus(ResultCode) A.21 User Defined Functions Function / EndFunction ...
Page 526
Appendix A. CRBasic Programming Instructions 526 ...
Note A lot of communications bandwidth and activity are needed to generate the Status table, so if the CR1000 is very tight on time, just getting the Status table itself repeatedly could push timing over the edge and cause skipped scans.
Scan time that the record was TimeStamp Time generated Version of the operating String Status OSVersion system (OS). Date OS was released, OSDate String Status YYMMDD Operating system signature Integer Status OSSignature CR1000-specific serial SerialNumber number. Stored in FLASH Integer Status memory. 528 ...
Page 529
Integer Status number; yyy = clock chip software revision; stored in FLASH memory. Sets a name internal to the CR1000. Stored in flash memory. Not to be confused String Config StationName1 with the station name set in datalogger support software.
Page 530
Default Range Edit? Info Type Number of times system voltage dropped below 9.6 between resets. When this condition is detected, the CR1000 ceases Integer 0-99 Error Low12VCount5 Reset by measurements and goes into changing to 0 a low-power mode until proper system voltage is restored.
Page 531
Appendix B. Status Table and Settings Table 121. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Bytes of unallocated memory on the CPU (SRAM). All free memory may not be available for data tables. As 4 kB and MemoryFree memory is allocated and...
Page 532
Appendix B. Status Table and Settings Table 121. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type A value of 98765 written to this location will initiate a full memory reset. Full Enter memory reset will reinitialize Integer Config FullMemReset...
Page 533
Appendix B. Status Table and Settings Table 121. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Time (μs) required to make the measurements in this scan, including integration and settling times. Processing occurs concurrent with this time so the sum of measure MeasureTime time and process time is not...
Page 534
Appendix B. Status Table and Settings Table 121. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type The maximum time (μs) MaxSlowProcTime9,13 required to process Integer array Status SlowSequence scan(s). Array of Boolean values posting the state of control PortStatus Boolean array of 8 False...
Page 535
38.4k BaudrateCOM2 COM3, or 57.6k COM4 = 0 BaudrateCOM3 (Disabled) BaudrateCOM4 115.2k Is the CR1000 configured to IsRouter Boolean False 0 or 1 Config PB act as router? Number of nodes (approximately) that will exist in the PakBus network.
Page 536
DHCP. Specifies the address of the IP router to which the Entered as String / All valid IP IPGateway CR1000 will forward all non- 0.0.0.0 Stored as 4 byte addresses local IP packets for which it has no route.
Page 537
Appendix B. Status Table and Settings Table 121. Status-Table Fields and Descriptions Fieldname Description Variable Type Default Range Edit? Info Type Specifies the port used for TCPPort Ethernet socket Long 6785 0 - 65535 communications. Controls which datalogger port PPP service is configured to use.
Page 538
The station name written to the header of data files by the datalogger support software (p. 77) is the station name entered when the software was set up to communicate with the CR1000. In contrast, the Status StationName()
Page 539
RS-232) for PakBus, the code is 4. The value shown is the initial baud rate the CR1000 will use. A negative value will allow the CR1000 to autobaud but will dictate at which baud tate to begin. When doing autobaud, the CR1000 measure the baudrate, then sets the comm port to that baud.
If the value of this setting is zero, the CR1000 is configured to act as a leaf node. In this configuration, the CR1000 will not be able to forward packets from one port to another and it will not maintain a list of neighbors.
Page 541
"state changing" message can only be processed or forwarded by this CR1000 if the source address of that message is in one of the source ranges and the destination address of that message is in the corresponding destination range. If no ranges are specified (the default), the CR1000 will not apply any routing restrictions.
Page 542
Appendix B. Status Table and Settings Table 122. CR1000 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR1000 supported telecommunications options. Setting Description Default Entry This setting specifies, for a given port, the explicit list of PakBus® node addresses that Neighbors Allowed the CR1000 will accept as neighbors.
Page 543
This read-only setting lists the routes, in the case of a router, or the router neighbors, in the case of a leaf node, that were known to the CR1000 at the time the setting was read. Each route is represented by four components separated by commas and enclosed in...
Page 544
Appendix B. Status Table and Settings Table 122. CR1000 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR1000 supported telecommunications options. Setting Description Default Entry FilesManager := { "(" pakbus-address "," name-prefix "," number-files ")" }.
Page 545
Appendix B. Status Table and Settings Table 122. CR1000 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR1000 supported telecommunications options. Setting Description Default Entry This setting specifies the name of a file to be implicitly included at the end of the current CRBasic program or can be run as the default program.
Page 546
Appendix B. Status Table and Settings Table 122. CR1000 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR1000 supported telecommunications options. Setting Description Default Entry Specifies the IP address that is used for the PPP interface if that interface is active (the PPP interface setting needs to be set to something other than Inactive).
Page 547
Appendix B. Status Table and Settings Table 122. CR1000 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR1000 supported telecommunications options. Setting Description Default Entry Telnet Enabled Set to 1 if the Telnet service should be enabled.
Page 548
Appendix B. Status Table and Settings 548 ...
Appendix C. Serial Port Pinouts C.1 CS I/O Communications Port Pin configuration for the CR1000 CS I/O port is listed in table CS I/O Pin Description (p. 549). Table 123. CS I/O Pin Description ABR: Abbreviation for the function name.
Appendix C. Serial Port Pinouts as a connection to a computer DTE device. A standard DB9-to-DB9 cable can 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.
Appendix D. ASCII / ANSI Table American Standard Code for Information Interchange (ASCII) / American National Standards Institute (ANSI) Decimal and Hexadecimal Codes and Characters Used with CR1000 Tools Keyboard Hyper- Keyboard Hyper- Display LoggerNet Terminal Display LoggerNet Terminal Char...
13-bit binary value, D being the MSB (p. 204). Largest 13-bit magnitude is 8191, but D - P Campbell Scientific defines the largest-allowable magnitude as 7999 Decimal locaters can be viewed as a negative base-10 exponent with decimal locations as shown in table FP2 Decimal-Locater Bits (p.
Products Campbell Scientific products expand the measurement and control capability of the CR1000. Consult product literature at www.campbellsci.com or a Campbell Scientific applications engineer to determine what products are most suited to particular applications. The following listings are intensionally not exhaustive, but are current as of the manual publication date.
Appendix F. Other Campbell Scientific Products F.1.2 Wireless Sensor Network Wireless sensors use the Campbell wireless sensor (CWS) spread-spectrum radio technology. The following wireless sensor devices are available. Table 129. Wireless Sensor Modules Model Description CWB100 Series Radio-base module for datalogger.
Appendix F. Other Campbell Scientific Products F.2.2 Pulse / Frequency Input Expansion Modules These modules expand and enhance pulse- and frequency-input capacity. Table 132. Pulse / Frequency Input-Expansion Modules Model Description SDM-INT8 Eight-channel interval timer SDM-SW8A Eight-channel, switch-closure module LLAC4 Four-channel, low-level ac module ...
18359 F.3 Cameras A camera can be an effective data gathering device. Campbell Scientific cameras are rugged-built for reliable performance at environmental extremes. Images can be stored automatically to a Campbell Scientific datalogger and transmitted over a variety of Campbell Scientific telecommunications devices.
F.5 Dataloggers Other Campbell Scientific datalogging devices can be used in networks with the 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...
CR9000 Configurable, modular, expandable, high-speed F.6 Power Supplies Several power supplies are available from Campbell Scientific to power the CR1000. F.6.1 Battery / Regulator Combination Read More! Information on matching power supplies to particular applications can be found in the Campbell Scientific Application Note "Power Supplies", available at www.campbellsci.com.
F.6.3 Battery Bases The CR1000 is supplied with a base option. Battery base options include either alkaline batteries or sealed rechargeable batteries. A third option is a simple protective base and the CR1000 is supplied power from an external source.
Appendix F. Other Campbell Scientific Products F.8 Telecommunications Products Many telecommunications devices are available for use with the CR1000 datalogger. F.8.1 Keyboard Display Table 151. Keyboard Displays Keyboard displays are either integrated into the datalogger or communicate through the CS I/O port.
F.9 Data Storage Devices Data-storage devices allow you to collect data on-site with a small device and carry it back to the PC (SneakerNet). Campbell Scientific mass-storage devices attach to the CR1000 CS I/O port. Table 157. Mass-Storage Devices Model...
Appendix F. Other Campbell Scientific Products Table 158. CF-Card Storage Module Model Description CFM100 CF card slot only NL115 Network link with CF card slot F.10 Data Acquisition Support Software F.10.1 Starter Software Short Cut, PC200W, and VisualWeather are designed for novice integrators but still have features useful in advanced applications.
Appendix F. Other Campbell Scientific Products Table 160. Datalogger Support Software Software Compatibility Description Datalogger support software RTDAQ PC, Windows for industrial and real time applications. Datalogger support software VisualWeather PC, Windows specialized for weather and agricultural applications. Datalogger support software Palm, Handspring, Palm OS 3.3...
Appendix F. Other Campbell Scientific Products Table 161. LoggerNet Adjuncts and Clients Software Description RTMCRT Allows viewing and printing multi-tab displays of real-time data. Displays are created in RTMC or RTMC Pro. RTMC Web Server Converts real-time data displays into HTML files, allowing the displays to be shared via an Internet browser.
Page 572
Appendix F. Other Campbell Scientific Products Table 163. Software Development Kits Software Compatibility Description Allows software developers to write Java applications to JAVA-SDK PC, Windows communicate with dataloggers. 572 ...
Page 586
Index Variable Modifier .......... 474 WorstCase............. 517 Variable Out of Bounds......... 528 WriteIO ............486 Vdc ..............470 Writing Program ........... 109 Vector............191 Vehicle Power Connection......83 Verify Interval ..........528, 540 XML ............... 471 Via CRBasic............ 103 XOR ............... 495 Vibrating Wire Input Module......330 VibratingWire..........486 Viewing Data..........44, 51 Voice Modem..........507 Y‐intercept ............
Page 588
CAMPBELL SCIENTIFIC COMPANIES Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES • www.campbellsci.com info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA • www.csafrica.co.za sales@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA)
Need help?
Do you have a question about the CR1000 and is the answer not in the manual?
Questions and answers