Campbell Scientific CR800 CR800 and CR850 Measurement and Control Systems
Campbell Scientific CR800 Manual
View all Campbell Scientific CR800 manuals
Add to My Manuals
Save this manual to your list of manuals |
Campbell Scientific CR800 manual content summary:
- Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 1
CR800 Measurement and Control System Revision: 5/13 Copyright © 2000 - 2013 Campbell Scientific, Inc. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 2
- Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 3
and Control Datalogger is warranted for three (3) years subject to this limited warranty: "PRODUCTS MANUFACTURED BY CAMPBELL SCIENTIFIC, INC. are warranted by Campbell Scientific, Inc. ("Campbell") to be free from defects in materials and workmanship under normal use and service for twelve - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 4
- Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 5
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 customer at the customer's expense. Campbell Scientific reserves the right to refuse service on products that were exposed - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 6
- Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 7
29 Section 3. Initial Inspection 31 Section 4. Quickstart Tutorial 33 4.1 Primer - CR800 Data-Acquisition 33 4.1.1 Components of a Data-Acquisition System 33 4.1.1.1 Sensors 33 4.1.1.2 Datalogger 33 4.1.1.3 Data Retrieval 33 4.1.2 CR800 Module and Power Supply 34 4.1.2.1 Wiring Panel 34 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 8
CR1000KD Keyboard Display 64 5.1.5 Power Requirements 64 5.1.6 Programming 65 5.1.6.1 Operating System and Settings 65 5.1.6.2 User Programming 65 5.1.7 Memory and Final Data Storage 66 5.1.8 Data .3.2 PakBus Instructions 74 5.1.10.3.3 IS Instructions 74 5.2 Datalogger Support Software 76 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 9
96 7.6.3.1 Settings via DevConfig 96 7.6.3.1.1 Deployment Tab 98 7.6.3.1.2 Logger Control Tab 101 7.6.3.2 Settings via CRBasic 102 7.6.3.3 Durable Settings Comments into Program 109 7.7.2 Sending Programs 110 7.7.2.1 Preserving Data at Program Send 110 7.7.3 Syntax 112 7.7.3.1 Numerical - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 10
Mode 137 7.7.3.8 Instructions 139 7.7.3.8.1 Measurement and Data-Storage Processing 7.8.1.3 Calibration Wizard Overview 152 7.8.1.4 Manual Calibration Overview 152 7.8.1.4.1 Single-Point Quarter-Bridge Zero (Option 10 166 7.8.2 Information Services 167 7.8.2.1 PakBus Over TCP/IP and Callback - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 11
173 7.8.2.13 SMTP 173 7.8.3 SDI-12 Sensor Support 173 7.8.3.1 SDI-12 Transparent Mode 174 7.8.3.1.1 SDI Programming 205 7.8.8.5.1 Input Instruction Set Basics 206 7.8.8.5.2 Controlling Data Output and Processing 223 7.8.10 NSEC Data Type 224 7.8.10.1 NSEC Options 225 7.8.11 Bool8 Data Type - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 12
Table of Contents 7.8.13.8 Formatting String Hexadecimal Variables 241 7.8.14 Data Tables 241 7.8.15 PulseCountReset Instruction 242 7.8.16 Program Signatures 243 7.8.16.1 Text Signature 243 7.8.16.2 Binary Runtime Signature 243 7.8.16.3 Executable Code Signatures 243 7.8.17 Advanced - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 13
Tips 302 8.1.5.3.1 Frequency Resolution 303 8.1.5.4 Pulse Measurement Problems 305 8.1.5.4.1 Pay Attention to Specifications 305 8.1.5.4.2 324 8.3.3.3 Manual Data-Table Reset 324 8.3.3.4 Formatting Drives 324 8.3.4 File Management 324 8.3.4.1 File Attributes 326 8.3.4.2 Data Preservation - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 14
for Modbus 352 8.6.2.3.1 Declarations 352 8.6.2.3.2 CRBasic Instructions - Modbus 352 8.6.2.3.3 Addressing (ModbusAddr 353 8.6.2.3.4 Supported Function Codes (Function 353 8.6.2.3.5 Reading Inverse-Format Registers 353 8.6.2.4 Troubleshooting 353 8.6.2.5 Modbus over IP 354 8.6.2.6 Modbus - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 15
Datalogger 374 8.6.3.7.2 FileControl Command 375 8.6.3.7.3 ListFiles Command 377 8.6.3.7.4 NewestFile Command 381 8.7 Support Software 382 8.8 Using the Keyboard Display 382 8.8.1 Data Internal Battery 397 9.3 Repair...400 Section 10. Troubleshooting 403 10.1 Status Table 403 10.2 Operating - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 16
(3 413 10.5 Power Supplies 414 10.5.1 Overview 414 10.5.2 Troubleshooting Power at a Glance 415 10.5.3 Diagnosis and Fix Procedures 415 Sensor Network 467 A.5.10 Peripheral Device Support 468 A.6 Processing and Math Instructions 470 A.6.1 Mathematical Operators 470 A.6.2 Arithmetic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 17
A.8 Clock Functions 483 A.9 Voice-Modem Instructions 485 A.10 Custom Keyboard and Display File Management 493 A.15 Data-Table Access and Management 495 A.16 Information Services 496 A.17 Modem 531 Appendix E. FP2 Data Format 535 Appendix F. Other Campbell Scientific Products ......537 F.1 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 18
545 F.8.4 Telephone 545 F.8.5 Private Network Radios 546 F.8.6 Satellite Transceivers 546 F.9 Data Storage Devices 546 F.10 Data Acquisition Support Software 546 F.10.1 Starter Software 546 F.10.2 Datalogger Support Software 547 F.10.2.1 LoggerNet Suite 548 F.10.3 Software Tools 548 F.10 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 19
| Advanced tab 101 Figure 42: DevConfig Logger Control tab 102 Figure 43: "Include File 55: Home page created using WebPageBegin() instruction 170 Figure 56: Customized numeric-monitor web screen 195 Figure 61: Custom menu example - View-Data window 195 Figure 62: Custom menu example - Make- - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 20
port 344 Figure 111: LoggerNet Network-Map Setup: PakBusPort 345 Figure 112: LoggerNet Device Map Setup: Dataloggers 345 Figure 113: Using the keyboard / display 384 Figure 114: Displaying data with the keyboard / display 385 Figure 115: Real-time tables and graphs 386 Figure 116: Real-time - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 21
123 Table 12. TOA5 Environment Line 126 Table 13. Typical Data Table 127 Table 14. DataInterval() Lapse Parameter Options 130 Table 15. Task Processes 133 Table 16. Pipeline Mode Task Priorities 134 Table 17. Program Timing Instructions 135 Table 18. Rules for Names 140 Table 19. Binary - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 22
Datalogger-Communications Settings ... 344 Table 83. DNP3 Implementation - Data Types Required to Store Data in Public Tables for Object Groups 348 Table 84. Modbus to Campbell Scientific Equivalents 351 Table 85. CRBasic Ports, Flags, Variables, and, Modbus Registers 352 Table 86. Supported - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 23
Table 121. Standard Null-Modem Cable or Adapter-Pin 250H Connections 529 123H Table 122. FP2 Data-Format Bit Descriptions 535 251H 124H Table 123. FP2 Decimal-Locater Bits 535 25H 125H Table . Starter Software 546 283H 1256H Table 155. Datalogger Support Software 547 284H 1257H 23 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 24
Language Support 125 30H 1273H CRBasic Example 14. Definition and Use of a Data Table 127 301H 1274H CRBasic Example 15. BeginProg / Scan() / NextScan / EndProg Syntax .. 136 302H 1275H CRBasic Example 16. Scan Syntax 136 30H 1276H CRBasic Example 17. Measurement Instruction - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 25
DNP3 349 CRBasic Example 66. Concatenating Modbus Long Variables 354 CRBasic Example 67. Using NAN in Expressions 408 CRBasic Example 68. Using NAN to Filter Data 410 CRBasic Example 69. Using Bit-Shift Operators 473 CRBasic Example 70. Retries in PakBus Communications 492 25 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 26
Table of Contents 26 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 27
of your office, Campbell Scientific dataloggers support research and operations all Our intent with this operator's manual is to guide you to the tools you manual: Capitalization - beginning of sentences, phrases, titles, names, Campbell Scientific product model numbers. Bold - CRBasic instruction - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 28
Italic - titles of publications, software, sections, tables, figures, and examples. Bold italic - CRBasic instruction parameters and arguments within the body text. Blue - CRBasic instructions when set on a dedicated line. Italic teal - CRBasic program comments Lucida Sans Typewriter font - CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 29
Section 2. Cautionary Statements The CR800 is a rugged instrument and will give years of reliable service if a few precautions are observed: • Protect from over-voltage • Protect from water • Protect from ESD Disuse accelerates depletion of the internal battery, which backs up - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 30
Section 2. Cautionary Statements 30 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 31
for use as a tutorial device o One datalogger program pre-loaded into the CR800 o 4 each pn 505 screws for use in mounting the CR800 to an enclosure backplate. o 4 each pn 6044 nylon hardware inserts for use in mounting the CR800 to a Campbell Scientific enclosure backplate. o 1 each pn 10873, six - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 32
Section 3. Initial Inspection 32 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 33
the use of electronic sensor technology, the CR800, a telecommunications link, and datalogger support software (p. 76). 4.1.1 Components of a Data-Acquisition System A typical data-acquisition system is conceptualized in figure Data-Acquisition System Components (p. 34). A CR800 is only one part of - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 34
4. Quickstart Tutorial modems, radios, satellite transceivers, and TCP/IP network modems are available for the most demanding applications. Figure 1: Data-acquisition system components 4.1.2 CR800 Module and Power Supply 4.1.2.1 Wiring Panel As shown in figure CR800 Wiring Panel (p. 35), the wiring - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 35
Section 4. Quickstart Tutorial Figure 2: Wiring panel 35 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 36
, program, and memory in case of power loss. See Internal Battery (p. 76). 4.1.3 Sensors Most electronic sensors, whether or not manufactured or sold by Campbell Scientific, can be interfaced to the CR800. Check for on-line content concerning interfacing sensors at www.campbellsci.com, or contact - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 37
Section 4. Quickstart Tutorial Figure 4: Analog sensor wired to differential channel #1 Table 1. Single-Ended and Differential Input Channels Differential Channel Single-Ended Channel 1H 1 1L 2 2H 3 2L 4 3H 5 3L 6 4.1.3.2 Bridge Sensors Many sensors use a resistive bridge to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 38
between voltage extremes (high to low or low to high). This is termed "state transition". Measurements are processed and presented as counts, frequency, or timing data. 38 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 39
single-ended analog input channel and measured with the PeriodAverage() instruction (see Period Averaging (p. 307) ). 4.1.3.3.1 Pulses Measured Figure Table 2. Pulse-Input Channels and Measurements Pulse-Input Channel Input Type Data Option P1, P2 • High-frequency • Counts • Low-level ac - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 40
Section 4. Quickstart Tutorial 4.1.3.3.3 Pulse Sensor Wiring Wiring a pulse sensor to a CR800 is straight forward, as shown in figure PulseInput Wiring -- Anemometer Switch (p. 40). Pulse sensors have two active wires, one of which is always ground. Connect the ground wire to a (ground) channel. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 41
Section 4. Quickstart Tutorial Figure 9: Location of RS-232 ports Figure 10: Use of RS-232 and digital I/O when reading RS-232 devices 41 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 42
. These devices connect to the CR800 through digital I/O ports C1, C2, and C3 C3. 4.1.6 Input Expansion Modules Modules are available from Campbell Scientific to expand the number of input and digital I/O ports on the CR800. The appendix Digital I/O (Control Port) Expansion (p. 541) lists available - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 43
the CR800 • Making a simple thermocouple measurement • Sending data from the CR800 to a PC • Viewing the data from the CR800 4.2.1 What You Will Need The following items are needed to complete this exercise: • Campbell Scientific CR800 datalogger • Campbell Scientific PS100 12 Vdc power supply (or - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 44
Section 4. Quickstart Tutorial 6. After confirming the correct polarity on the wire connections, insert the green power connector into its receptacle on the CR800. 7. Connect the RS-232 cable between the RS-232 port on the CR800 and the RS232 port on the PC (or to the USB-to-RS-232 cable). 8. Move - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 45
to the EZSetup Wizard along with instructions on how to navigate through the wizard. Datalogger Type and Name Select the CR800 may change if the cable is moved to a different USB port. This will prevent data transfer between the software and CR800. Should this occur, simply move the USB cable - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 46
and program functions. The Monitor Data or Collect Data tabs may be selected at an existing program. Click New Program. 3. The Select Datalogger Model menu appears. Select CR800. 4. The program now second prompt lists sensor support options. You should probably click Campbell Scientific, Inc. if you - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 47
Section 4. Quickstart Tutorial Figure 14: Short Cut temperature sensor folder 4.2.4.2 Procedure: (Short Cut Steps 7 to 9) 7. Double-click Wiring Panel Temperature to add it to Selected. Alternatively, single-click Wiring Panel Temperature, then click on . 8. Double-click Type T Thermocouple to add - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 48
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. Now, there's an - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 49
11. Outputs displays the list Selected Sensors on the left and data storage tables, under Selected Outputs, on the right. Figure 16 list from which to select the time units. These are used to set the time interval when data are stored. 13. Only one table is needed for this tutorial, so Table 2 can be - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 50
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 51
Data PC200W Support Software Objectives: This portion of the tutorial will use PC200W to send the program to the CR800, collect data from the CR800, and store the data clock. 3. Click Send Program.... A warning will appear that data on the datalogger will be erased. Click Yes. A dialog box will open - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 52
Section 4. Quickstart Tutorial CR800. To view the OneMin table, select an empty cell in the display area, then click Add. Figure 20: PC200W Monitor Data tab - Public table Figure 21: PC200W Monitor Data tab - Public table 52 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 53
Section 4. Quickstart Tutorial 4.2.5.3 Procedure: (PC200W Step 5) 5. In the Add Selection window Tables field, click on OneMin, then click Paste. The OneMin table is now displayed. Figure 22: PC200W Monitor Data tab - Public and OneMin Tables 53 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 54
tab 4.2.5.5 Procedure: (PC200W Steps 7 to 9) 7. Click the OneMin box so a check mark appears in the box. Under What to Collect, select New data from datalogger. This selects the to be collected. 8. Click on Collect. A dialog box will appear prompting for a filename. Click Save to accept the default - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 55
Section 4. Quickstart Tutorial Figure 24: PC200W View data utility 55 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 56
the dialog box, select the CR800_OneMin.dat file and click Open. 11. The collected data are now shown. Figure 25: PC200W View data table 4.2.5.7 Procedure: (PC200W Steps 12 to 13) 12. Click on any data column. To display the data in a new line graph, click on . Figure 26: PC200W View line graph 13 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 57
Overview A Campbell Scientific data-acquisition system is made up of the following basic components: • Sensors • Datalogger o Clock o Measurement and control circuitry o Telecommunications circuitry o User-entered CRBasic program • Telecommunications device • Datalogger support software (p. 76 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 58
CRBasic, a programming language that includes data processing and analysis routines and a standard BASIC instruction set. Campbell Scientific datalogger support software facilitates program generation, editing, data retrieval, and real-time data monitoring (see Support Software (p. 76, p. 382) ). In - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 59
the clock for scheduling operations. The CRBasic program times functions through various instructions, but the method of timing is nearly always in the form are supported by the CR800 datalogger. Refer to the appendix Sensors (p. 537) for information on sensors available from Campbell Scientific. • - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 60
manuals and application notes are available at www.campbellsci.com to assist in measuring many sensor types. Consult with a Campbell Scientific applications connection of a sensor to an input channel and CRBasic programming to instruct the CR800 how to make, process, and store the measurement. The - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 61
Section 5. System Overview as compared to pulse-count measurements. The frequency resolution of pulsecount measurements can be improved by extending the measurement interval by increasing the scan interval and by averaging. For information on frequency resolution, see Frequency Resolution. Pulse - 2 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 62
peripheral devices requiring nominal 12 Vdc. This supply may drop as low as 9.6 Vdc before datalogger operation stops. Precautions should be taken to minimize the occurrence of data from underpowered sensors. • Peripheral 5-Vdc Power Source - 1 terminal (5V) and associated ground (G) supply power to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 63
Data Retrieval (p. 332), and PakBus Overview (p. 334). The CR800 is equipped with four communications ports. Communication ports allow the CR800 to communicate with other computing devices, such as a PC, or with other Campbell Scientific dataloggers the DisplayMenu() instruction. CRBasic programming - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 64
of the CR800 datalogger independent of other Editor Help for the DisplayMenu() instruction. CRBasic programming in the 486), and Keyboard Display (p. 69). The CR1000KD can be mounted to a surface by robust power system. Contact a Campbell Scientific applications engineer if assistance is required - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 65
sent via DevConfig, most settings are cleared, whereas, when sent via datalogger support software, most settings are retained. 5.1.6.2 User Programming Read More! See sections Programming (p. 108) and CRBasic Programming Instructions (p. 451), and CRBasic Editor Help for more programming assistance - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 66
used to create CR800 programs. • Short Cut creates a datalogger program and wiring diagram in four easy steps. It supports most sensors sold by Campbell Scientific and is recommended for creating simple programs to measure sensors and store data. • Programs generated by Short Cut are easily imported - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 67
(p. 540) ) Data files from TableFile() instruction (TOA5, TOB1, CSIXML Data are usually transferred through a telecommunications link to an ASCII file on the supporting computer using Campbell Scientific datalogger support software (see Datalogger Support Software (p. 76) ). See also the manual - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 68
The CR800 communicates with Campbell Scientific support software, telecommunication peripherals, and other dataloggers via PakBus, a proprietary network communications protocol. PakBus is a protocol similar in concept to IP (Internet protocol). By using signatured data packets, PakBus increases the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 69
More! See DNP3 (p. 347). The CR800 supports DNP3 slave communication for inclusion in DNP3 SCADA troubleshoot a datalogger installation conveniently and in most weather conditions. 5.1.9.4.1 Custom Menus Read More! To implement custom menus, see CRBasic Editor Help for the DisplayMenu() instruction - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 70
HTTP services, all of which give high level access to CR800 data and programs, are enabled without password protection. Campbell Scientific encourages information • Hide program files for extra protection • Secure the CR800 datalogger and power supply under lock and key. Note All security features - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 71
less than 1263. Contact Campbell Scientific for information on upgrading the CR1000KD operating system. LoggerNet: • All datalogger functions and data are easily accessed via RS-232 and Ethernet using Campbell Scientific datalogger support software. • Cora command find-logger-security-code. Telnet - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 72
codes") are the oldest method of securing a Campbell Scientific datalogger. Pass-code lockouts can effectively lock out innocent SetSecurity(0,0,0). Settings persist when a new program is downloaded that has no SetSecurity() instruction Level 1 must be set before Level 2. Level 2 must be set before - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 73
. Contact Campbell Scientific for information on upgrading the CR1000KD operating system. 5.1.10.3 Passwords 5.1.10.3.1 .csipasswd Passwords are used to secure IP based communications. They are set in various telecommunications schemes via the .csipasswd file, CRBasic PakBus instructions, CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 74
protection: • ModemCallBack() • SendVariable() • SendGetVariables() • SendFile() • GetVariables() • GetFile() • GetDataRecord() 5.1.10.3.3 IS Instructions The following CRBasic instructions that service CR800 IP capabilities have provisions for password protection: • EMailRecv() • EMailSend - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 75
level of security is given to datalogger communications. See PakBus Encryption (p. or files specified by the Include() instruction, can be hidden using the FileHide() instruction. The CR800 can locate and use CR800 should give many years of reliable service. 5.1.11.1 Protection from Water The CR800 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 76
an internal voltage reference to routinely calibrate itself. Campbell Scientific recommends factory recalibration every two years. If calibration services are required, refer to the section entitled Assistance (p. 5) at the front of this manual. 5.1.11.4 Internal Battery Caution Misuse or improper - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 77
Campbell Scientific weather stations. Version 3.0 or higher supports custom weather stations or the ET107, ET106, and MetData1 pre-configured weather stations. The software allows you to initialize the setup, interrogate the station, display data, and generate reports from one or more weather - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 78
Section 5. System Overview 78 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 79
with telecommunications peripherals manufactured by Campbell Scientific. 9.3 SDI‐12: Digital control ports C1, C3 are individually configurable and meet SDI‐12 Standard v. 1.3 for datalogger mode. Up to ten SDI‐12 sensors are supported per port. 9.5 PROTOCOLS SUPPORTED: PakBus, AES‐128 Encrypted - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 80
Section 6. CR800 Specifications 80 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 81
use of an enclosure, which is available from Campbell Scientific. This style of enclosure is classified as NEMA 4X (watertight, dust-tight, corrosion-resistant, indoor and outdoor use). Enclosures have back plates to which are mounted the CR800 datalogger and associated peripherals. Back plates are - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 82
Sources Note Reliable power is the foundation of a reliable data-acquisition system. When designing a power supply, consideration should be or 60-Hz rejection arguments for CRBasic analog input measurement instructions (see Sensor Support (p. 269) ) often improves rejection of noise sourced from - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 83
7.4.3 Power Supplies The appendix Power Supplies (p. 542) lists external power supplies available from Campbell Scientific, including alkaline and solar options. More information is available in manual or brochure form at www.campbellsci.com. 7.4.3.1 External Batteries When connecting external power - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 84
12V and SW12 terminals can vary widely and will fluctuate with the dc supply used to power the CR800, 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 85
to provide a square-wave ac excitation for use with polarizing bridge sensors through the RevEx parameter of the previously listed bridge instructions. 7.4.5.2 Continuous Regulated (5 Volt) The 5V terminal is regulated and remains near 5 Vdc (±4%) so long as the CR800 supply voltage remains above - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 86
instruction. PortSet() is a measurement task instruction. Use it when powering analog input sensors that need to be powered just prior to measurement. A 12-Vdc switching circuit, designed to be driven by a digital I/O port, is available from Campbell Scientific strikes hit the datalogger or sensors - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 87
by providing a low-resistance path around the system to a point of low potential. Campbell Scientific recommends that all dataloggers be earth (chassis) grounded. All components of the system (dataloggers, sensors, external power supplies, mounts, housings, etc.) should be referenced to one common - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 88
power lines or wires connected to instrumentation. While elaborate, expensive, and nearly infallible lightning protection systems are on the market, Campbell Scientific, for many years, has employed a simple and inexpensive design that protects most systems in most circumstances. It is, however, not - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 89
Section 7. Installation In addition to protections discussed in ESD Protection (p. 86), use of a simple lightning rod and low-resistance path to earth ground is adequate protection in many installations. A lightning rod serves two purposes. Primarily, it serves as a preferred strike point. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 90
when the input ground is known to be at a different ground potential from CR800 ground. Ground potential differences are a common problem when measuring full-bridge sensors (strain gages, pressure transducers, etc), and when measuring thermocouples in soil. 7.5.3.1 Soil Temperature Thermocouple If - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 91
magnitude of this error. The Delmhorst gypsum block used in the Campbell Scientific 227 probe has two concentric cylindrical electrodes. The center electrode is parallel plate electrodes are particularly susceptible to ground loop problems. Similar considerations apply to the geometry of the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 92
system necessary to communicate with a PC via RS-232 and to accept and execute user application programs when using Campbell Scientific datalogger support software. 7.6.1 Device Configuration Utility Device Configuration Utility, or DevConfig, is the preferred tool for configuring the CR800. It is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 93
supported by DevConfig graphical user interface. • Show Help as prompts and explanations. Help for the appropriate settings for a particular device can also be found in the user manual only if the device supports more than one baud rate. The page for each device presents instructions to set up the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 94
memory to receive it under some circumstances. If problems are encountered with a 2 MB CR800, sending compression algorithm. The datalogger will accept and data and reset all settings to factory defaults. Text in the Send OS tab (figure DevConfig OS Download Window (p. 95) ) lists instructions - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 95
Section 7. Installation Figure 35: DevConfig OS download window Figure 36: Dialog box confirming OS download 95 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 96
Datalogger OS Version / Date CR1000 16 / 11-10-08 CR800 7 / 11-10-08 CR3000 9 / 11-10-08 Campbell Scientific recommends upgrading operating systems only via a directhardwire link. However, the Send button in the datalogger support and the PakBus® Networking Guide available at www.campbellsci. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 97
settings. The reverted values will not take effect until the final changes have been applied. This button will remain disabled if the device does not support the DevConfig protocol messages. Clicking Save on the summary screen will save the configuration to an XML file. This file can be used to load - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 98
of CR800 configuration 7.6.3.1.1 Deployment Tab Illustrated in figure DevConfig Deployment Tab (p. 98), the Deployment tab allows the user to configure the datalogger prior to deploying it. Deployment tab settings can also be accessed through the Setting Editor tab and the Status table. Figure 39 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 99
of the datalogger. The allowable range is between 1 and 4094. Each PakBus® device should have a unique PakBus® address. Addresses >3999 force other PakBus® devices to respond regardless of their respective PakBus® settings. See the PakBus® Networking Guide (available from Campbell Scientific) for - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 100
range value. • Remove Range will remove the range specified by the values of the Begin and End controls from the list of neighbors to the datalogger on the port specified by Selected Port. This control is disabled if the range specified is not present in the list. • Help is displayed at - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 101
of files with the specified extension that will be saved when received from a specified node. Figure 41: DevConfig Deployment | Advanced tab 7.6.3.1.2 Logger Control Tab • Clocks in the PC and CR800 are checked every second and the difference displayed. The System Clock Setting allows entering - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 102
to select a program file to be sent to the datalogger. The field above the button is updated as the are filled in. Figure 42: DevConfig Logger Control tab 7.6.3.2 Settings via CRBasic Some variables can be done with variables in any data table. For example, to set a variable, x, equal to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 103
on-site visit to correct the problem. For example, wireless-ethernet (cell drops out of telecommunications. Campbell Scientific recommends implementing one or both instruction followed by any other code. 2. send the Include file to the CR800 using tools in the File Control menu of datalogger support - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 104
Section 7. Installation Figure 43: "Include File" settings via DevConfig Figure 44: "Include File" settings via PakBusGraph 104 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 105
,24,Hr) Then SW12(0) 'Modem off at 5:00 PM NextScan NOTE: No EndProg Instruction!! 7.6.3.3.2 Default.cr8 File Default.cr8 can be stored on the CR800 CPU: drive. At 106) ). Default.cr8 can be edited to preserve critical datalogger settings such as communication settings, but cannot be more than - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 106
(45,60,Sec) Then SW12(0) NextScan EndProg 7.6.3.4 Program Run Priorities 1. When the CR800 starts, it executes commands in the powerup.ini file (on Campbell Scientific mass-storage media (USB: drive)), including commands to set program file (i.e., .cr8 files) attributes to Run Now or Run On Power Up - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 107
does not replace, the design process • It aids development of PakBus networks only. • It does not make hardware recommendations. • It does not generate datalogger programs. • It does not understand distances or topography; that is, it does not warn the user when broadcast distances are exceeded or - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 108
Section 7. Installation For more detailed information on Network Planner, please consult the LoggerNet manual, which is available at www.campbellsci.com. 7.6.3.5.2 Basics PakBus Settings • Device addresses are automatically allocated but can be changed. • Device connections are used to determine - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 109
Campbell Recorder BASIC). CRBasic Editor is a text editor that facilitates creation and modification of the ASCII text file that constitutes the CR800 application program. CRBasic Editor is a component of LoggerNet (p. 548), RTDAQ, and PC400 datalogger-support related data. instructions - Instructions - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 110
are sent with: • Program Send command in datalogger-support software (p. 76) • Program send command in Device Configuration Utility (DevConfig (p. 92)) • Campbell Scientific mass-storage media (USB: drive) A good practice is to always retrieve data from the CR800 before sending a program; otherwise - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 111
| Send Program RTDAQ | Clock/Program | Send Program DevConfig | Logger Control | Send Program *Reset memory and set program attributes to Run CRBasic Editor Program Send File Control window Table 7. Data Table Structures -Data table name(s) -Data interval or offset -Number of fields per record - - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 112
formats may also be used, as shown in table Formats for Entering Numbers in CRBasic (p. 112). Only standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 8. Formats for Entering Numbers in CRBasic Format Example Base-10 Equivalent Value Standard - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 113
, a condition, or both. Table size Set the size of a data table. Other on-line storage devices Send data to a Campbell Scientific mass-storage media (USB: drive) if available. Processing of data List data to be stored in the data table, e.g. samples, averages, maxima, minima, etc. Processes or - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 114
TC(6) 'Define Units Units RefTemp = degC Units TC = DegC Declare constants Declare public variables, dimension array, and declare units. 'Define data tables DataTable(Temp,1,2000) DataInterval(0,10,min,10) Average(1,RefTemp,FP2,0) Average(6,TC(),FP2,0) EndTable 'Begin Program BeginProg 'Set scan - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 115
can be found in the CRBasic Programming Instructions (p. 451) section. A full treatment of each instruction and 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 116
long. This allows for four additional characters that are added as a suffix to the variable name when it is output to a data table. Variable names can contain the following characters: • A to Z • a to z • 0 to 9 • _ (underscore) • $ Names must start with a letter, underscore, or dollar sign - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 117
Section 7. Installation simply declare a variable array as shown below: Public TempC(4), This creates in memory the four variables TempC(1), TempC(2), TempC(3), and TempC(4). A variable array is useful in program operations that affect many variables in the same way. CRBasic example Using a - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 118
however, this practice can result in at least one problem. The datalogger support software is incapable of efficiently handling different data types for the same field name. Consequently, the software mangles the field names in data file headers. Table Data Types (p. 119) lists details of available - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 119
Types Name: Command or Argument Description / Word Size Where Used Notes FP2 Campbell Scientific floating point / Final data storage Default final storage data type. Use FP2 for stored data requiring 3 or 4 significant digits. If more significant 2 byte digits are needed, use IEEE4 or an - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 120
Divided up as four bytes of seconds since 1990 and four bytes of nanoseconds into the second. Used to record and process time data. See NSEC Data Type (p. 224). 1 nanosecond Size is defined by the CR800 operating system. When converting from STRING to FLOAT, numerics at the beginning of a string - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 121
Storage Example Sample(1,CR800Time,Nsec) EndTable Flags Flags are a useful program-control tool. While any variable of any data type can be used as a flag, using Boolean variables, especially variables named "Flag", works best. CRBasic example Flag Declaration and Use (p. 121) shows an example - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 122
to zero at the time the datalogger program compiles. Variables can be initialized declare passing / receiving pairs with the same data types and applicable string lengths. 7.7.3.4.2 Constants or the C command in a terminal emulator (see Troubleshooting -- Terminal Emulator (p. 421) ). Note Using - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 123
instruction names, as well as valid alphanumeric names for instruction parameters. In general, instruction names should not be used as variable, constant, or table names in a datalogger Com3 Com310 ComME ComRS232 ComSDC10 ComSDC7 ComSDC8 CR1000 CR5000 CR800 CR9000X DO EVENT FLOAT hr - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 124
the table (derived from the alias) must be used when accessing final storage data. Variables in one, two, and three dimensional arrays can be assigned units declared string constant as an aid to foreign language support. CRBasic example Foreign Language Support (p. 125) shows the use of Alias and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 125
table is created by a series of CRBasic instructions entered after variable declarations but before the BeginProg instruction. These instructions include: DataTable() 'Output Trigger Condition(s) 'Output Processing Instructions EndTable A data table is essentially a file that resides in CR800 memory - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 126
Subsequent lines contain data. Note Discrete data files (TOB1, TOA5, XML) can also be written to CR800 CPU memory using the TableFile() instruction. The first strings that identify the name of individual fields as given in the datalogger program. If the field is an element of an array, the name - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 127
and ends with the EndTable() instruction. Between DataTable() and EndTable() are instructions that define what data to store and under what conditions data are stored. A data table must be called by the CRBasic program for data storage processing to occur. Typically, data tables are called by the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 128
EndTable 'Main Program BeginProg Scan(5,Sec,1,0) 'Default Datalogger Battery Voltage measurement Batt_Volt: Battery(Batt_Volt) 'Wiring output processing instructions (see section, Output Processing Instructions (p. 130) ). Read More! Section, TrigVar and DisableVar - Controlling Data Output and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 129
support software and so are not collected. CRBasic example Definition and Use of a Data Table (p. 127) creates a data table named OneMin, stores data once records the tables hold. DataInterval() Instruction DataInterval() instructs the CR800 to both write data records at the specified interval and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 130
intervals). Note Array-based dataloggers, such as CR10X and CR23X, use open intervals exclusively. Data Output-Processing Instructions Final data storage processing instructions (aka "output processing" instructions) determine what data are stored in a data table. When a data table is called in the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 131
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 (p. 118) for more information on available data list of output processing instructions, see section Final Data Storage (Output) Processing - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 132
is available in CRBasic Editor Help. Web-Page Sequences The WebPageBegin / WebPageEnd instructions are used to declare a web page that is displayed when a request numbers represented by engineering units, performs calculations, stores data, makes decisions to actuate controls, and performs serial - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 133
Installation 7.7.3.6.1 Pipeline Mode datalogger, which is displayed by the support software. The CRBasic Editor precompiler returns a similar message. Note A program can be forced to run in sequential or pipeline modes by placing the SequentialMode or PipelineMode instruction in the declarations - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 134
, and then execution proceeds to the next instruction. This line-by-line execution allows writing engaging Campbell Scientific mass-storage media (USB: drive), occur. When running in sequential mode, the datalogger uses CR1000 operating system will not do this handshaking between independent tasks - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 135
unpredictable results are likely to occur. The SemaphoreGet() and SemaphoreRelease() instruction pair provide a tool to prevent unwanted access of an object (variable single Scan() / NextScan structure, with only variable and data-table declarations outside the Scan() / NextScan structure. In these - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 136
timing. Use of the CRBasic Editor default size is normal. Refer to section SkippedScan (p. 405) for troubleshooting tips. • Count - number of scans to make before proceeding to the instruction following NextScan. A count of 0 means to continue looping forever (or until ExitScan). In the example in - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 137
skipped slow scans is done after the first splice is complete rather than immediately after the interval comes true. In sequential mode, all instructions in slow sequences are executed as they occur in the program according to task priority. Background calibration is an automatic, slow-sequence scan - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 138
a measurement but stop to wait when a measurement semaphore is needed. Slow sequences release the semaphore (p. 442) after complete execution of each measurement instruction to allow the main scan to acquire the semaphore when it needs to start. If the measurement semaphore is set by a slowsequence - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 139
set up CR800 hardware to make measurements and store results in variables. Data-storage instructions process measurements into averages, maxima, minima, standard deviation, FFT, etc. Each instruction is a keyword followed by a series of informational parameters needed to complete the procedure - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 140
are specifically identified in the description of each instruction in CRBasic Editor Help. • Constant, or appear to be supported in a specific operating system. However, they may not be supported in future operating systems along with the data, 39 they are not subjected to the stringent syntax checking that - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 141
100, 5000) When the trigger is "TC > 100", a TC temperature > 100 will set the trigger to true and data are stored. 7.7.3.8.5 Arrays of Multipliers and Offsets A single measurement instruction can measure a series of sensors and apply individual calibration factors to each sensor as shown in CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 142
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 143
• When programming extended-cyclical summation of non-integers, use the AddPrecise() instruction. Otherwise, as the size of the sum increases, fractional addends will °F. 7.7.3.9.3 Expressions with Numeric Data Types FLOATs, LONGs and Booleans are cross-converted to other data types, such as FP2, by - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 144
Section 7. Installation CRBasic Example 20. Conversion of FLOAT / LONG to Boolean Public Fa As Float Public Fb As Float Public L As Long Public Ba As Boolean Public Bb As Boolean Public Bc As Boolean BeginProg Fa = 0 Fb = 0.125 L = 126 Ba = Fa Bb = Fb Bc = L EndProg 'This will set Ba = False (0) - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 145
Installation Constants Conversion Constants are not declared with a data type, so the CR800 assigns the data type as needed. If a constant (either entered as , i.e., if X is not zero. When a variable of data type BOOLEAN is assigned any non-zero number, the CR800 internally converts it to -1. 145 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 146
to translate the conditions listed in table Binary Conditions of TRUE and FALSE (p. 146) to binary form (-1 or 0), using the listed instructions and saving the binary form in the memory location indicated. Table Logical Expression Examples (p. 147) explains some logical expressions. Non-Zero = True - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 147
Section 7. Installation Table 20. Logical Expression Examples If X >= 5 then Y = 0 Sets the variable Y to 0 if the expression "X >= 5" is true, i.e. if X is greater than or equal to 5. The CR800 evaluates the expression (X >= 5) and registers in system memory a -1 if the expression is true, or a 0 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 148
five days for further processing. CRBasic has syntax provisions facilitating access to these table data, or to meta data relating to the data table. Except when using the GetRecord() instruction (Data Table Access and Management (p. 495) ), the syntax is entered directly into the CRBasic program - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 149
table to go to get the value (optional). If left blank, the most recent record is acquired. Table 21. Abbreviations of Names of Data Processes Abbreviation Process Name Tot Totalize Avg Average Max Maximum Min Minimum SMM Sample at Max or Min Std Standard Deviation MMT Moment No - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 150
are recorded in the Status table, which is a type of data table. Signatures recorded in the Status table can copied to a syntax, whether on the disable parameter or with multiplier and offset on measurement instructions, if the parameter expression is more than a simple reference to a variable - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 151
applications. Consult a Campbell Scientific applications engineer if the CR1000KD Keyboard / Display Display or the numeric monitor in any version of datalogger support software CAL files. These data become the source for calibration factors when requested by the LoadFieldCal() instruction. A CAL - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 152
is permitted for more advanced applications, each with two supporting instructions: • LoadFieldCal() - an optional instruction that evaluates the validity of, and loads values from a CAL file. • SampleFieldCal - an optional data-storage output instruction that writes the latest calibration values to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 153
See Two Point Slope and Offset (Option 2) (p. 159) and Two Point Slope Only (Option 3) (p. 161) for demonstration programs: 1. Use a separate FieldCal() instruction and separate, related variables for each sensor to be calibrated. 2. Ensure mode variable = 0 or 6 before starting. a. If Mode > 0 and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 154
by the CR800 excitation channel. To reset tests, use the support software File Control (p. 431) menu commands to delete .cal Parameter mV output KnownRH (desiccated chamber) Argument at Deployment Argument at 30-Day Service 1000 mV 1050 mV 0 % 0 % Multiplier Offset RH reading 0.05 % / mV - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 155
start calibration. When CalMode increments to 6, simulated 30-day, service zero calibration is complete. Calibrated Offset will equal -52.5%. CRBasic zero, not changed) 'Measured Relative Humidity 'Data Storage Output of Calibration Data -- stored whenever a calibration occurs DataTable(CalHist, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 156
KnownRH,1,30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 7.8.1.5.2 Offset (Option 1) Case: A Report for Salinity Sensor Parameter Parameter at Deployment Parameter at 7-Day Service mV output 1350 mV 1345 mV KnownSalt (standard 30 mg/l solution - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 157
at .05 mg / liter / mV, 'does not change) 'Offset (starts at zero, not changed) 'Salt concentration 'Data Storage Output of Calibration Data -- stored whenever a calibration occurs DataTable(CalHist,NewFieldCal,200) SampleFieldCal EndTable BeginProg Multiplier = .05 Offset = 0 LoadFieldCal(true - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 158
zero offset of the pressure transducer, water temperature, and barometric pressure readings. Use the external keyboard / display or support software numeric monitor to change variable values as directed. Calibration Report for Pressure Transducer Parameter Measurement Before Zero Piezometer - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 159
200,VW(1,1),1,1,1,1000,4000,1,_60Hz,1,0) ' - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 160
Set variable SignalmV to 285. Set variable KnownFlow to 30.0. b. Start the 7-day, service calibration by setting variable CalMode = 1. c. When CalMode increments to 3, set variable SignalmV to not changed) 'Water flow 'Data Storage Output of Calibration Data ─ stored whenever a calibration occurs - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 161
30) 'If there was a calibration, store it into a data table CallTable(CalHist) NextScan EndProg 7.8.1.5.5 Two-Point Slope Only (Option require determination of offset. Wave form analysis, for example, may only require relative data to characterize change. Case: A soil-water sensor is to be used to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 162
is not intended to be a primer on shunt-calibration theory, but only to introduce use of the technique with the CR800 datalogger. Campbell Scientific strongly urges users to study shunt-calibration theory from other sources. A thorough treatment of strain gages and shunt-calibration theory is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 163
circuit, substituting a 1000-Ω potentiometer for the strain gage. To reset calibration tests, use the support software File Control (p. 431) menu to delete .cal files, and then send the demonstration CRBasic example FieldCalStrain() Calibration Demo (p. 164) as a program to a CR800 datalogger. 163 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 164
Section 7. Installation Figure 49: Quarter-bridge strain-gage schematic with RC-resistor shunt CRBasic Example 31. FieldCalStrain() Calibration Demonstration 'Program to measure quarter bridge strain gage 'Measurements Public Raw_mVperV Public MicroStrain 'Variables that are arguments in the Zero - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 165
Section 7. Installation PROGRAM BeginProg 'Set Gage Factors GF_Raw = 2.1 GF_Adj = GF_Raw 'The adj Gage factors are used in the calculation of uStrain 'If a calibration has been done, the following will load the zero or 'Adjusted GF from the Calibration file LoadFieldCal(True) Scan(100,mSec,100,0) - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 166
Section 7. Installation Figure 50: Strain-gage shunt calibration started Figure 51: Strain-gage shunt calibration finished 7.8.1.6.2 Quarter-Bridge Zero (Option 10) Continuing from Quarter-Bridge Shunt (Option 13) (p. 165), keep the 249-kΩ resistor in place to simulate a strain. Using the external - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 167
digital-cellular modems for information services can be found in Campbell Scientific manuals for those modems. When manuals and CRBasic Editor Help. • PakBus communication over TCP/IP. • Callback (datalogger-initiated communication) using the CRBasic TCPOpen() instruction • Datalogger-to-datalogger - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 168
most current record from the CR800 data tables. Data callback and datalogger-to-datalogger communications are also possible over TCP/IP. For details and example programs for callback and datalogger-todatalogger communications, see the network-link manual. A listing of networklink model numbers is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 169
the new home page under the name default.html and copy it to the datalogger. It can be copied to a CR800 drive with File Control. Deleting as shown in figure Home Page Created Using WebPageBegin() Instruction (p. 170) . The Campbell Scientific logo in the web page comes from a file data tables. 169 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 170
Section 7. Installation Figure 55: Home page created using WebPageBegin() instruction Figure 56: Customized numeric-monitor web page 170 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 171
}") HTTPOut("Campbell Scientific CR800 Datalogger") HTTPOut("Welcome To the Campbell Scientific CR800 Web Site!") HTTPOut("") HTTPOut("Monitor CR800 Datalogger Tables") HTTPOut("CR800 Data Table Links") HTTPOut(" - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 172
Deployment | Advanced tab of the CR800 service in DevConfig. Files on the CR800 are datalogger or web camera. This is done using the CRBasic FTPClient() instruction. Refer to a manual for a Campbell Scientific for monitoring road conditions. The CR800 supports SNMP when a network device is attached - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 173
datalogger instructions. Campbell Scientific publication PS200/CH200 12 V Charging Regulators, which is available at www.campbellsci.com. The CR800 supports SDI-12 communication through two modes - transparent mode and programmed mode. • Transparent mode facilitates sensor setup and troubleshooting - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 174
data recording. 7.8.3.1 SDI-12 Transparent Mode System operators can manually interrogate and enter settings in probes using transparent mode. Transparent mode is useful in troubleshooting program. It is easily accessed through Campbell Scientific datalogger support software (p. 76), but may also be - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 175
aI! 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. Change Address aAb! b (support for this command is required only if - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 176
, however, will still pick up data resulting from a previously issued C! command. 2Complete response string can be obtained when using the SDI12Recorder() instruction by declaring the Destination variable as String. 3This command may result in a service request. Address Commands A single probe - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 177
the next scan. The datalogger scan rate should be set such that the resulting skew between time of measurement and time of data collection does not compromise data integrity. Note This command is new to Version 1.2 or higher of the SDI-12 Specification. Older sensors, older loggers, or new sensors - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 178
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 data. In programmed mode, the CR800 provides command and timing services within a single line of code. For example, when the SDI12Recorder() instruction - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 179
automatically issues retries and performs other services that make the SDI-12 measurement work as trouble free as possible. Table SDI-12Recorder() Commands (p. 179) summarizes CR800 actions triggered by some SDI12Recorder() commands. If the SDI12Recorder() instruction is not successful, NAN will be - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 180
every 5 seconds. The sensors requires 95 seconds to respond with data after a measurement request. Complicating the application is the need for () instruction begins, resulting is a real scan rate of about 6.5 minutes. 3. There is a 95-second time skew between each sensor measurements. Problem 1 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 181
state continuously. To remedy this problem, measurements need to be started with C! command, but stopped short of receiving the next measurement command (hard-coded part of the C! routine) after their data are polled. The SDI12Recorder() instruction C command (not C!) provides this functionality - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 182
Then IndDone(X) = -1 'Test to see if ttt expired. If ttt not expired, load "1e9" into first 'variable then moves to next instruction. If ttt expired, issue 'aDv! command(s). If ((Temp_Tmp(X) = 2e9) OR (Temp_Tmp(X) = 1e9)) Then cmd(X) = "C" 'Start sending "C" command. ElseIf(Temp_Tmp(X) = NAN - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 183
Section 7. Installation Else 'C!/C command sequence complete Move(Temp_Meas(X),1,Temp_Tmp(X),1) 'Copy measurements to SDI_Val(10) cmd(X) = "C!" 'Start next measurement with "C!" IndDone(X) = -1 EndIf Next X 'Summarize Measurement Event Success For X = 1 To 4 GroupDone = GroupDone + IndDone - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 184
(Temp(3)) Loop EndSequence SlowSequence Do SDI12SensorSetup(1,7,3,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(4)) Loop EndSequence EndProg SDI-12 Extended Command Support SDI12Recorder() sends any string enclosed in quotation marks in the Command parameter. If the command string is a non-standard - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 185
7.8.3.2.2 SDI-12 Sensor Mode The SDI12SensorSetup() / SDI12SensorResponse() instruction pair programs the CR800 to behave as an SDI-12 sensor. A common use of this feature is the transfer of data from the CR800 to other Campbell Scientific dataloggers over a single-wire interface (SDI-12 port to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 186
= Status.SerialNumber 'serial number Source(10) = Status.LithiumBattery 'data backup battery, V NextScan SlowSequence Do SDI12SensorSetup(2,1,0,1) Delay(1,500,mSec) only the probe addressed by the datalogger will respond. All other probes will remain active until the timeout period expires. 186 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 187
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 188
to a subroutine (local variables (p. 435) ) are declared within the subroutine instruction. Local variables can be aliased (as of 4-13; OS 26) but are among variables declared as Public or Dim. See Expressions with Numeric Data Types (p. 143) for conversion types. Note To avoid programming conflicts - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 189
or Dim. 'Local variables are those declared in the Sub() instruction. 'Program Purpose: Demonstrates use of global and local variables with a data storage interval. Measurements from polar (wind speed and direction) or orthogonal (fixed East and North propellers) sensors are supported. Vector - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 190
In the CR800 WindVector() instruction, the OutputOpt parameter defines the processed data that are stored. All standard deviation is 4 calculated using Campbell Scientific's wind speed weighted algorithm. computed hourly vector directions. Correct manual calculation of hourly vector direction from - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 191
of two ways: 1) using every sample taken during the data storage interval (enter 0 for the Subinterval parameter), or 2) / scan rate (secs) For example, if the scan rate is 1 second and the data interval is 60 minutes, the standard deviation is calculated from all 3600 scans when the sub-interval - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 192
where for polar sensors: or, in the case of orthogonal sensors: Resultant mean wind direction, Θu: Standard deviation of wind direction, σ (Θu), using Campbell Scientific algorithm: The algorithm for σ (Θu) is developed by noting (FIGURE. Standard Deviation of Direction (p. 193) ) that where 192 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 193
0. The term, is 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. In these tests, the maximum differences in 193 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 194
be customized to simplify routine operations. Viewing data, toggling control functions, or entering notes are common applications. Individual menu screens support up to eight lines of text with up to seven variables. Use the following CRBasic instructions. Refer to CRBasic Editor Help for complete - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 195
long to mask default display clock. CRBasic example Custom Menus (p. 197) lists CRBasic programming for a custom menu that facilitates viewing data, entering notes, and controlling a device. figure Custom Menu Example - Home Screen (p. 195) through figure Custom Menu Example - Control LED Boolean - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 196
Section 7. Installation Figure 63: Custom menu example - Predefined-notes pick list Figure 64: Custom menu example - Free-Entry notes window Figure 65: Custom menu example - Accept / Clear notes window Figure 66: Custom menu example - Control sub menu 196 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 197
Menus (p. 197). CRBasic Example 38. Custom Menus 'Custom Menu Example 'Declarations supporting View Data menu item Public RefTemp 'Reference Temp Variable Public TCTemp(2) 'Thermocouple Temp Array 'Delarations supporting blank line menu item Const Escape = "Hit Esc" 'Word indicates action - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 198
Process Variable 'LED Count Down Variable 'LED Control Variable 'Set up Notes data table, written 'to when a note is accepted 'Sample Pick List Note PanelTemps 'Create menu item CountDown 'Create a pick list for CountDown 'Manual LED control Menu Item 'End custom menu creation 'Initialize Notes Sub - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 199
'Call data table 'Menu Item "Make Notes" Support Code If Then'Interprocess count down and manual LED ToggleLED = False EndIf dataloggers accept program files or Include() instruction files with .DLD extensions. This gets around the system filters that look at file extensions for specific loggers - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 200
of .DLD type used by legacy Campbell Scientific dataloggers. As an example, pseudo code using example for CR3000, CR1000, and CR800 Series Dataloggers 'Key instructions include #If, # seconds 'Choose a COM port depending on which logger type the program is running in. #If LoggerType = - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 201
depending 'on the datalogger type the program is running in. #If LoggerType = CR3000 'This instruction is used if the logger is a CR3000 VoltSe(ValueRead,1,mV1000,22,0,0,_50Hz,0.1,-30) #ElseIf LoggerType = CR1000 'This instruction is used if the logger is a CR1000 VoltSe(ValueRead,1,mV2500,12 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 202
of how bits may be translated into usable information, see the appendix FP2 Data Format (p. 535). Note ASCII / ANSI control character ff-form feed (binary idiosyncrasies of serial communication. When a standardized serial protocol is supported by the CR800, such as PakBus® or Modbus, translation - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 203
point-to-point and network communications among PCs and Campbell Scientific dataloggers. Modbus and DNP3 are industry-standard networking SCADA on the CR800. Read More! See SDI-12 Recording (p. 308), SDI-12 Sensor Support (p. 173), PakBus Overview (p. 334), DNP3 (p. 347), and Modbus (p. 350). - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 204
. 7.8.8.4 Glossary of Terms Asynchronous Indicates the sending and receiving devices are not synchronized using a clock signal. Baud rate The rate at which data are transmitted. Big Endian "Big end first." Placing the most significant integer at the beginning of a numeric word, reading left to right - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 205
CR800 supports several data bits. The stop bit can be 1, 1.5 or 2. TX Transmit 7.8.8.5 CRBasic Programming To transmit or receive RS-232 or TTL signals, a serial port (see table CR800 Serial Ports (p. 203) ) must be opened and configured through CRBasic with the SerialOpen() instruction problem - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 206
) and ensure this option supports PakBus® in the specific application. • BufferSize - The buffer holds received data until it is removed. SerialIn(), SerialInRecord(), and SerialInBlock() instructions are used to read data from the buffer to variables. Once data are in variables, string manipulation - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 207
instruction if expression evaluates to a constant 7.8.8.5.2 Input Programming Basics Applications with the purpose of receiving data from another device usually include the following procedures. Other procedures may be required depending on the application. 1. Know what the sensor supports - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 208
Is power consumption critical? • Does the sensor compute a checksum? Which type? A checksum is useful to test for data corruption. 2. Open a serial port (SerialOpen() instruction). • Example: SerialOpen(Com1,9600,0,0,10000) • Designate the correct port in CRBasic. • Correctly wire the device to the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 209
Concatenate (add) strings together using & instead of +. • Tip - CHR() instruction is used to insert ASCII / ANSI characters into a string. 3. Output string via . The manufacturer of the instrument must provide the rules by which data are to be decoded. • Alpha-numeric: Each digit represents its - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 210
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. The variable must be an array set As - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 211
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). CRBasic Example 40. Receiving an RS‐232 String 'To demonstrate CR800 Serial I/O features, this - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 212
# character as filters SerialOpen(Com2,9600,0,0,10000) 'Open a serial port 'Receive serial data as a string '42 is ASCII code for "*", 35 is code for "#" SerialInRecord ,"",2,0) NextScan EndProg 7.8.8.6 Testing Applications A common problem when developing a serial I/O application is the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 213
Section 7. Installation Figure 69: HyperTerminal New Connection description Figure 70: HyperTerminal Connect-To settings 213 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 214
Section 7. Installation Figure 71: HyperTerminal COM-Port Settings Tab Click File | Properties | Settings | ASCII Setup... and set as shown. Figure 72: HyperTerminal ASCII setup 214 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 215
a use of CR800 serial I/O features. Problem: An energy company has a large network of older CR510 dataloggers into which new CR800 dataloggers are to be incorporated. The CR510 dataloggers are programmed to output data in the legacy Campbell Scientific Printable ASCII format, which satisfies - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 216
of the legacy 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 CR800 program if the SerialOpen() baud rate matches that of the datalogger support software (p. 382 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 217
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 218
Section 7. Installation 'If it is a leap year, use this section. If (LeapYear = True) Then Select Case DOY Case Is < 32 Month = 1 Date = DOY Case Is < 61 Month = 2 Date = DOY + -31 Case Is < 92 Month = 3 Date = DOY + -60 Case Is < 122 Month = 4 Date = DOY + -91 Case Is < 153 Month = 5 Date = DOY + - - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 219
Section 7. Installation Case Is < 121 Month = 4 Date = DOY + -90 Case Is < 152 Month = 5 Date = DOY + -120 Case Is < 182 Month = 6 Date = DOY + -151 Case Is < 213 Month = 7 Date = DOY + -181 Case Is < 244 Month = 8 Date = DOY + -212 Case Is < 274 Month = 9 Date = DOY + -243 Case Is < 305 Month = 10 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 220
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) If TimeIntoInterval(0,5,Sec) Then 'Load OneMinData table - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 221
logger to send this? A: Strings created with CRBasic are NULL terminated. Adding strings together means the 2nd string will start at the first null it finds in the first string. Use SerialOutBlock() instruction with the datalogger support software character of the incoming data stream. PakBus® takes - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 222
in mind when setting timeouts for the SerialIn() and SerialOut() instructions, or user-defined timeouts in constructs using the SerialInChk() instruction. Q: What are the termination conditions that will stop incoming data from being stored? A: Termination conditions: • TerminationChar argument is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 223
the variable when it contains old data." However, there are more elegant ways to handle the root problem. There is nothing unique about fast, like the Move() instruction, and an asynchronous process is reading the data, this can be even worse because the "reading old data" will happen less often but - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 224
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. Data stored are the sample, average, and total of the variable 'counter, which is equal to 0, 1, 2, 3, or 4 when - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 225
that may be accessed from the program after being written to a data table. The time of other events, such as alarms, can be stored using the RealTime() instruction. • Accessing and storing a time stamp from another datalogger in a PakBus network. 7.8.10.1 NSEC Options NSEC is used in a CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 226
Time Arrays 'Application: Demonstrate how to sample a time stamp into Final Data Storage using 'an array dimensioned 7 or 9. 'Solution: 'A time stamp day, 'hour, minutes, seconds, and microseconds using the RealTime() instruction. The first 'seven time values are copied to variable rTime2(1) through - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 227
string forms. 'These are accomplished by, '1) reading Public.TimeStamp into a LONG numeric variable. '2) store it into a type NSEC datum in final data storage. '3) sample it back into string form using the TableName.FieldName notation. 'Declarations Public UTTime(3) As String * 30 Dim TimeLong As - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 228
data type, 256 bits are required (8 states * 32 bits per state). When programming with BOOL8, repetitions in the output processing DataTable() instruction in figure Bool8 Data from Bit-Shift Example (PC Data File) (p. 230) , when datalogger support software (p. 76) stores the data in an ASCII file - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 229
Section 7. Installation Variable aliasing (p. 124) can be employed in the CRBasic program to make the data more understandable. Figure 76: Alarms toggled in bit-shift example Figure 77: Bool8 data from bit-shift example (numeric monitor) 229 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 230
(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) EndTable BeginProg Scan(1,Sec,3,0) 'Reset all bits each pass before - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 231
&b100000000000000000000000000000 ' &b1000000000000000000000000000000 '&b10000000000000000000000000000000 'Note &HFF = &B11111111. By shifting at 8 bit increments along 32-bit 'Flags' (Long 'data type), the first 8 bits in the four Longs FlagsBool8(4) are loaded with alarm 'states. Only the first - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 232
'AND 4th 8 bits of "Flags" & 11111111 7.8.12 Faster Measurement Rates Certain data acquisition applications require the CR800 to make analog measurements at rates faster than once per voltage measurement instruction. Techniques discussed can also be used with the following instructions: VoltSE() - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 233
a minimal CRBasic program, measurement rates between 1 and 100 Hz are determined by the Interval and Units parameters in the Scan() / NextScan instruction pair. The following program executes VoltSE() at 1 Hz with a 100% duty cycle. Table 33. Measuring VoltSE() at 1 Hz PipeLineMode' - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 234
at rates between 100 and 600 Hz, the SubScan() / NextSubScan instruction pair is added. Measurements over 100 Hz do not do not have of the scan interval, the CR800 processor catches up on overhead tasks and processes data stored in the buffers. For example, the CR800 can be programmed to measure - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 235
Scan() / NextScan buffers is exceeded, a skipped scan, and so a missed-data event, will occur. 7.8.12.2.1 SubScan() / NextSubScan Details • The number of in table Status Table Fields and Descriptions (p. 506). The EndScan instruction occupies an additional 100 µs of measure time, so the interval - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 236
array and stores the array in a single (but very long!) record in the data table. The exact sampling interval is calculated as, Tsample = 1.085069 * INT (µs) entered in the SettlingTime parameter of the analog input instruction. Table 36. Measuring VoltSE() at 2000 Hz PipeLineMode' - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 237
from a single channel. For example, the command, Dim FastTemp(500) dimensions array FastTemp() to store 500 measurements (one second of data at 500 Hz, one-half second of data at 1000 Hz, etc.) The dimension can be any integer from 1 to 65535. Repetitions The number of measurements to make on - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 238
as strings. Example: 1 + 2 + 3 + "a" + 5 + 6 + 7 = "6a567" "Subtracts" NULL ("") from the end of ASCII characters for conversion to an ASCII code (LONG data type). Example: "a" - "" = 97 ASCII codes of the first characters in each string are compared. If the difference between the codes is zero - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 239
Section 7. Installation 7.8.13.2 String Concatenation Concatenation is the building of strings from other strings ("abc123"), characters ("a" or chr()), numbers, or variables. Table 39. String Concatenation Examples Expression Comments Str(1) = 5.4 + 3 + " Volts" Add floats, concatenate - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 240
. To manipulate a string that has NULL characters within it (in addition to being terminated with another NULL), use MoveBytes() instruction. 7.8.13.4 Inserting String Characters CRBasic Example 48. Inserting String Characters Objective: Use MoveBytes() to change "123456789" to "123A56789" Given - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 241
to hex step 2 CRLFNumeric(2) = HexToDec(Strings(20)) Convert Hex string to Float Result 3338 0D0A 3338.00 7.8.14 Data Tables CRBasic Example 50. Two Data Intervals in One Data Table 'CRBasic program to write to a single table with two different time intervals. 'Note: this is a conditional table - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 242
the difference in air temperatures is >=3 turn LED on 'and trigger the data table's faster interval If deltaT >= 3 Then PortSet(4,true) int_fast = true 'Call Output Tables CallTable TwoInt NextScan EndProg 7.8.15 PulseCountReset Instruction PulseCountReset is used in rare instances to force the reset - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 243
Executable code is code that resides between BeginProg and EndProg instructions. See CRBasic example Program Signatures (p. 243). CRBasic Example 51 Define Public Variables Public RunSig, ProgSig, ExeSig(2),x,y 'Define Data Table DataTable(Signatures,1,1000) DataInterval(0,1,Day,10) Sample(1, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 244
'"RunSignature" 'signature includes code since initial 'Signature instruction 'Signature includes all code since 'ExeSig(1) = Signature so. '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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 245
= True Const Low = False 'Optional - Declare a Station Name into a location in the Status table. StationName(CR1000_on_desk) 'Optional -- Declare units. 'data file header. Units Batt_Volt = Volts Units PTemp = deg C Units AirTemp = deg C Units AirTempF2 = deg F Units DeltaT_C = deg C Units are - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 246
FP2) Sample(1,HowMany, FP2) EndTable 'Stores temperature minimum in low 'resolution format 'Stores temp difference sample in low 'resolution format 'Stores how many data events in low 'resolution format BeginProg 'A second way of naming a station is to load the name into a string variable. The is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 247
just needs to be included. HowMany = Event.EventCount(1,1) 'Call Data Tables CallTable(OneMin) CallTable(Event) NextScan EndProg 7.8.17.2 Running Average Secondary, or slow sequence, scans are prefaced with the SlowSequence instruction. CRBasic Example 54. Use of Multiple Scans 'This program - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 248
17.4 Groundwater Pump Test CRBasic example Groundwater Pump Test (p. 248) demonstrates: 1. How to write multiple-interval data to the same data table. 2. Use of program-control instructions outside the Scan() / NextScan structure. 3. One way to execute conditional code. 4. Use of multiple sequential - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 249
, FP2) EndTable 'Main Program BeginProg Scan(1,Sec,0,0) If TimeIntoInterval(0,1,Min) Then Flag(1) = True If Flag(1) = True Then ExitScan NextScan '10 Second Data Interval If Flag(1) = True Then Scan(10,Sec,0,60) Counter(2) = Counter(2) + 1 Battery(Batt_volt) PanelTemp(PTemp,250) TCDiff(Level,1,mV2_5 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 250
TypeT,PTemp,True ,0,250,1.0,0) If TimeIntoInterval(0,1,Min) Then TimeIntoTest = TimeIntoTest + 1 EndIf 'Call Output Tables CallTable LogTable NextScan '2 Minute Data Interval Scan(2,Min,0,200) Counter(5) = Counter(5) + 1 Battery(Batt_volt) PanelTemp(PTemp,250) TCDiff(Level,1,mV2_5,1,TypeT,PTemp,True - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 251
Section 7. Installation '10 Minute Data Interval Scan(10,Min,0,0) Counter(6) = Counter(6) + 1 Battery(Batt_volt) PanelTemp( at the beginning of the program and then utilized by several measurement instructions throughout the program. CRBasic Example 56. Scaling Array 'Declare viewable variables - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 252
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 showing use of StationName instruction, use of units, and writing 'to a data table conditionally 'Declare Station - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 253
of a delta temperature 'above 3 degrees. The event is recorded when the delta temperature drops back below '3 degrees. 'The DataEvent instruction forces a record in data table Event each time an 'event ends. Number of events is written to the reserved variable 'EventCount(1,1). In this program - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 254
= Event.EventCount(1,1) 'Call data table(s) CallTable(Event) CallTable( 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 255
is usually achieved by calibrating individual sensors over the range of use and applying corrections to the RS/RO value input to the PRTCalc() instruction (by using the calibrated value of RO) and the multiplier and offset parameters. Refer to CRBasic Editor Help for specific PRTCalc() parameter - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 256
Section 7. Installation 256 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, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 257
Section 7. Installation Table 47. PRTCalc() Type-Code-3 Sensor US Industrial Standard, alpha = 0.00391 (Reference: OMIL R84 (2003)) Constant Coefficient i 8.8564290E+00 j 2.5190880E+02 Table 48. PRTCalc() Type-Code-4 Sensor Old Japanese Standard, alpha = 0.003916 (Reference: JIS C 1604: - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 258
Section 7. Installation Table 50. PRTCalc() Type-Code-6 Sensor Standard ITS-90 SPRT, alpha = 0.003926 (Reference: Minco / Instrunet) Constant Coefficient a 3.9848000E-03 d -2.3480000E-06 e 1.8226630E-05 f -1.1740000E-06 g 1.6319630E+00 h -2.4709290E+00 i 8.8283240E+00 j 2. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 259
Section 7. Installation Figure PT100 in Four-Wire Half-Bridge (p. 260) shows the circuit used to measure a 100-Ω PRT. The 10-kΩ resistor allows the use of a high excitation voltage and a low input range. This ensures that noise in the excitation does not have an effect on signal noise. Because the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 260
Section 7. Installation A terminal-input module (TIM) can be used to complete the circuit shown in figure PT100 in Four-Wire Half-Bridge (p. 260). Refer to the appendix Signal Conditioners (p. 539) for information concerning available TIM modules. Figure 79: PT100 in four-wire half-bridge CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 261
requirements in this example are the same as in PT100 in Four-Wire Half-Bridge (p. 258). In this case, a three-wire half-bridge and CRBasic instruction BRHalf3W() are used to measure the resistance of the PRT. The diagram of the PRT circuit is shown in figure PT100 in Three-Wire HalfBridge - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 262
2) This example measures a 100 ohm PRT in a four-wire full-bridge, as shown in figure PT100 in Four-Wire Full-Bridge (p. 263), using CRBasic instruction BRFull(). In this example, the PRT is in a constant-temperature bath and the measurement is to be used as the input for a control algorithm. As - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 263
Section 7. Installation where X' = X / 1000 + R3/(R2+R3) Thus, to obtain the value RS/R0, (R0 = RS @ 0°C) for the temperature calculating instruction PRTCalc(), the multiplier and offset used in BRFull() are 0.001 and R3/(R2+R3), respectively. The multiplier (Rf) used in the bridge transform - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 264
high-precision math, so a 32-bit extension of the mantissa is saved and used internally resulting in 56 bits of precision. Note This instruction should not normally be inserted within a For/Next construct with the Source and Destination parameters indexed and Reps set to 1. Doing so will perform - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 265
Section 7. Installation Figure Running-Average Frequency Response (p. 266) is a graph of signal attenuation plotted against signal frequency normalized to 1/(running average duration). The signal is attenuated by a synchronizing filter with an order of 1 (simple averaging): Sin(πX) / (πX), where X - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 266
Section 7. Installation The recorded amplitude for this example should be about 1/3 of the input‐signal amplitude. A program was written with two stored variables: Accel2 and Accel2RA. The raw measurement was stored in Accel2, while Accel2RA was the result of performing a running average on the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 267
Section 7. Installation Figure 84: Running-average signal attenuation 267 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 268
Section 7. Installation 268 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 269
Campbell Scientific applications a scan starts at 15:00:00, data output during that scan will have a stamp attached to the measurement, if the CallTable() instruction is called from within the Scan() / NextScan ms. Time-stamp skew is not a problem with most applications because, • program execution - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 270
SlowSequence to execute CallTable() TriggerSequence(1,0) NextScan 'Allow data to be stored 510 ms into the Scan with a s.51 time stamp SlowSequence Do WaitTriggerSequence CallTable(Test) Loop EndProg Other time-processing CRBasic instructions are governed by these same rules. Consult CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 271
BrFull(), BrFull6W(), BrHalf4W(), TCDiff(), and VoltDiff () instructions perform DIFF voltage measurements. Figure 85: PGI amplifier A PGIA processes the difference between the H and L inputs, while rejecting voltages that are common to both inputs. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 272
campbellsci.com for indepth treatment of the advantages of differential and single-ended measurements: Preventing and Attacking Measurement Noise Problems, Benefits of Input Reversal and Excitation Reversal for Voltage Measurements, and Voltage Measurement Accuracy, Self-Calibration, and Ratiometric - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 273
that is approximately 25°C too high. A common problem with ground-potential difference occurs in applications wherein external dataloggers. Using multiple measurement "reps" in these dataloggers reduced overall measurement time. Several parameters in CRBasic voltage measurement instructions - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 274
the following (see CR800 Specifications ): • Input Voltage: 2500 mV • Programmed Input Voltage Range: ±2500 mV (mV2500) • Programmed Measurement Instruction: VoltDiff() • Input Measurement Reversal: True • CR800 Temperature: Between 0°C and 40°C Accuracy of the measurement is calculated as follows - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 275
Section 8. Operation where Gain Error = ± (2500 * 0.0006) = ±1.5 mV and Offset Error = 1.5 • 667 µV + 1 µV = 1.00 mV Therefore, Error = Gain Error + Offset Error = ±1.5 mV + 1.00 µV = ±2.50 mV In contrast, the error for a 500‐mV input under the same constraints is ±1.30 mV. The figure Voltage - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 276
instruction. Autoranging optimizes resolution but takes longer than a measurement on a fixed range, because of the two measurements required. An auto-ranged measurement will return NAN (Not-A-Number) if the voltage exceeds the range picked by the first measurement. To avoid problems datalogger - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 277
> 2500 mV to indicate an open input. For bridge measurements, the returned value X being > 1 would indicate an open input. For example, the BrHalf() instruction returns the value X defined as V1/Vx, where V1 is the measured single-ended voltage and Vx is the user-defined excitation voltage having - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 278
Compensation Options (p. 278) lists available options. Table 53. Analog Measurements and Offset Voltage Compensation CRBasic Voltage Measurement Instruction Input Reversal (RevDiff = True) Excitation Reversal (RevEx = True) Measure Ground Reference Offset (MeasOff = True) VoltDiff() * VoltSe - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 279
RevEx, or MeasOff is disabled (= False) in a measurement instruction, offset voltage compensation is still performed, albeit less effectively, Read More! See White Paper "Preventing and Attacking Measurement Noise Problems" at www.campbellsci.com. The CR800 incorporates circuitry to perform - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 280
Section 8. Operation duration. Consequently, noise at 1 / (integer multiples) of the integration duration is effectively rejected by an analog integrator. table CRBasic Measurement Integration Times and Codes (p. 280) lists three integration durations available in the CR800 and associated CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 281
Section 8. Operation Figure 88: Ac power line noise rejection techniques ac Noise Rejection on Large Signals If rejecting ac-line noise when measuring with the 2500 mV (mV2500) and 5000 mV (mV5000) ranges, the CR800 makes two fast measurements separated in time by one-half line cycle (see figure - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 282
. Additional settling time may be required when measuring high-resistance (high-impedance) sensors and / or sensors connected to the datalogger by long leads. Measurement time of a given instruction increases with increasing settling time. For example, a 1 ms increase in settling time for a bridge - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 283
time for a particular sensor and cable can be measured with the CR800. Programming a series of measurements with increasing settling times will yield data that indicate at what settling time a further increase results in negligible change in the measured voltage. The programmed settling time at this - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 284
may help in understanding the CRBasic code in the example. The first six measurements are shown in table First Six Values of Settling-Time Data (p. 285). Each trace in figure Settling Time for Pressure Transducer (p. 285) contains all twenty PT() mV/Volt values (left axis) for a given record number - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 285
Settling time for pressure transducer Table 58. First Six Values of Settling-Time Data TIMESTAMP REC PT(1) PT(2) PT(3) Smp Smp Smp 1/3/2000 23:34 The internal voltage standard should periodically be calibrated by Campbell Scientific. When high-accuracy voltage measurements are required, a - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 286
• 89% settling for 10 new values • 96% settling for 14 new values If this rate of update for measurement channels is too slow, the Calibrate() instruction can be used. The Calibrate() instruction computes the necessary G and B values every scan without any low-pass filtering. For a VoltSe - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 287
250 µs integration, and a maximum of 54 for all possible integration durations and input-voltage ranges chosen. An example use of the Calibrate() instruction programmed to calibrate all input ranges is given as: 'Calibrate(Dest,Range) Calibrate(cal(1),true) where Dest is an array of 54 variables - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 288
Section 8. Operation Table 59. Status Table Calibration Entries Status Table Element CalGain(18) CalSeOffset(1) CalSeOffset(2) CalSeOffset(3) CalSeOffset(4) CalSeOffset(5) CalSeOffset(6) CalSeOffset(7) CalSeOffset(8) CalSeOffset(9) CalSeOffset(10) CalSeOffset(11) CalSeOffset(12) CalSeOffset(13) - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 289
Offset or Gain ±mV Input Range Offset 25 Offset 7.5 Offset 2.5 Integration 50-Hz Rejection 50-Hz Rejection 50-Hz Rejection Table 60. Calibrate() Instruction Results Array Cal() Element 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Differential (Diff) Single-Ended - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 290
voltage measurements is a function of settling and integration times, A/D conversion, and the number entered into the Reps parameter of the VoltDiff() or VoltSE() instruction. A close approximation is: Time Skew = Settling Time + Integration Time + A‐D Conversion Time1 + Reps/NoReps2 290 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 291
reversed. The offset error in the two measurements due to thermal EMFs can then be accounted for in the processing of the measurement instruction. The excitation channel maintains the excitation voltage or current until the hold for the analog to digital conversion is completed. When more than - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 292
Resistive-Bridge Type and Circuit Diagram Half-Bridge1 CRBasic Instruction and Fundamental Relationship CRBasic Instruction: BrHalf() Fundamental Relationship2: Relationships Three-Wire Half-Bridge1,3 CRBasic Instruction: BrHalf3W() Fundamental Relationship2: Four-Wire Half-Bridge1,3 CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 293
voltages; Rf = "fixed", "bridge" or "completion" resistor; Rs = "variable" or "sensing" resistor. 2Where X = result of the CRBasic bridge measurement instruction with a multiplier of 1 and an offset of 0. 3See the appendix Resistive Bridge Modules (p. 539) for a list of available terminal input - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 294
Input-Voltage Range and Basic Resolution Range (mV) Basic Resolution (µV) ±5000 ±2500 ±250 ±25 ±7.5 ±2.5 1333 667 66.7 6.7 2.0 0.67 Assumptions that support the ratiometric-accuracy specification include: • Excitation voltages less than 1000 mV are reversed during the excitation phase of the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 295
bridge measurement that uses the BrFull() instruction as follows: The relationship defining the BrFull() instruction is X = 1000*V1/Vx, illustrated in this example, which is supported by the assumption that the measurement is differential with input reversal, datalogger temperature is between ‐25° to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 296
for the particular strain bridge configuration used. All strain gages supported by StrainCalc() use the full-bridge schematic. In strain has four. StrainCalc() requires a bridge configuration code. Table StrainCalc() Instruction Equations (p. 296) shows the equation used by each configuration code. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 297
Campbell Scientific strongly encourages users to carefully evaluate relevant parts of the Thermocouple Measurements section of the CR1000 Datalogger Operator's Manual CR800 pulse-input channels can be measured with CRBasic instruction PulseCount(). PulseCount() has various parameters to customize it - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 298
functions include returning counts or frequency on frequency or switch-closure signals. TimerIO() instruction has additional capabilities. Its primary function is to measure the time between state transitions. Note Consult CRBasic Editor Help for more information on PulseCount() and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 299
() instruction. Dedicated pulse-input channels (P1 through P2), as shown in figure Pulse-Input Channels (p. 300), can be configured to read high-frequency pulses, low-level ac signals, or switch closures. Note Input-channel expansion devices for all input types are available from Campbell Scientific - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 300
Section 8. Operation Figure 94: Pulse-input channels 8.1.5.1.1 High-frequency Pulse (P1 - P2) High-frequency pulse inputs are routed to an inverting CMOS input buffer with input hysteresis. The CMOS input buffer is an output zero level with its input ≥ 2.2 V, and an output one level with its input ≤ - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 301
I/O channels can be programmed with either PulseCount() or TimerIO() instructions. When configured for input, signals connected to C1 - C4 digital I/O channel specifications in CR800 Specifications. Caution Contact Campbell Scientific for signal conditioning information if a pulse input < -8.0 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 302
be expressed in terms of microseconds or Hertz. To read more concerning edge timing, refer to CRBasic Editor Help for the TimerIO() instruction. Edge-timing resolution is approximately . Edge Timing (C1 - C4) Open collector (bipolar transistors) or open drain (MOSFET) sensors are typically measured - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 303
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) 303 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 304
as programmed (rising or falling). This counter is running at a fixed high frequency. A count is also incremented for each transition. When the TimerIO() instruction executes, it uses the difference of time between the edge prior to the last execution and the edge prior to this execution as the time - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 305
varying over the execution interval. The calculation returns the average regardless of how the signal is changing. 8.1.5.4 Pulse Measurement Problems 8.1.5.4.1 Pay Attention to Specifications The table Example of Differing Specifications for Pulse Input Channels (p. 305) compares specifications for - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 306
Section 8. Operation Table 68. Time Constants (τ) Measurement Pulse channel, low-level ac mode Digital I/O, high-frequency mode Digital I/O, switch-closure mode τ See table Filter Attenuation of Frequency Signals (p. 306) footnote 0.025 0.025 Table 69. Filter Attenuation of Frequency Signals. As - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 307
the interrupt that is capturing the precise time until the next scan is serviced. This is done so that the CR800 does not get bogged down interrupts. An small RC filter retrofitted to the sensor switch should fix the problem. 8.1.6 Period Averaging The CR800 can measure the period of a signal on any - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 308
. 8.1.8 RS-232 and TTL Read More! Serial Input / Output Instructions (p. 487) and Serial I/O (p. 201). The CR800 can usually receive and record RS-232 and 0 - 5 Vdc logic data from sensors designed to transmit via these protocols. Data are received through the CS I/O port with the proper interface - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 309
not always possible or practical. By adding FieldCal() or FieldCalStrain() instructions to the CR800 program, a user can easily adjust the concern with sensors acquired from manufacturers other than Campbell Scientific. Campbell Scientific sensors are engineered for optimal performance with factory - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 310
The SDI-12 standard allows cable lengths of up to 200 feet. Campbell Scientific does not recommend SDI-12 sensor lead lengths greater than 200 feet; measurements or other functions, using the WaitDigTrig() instructions, independent of CR800 clocks or data time stamps. When programs are running in - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 311
send data to the CR800 over a proprietary, three-wire serial communications link utilizing channels C1, C2 and C3. Read More! For complete information on available measurement and control peripherals, go to the appendix Sensors and Peripherals, www.campbellsci.com, or contact a Campbell Scientific - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 312
Campbell Scientific serial I/O modules are designed to facilitate reading and parsing serial data. Campbell Scientific output port and set low (0 Vdc) or high (5 Vdc) using the PortSet() or WriteIO() instructions. Port C4 can be configured for pulse width modulation with a maximum period of 36.4 s. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 313
by Campbell Scientific. For more information, see the appendix Relay Drivers (p. 541), contact a Campbell Scientific applications this example, when the control port is set high, 12 Vdc from the datalogger passes through the relay coil, closing the relay which completes the power circuit and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 314
Section 8. Operation Figure 101: Relay driver circuit with relay Figure 102: Power switching without relay 8.2.5 Analog Control / Output Devices The CR800 can scale measured or processed values and transfer these values in digital form to an analog output device. The analog output device performs a - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 315
most memory features automatically. However, users should periodically review areas of memory wherein data files, CRBasic program files, and image files reside. Review and management of memory are accomplished with commands in the datalogger support software (p. 76) File Control (p. 431) menu. 315 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 316
reported in Status table field CPUDriveFree. USB: drive - Holds program files. Holds a copy of requested final-storage table data as files when TableFile() instruction is used. USB: data can be retrieved from the storage device with Windows Explorer. USB: drive can facilitate the use of Powerup.ini - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 317
the user program. These values may persist through powerup, recompile, and watchdog events if the PreserveVariables instruction is in the running program. Final-Storage Data Tables Final Storage is given lowest priority in SRAM memory allocation. Communications Memory 1 Communications Memory - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 318
partitioned when a Campbell Scientific mass-storage device is connected. Table 72. Data-Storage Drives Drive instruction allows the user to set the size of a data table. Discrete data files are normally created only on a PC when data are retrieved using datalogger support software (p. 76). Data - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 319
discrete files by using the TableFile() instruction. Table TableFile()-Instruction Data-File Formats (p. 320) describes available data-file formats. Caution When removing mass-storage devices, do so when the LED is not flashing or lit. Campbell Scientific mass-storage devices • should be formatted - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 320
are indicated with an asterisk. A more detailed discussion of data file formats is available in the Campbell Scientific publication LoggerNet Instruction Manual available at www.campbellsci.com. Table 73. TableFile()-Instruction Data-File Formats TableFile() Format Option 01 Base File Format TOB1 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 321
FP2","FP2" }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' E1H TOA5 TOA5 files contain ASCII (p. 425) header and comma‐separated data. Example: "TOA5","11467","CR1000","11467","CR1000.Std.20","CPU:file format.CR1","26243","Test" "TIMESTAMP","RECORD","battfivoltfiMin","PTemp" "TS","RN Min","Smp" "2010-12 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 322
data in a JSON format. Example: "signature": 38611,"environment": {"stationfiname": "11467","tablefiname": "Test","model": "CR1000","serialfino": "11467", "osfiversion": "CR1000 selected in the TableFile() instruction in the CR800 CRBasic program. Line 1 - Data Origins Includes the following metadata - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 323
some formats as a means to ensure data integrity and provide an up‐count data field for graphing operations. The maximum record number is &hffffffff (a 32‐bit number), then the record number sequence restarts at zero. The CR800 reports back to the datalogger support software 31 bits, or a maximum of - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 324
Functions Sending programs to the CR800 Accessed Through Program Send1, File Control Send2, DevConfig3, keyboard with Campbell Scientific mass-storage media (USB: drive)4, power-up with Campbell Scientific mass-storage media (USB: drive)5, web API HTTPPut (Sending a File to a Datalogger) 324 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 325
(p. 318) 5Automatic with Campbell Scientific mass-storage media (USB: drive) and Powerup.ini. See Power-up (p. 327) 6CRBasic instructions (commands). See Data-Table Declarations (p. 453) and File Management (p. 493) and CRBasic Editor Help. 7Datalogger support software Retrieve (p. 431) command - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 326
CR800 with Campbell Scientific mass-storage media (USB: drive) and Powerup.ini. See Power-up (p. 327). 8.3.4.2 Data Preservation Associated with file attributes is the option to preserve data in CR800 memory when a program is sent. This option applies to data table SRAM, and support software cache - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 327
to a specified drive with no run attributes or to format a memory drive. Powerup.ini options also allow final data storage management on CF cards comparable to the datalogger support software (p. 76) File Control feature. The CRD: drive has precedence over the USB: drive. Including a powerup.ini - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 328
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. along with the operating system or user program file, using the datalogger support software File Control Send (p. 431) command. Note Some text editors - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 329
no run attributes. Use to copy Include (p. 433) or program support files to the CPU: drive before copying the program file to run. 9 Load OS (File = .obj) 13 Run always, erase data 14 Run now, erase files 1By using PreserveVariables() instruction in the CRBasic program, with commands 1 and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 330
,pwrup_1.cr1,cpu: Powerup.ini Example 'Run a program file now, erase data now. 14,run.cr1,cpu: 8.3.4.4 File Management Q & A Q: How do I hide a program file on the CR800 without using the CRBasic FileManage() instruction? A: Use the CoraScript File-Control command, or the Web API FileControl command - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 331
System Error Codes (p. 331) lists error codes associated with the datalogger file system. Errors can occur when attempting to access files on any file ptr (pointer) or device not initialized 18 Device does not support this operation 19 Bad function argument supplied 20 Seek out-of-file bounds - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 332
failure error 43 Pathname exceeds _MAX_PATHNAME 8.4 Telecommunications and Data Retrieval Telecommunications, in the context of CR800 operation, a Campbell Scientific applications engineer for assistance in configuring any telecommunications system. Synopses of software to support the various - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 333
The CR800 communicates with datalogger support software (p. 76) and other Campbell Scientific dataloggers (p. 541) using the PakBus (p. 438) protocol (PakBus Overview (p. 334) ). Modbus, DNP3, and Web API are also supported (see Alternate Telecommunications and Data Retrieval (p. 347) ). CAN bus - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 334
datalogger support manuals for various telecommunications hardware may discuss Callback options. Contact a Campbell Scientific sequence to stop incoming data while SDC occurs. Non Guide, available at www.campbellsci.com. The CR800 communicates with computers or other Campbell Scientific dataloggers - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 335
DevConfig (Device Configuration Utility) is the primary settings editor for Campbell Scientific equipment. It requires a hardwire RS-232 connection to a is typically a central router. o Routers can be router-capable dataloggers or communications devices. The CR800 is a leaf node by factory default - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 336
Network Device Description PakBus Leaf Node PakBus Router PakBus Aware Transparent CR200X Datalogger • CR800 Datalogger • • CR1000 Datalogger • • CR3000 Datalogger • • CR5000 Datalogger • • LoggerNet Software • NL100 Serial port network link • • Peripheral port NL115 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 337
• COM220 Telephone modem • COM310 Telephone modem • SRM-5A Short-haul modem • 1This network link is not compatible with CR800 datalogger. 8.5.3 Linking PakBus Nodes: Neighbor Discovery New terms (see Nodes: Leaf Nodes and Routers (p. 335) ): • node • link • neighbor • neighbor-filters - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 338
node at the random interval. Users should base the Verify Interval setting on the timing of normal communications such as scheduled LoggerNet-data collections or datalogger- todatalogger communications. The idea is to not allow the CVI to expire before normal communications. If the CVI expires, the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 339
troubleshooting PakBus® networks. 8.5.4.1 Link Integrity With beaconing or neighbor-filter discovery, links are established and verified using relatively small data the file-receive transaction to get table definitions from the datalogger. Because LoggerNet must specify a size for the next fragment - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 340
as possible with higher traffic (large numbers of nodes and / or frequent data collection). Long beacon intervals minimize collisions with other packets and resulting retries. adding the root port (COM, IP, etc), add a PakBusPort and the dataloggers. Figure 104: Flat Map Figure 105: Tree Map 340 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 341
all CR800s. All LoggerNet functions, such as send programs, monitor measurements and collect data, are available to each CR800. CR800s can also be programmed to exchange data with each other (the data exchange feature is not demonstrated in this example). 8.5.6.1 LAN Wiring Use three-conductor - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 342
Utility (DevConfig). Click on Device Type: CR800. Follow on-screen instructions to power CR800s and connect them to the PC. Close other programs settings using DevConfig as outlined in table PakBus-LAN Example Datalogger-Communications Settings (p. 344). Leave unspecified settings at default - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 343
Section 8. Operation Figure 108: DevConfig Deployment | ComPorts Settings tab Figure 109: DevConfig Deployment | Advanced tab 343 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 344
Settings Setting→ Sub-Setting→ PakBus Adr COM1 Baud Rate Neighbors1 COM2 Baud Rate Neighbors1 Datalogger ↓ Begin: End: Begin: End: CR800_1 1 115.2K Fixed 2 2 115.2K Fixed 3 4 CR800_2 2 115.2K Fixed 1 1 Disabled CR800_3 3 115.2K Fixed 1 1 115.2K Fixed 4 4 CR800_4 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 345
Section 8. Operation Figure 111: LoggerNet Network-Map Setup: PakBusPort As shown in figure LoggerNet Device Map Setup: PakBusPort (p. 345), set the PakBusPort maximum baud rate to 115200. Leave other settings at the defaults. Figure 112: LoggerNet Device Map Setup: Dataloggers 345 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 346
encrypted commands and data. Header level information needed for routing is not encrypted. Encryption uses the AES-128 algorithm. Campbell Scientific products supporting PakBus encryption include the following: • LoggerNet 4.2 • CR1000 datalogger (OS26 and newer) • CR3000 datalogger (OS26 and newer - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 347
Telecommunications The CR800 communicates with datalogger support software (p. 76) and other Campbell Scientific dataloggers (p. 541) using the PakBus implementation. A standard CR800 program with DNP instructions will take arrays of real time or processed data and map them to DNP arrays in integer - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 348
Groups Data Type Group Description Boolean 1 Binary input 2 Binary input change 10 Binary output 12 Control block Long 30 Analog input 32 Analog change event 40 Analog output status 41 Analog output block 50 Time and date 51 Time and date CTO 8.6.1.2.2 CRBasic Instructions - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 349
the master using DNPVariable(). Dual instructions cover static (current values) and event (previous ten records) data. o For analog measurements: Program BeginProg 'DNP communication over the RS-232 port at 115.2kbps. Datalogger 'DNP address is 1 DNP(COMRS-232,115200,1) 'DNPVariable(Source, Swath, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 350
WindDir=0 IArray(2) = WindDir * 100 'Default Datalogger Battery Voltage measurement Batt_Volt: Battery(Batt_Volt) IArray(3) instruments (sensors), and the communications-network hardware. The communications port, baud rate, data bits, stop bits, and parity are set in the Modbus driver of the master - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 351
terminology equivalents to aid in understanding how CR800s fit into a SCADA system. Table 84. Modbus to Campbell Scientific Equivalents Modbus Domain Data Form Campbell Scientific Domain Coils Single Bit Ports, Flags, Boolean Variables Digital Registers 16-bit Word Floating Point Variables - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 352
to two Modbus domain input / holding registers. 8.6.2.3.2 CRBasic Instructions - Modbus Complete descriptions and options of commands are available in () Sets up a CR800 as a Modbus master to send or retrieve data from a Modbus slave. Syntax ModbusMaster(ResultCode, ComPort, BaudRate, ModbusAddr, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 353
Supported Function Codes (Function) Modbus protocol has many function codes. CR800 commands support the following. Table 86. Supported in the CR800, use the MoveBytes() instruction as shown in the sample code below -byte ordered word (ABCD). 8.6.2.4 Troubleshooting Test Modbus functions on the CR800 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 354
with the CR800. Contact Campbell Scientific for details. 8.6.2.6 Modbus tidBytes Q: Can Modbus be used over an RS‐232 link, 7 data bits, even parity, . CRBasic Example 66. Concatenating Modbus Long Variables 'Requires CR800 OS v.3, CR1000 OS v.12, or CR3000 OS v.5 or higher 'CR800 uses Big-endien - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 355
SCAN instructions). ModbusMaster EndProg 8.6.3 Web Service API The CR800 The API facilitates the following functions: • Data Management o Collect data • Control o Set variables / flags commands are also used with Campbell Scientific's RTMC web server datalogger support software (p. 76). The - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 356
Utility (DevConfig) (p. 92) software Net Services tab, Edit .csipasswd File button. When in Datalogger .csipasswd File Editor dialog box, pressing set to read-only, but the CRBasic parameter SetValue in the WebPageBegin() instruction will function. However, if .csipasswd sets a user name other than - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 357
beginning record number (when using since-record argument). • • interval in seconds (when using backfill argument). • Argument(s) source: dl (datalogger is data source): default, applies to all commands listed in column 2. tablename.fieldname: applies only to BrowseSymbols, and DataQuery html - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 358
format=html&mode=date-range&p1=2010-07-27T12:00:00&p2=2010-0727T14:00:00 8.6.3.4 Data Management 8.6.3.4.1 BrowseSymbols Command BrowseSymbols allows a web client to poll the host CR800 for its data memory structure. Memory structure is made up of table name(s), field name(s), and array sub-scripts - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 359
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. The response consists of a set of child symbol descriptions. Each of these descriptions include the following fields - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 360
Section 8. Operation is_read_only can_expand Boolean value that is set to true if the symbol is considered to be read-only. A value of false would indicate an expectation that the symbol value can be changed using the SetValueEx command. Boolean value that is set to true if the symbol has child - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 361
Section 8. Operation BallastLinedl:BallastLine6truefalsetrue Publicdl:Public6truefals etrue XML Response When xml is entered in the BrowseSymbols format - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 362
","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 CR800 for data. DataQuery typically takes the form: http://ip_address/?command=DataQuery&uri=dl:tablename.fieldname& format=_&mode=_&p1=_&p2=_ DataQuery - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 363
the format of the output. If this parameter is omitted, or if the value is html, empty, or invalid, the output is HTML. format Option Data Output Format Content-Type Field of HTTP Response Header html HTML text/html xml CSIXML text/xml json CSIJSON application/json toa5 TOA5 text/csv - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 364
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 format parameter, the response will be HTML. Following are - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 365
18583 CR1000.Std.25 CPU:IndianaHarbor_081712.CR1 33322 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 366
CR1000.Std.25", ......"prog_name": "CPU:IndianaHarbor_081712.CR1 fields name": "Induced_Water", ......"type": "xsd:float", ......"process": "Smp", ......"settable": false}] }, ......"data as Campbell Scientific TOA5. Following is an example response: "TOA5","TXSoil","CR1000","No_SN","CR1000.Std.25 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 367
tob1 is entered in the DataQuery format 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 368
Section 8. Operation "SECONDS","NANOSECONDS","RN Min","Smp" "ULONG","ULONG","ULONG","FP2","FP2" 376 }Ÿp' E1HŒŸp' E1H›Ÿp' E1HªŸp' E1H¹Ÿp' E1H 8.6.3.5 Control CRBasic program language logic can be configured to allow remote access to many control functions by means of changing the value of a - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 369
- Success 5 - Read only 6 - Invalid table name 7 - Invalid fieldname 8 - Invalid fieldname subscript 9 - Invalid field data type 10 - Datalogger communication failed 12 - Blocked by datalogger security 15 - Invalid web client authorization description A text description of the outcome code. HTML - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 370
.csipasswd access level of 1 (all access allowed). Table 93. ClockSet API Command Parameters If this parameter is excluded, or if it is set to "datalogger" uri (uri=dl) or an empty string (uri=), the command is sent to the CR800 web server.1 format Specifies the format of the response. The - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 371
determines the format of the response. If a format is not specified, the format defaults to HTML. For more detail concerning data response formats, see the Data File Formats section. Responses contain three fields as described in the following table: Table 94. ClockSet API Command Response outcome - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 372
API Command Parameters If this parameter is excluded, or if it is set to "datalogger" uri (uri=dl) or an empty string (uri=), the host CR800 real-time format defaults to HTML. For more detail concerning data response formats, see the Data File Formats section. Responses contain three fields as - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 373
Section 8. Operation time Specifies the current value of the CR800 real-time clock2. This value will only be valid if the value of outcome is set to 1. This value will be formatted in the same way that record time stamps are formatted for the DataQuery response. description A text string that - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 374
management. 8.6.3.7.1 Sending a File to a Datalogger A file can be sent to the Instructs Curl.exe to use the HTTPPut command Instructs Curl.exe to print all output to the screen Instructs curl -XPUT -v -S -T "c:\campbellsci\lib\OperatingSystems\CR1000.Std.25.obj" --user harrisonford:lostark1 http:// - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 375
- Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 376
run on power up. 20 - Copy the file specified by file2 to the name specified by file, stop the currently running program, delete its associated data tables, and run the program specified by file2 without affecting the program that will run on power up. file Specifies the first parameter for the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 377
the commands will cause the CR800 to perform a reset. In the case of sending an operating system, it can take tens of seconds for the datalogger to copy the image from memory into flash and to perform the checking required for loading a new operating system. While this reset is under way - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 378
Section 8. Operation Examples: http://192.168.24.106/?command=ListFiles Response: returns the drive structure of the host CR800 (CPU:, USR:, CRD:, and USB:). http://192.168.24.106/CPU/?command=ListFiles Response: lists the files on the host CR800 CPU: drive. ListFiles Response The format of the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 379
Section 8. Operation HTML page source: ListFiles Response ListFiles Response < - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 380
Section 8. Operation 380 Page source template: ListFiles Response ListFiles Response Path Is Directory Size Last Write - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 381
Section 8. Operation JSON Response When json is entered in the ListFiles format parameter, the response will - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 382
are available from Campbell Scientific to facilitate CR800 programming, maintenance, data retrieval, and data presentation. Starter software (table Starter Software ) are those products designed for novice integrators. Datalogger support software products (table Datalogger Support Software (p. 382 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 383
Section 8. Operation Table 103. Special Keyboard-Display Key Functions Key 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 [Esc] Back up one level in the menu [Home] Move - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 384
Section 8. Operation Figure 113: Using the keyboard / display 384 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 385
8.8.1 Data Display Section 8. Operation Figure 114: Displaying data with the keyboard / display 385 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 386
Section 8. Operation 8.8.1.1 Real-Time Tables and Graphs Figure 115: Real-time tables and graphs 8.8.1.2 Real-Time Custom The external keyboard / display can be configured with a user-defined, real-time display. The CR800 will keep the setup if the same program is running, or until it is changed by - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 387
Section 8. Operation Figure 116: Real-time custom 387 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 388
Section 8. Operation 8.8.1.3 Final-Storage Tables Figure 117: Final-storage tables 388 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 389
8.8.2 Run/Stop Program Section 8. Operation Figure 118: Run/Stop Program 389 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 390
Section 8. Operation 8.8.3 File Display Figure 119: File display 390 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 391
Section 8. Operation 8.8.3.1 File: Edit The CRBasic Editor is recommended for writing and editing datalogger programs. When making minor changes in the field with the external keyboard / display, restart the program to activate the changes. Figure 120: File: edit 391 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 392
Section 8. Operation 8.8.4 Ports and Status Read More! See the appendix Status Table and Settings (p. 505). 8.8.5 Settings Figure 121: Ports and status Figure 122: Settings 392 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 393
algorithms used to create it are open source and free to use for any purpose. Files with the .gz extension have been passed through these data compression algorithms to make them smaller. For more information, go to www.gnu.org. Q: Is there a difference between Gzip and zip? A: While similar, Gzip - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 394
when sending a file to a datalogger. Compression can reduce transfer times data plans. Q: Does my CR800 support Gzip? A: Version 25 of the standard CR800 operating system supports utility compatible with Windows®. Download and installation instructions are available at http://www.7-zip.org - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 395
in the datalogger support software (p. 76). Compressed programs can also be sent using HTTP PUT to the CR800 web server. The CR800 will not automatically decompress and use compressed files sent via File Control, FTP, or a low-level OS download; however, these files can be manually decompressed by - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 396
Section 8. Operation 396 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 397
is repaired at Campbell Scientific. The module should not be opened by the user except to replace the lithium coin cell providing back up power to the clock and SRAM. Repeated disassembly of the CR800 will degrade the seal, leading to potential moisture problems and data are - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 398
o Time. Clock will need resetting when the battery is replaced. o Final-storage data tables. A replacement lithium battery (pn 13519) can be purchased from Campbell Scientific or another supplier. Table Internal Lithium-Battery Specifications (p. 398) lists battery specifications. Table - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 399
Section 9. Maintenance Figure 125: Pulling edge away from panel Pull one edge of the canister away from the wiring panel to loosen it from three connector seatings. Figure 126: Removing nuts to disassemble canister Remove six nuts, then open the clam shell. 399 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 400
Occasionally, a CR800 requires repair. Consult with a Campbell Scientific applications engineer before sending any product for repair. Be prepared to perform some troubleshooting procedures while on the phone with the applications engineer. Many problems can be resolved with a telephone conversation - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 401
within three days of product receipt or is incomplete, the product will be returned to the customer at the customer's expense. Campbell Scientific reserves the right to refuse service on products that were exposed to contaminants that may cause health or safety concerns for our employees. 401 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 402
Section 9. Maintenance 402 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 403
many potential problems is the Status table. The appendix Status Table and Settings (p. 506) documents the Status registers and gives some suggestion on how to use them as troubleshooting tools. 10.2 Operating Systems One action that spans troubleshooting of many Campbell Scientific products is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 404
of this error to a Campbell Scientific applications engineer, especially if the problem is reproducible. Any program datalogger failed to compile, and the datalogger reverted to running DEFAULT.cr8. Warning: Cannot open include file CPU: Filename.cr8 The filename in the Include instruction - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 405
the logger will initiate a new self-calibration. If the error does not occur on power-up, the problem is called. No data will be stored in [tablename] because there is no CallTable() instruction in the store data are not skipped. If any scan skips repeatedly, optimization of the datalogger program - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 406
Section 10. Troubleshooting incremented by all events that leave gaps in data, including cycling power to problems, or an operating-system or hardware problem. If power or transient problems are ruled out, the CR800 probably needs an operating-system update or repair (p. 3) by Campbell Scientific - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 407
Troubleshooting rare. Please consult with a Campbell Scientific applications engineer at any occurrence. compile results). • The program has large memory requirements for data tables or variables and the CR800 does not have adequate memory instruction in the program. Analyzing InstructionTimes() 407 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 408
Section 10. Troubleshooting results can be difficult due to the multitasking nature of the logger, but it can be a useful tool for fine tuning a program. 10.3.4 NAN and ±INF NAN (not-a-number) and ±INF (infinite) are data words indicating an exceptional occurrence in datalogger function or - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 409
Section 10. Troubleshooting 10.3.4.3 Data Types, NAN, and ±INF NAN and ±INF are presented differently depending on the declared-variable data type. Further, they are recorded differently depending on the final-storage data type chosen compounded with the declared-variable data type used as the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 410
Section 10. Troubleshooting 0 / 0 NAN 1 except Average() outputs NAN 2 except Average() outputs 0 NAN -NAN measurements will be included in the output process. CRBasic example Using NAN to Filter Data (p. 410) demonstrates the use of conditional statements to set DisableVar to TRUE as needed to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 411
Troubleshooting 10.4 Communications 10.4.1 RS-232 Baud rate mis-match between the CR800 and datalogger support software is often the root of communication problems programs for the SerialOpen() instruction; SerialOpen() specifies a baud rate. . All Campbell Scientific datalogger support software include - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 412
Section 10. Troubleshooting CommsMemFree(1) is encoded using the following expression: CommsMemFree(1) = tiny + lil*100 + mid*10000 + med*1000000 + lrg*100000000 where, tiny = number of 16‐byte packets available - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 413
Section 10. Troubleshooting Table 110. CommsMemFree(1) Defaults and Use Example, TLS Active Example Buffer Category down for no apparent reason (a very rare occurrence), please contact a Campbell Scientific applications engineer since the CR800 operating system may need adjustment. 10.4.3.3 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 414
Troubleshooting queue stays high (all are rare occurrences), please contact a Campbell Scientific application engineer as the operating system may need adjustment. packets rcvdq = number of input packets currently waiting to be serviced sendq = number of output packets waiting to be sent The - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 415
Section 10. Troubleshooting 10.5.2 Troubleshooting Power at a Glance Symptoms: Possible symptoms include the CR800 program not executing; Low12VCount of the Status indicated after following the procedure, see Warranty and Assistance (p. 3) for information on sending items to Campbell Scientific. 415 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 416
Section 10. Troubleshooting Battery Test If using a rechargeable power supply, disconnect the adequate for CR800 operation. However, if the CR800 is to function for a long period, Campbell Scientific recommends replacing, or, if using a sealed, rechargeable battery, recharging the battery so the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 417
Section 10. Troubleshooting Charging Regulator with Solar-Panel Test Disconnect any wires Voltage (p. 419) to calibrate the charging regulator, or return the charging regulator to Campbell Scientific for calibration. With the charging regulator still under load, measure the voltage between the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 418
Section 10. Troubleshooting 10.5.3.3 Charging Regulator with Transformer Test The procedure outlined in this flow chart tests PS100 and CH100 need for repair is indicated after following the procedure, see Warranty and Assistance (p. 3) for information on sending items to Campbell Scientific. 418 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 419
Section 10. Troubleshooting Charging Regulator with ac or dc Transformer Test Disconnect any wires (p. 419) to calibrate the charging regulator, or return the charging regulator to Campbell Scientific for calibration. Obtain Repair Authorization The charging regulator is damaged and should be - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 420
Section 10. Troubleshooting Adjusting Charging Circuit 1) Place a 5-kΩ resistor between a 12V terminal and a G (ground) ground terminal on the charging regulator. Use a voltmeter to measure the voltage across the 5-kΩ resistor. 2) - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 421
to aid Campbell Scientific engineers in operating system development. It has some features that advanced users may find useful for troubleshooting. Terminal in: 1. Campbell Scientific datalogger support software Terminal Emulator (p. 445) window 2. DevConfig (Campbell Scientific Device Configuration - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 422
Section 10. Troubleshooting As shown in figure DevConfig Terminal Emulator (p. 424), after Campbell Scientific engineering tool Lists memory-test results Lists files in CR800 memory. Lists technical data concerning data-table sizes. Issue commands from keyboard that are passed through the logger - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 423
"filled" flag in the CR800 for that data table and so allow datalogger support software (p. 382, p. 429) to collect the whole table. If the table was not full, data pulled from unfilled section will be garbage. Campbell Scientific engineering tool Enables monitoring of CR800 communications traffic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 424
Section 10. Troubleshooting Figure 129: DevConfig terminal emulator tab 10.6.1 Serial Talk Through and Sniffer In the P: Serial Talk Through and W: Serial Comms Sniffer modes, the timeout can - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 425
for electric current. Used to quantify the capacity of a power source or the requirements of a power‐consuming device. analog Data presented as continuously variable electrical signals. argument See parameter (p. 438). ASCII / ANSI Abbreviation for American Standard Code for Information Interchange - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 426
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 427
of the CRBasic field calibration instructions FieldCal() and FieldCalStrain(). It is found in LoggerNet (4.0 or higher) or RTDAQ. Callback A name given to the process by which the CR800 initiates telecommunication with a PC running appropriate CSI datalogger support software. Also known as "Initiate - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 428
manual, available at www.campbellsci.com, for more information. CPU Central processing unit. The brains of the CR800. CR1000KD An optional hand‐held keyboard display for use with the CR1000 and CR800 dataloggers. See the appendix Keyboard Display (p. 545). CR10X Older generation Campbell Scientific - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 429
the neighbor is removed from the neighbor list. datalogger support software Campbell Scientific software that includes at least the following functions: o Datalogger telecommunications o Downloading programs o Clock setting o Retrieval of measurement data Includes PC200W, PC400, RTDAQ, and LoggerNet - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 430
to the difference in voltage between the two leads. digital Numerically presented data. Dim A CRBasic command for declaring and dimensioning variables. Variables declared with Dim remain hidden during datalogger operations. dimension To code for a variable array. DIM example(3) creates the three - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 431
time Time required to execute an instruction or group of instructions. If the execution time of a is a feature of LoggerNet, PC400 and RTDAQ (p. 76) datalogger support software. It provides a view of the CR800 file system and If collecting a data file from a CF card with Retrieve, first stop the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 432
432 Format formats the selected CR800 memory device. All files, including data, on the device will be erased. LNCMD software A feature of LoggerNet Setup Screen. In the Setup Screen network map (Entire Network), click on a CR800 datalogger node. The File Retieval tab should be one of several tabs - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 433
declared in the Sub() and Function() instructions. ground Being or related to an a clock line, the CLK/HS (pin 7) line in the datalogger CS I/O port is primarily used to detect the presence or absence of IEEE4 Four‐byte, floating‐point data type. IEEE Standard 754. Same format as Float - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 434
A name given to a processes by which the CR800 initiates telecommunications with a PC running appropriate Campbell Scientific datalogger support software. Also known as "Callback." input/output instructions Used to initiate measurements and store the results in input storage or to set or read - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 435
has an integrated keyboard display. The CR1000KD keyboard display is compatible with the CR800 and CR850 dataloggers. lf Line feed local variable A an "end" instruction which exits the program from the loop. loop counter Increments by one with each pass through a loop. manually initiated Initiated by - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 436
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 437
the description of a datalogger network when using LoggerNet be both a parent and a child. NSEC Eight‐byte data type divided up as four bytes of seconds since 1990 offset a term, often a parameter in a CRBasic measurement instruction, to designate the y‐intercept, shifting factor, or zeroing factor - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 438
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 439
for use with, and requiring, the CR800 (or another Campbell Scientific datalogger) to operate. Ping A software utility that attempts to appendix Accuracy, Precision, and Resolution (p. 449). PreserveVariables PreserveVariables instruction protects Public variables from being erased when a program is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 440
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 441
data tables allowing the oldest data to be overwritten. This is the default setting for data Campbell Scientific dataloggers to PC communications is quite rigid, but transparent to most users. Implementation of RS‐232 in Campbell Scientific datalogger by a single instruction with multiple repetitions - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 442
(p. 445). SDI‐12 Serial Data Interface at 1200 bps. Communication protocol for transferring data between data recorders and sensors. SDM Synchronous device execution of the main scan. Send The Send button in datalogger support software (p. 76). The Send command sends a CRBasic program, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 443
in memory. It is derived using an algorithm which assures a 99.998% probability that if either the data or the data sequence changes, the signature changes. single‐ended Denotes a sensor or measurement terminal wherein the analog voltage signal is carried on a single lead, which is measured - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 444
Section 11. Glossary state Whether a device is on or off. Station Status command A command available in most datalogger support software available from Campbell Scientific. The following figure is a sample of the Station Status output. 444 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 445
Datalogger Support Software (p. 76). A complete listing of datalogger support software available from Campbell Scientific can be found in the appendix Software (p. 546). Software manuals can be found at www.campbellsci.com. synchronous The transmission of data by the instruction will be based - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 446
‐line shell that facilitates the issuance of low‐level commands to a datalogger or some other compatible device. A terminal emulator is available in most datalogger support software available from Campbell Scientific. thermistor A thermistor is a resistive element whose change in resistance with - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 447
supply. A UPS can be constructed for most datalogger applications using ac line power, an ac/ac 60 Hz. High‐level Vac is used as a primary power source for Campbell Scientific power supplies. Do not connect high‐level Vac directly to the CR800. The troubleshooting data acquisition system faults. 447 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 448
the processor state, software timers, and program‐related counters when the datalogger is running its program. If the processor has bombed or is neglecting or software problem may exist. When large numbers of watchdog‐timer resets occur, consult with a Campbell Scientific applications engineer - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 449
of the repeatability of a 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 450
Section 11. Glossary 450 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 451
SetSecurity Sets numeric password for datalogger security levels 1, 2, and 3. Executes at compile time. Syntax SetSecurity(security[1], security[2], security[3]) StationName Sets the station name internal to the CR800. Does not affect data files produced by support software. See sections CRBasic - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 452
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 453
DataTable / EndTable Mark the beginning and end of a data table. Syntax DataTable(Name, TrigVar, Size) [data table modifiers] [on-line storage destinations] [output processing instructions] EndTable DataTime Declaration within a data table that allows time stamping with system time. Syntax DataTime - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 454
from CR800 internal memory and file system to resident Campbell Scientific mass‐storage media (USB: drive). TableFile() with Option 64 is often a preferred alternative to this instruction. Syntax CardFlush DSP4 Send data to the DSP4 display. Syntax DSP4(FlagVar, Rate) TableFile Writes a file from - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 455
Appendix A. CRBasic Programming Instructions A.2.3 Final Data Storage (Output) Processing Read More! See Data Output Processing Instructions (p. 130). FieldNames Immediately follows an output processing instruction to change default field names. Syntax FieldNames("Fieldname1 : Description1, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 456
A. CRBasic Programming Instructions PeakValley Detects maxima and minima in a signal. Syntax PeakValley(DestPV, DestChange, Reps, Source, Hysteresis) Sample Stores the current value at the time of output. Syntax Sample(Reps, Source, DataType) SampleFieldCal Writes field calibration data to a table - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 457
Program Control Instructions A.4.1 Common Program Controls BeginProg / EndProg Marks the beginning and end of a program. Syntax BeginProg [program code] EndProg Call Transfers program control from the main program to a subroutine. Syntax Call subname (list of variables) CallTable Calls a data table - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 458
or after a SlowSequence and accompanying declaration sequences. Syntax EndSequence Exit Exits program. Syntax Exit For / Next Repeats a group of instructions for a specified number of times. Syntax For counter = start To end [ Step increment ] [statement block] [ExitFor] [statement block] Next - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 459
Appendix A. CRBasic Programming Instructions Scan / ExitScan / ContinueScan / NextScan Establishes the program scan rate. ExitScan and ContinueScan are optional. See Faster Measurement Rates (p. 232) for information on use of Scan() / - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 460
Appendix A. CRBasic Programming Instructions WaitDigTrig Triggers a measurement scan from an external digital [list of constants] Read [VarExpr] Restore Read Reads constants from the list defined by Data or DataLong into a variable array. Syntax Read [VarExpr] Restore Resets the location of the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 461
Instructions . Syntax ShutDownEnd A.5 Measurement Instructions Read More! For information on recording data from RS-232 and TTL Returns the execution time of each instruction in the program. Syntax InstructionTimes Syntax MemoryTest(Dest) PanelTemp This instruction measures the panel temperature in - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 462
Appendix A. CRBasic Programming Instructions A.5.2 Voltage VoltDiff Measures the voltage difference between H and L inputs of a differential channel Syntax VoltDiff(Dest, Reps, Range, DiffChan, RevDiff, SettlingTime, Integ, Mult, Offset) VoltSe Measures - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 463
or frequency of voltages pulses on a pulse channel. Syntax PulseCount(Dest, Reps, PChan, PConfig, POption, Mult, Offset) VibratingWire The VibratingWire instruction is used to measure a vibrating wire sensor with a swept frequency (from low to high). Syntax VibratingWire(Dest, Reps, Range, SEChan - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 464
Appendix A. CRBasic Programming Instructions A.5.7 Digital I/O CheckPort Returns the status of a control port. Syntax X = CheckPort(Port) PortGet Reads the status of a control port. Syntax PortGet(Dest, Port) PortsConfig Configures control - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 465
Instructions A.5.8 SDI-12 Read More! See SDI-12 Sensor Support (p. 173). SDI12Recorder Retrieves the results from an SDI‐12 sensor. Syntax SDI12Recorder(Dest, SDIPort, SDIAddress, SDICommand, Multiplier, Offset) SDI12SensorSetup Sets up the datalogger a Campbell Scientific applications engineer - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 466
to keep the CR800 clock correct or provide other information from the GPS such as location and speed. Proper operation of this instruction may require a factory upgrade of on‐board memory. Syntax GPS(GPS_Array, ComPort, TimeOffsetSec, MaxErrorMsec, NMEA_Sentences) Note To change from the GPS default - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 467
Appendix A. CRBasic Programming Instructions Therm107 Measures a Campbell Scientific 107 thermistor. Syntax Therm107(Dest, Reps, SEChan, Vx/ExChan, SettlingTime, Integ, Mult, Offset) Therm108 Measures a Campbell Scientific 108 thermistor. Syntax Therm108(Dest, Reps, SEChan, Vx/ExChan, SettlingTime, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 468
Appendix A. CRBasic Programming Instructions A.5.10 Peripheral Device Support Multiple SDM instructions can be used within a program. AM25T Controls the (CPIAddress, DestFreq, DestDiag) CDM_VW300Rainflow Obtains rainflow histogram data from the CDM_VW300. Syntax CDM_VW300Rainflow(CPIAddress, RF1, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 469
Appendix A. CRBasic Programming Instructions SDMAO4 Sets output voltage levels in an SDM‐AO4 analog output device. Syntax SDMAO4(Source, Reps, SDMAdress) SDMAO4A Sets output voltage levels in an SDM‐ - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 470
Appendix A. CRBasic Programming Instructions SDMSIO4 Controls and transmits / receives data from an SDM‐SIO4 Interface. Syntax SDMSIO4(Dest, Reps, SDMAddress, Mode, Command, Param1, Param2, ValuesPerRep, Multiplier, Offset) SDMSpeed Changes the rate the CR800 uses to clock SDM data. Syntax SDMSpeed( - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 471
Appendix A. CRBasic Programming Instructions A.6.2 Arithmetic Operators Table 112. Arithmetic Operators Symbol Name Notes Result is always promoted to a float (p. 142) to avoid problems that may occur when raising an integer to a negative power. However, loss of precision occurs if result is > - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 472
Appendix A. CRBasic Programming Instructions • bits 5-4: value_2 • bits 3-0: value_3 Code to extract these values is shown in CRBasic example Using Bit-Shift Operators (p. 473). With unsigned integers, shifting left is - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 473
Appendix A. CRBasic Programming Instructions CRBasic Example 69. Using Bit‐Shift Operators Dim input_val As Long Dim value_1 As Long Dim value_2 As Long Dim value_3 As Long 'read input_val - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 474
Appendix A. CRBasic Programming Instructions A.6.6 Trigonometric Functions A.6.6.1 Derived Functions Table Derived Trigonometric Functions (p. 474) is a list of trigonometric functions that can be derived from functions intrinsic to CRBasic. Table 114. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 475
Appendix A. CRBasic Programming Instructions COS Returns the cosine of an angle specified in radians. Syntax x . Syntax x = ABS(source) ABSLong Returns the absolute value of a number. Returns a value of data type Long when the expression is type Long. Syntax x = ABS(source) Ceiling Rounds a value to - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 476
Appendix A. CRBasic Programming Instructions Floor Rounds a value to a lower integer. Syntax variable = Floor(Number) FRAC Returns the fractional part of a number. Syntax x = FRAC(source) INT or FIX Return the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 477
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 Calculates temperature from the resistance of - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 478
Appendix A. CRBasic Programming Instructions VaporPressure Calculates vapor pressure from temperature and relative 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 479
Appendix A. CRBasic Programming Instructions A.6.10 Other Functions AddPrecise Used in conjunction with MovePrecise, allows a random number. Syntax RND(source) A.6.10.1 Histograms Histogram Processes input data as either a standard histogram (frequency distribution) or a weighted‐value histogram. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 480
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 481
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 482
Appendix A. CRBasic Programming Instructions HexToDec Converts a hexadecimal string to a float or integer. Syntax Variable = HexToDec(Expression) InStr Finds the location of a string within a string. Syntax Variable = InStr(Start, SearchString, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 483
CRBasic Programming Instructions StrComp Compares FilterString, NumSplit, SplitOption) SPrintF Converts data to formatted strings. Returns length of datalogger clock value to a remote datalogger in the PakBus network. Syntax ClockReport(ComPort, RouterAddr, PakBusAddr) ClockSet Sets the datalogger - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 484
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 485
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 486
in sections Using the Keyboard Display (p. 382) and Read More! To implement custom menus, see CRBasic Editor Help for the DisplayMenu() instruction. CRBasic programming in the CR800 facilitates creation of custom menus for the external keyboard / display. Figure Custom Menu Example (p. 70) shows - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 487
Appendix A. CRBasic Programming Instructions MenuPick Creates a list of selectable options that can be used when editing a MenuItem value. Syntax: MenuPick(Item1, Item2, Item3...) DisplayValue Defines the name and associated data‐table value or variable for an item in a custom menu. Syntax: - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 488
® 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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 489
datalogger support software (p. 76) ). Because these communication instructions wait for a response or timeout before the program moves on to the next instruction cause the instruction not to wait for a response or timeout. This will make the instruction execute faster; however, any data that it - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 490
Instructions ClockReport Sends the datalogger clock value to a remote datalogger in the PakBus network. Syntax ClockReport(ComPort, RouterAddr, PakBusAddr) DataGram Initializes a SerialServer / DataGram / PakBus application in the datalogger from a data table in a remote PakBus datalogger and stores - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 491
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 datalogger, and / or retrieve an array of data from the host datalogger. - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 492
Appendix A. CRBasic Programming Instructions TimeUntilTransmit The TimeUntilTransmit instruction returns the time remaining, in seconds, before communication with the host datalogger. Syntax TimeUntilTransmit Table 115. Asynchronous-Port Baud Rates -nnnn (autobaud1 starting at nnnn) 0 (autobaud - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 493
Appendix A. CRBasic Programming Instructions FindSpa Searches a source array for a value and returns the value Commands to access and manage files stored in CR800 memory. CalFile Stores variable data, such as sensor calibration data, from a program into a non‐ volatile CR800 memory file. CalFile pre - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 494
Appendix A. CRBasic Programming Instructions FileManage Manages program files from within a running datalogger program. Syntax FileManage("Device: created. Syntax Variable = FileTime(FileHandle) FileWrite Writes ASCII or binary data to a file referenced in the program by FileHandle. Syntax FileWrite( - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 495
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 496
TableName.TimeStamp(m,n) WorstCase Saves one or more "worst case" data storage events into separate tables. Used in conjunction with DataEvent(). Syntax WorstCase(TableName, NumCases, MaxMin, Change, RankVar) A.16 Information Services These instructions address use of email, SMS, Web Pages, and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 497
A. CRBasic Programming Instructions EMailRecv Polls an a line of HTML code to be used in a datalogger‐generated HTML file. Syntax WebPageBegin("WebPageName", WebPageCmd) HTTPOut("html HTTP server to store the enclosed file/data under the supplied URI. Syntax HTTPPUT(URI, Contents, Response, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 498
Appendix A. CRBasic Programming Instructions IPNetPower Controls power state of individual Ethernet devices. Syntax IPNetPower( IPInterface, State) IPRoute Sets the interface to be used (Ethernet or PPP) when the datalogger sends an outgoing packet and both interfaces are active. Syntax IPRoute( - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 499
WebPageEnd XMLParse() Reads and parses an XML file in the datalogger. Syntax XMLParse(XMLContent, XMLValue, AttrName, AttrNameSpace, ElemName, ElemNameSpace when a COM port hangs up communication. Syntax ModemHangup(ComPort) [instructions to be run upon hang-up] EndModemHangup Read More! See - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 500
Appendix A. CRBasic Programming Instructions DNP Sets up a CR800 as a DNP slave (outstation/server) device. 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, - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 501
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 502
Initiates a single transmission to an Argos satellite when the instruction is executed. Syntax ArgosTransmit(ResultCode, ST20Buffer) GOESData Sends data to a Campbell Scientific GOES satellite data transmitter. Syntax GOESData(Dest, Table, TableOption, BufferControl, DataFormat) GOESGPS - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 503
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 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 504
Appendix A. CRBasic Programming Instructions 504 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 505
a comprehensive list of Status-table registers with brief descriptions. Status-table information is easily viewed in Station Status in the datalogger support software. However, be aware that information presented in Station Status is not automatically updated. Click the refresh button each time an - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 506
SkippedSlowScan PortStatus PortConfig Measurements ErrorCalib Data SkippedRecord DataFillDays Table 117. Descriptions Fieldname Description Variable Type RecNum Increments for successive status-table data records. TimeStamp Scan time that the record was generated Time OSVersion - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 507
. Not to be confused with the station name set in datalogger support software. See foot note for limitations. String PakBusAddress2 CR800 PakBus Time the program began running. Time Signature of the compiled binary data structure for the current program. Value is independent of comments added - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 508
running the current program instance. Does not include scans intentionally skipped as may occur with the use of ExitScan and Do / Loop instructions. Integer The number of scans skipped in the background Integer array calibration. SkippedSlowScan9 The number of scans skipped in a SlowSequence - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 509
and Descriptions Fieldname Description Variable Type MemoryFree Bytes of unallocated memory on the CPU (SRAM). All free memory may not be available for data tables. As memory is allocated and freed, holes of unallocated memory, which are unusable for final storage, may be created. Integer - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 510
Integer DataTableName Programmed name of data table(s). Each table has its own entry. String array of number of data tables SkippedRecord10 Variable array that static value calculated at compile time. Assumes all measurement instructions will run each scan. Integer Time (μs) required to make - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 511
Fields and Descriptions Fieldname Description Variable Type ProcessTime Processing time (μs) of the last scan. Time is measured from the end of the EndScan instruction (after the measurement event is set) to the beginning of the EndScan (before the wait for the measurement event begins) for the - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 512
. Integer RS232Timeout RS-232 hardwarehandshaking timeout. For RS-232 hardware handshaking, this specifies in tens of ms the timeout that the datalogger will wait between packets if CTS is not asserted. Integer CommActive15 Array of Boolean values telling if communications are currently active - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 513
or COM2 = 0 (Disabled) 0 = Auto 1200 2400 4800 9600 19.2k 38.4k 57.6k False 115.2k 0 or 1 50 >=50 0 Yes, can also use SerialOut instruction to setup. Config Yes Config PB Yes Config PB Yes Config PB 513 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 514
array of 9 0 VerifySDC11 VerifyCOM1 VerifyCOM2 0 - approx. 65,500 Status MaxPacketSize USRDriveSize IPInfo IPAddressEth IPGateway TCPPort Maximum number of bytes per data collection packet. _ Configures the USR: drive. If 0, the drive is removed. If Integer non-zero, the drive is created - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 515
Appendix B. Status Table and Settings Table 117. Status-Table Fields and Descriptions Fieldname Description Variable Type pppInterface Controls which datalogger port PPP service is configured to use. Warning: If this value is set to CS I/O ME, do not attach any other devices to the CS I/O port - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 516
instruction), can be sampled into a data table using data table access syntax. See the Program Access to Data Tables (p. 148) section for more information. 2 PakBus Addresses 1 to 4094 are valid. Addresses >= 4000 are generally reserved for a PC by the datalogger support to the logger starting from - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 517
TRUE. One other event that causes ComME to be active is the GOES instruction. In conclusion, the name "CommsActive" can be misleading. For example, if second timeout during which time CommsActive is set to TRUE and only outputs data, then CommsActive is not set to TRUE. For protocols other than - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 518
Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported is unique in the scope of the datalogger network. Duplication of PakBus® addresses in two the GPS instruction, NetworkTimeProtocol instruction, and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 519
Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported governs the baud rate that the CR800 will use for a given port to support PakBus® or PPP communications. For some ports (COM1 or COM2), this setting also - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 520
Table 118. CR800 Settings Settings are accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry Neighbors Allowed RS232 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 521
Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported by the CR800 executing a TCPOpen() instruction or by having a connection made to the PakBus/TCP logger service. Via Neighbor Address Specifies address of - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 522
Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported the file type. This serial number is used by the datalogger to know which file to delete after the serial number exceeds data will begin overwriting old - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 523
Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported datalogger when it starts are as follows: 1. If the logger of bytes per data collection packet. 1000 which datalogger port PPP service is configured - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 524
Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported . CONNECT PakBus/TCP Service Port This setting specifies the TCP service port for PakBus® communications with the datalogger. Unless firewall issues - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 525
accessed through the Campbell Scientific Device Configuration Utility (DevConfig) via direct-serial and IP connections, or through PakBusGraph via most CR800 supported telecommunications options. Setting Description Default Entry Telnet Enabled Set to 1 if the Telnet service should be enabled - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 526
Appendix B. Status Table and Settings 526 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 527
and can be used as an enable line for printers. Clock/Handshake: Used with the SDE and TXD lines to 7 CLK/HS I/O address and transfer data to SDs. When not used as a clock, pin 7 can be used as a handshake line (during printer output, high enables, low disables). 8 +12 Vdc 9 TXD Transmit - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 528
. The 40-second timeout is generally circumvented when communicating with datalogger support software (p. 76) because it sends information as part of powered-up, so no incoming bytes are lost. When the logger has data to send via RS-232, if the data are not a response to a received packet, such as - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 529
will need to be configured to output a RING (or other characters previous to the DTR being asserted) on the modem's TX line to wake the datalogger and activate the DTR line or enable the modem. 529 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 530
Appendix C. Serial Port Pinouts 530 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 531
Appendix D. ASCII / ANSI Table Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Hex 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d American Standard Code for Information Interchange (ASCII) / American National Standards Institute (ANSI - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 532
Appendix D. ASCII / ANSI Table Dec 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 Hex 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 Keyboard Display Char 0 1 2 3 4 5 6 7 8 9 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 533
Appendix D. ASCII / ANSI Table Dec 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 Hex 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 Keyboard Display Char A B C D E F G H I J K L M - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 534
Appendix D. ASCII / ANSI Table Dec 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 Hex 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f Keyboard Display Char d e f g h i j k l m n o p q r s t u v w - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 535
). Table 122. FP2 Data-Format Bit Descriptions Bit Description A Polarity, 0 = +, 1 = - B, C Decimal locaters as defined in the table FP2 Decimal Locater Bits. D - P 13-bit binary value, D being the MSB (p. 205). Largest 13-bit magnitude is 8191, but Campbell Scientific defines the largest - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 536
Appendix E. FP2 Data Format 536 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 537
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. F.1 Sensors Most electronic sensors - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 538
Scientific Products F.1.2 Wireless Sensor Network Wireless sensors use the Campbell wireless sensor (CWS) spread-spectrum radio technology. The following wireless sensor devices are available. Table 125. Wireless Sensor Modules Model Description CWB100 Series Radio-base module for datalogger - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 539
Appendix F. Other Campbell Scientific Products F.2.2 Pulse / Frequency Input Expansion Modules These modules expand and enhance pulse- and frequency-input capacity. Table 128. Pulse / Frequency Input-Expansion Modules Model Description - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 540
thermocouple measurements. Table 134. Terminal-Strip Covers Datalogger CR800 CR1000 CR3000 Terminal-Strip Cover Part Number No cover available 17324 18359 F.3 Cameras A camera can be an effective data gathering device. Campbell Scientific cameras are rugged-built for reliable performance at - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 541
ports A6REL-12 Six relays driven by six control ports / manual override LR4 Four-channel latching relay SDM-CD8S Eight-channel dc 12-Vdc control circuit F.5 Dataloggers Other Campbell Scientific datalogging devices can be used in networks with the CR800. Data and control signals can pass - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 542
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. Table 140. Battery / Regulator Combinations Model Description PS100 12 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 543
enclosures. 84-Ahr, sealed-rechargeable battery (requires regulator & primary source). Includes mounting bracket for Campbell Scientific enclosures. F.6.3 Battery Bases The CR800 is supplied with a base option. Battery base options include either alkaline batteries or sealed rechargeable batteries - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 544
Appendix F. Other Campbell Scientific Products F.6.5 Primary Power Sources Table 144. Primary Power Sources Model Description 9591 18-Vac, 1.2-A wall-plug charger (accepts 110-Vac mains power, requires regulator) 14014 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 545
Appendix F. Other Campbell Scientific Products F.8 Telecommunications Products Many telecommunications devices are available for use with the CR800 datalogger. F.8.1 Keyboard Display Table 147. Keyboard Displays Keyboard displays are either integrated into the datalogger or communicate through - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 546
and carry it back to the PC (SneakerNet). Campbell Scientific mass-storage devices attach to the CR800 CS I/O port. Table 153. Mass-Storage Devices Model Description SC115 2 GB flash memory drive (thumb drive) F.10 Data Acquisition Support Software F.10.1 Starter Software Short Cut, PC200W - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 547
Appendix F. Other Campbell Scientific Products Table 154. Starter Software Model Description VisualWeather Easy-to use datalogger support software specialized for weather and agricultural applications, PC, Windows® compatible. F.10.2 Datalogger Support Software PC200W, PC400, RTDAQ, and - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 548
and Clients1,2 Software Description LoggerNetAdmin Admin datalogger support software LNLinux Linux based LoggerNet server data, post-processes data files, and generates reports. It includes Split, RTMC, View Pro, and Data Filer. PC-OPC Campbell Scientific OPC Server. Feeds datalogger data - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 549
to configure settings and update operating systems for Campbell Scientific devices. Description Allows software developers to create custom client applications that communicate through a LoggerNet server with any datalogger supported by LoggerNet. Requires LoggerNet. LoggerNet-server SDK. Allows - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 550
Appendix F. Other Campbell Scientific Products 550 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 551
Index 1 12V Terminal 62 12‐Volt Supply 86 5 5 V‐Low 506 50 Hz Rejection 82, 280 5‐V Pin 527 5V Terminal 62 5‐Volt Supply 85 6 60‐Hz Rejection 82, 280 9 9‐Pin Connectors 203, 527 A A/D 270, 290, 291, 425 Abbreviations 149 ABS 475 ac 425 ac Excitation 85, 293 ac Noise Rejection 280 ac - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 552
Clock 59 Clock Function 483 Clock Synchronization 44 ClockChange 483 ClockReport 483, 489 ClockSet 483 Closed Interval 130 Code 427 Coil 351 Collecting Data 51 COM Port Connection 43 Command 175 Commands ‐ SDI‐12 175 Comment 109, 110 Common Mode 270, 276 Communication 43, 51, 68, 332 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 553
506 cr 204 CR1000KD 58, 70, 194 Data Storage Processing Instruction 139 Data Table 44, 125, 127, 148, 241, 388, 453 Data Table Name 116, 506 Data Type 118, 119, 143, 144, 230 DataEvent 453 DataGram 489 DataInterval 129, 453 DataInterval() Instruction 129 Datalogger 33 Datalogger Support - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 554
Index Desiccant 75, 81, 429 DevConfig 92, 429 Device Configuration 92 Device Map 340 DewPoint 477 DHCP 173, 430 DHCPRenew 496 Diagnosis ‐ Power Supply 415 Diagnostics 461 Dial Sequence 132 DialModem 499 DialSequence / EndDialSequence 489 DialVoice 485 Differential 36, 430 Digital 430 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 555
493 FileRead 493 FileReadLine 493 FileRename 493 FileSize 493 FileTime 493 FileWrite 493 Fill and Stop Memory 315, 432 FillStop 453 Final Data Storage 432 Final Data Storage Table 388 FindSpa 492 Firmware 65 FIX 475 Fixed Voltage Range 276 Flag 121, 352 FLOAT 118, 143, 144, 145, 409 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 556
518 Information Services 167, Instructions ‐‐ HTTPPOST 496 Instructions ‐‐ HTTPPUT 496 Instructions ‐‐ IPNetPower 496 Instructions ‐‐ RainFlowSample 456, 479 Instructions ‐‐ Resistance 291 Instructions ‐‐ SDMAO4A 468 Instructions ‐‐ SolarPosition 477 Instructions ‐‐ SPrintF 481 Instructions - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 557
Logger Manual Organization 27 Manually Initiated 435 Marks and Spaces 204 Mass Storage Device 96, 106, 319, 327 Math 143, 408, 470 Mathematical Operation 143 Mathematical Operator 470 Maximum 455 MaxSpa 478 MD5 digest 435 ME Pin 527 MeasOff 278 Measurement 408 Measurement Instruction Data - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 558
, 279, 280, 281 Nominal Power 64 NOT 473 Not‐A‐Number 408 NSEC 437 NSEC Data Type 118, 437 NULL Character 221 Null Modem 429, 430, 437 Number 506, 518 438, 439 Parameter Type 140 Password 70, 518 PC Program 411 PC Support Software 76 PC200W 44 PCM 276 PDM 61, 312 PeakValley 455 Peer‐ - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 559
496 Precision 33, 439, 449 Predefined Constant 123 Preserve Data 110, 326 Preserve Settings 518 PreserveVariables 452 Pressure Transducer 285 Processing Instructions 440 Processing Instructions ‐‐ Output 438 Program 65 Program ‐ Overrun 403, 506 Index Program Control Instructions 440 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 560
Timing 60 Resolution ‐‐ Period Average 60 Resource Library 151 Restore 460 Retrieving Data 51 Retry 492 RevDiff 278 Reverse Polarity 43, 83 RevEx 278 Right 481 457 Scan Interval 135 Scan Priority 137 Scan Time 135, 442 Scientific Notation 112 SDE Pin 527 SDI‐12 173, 177, 442, 465 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 561
SDMIO16 468 SDMSIO4 468 SDMSpeed 468 SDMSW8A 468 SDMTrigger 468 SDMX50 468 SecsPerRecord 506 SecsSince1990 483 Security 70, 506, 518 Seebeck Effect 442 Select Case / Case / Case Is / Case Else / EndSelect .....457 Self‐Calibration 285 Semaphore 442 SemaphoreGet 134, 460 SemaphoreRelease - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 562
269 Support Software 445 Surge Protection 83, 86, 88 SW12 463 SW‐12 Port 61, 463, 506 Switch Bounce 305 Switch Closure 300, 301, 305 Switched 12 Vdc (SW12) Port 61, 463, 506 Synchronizing 310 Synchronous 445 System Time 135, 445 Système Internationale 443 T Table 44 Table ‐‐ Data Header - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 563
223 Triggers 223 TriggerSequence 457 Trigonometric Function 474 TrigVar 223, 224 Trim 481 Troubleshooting 403, 505 True 146 TTL 446 TTL logic 446 TTL Recording 308 102 Vibrating Wire Input Module 315 VibratingWire 464 Viewing Data 44, 51 Voice Modem 485 VoiceBeg / EndVoice 485 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 564
Index WriteIO 464 Writing Program 108 X XML 448 XOR 473 Y Y‐intercept 141, 142 Z Zero 155, 166 Zero Basis 151 564 - Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 565
- Campbell Scientific CR800 | CR800 and CR850 Measurement and Control Systems - Page 566
SP BRASIL www.campbellsci.com.br • [email protected] Campbell Scientific Canada Corp. (CSC) 11564 - 149th Street NW Edmonton, Alberta T5M 1W7 CANADA www.campbellsci.ca • [email protected] Campbell Scientific Centro Caribe S.A. (CSCC) 300 N Cementerio, Edificio Breller Santo Domingo
CR800 Measurement and
Control System
Revision: 5/13
C o p y r i g h t © 2 0 0 0 - 2 0 1 3
Campbell Scientific, Inc.