Campbell Scientific CR6 CR6 Measurement and Control System
Campbell Scientific CR6 Manual
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Campbell Scientific CR6 manual content summary:
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 1
OPERATOR'S MANUAL See the section Release Notes (p. 30) for important information pertaining to this preliminary version. CR6 Measurement and Control System PRELIMINARY: 12/4/14 Copyright © 2000 - 2014 Campbell Scientific, Inc. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 2
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 3
The CR6 Measurement and Control Datalogger is warranted for three (3) years subject to this limited warranty: "PRODUCTS MANUFACTURED BY CAMPBELL SCIENTIFIC, INC. are warranted by Campbell Scientific, Inc. ("Campbell") to be free from defects in materials and workmanship under normal use and service - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 4
- Campbell Scientific CR6 | CR6 Measurement and Control System - 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 at the customer's expense. Campbell Scientific reserves the right to refuse service on products that were exposed to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 6
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 7
Wiring Panel - Quickstart 37 4.4 Power Supplies - Quickstart 38 4.4.1 Internal Battery - Quickstart 39 4.5 Data Retrieval and Telecommunications - Quickstart 39 4.6 Datalogger Support Software - Quickstart 40 4.7 Tutorial: Measuring a Thermocouple 40 4.7.1 What You Will Need 40 4.7.2 Hardware - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 8
- Overview 68 5.1.6.1 SDI-12 Sensor Support - Overview 69 5.1.6.2 RS-232 - Synchronizing Measurements - Overview 71 5.2 Datalogger - Overview 71 5.2.1 Time Keeping 77 5.2.2.5.2 RS-232 Ports 78 5.2.2.5.3 USB Port 78 5.2.2.5.4 Micro SD Card Data-File Formats in CR6 Memory 86 5.2.9.6 Data Format - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 9
12.2 Protection from Voltage Transients 88 5.2.12.3 Calibration 88 5.2.12.4 Internal Battery - Details 88 5.3 Datalogger Support Software - Overview 89 6. CR6 Specifications 91 6.1 Voltage Measurements - Specifications 91 6.2 Resistance Measurements - Specifications 93 6.3 Voltage and Current - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 10
120 7.7.4 Durable Settings 120 7.7.4.1 'Include' File 120 7.7.4.2 Default.CR6 File 124 7.7.5 Program Run Priorities 124 7.7.6 Network Planner 125 7.7.6.1 Priorities in Sequential Mode 157 7.8.3.8 Instructions 159 7.8.3.8.1 Measurement and Data-Storage Processing 159 7.8.3.8.2 Argument Types - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 11
Data Tables 168 7.8.3.12 System Signatures 170 7.9 Programming Resource Library 170 7.9.1 Advanced Programming Techniques 170 7.9.1.1 Capturing Events 170 7.9.1.2 Conditional Output 171 7.9.1.3 Groundwater Pump Test 172 7.9.1.4 Miscellaneous Features 175 7.9.1.5 PulseCountReset Instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 12
Data 248 7.9.16.1 Introduction 248 7.9.16.2 I/O Ports 249 7.9.16.3 Protocols 250 7.9.16.4 Glossary of Serial I/O Terms 250 7.9.16.5 CRBasic Programming 252 7.9.16.5.1 Input Instruction 17 Serial I/O: SDI-12 Sensor Support - Details 269 7.9.17.1 SDI 289 7.9.20 Web Services 291 7.9.20.1 PakBus - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 13
7.9.20.14 HTTPS 297 7.9.21 Wind Vector 298 7.9.21.1 OutputOpt Parameters 298 7.9.21.2 Wind Vector Processing 299 7.9.21.2.1 Measured Raw Data 299 7.9.21.2.2 Calculations 300 8. Operation 305 8.1 Measurements - Details 305 8.1.1 Time Keeping - Details 305 8.1.1.1 Time Stamps 305 8.1.2 Analog - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 14
CPU: Drive 376 8.3.1.1.3 USR: Drive 376 8.3.1.1.4 USB: Drive 377 8.3.1.1.5 CRD: Drive 378 8.3.1.1.6 Data-File Formats 379 8.3.2 Memory Reset 383 8.3.2.1 Full Memory Reset 383 8.3.2.2 Program Send Reset 383 8.3.2.3 Manual Data-Table Reset 383 8.3.2.4 Formatting Drives 383 8.3.3 File - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 15
410 8.6.2.2.2 CRBasic Instructions (DNP3 411 8.6.2.2.3 Programming for DNP3 Data Acquisition 411 8.6.3 Instructions (Modbus 415 8.6.3.2.3 Addressing (ModbusAddr 416 8.6.3.2.4 Supported Modbus Function Codes 416 8.6.3.2.5 Reading Inverse-Format Modbus Registers 416 8.6.3.3 Troubleshooting - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 16
Datalogger Support Software - Details 445 8.8 Keyboard Display - Details 446 8.8.1 Data .3.1 .csipasswd 462 8.11.3.2 PakBus Instructions 462 8.11.3.3 TCP/IP Instructions 462 8.11.3.4 Settings 462 8.11 Battery 466 9.3 Repair 468 10. Troubleshooting 471 10.1Essential Tools 471 10.2Error - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 17
Declarations 518 A.3 Data-Table Declarations 518 A.3.1 Data-Table Modifiers 518 A.3.2 Data Destinations 519 A.3.3 Processing for Output to Final-Data Memory 520 A.3.3.1 Single-Source 520 A.3.3.2 Multiple-Source 522 A.4 Single Execution at Compile 522 A.5 Program Control Instructions 523 17 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 18
10 Peripheral Device Support 536 A.7 Processing and Math Instructions 539 A.7.1 Mathematical Instructions 556 A.11 Custom Keyboard and Display Menus 558 A.12 Serial Input / Output 559 A.13 Peer-to-Peer PakBus® Communications 561 A.14 Variable Management 565 A.15 File Management 566 A.16 Data - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 19
598 G.4.2 Continuous-Analog-Output (CAO) Modules List 598 G.4.3 Relay-Driver Modules List 599 G.4.4 Current-Excitation Modules List 599 G.5 Sensors - Transceivers List 603 G.7 Data-Storage Devices - List 603 G.8 Datalogger Support Software - Lists 604 G.8.1 Starter Software List 604 19 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 20
Datalogger Support Software List 604 G.8.2.1 LoggerNet Suite List 605 G.8.3 Software Tools List 606 G.8.4 Software Index 611 List of Figures Figure 1. Data-Acquisition System Components 36 Figure 2. Wiring Short Cut Thermocouple Wiring -- needs new image for CR6: 1H = U1, 1L = U2 45 Figure 7. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 21
Menu Example - Home Screen 184 Figure 46. Custom Menu Example - View Data Window 184 Figure 47. Custom Menu Example - Make Notes Sub Menu 185 Home Page 293 Figure 77. Home Page Created Using WebPageBegin() Instruction .......... 294 Figure 78. Customized Numeric-Monitor Web Page 294 Figure - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 22
Wire Measurement Wiring 349 Figure 96. Unconditioned Time-Domain Data 350 Figure 97. Unconditioned Vspect Data 351 Figure 98. Narrow Sweep, Low Noise 353 U and C terminals configured for control 371 Figure 110. Relay Driver Circuit with Relay 372 Figure 111. Power Switching without Relay 372 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 23
121. LoggerNet Network-Map Setup: Dataloggers 406 Figure 122. Using the Keyboard / Display 447 Figure 123. Displaying Data with the Keyboard / Display 448 Table 1. PC200W EZSetup Wizard Example Selections 42 Table 2. CR6 Wiring Panel Terminal Definitions 73 Table 3. Analog Voltage Measurement - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 24
Sensor 239 Table 48. ASCII / ANSI Equivalents 248 Table 49. CR6 Serial Ports 249 Table 50. SDI-12 Commands for Transparent Mode 271 67. First Six Values of Settling-Time Data 321 Table 68. Range-Code Option C Entries 328 Table 71. Calibrate() Instruction Results 328 Table 72. Resistive-Bridge - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 25
400 Table 104. PakBus-LAN Example Datalogger-Communication Settings .. 404 Table 105. Router Port Numbers 407 Table 106. DNP3 Implementation - Data Types Required to Store Data in Public Tables for Object Groups 410 Table 107. Modbus to Campbell Scientific Equivalents 414 Table 108. CRBasic Ports - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 26
141. Decimal and hexadecimal Codes and Characters Used with CR6 Tools 587 Table 142. FP2 Data-Format Bit Descriptions 591 Table 143. FP2 Decimal-Locater Bits 591 Table 144. Endianness in Campbell Scientific Instruments 593 Table 145. Dataloggers 595 Table 146. Analog-Input Modules 596 Table - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 27
SW12 Terminal 123 CRBasic Example 3. Simple Default.CR6 File to Control SW12 Terminal 124 CRBasic Example Data Table 147 CRBasic Example 13. Use of the Disable Variable 151 CRBasic Example 14. BeginProg / Scan() / NextScan / EndProg Syntax .. 156 CRBasic Example 15. Measurement Instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 28
52. PT100s with Current Excitation 247 CRBasic Example 53. Receiving an RS-232 String 257 CRBasic Example 54. Measure Sensors / Send RS-232 Data 262 CRBasic Example 55. Using SDI12Sensor() to Test Cv Command 278 CRBasic Example 56. Using Alternate Concurrent Command (aC 279 CRBasic Example 57 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 29
, please call us at (435) 227-9100 or email [email protected]. In earlier days, Campbell Scientific dataloggers greeted our customers with a cheery HELLO at the flip of the ON switch. While the user interface of the CR6 datalogger has advanced beyond those simpler days, you can still hear - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 30
software, sections, tables, figures, and examples. • Bold italic - CRBasic instruction parameters and arguments within the body text. • Blue - CRBasic instructions from data reviewed by the datalogger engineers. The rest of the manual ( not yet exposed to the CR6 user that will become operable - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 31
last up to 10 or more years. See section Internal Battery - Details (p. 88) for more information. • IMPORTANT: Maintain a level of calibration appropriate to the application. Campbell Scientific recommends factory recalibration of the CR6 every three years. 31 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 32
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 33
datalogger program pre-loaded into the CR6 that measures powersupply voltage and wiring-panel temperature. o A serial communication cable to connect the CR6 to a PC o A ResourceDVD that contains product manuals and the following starter software device. The Campbell Scientific number may differ - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 34
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 35
- Overview (p. 56) Acquiring data with a Campbell Scientific datalogger is a fairly defined procedure involving the use of electronic sensor technology, the CR6 datalogger, a telecommunication link, and datalogger support software (p. 493) A CR6 is only one part of a data-acquisition system. To - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 36
Section 4. System Quickstart Figure 1. Data-Acquisition System Components 4.2 Sensors - Quickstart Reading hexadecimal, or ASCII character form. The CR6, sometimes with the assistance of various nearly all electronic sensor output types. Sensor types supported include: • Analog o Voltage o Current o - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 37
manuals and application notes are available at www.campbellsci.com to assist in measuring many sensor types. The previous list of supported sensors is not necessarily comprehensive. Consult with a Campbell Scientific application engineer for assistance in measuring unfamiliar sensors. 4.3 Datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 38
81) • Power Supplies - Details (p. 104) • Power Supplies - Troubleshooting • Power Supplies - Lists (p. 607) The CR6 requires a power supply. Be sure that any power supply components match the are provided when 5 Vdc is supplied through the USB connection between the micro-B USB port and a PC. 38 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 39
of options) allows you to collect data from your PC over long distances and gives you the power to discover problems early. A Campbell Scientific application engineer can help you make a shopping list for any of these telecommunication options: • Standard o USB serial o Ethernet o WiFi (option at - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 40
40) • Datalogger Support Software - Overview (p. 89) • Datalogger Support Software - Details (p. 445) • Datalogger Support Software - Lists (p. 604) Datalogger support software are PC or Linux software available from Campbell Scientific that facilitate communication between the computer and the CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 41
computer (PC) with an available USB port with USB driver installed • USB to micro-USB cable , which is shipped with the CR6 • PC200W software, which is available on the Campbell Scientific resource DVD or thumb drive, or at www.campbellsci.com. Note If the CR6 datalogger is connected to the PC - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 42
. This will configure the software to communicate with the CR6 datalogger. The table PC200W EZSetup the currently selected CR6 with clock and program functions. Monitor Data and Collect Data tabs are also instructions on how to navigate through the wizard. Select the CR6 from the list box. Datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 43
to a different USB port. This will prevent data transfer between the software and CR6. Should this occur, simply move the cable back to the original port. If this is not possible, close then reopen the PC200W software to refresh the available COM ports. Click on Edit Datalogger Setup and change - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 44
assist in monitoring system status. 7. At the left portion of the main Short Cut window, click Wiring Diagram. Attach the physical type-T thermocouple to the CR6 as shown in the diagram. Click on 3. Sensors in the left portion of the window to return to the sensor selection screen. 44 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 45
Wiring -- needs new image for CR6: 1H = U1, 1L = U2 and Evan Campbell. Campbell Scientific designed the first CR7 datalogger to make wires of dissimilar metals are wired to CR6 analog input terminals is the reference junction. using proprietary algorithms in the CR6 operating system. 8. Click Next - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 46
tables have a Store Every field and a drop-down list from which to select the time units. These are used to set the time intervals when data are stored. 10. Only one table is needed for this tutorial, so Table 2 can be removed. Click 2 Table2, then click Delete Table. 11. Change the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 47
Figure 8. Short Cut Outputs Tab Section 4. System Quickstart 4.7.4.5 Procedure: (Short Cut Steps 13 to 14) 13. Click Finish to compile the program. Give the program the name MyTemperature. A summary screen will appear showing the compiler results. Any errors during compiling will be displayed. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 48
the upper right corner. 4.7.5 Send Program and Collect Data PC200W Datalogger Support Software objectives: • Send the CRBasic program created by Short Cut in the previous procedure to the CR6. • Collect data from the CR6. • Store the data on the PC. 4.7.5.1 Procedure: (PC200W Step 1) 1. From the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 49
Section 4. System Quickstart Figure 11. PC200W Monitor Data Tab - Public Table 4.7.5.3 Procedure: (PC200W Step 5) 5. To view the OneMin table, select an empty cell in the display area. Click Add. In the Add Selection - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 50
Section 4. System Quickstart Figure 12. PC200W Monitor Data Tab - Public and OneMin Tables 4.7.5.4 Procedure: (PC200W Step 6) 6. Click on the Collect Data tab and select data to be collected and the storage location on the PC. Figure 13. PC200W Collect Data Tab 50 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 51
Procedure: (PC200W Steps 7 to 10) 7. Click the OneMin box so a check mark appears in the box. Under What to Collect, select New data from datalogger. This selects the data to be collected. 8. Click on a table in the list to highlight it, then click Change Table's Output File... to change the name of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 52
dialog box, select the CR6_OneMin.dat file and click Open. 12. The collected data are now shown. Figure 15. PC200W View Data Table 4.7.5.7 Procedure: (PC200W Steps 13 to 14) 13. Click the heading of any data column. To display the data in that column in a line graph, click the icon. 14. Close the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 53
Section 4. System Quickstart Figure 16. PC200W View Line Graph 53 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 54
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 55
) • Operation (p. 305) A Campbell Scientific data-acquisition system is made up of the following basic components: • Sensors • Datalogger, which includes: o Clock o link or external storage device • Datalogger support software (p. 493) The figure Data-Acquisition Systems - Overview (p. 56) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 56
Section 5. System Overview Figure 17. Data-Acquisition System - Overview 5.1 Measurements - Overview Reading List: • Sensors - Quickstart (p. 36) • Measurements - Overview (p. 56) • Measurements - Details (p. 305) 56 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 57
be found at www.campbellsci.com/manuals (http://www.campbellsci.com/manuals). You can also consult with a Campbell Scientific application engineer. This section discusses direct sensor-to-datalogger connections and applicable CRBasic programming to instruct the CR6 how to make, process, and store - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 58
Section 5. System Overview Conceptually, analog-voltage sensors output two signals: high and low. Sometimes, the low signal is simply sensor ground. A single-ended measurement measures the high signal with reference to ground, with the low signal tied to ground. A differential measurement measures - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 59
noise are not a problem and care is taken to avoid problems caused by ground currents. designed for differential measurements. Many Campbell Scientific sensors are not designed for differential referenced to CR6 ground, any difference in ground potential between the sensor and the CR6 will result - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 60
circuitry, such as might be found in a gas analyzer, and the CR6 use a common power supply, differences in current drain and lead resistance often example, the sequence on a differential measurement using the VoltDiff() instruction involves two measurements - first with the high input referenced to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 61
between a known voltage applied to the excitation (input) arm of a resistor bridge and the voltage measured on the output arm. The CR6 supplies a precise-voltage excitation via U terminals, configured for excitation output,. Return voltage is measured on U terminals configured for single-ended or - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 62
Section 5. System Overview Figure 21. Half-Bridge Wiring Example - Wind Vane Potentiometer 62 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 63
Transducer 5.1.2.3.2 Current Excitation Resistance can also be measured by supplying a precise current and measuring the return voltage. The CR6 supplies a precise-excitation current via terminals configured for current-excitation. Return voltage is measured on U terminals configured for single - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 64
with a Campbell Scientific application engineer CR6 detects the state transition as each wave varies between voltage extremes (high-to-low or low-to-high). Measurements are processed and presented as counts, frequency, or timing data with the PeriodAverage() instruction (see section Period Averaging - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 65
wire to a (signal ground) terminal. Connect the other wire to a U or C terminal configured for pulse input. Sometimes the sensor will require power from the CR6, so there may be two power wires - one of which will be power ground. Connect power ground to a G terminal. Do not confuse the pulse wire - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 66
Section 5. System Overview Figure 25. Pulse-Input Wiring Example - Anemometer 5.1.4 Period Averaging - Overview Reading List: • Period Averaging - Specifications (p. 95) 66 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 67
input signal, even when the CR6 is between program scans. In contrast, period-average measurement instructions only monitor the input signal Campbell Scientific has developed static and dynamic spectrumanalysis techniques that produces superior noise rejection, higher resolution, diagnostic data - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 68
Flow folders. Short Cut is distributed free of charge with datalogger support software (p. 493) and is available for download at www. measurement related data to the CR6. Smart sensors vary widely in output modes. Many have multiple output options. Output options supported by the CR6 include SDI - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 69
269) SDI-12 is a smart-sensor protocol that uses one SDI-12 port and is powered by 12 Vdc. It is fully supported by the CR6 datalogger. Refer to the chart CR6 Terminal Definitions (p. 73), which indicates U and C terminals that can be configured for SDI-12 input. For more information about SDI-12 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 70
verified quantities. Adjusting sensor output directly is preferred, but not always possible or practical. By adding FieldCal() or FieldCalStrain() instructions to the CR6 CRBasic program, measurements of a linear sensor can be adjusted by modifying the programmed multiplier and offset applied to the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 71
datalogger support software (p. 493) packages, is used to write more complex programs. Measurement data are stored in non-volatile memory. Most applications do not require that every measurement be recorded. Rather, measurements are usually combined in statistical or computational summaries. The CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 72
Section 5. System Overview 5.2.1 Time Keeping - Overview Reading List: • Time Keeping - Overview (p. 72) • Time Keeping - Instructions (p. 554) Nearly all CR6 functions depend on the internal clock. The operating system and the CRBasic user program use the clock for scheduling operations. The - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 73
Needs updated image. U 1 U 2 U 3 U 4 U 5 U 6 U 7 U 8 U 9 U1 0 U1 1 U1 2 C 1 C 2 C 3 C 4 12V SW12-1 SW12-2 CS I/O RS-232 Maximum1 Labels Table 2. CR6 Wiring Panel Terminal Definitions Analog Input Single-ended 12 Differential (high/low) 6 Period average 12 Vspect - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 74
Section 5. System Overview Table 2. CR6 Wiring Panel Terminal Definitions Switch closure 16 16 High frequency 16 2 Full-Duplex RS-485 (A/B) 2 SDI-12 8 SDM (Data/Clock/Enable) 1 SPI (MOSI/SCLK/MISO) 4 I2C (SDA/SCL) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 75
interrupts, asynchronous communications and SDI-12 communications. Table CR6 Terminal Definitions (p. 73) summarizes available options. Figure - available by adding a peripheral analog output device available from Campbell Scientific. Refer to section Analog-Output Modules (p. 370) for information - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 76
insurance against data loss - and often the most neglected. The following terminals are provided for connection of sensor and CR6 datalogger grounds: (p. 81) • Power Supplies - Details (p. 104) • Power Supplies - Troubleshooting • Power Supplies - Lists (p. 607) 5.2.2.4.1 Power In The - BAT +- - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 77
• Smart sensors • Modbus and DNP3 networks • Ethernet • Modems • Campbell Scientific PakBus networks • Other Campbell Scientific dataloggers • Campbell Scientific datalogger peripherals Communication ports include: • CS I/O • RS-232 • USB • SDI-12 • SDM • CPI • Ethernet • MicroSD card slot (requires - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 78
manufacturer's modem or smart sensor. Purchase Campbell Scientific pn 31055 (male DTE) or pn 31056 USB port, labeled USB, for communicating with a PC with datalogger support software (p. 493). The USB connection powers up the programming, configuration, and analog measurement features of the CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 79
Display (p. 79), is a peripheral optional to the CR6. The keyboard display is an essential installation, maintenance, and troubleshooting tool for many applications. It allows interrogation and programming of the CR6 datalogger independent of other telecommunication links. More information on the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 80
Menus - Overview (p. 80, p. 558) • Data Displays: Custom Menus - Details (p. 183) • Custom Menus - Instruction Set (p. 558) • Keyboard Display - Overview (p. four values. Each submenu displays two values from CR6 memory. PanelTemps shows the CR6 wiringpanel temperature at each scan, and the one - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 81
Campbell Scientific to expand the number of terminals on the CR6 Power Supplies - Troubleshooting • Power Supplies - Lists (p. 607) The CR6 is fully USB connection between the micro-B USB port and a PC. The CR6 is internally protected against accidental polarity reversal on the power inputs. The CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 82
software applications, Short Cut and CRBasic Editor, are used to create CR6 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 83
Overview (p. 83) • Memory - Details (p. 373) • Data Storage Devices - List (p. 603) Data concerning CR6 memory are posted in the Status (p. 581) table. Memory is ̶ Photographic images (See the appendix Cameras ) ̶ Data files from TableFile() instruction (TOA5, TOB1, CSIXML and CSIJSON) o Keep (p. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 84
a micro-SD card (CRD: drive) or a Campbell Scientific mass storage media (USB: drive) to the PC. 5.2.9.1 PakBus - Overview Reading List: • PakBus - Overview (p. 84) • PakBus - Details (p. 395) The CR6 communicates with datalogger support software (p. 604), telecommunication peripherals (p. 601), and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 85
link to a file on the supporting PC using Campbell Scientific datalogger support software (p. 604). See also the manual and Help for the software being used. 5.2.9.3 Mass-Storage Device Caution When removing a Campbell Scientific mass storage device (thumb drive) from the CR6, do so only when the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 86
the TableFile() instruction. 5.2.9.6 Data Format on Computer CR6 data stored on a PC with datalogger support software (p. 604) are formatted as either ASCII or binary depending on the file type selected in the support software. Consult the software manual for details on available data-file formats - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 87
(p. 418) The CR6 supports Web API communication for services, all of which give high level access to CR6 data and CRBasic programs, are enabled without password protection. You may wish to secure your CR6 from mistakes or tampering. The following may be reasons to concern yourself with datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 88
-Calibration (p. 327). The CR6 uses an internal voltage reference to routinely calibrate itself. Campbell Scientific recommends factory recalibration every two years. If calibration services are required, refer to the section entitled Assistance (p. 5) at the front of this manual. 5.2.12.4 Internal - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 89
40) • Datalogger Support Software - Overview (p. 89) • Datalogger Support Software - Details (p. 445) • Datalogger Support Software - Lists (p. 604) Datalogger support software are PC or Linux software available from Campbell Scientific that facilitate communication between the computer and the CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 90
Section 5. System Overview a Campbell Scientific application engineer for a software recommendation to fit a specific application. 90 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 91
CR6 dataloggers are tested and guaranteed to meet electrical specifications in a standard -40 to 70 °C, or extended -55 to 85 °C, non-condensing environment. Recommended recalibration interval is 3 years. System configuration and critical specifications should be confirmed with a Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 92
Section 6. CR6 Specifications Table 3. Analog Voltage Measurement Range and Resolution Typical Effective Resolution4 Typical Effective Resolution4 fN11 Examples settling time of 500 µs. Minimum settling time is 100 µs. 2 Notch frequency 3 Refers to multiplexing circuitry internal to the CR6. 92 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 93
Section 6. CR6 Specifications 6.2 6.3 Resistance Measurements - Specifications See Reading List: • Resistance Measurements - help estimating measurement accuracy for ratio-metric measurements. For Resistance() instruction, the excitation current is internally measured across an internal resistor - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 94
Section 6. CR6 Specifications 6.4 Current Excitation Range: Accuracy: Resolution: Compliance Voltage: ±2.0 mA See following table Current Excitation Absolute Accuracy 0.6 µA ±5 V Table 6. Voltage Excitation Absolute Accuracy1 Temperature (°C) Accuracy 0° to 40° ±(0.1% - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 95
and optional parameter Therm_fN1 of the VibratingWire() instruction. A U terminal pair excites and measures the thermistor. The bridge resistor is built into the CR6 circuitry. Terminals Without Vibrating-Wire Sensor: With Vibrating-Wire Sensor: Input Resistance: Measurement: Type: Range - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 96
Section 6. CR6 Specifications 6.7 Range: Accuracy: Resolution: See following table Period Average Ranges 2 10 50 12.5 10 2 62 8 64 2 2 100 5 1 With signal centered around CR6 ground. 2 The maximum frequency = 1/(twice minimum pulse width) for 50% duty cycle signals. Pulse - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 97
Section 6. CR6 Specifications 6.8 Minimum Switch-Closed 5 ms Time: Minimum Switch-Open Time: 6 ms Maximum Bounce Time: 1 ms open without being counted Maximum Input Frequency: 150 Hz High- - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 98
Section 6. CR6 Specifications Current Sourcing Limits: See following table U and C Terminal Current Limits Table 10. SW12 Terminal Current Limits Temperature (°C) -40° 20° 70° 85° 1 Thermal fuse hold - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 99
Section 6. CR6 Specifications Internet Protocols: Additional Protocols Supported: Data File Formats: USB: CS I/O: CPI: RS-232 : 0 - 5 V USB micro-B device only, 2.0 fullspeed 12 Mbps, for computer connection. Interfaces with Campbell Scientific peripherals. RJ-45, interface to Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 100
Section 6. CR6 Specifications Clock Resolution: Program Execution Interval: correction to 10 µs. 1 ms 1 ms • Power Supplies - Overview (p. 81) • Power Supplies - Details (p. 104) • Power Supplies - Troubleshooting • Power Supplies - Lists (p. 607) Charger Input: CHG terminal. 16 - 32 Vdc, 1.2 A - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 101
Section 6. CR6 Specifications 6.14 Physical Attributes - Specifications Dimensions: Weight/Mass: Materials Case: Dust Plugs: 188 x 102 x 61 mm (7.4 x 4.0 x 2.4 in); additional clearance required for cables and leads 0.42 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 102
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 103
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 CR6 datalogger and associated peripherals. Back plates are - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 104
• Power Supplies - Troubleshooting • Power Supplies - Lists (p. 607) Reliable power is the foundation of a reliable data-acquisition system. When designing the power supply. The CR6 is internally protected against accidental polarity reversal on the power inputs. The CR6 has a modest-input power - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 105
Campbell Scientific application engineer if assistance in selecting a power supply is needed, particularly with applications in extreme environments. 7.4.1 CR6 Power Requirement The CR6 supplied through the USB connection between the micro-B USB port and a PC. The CR6 is internally protected - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 106
sources. Following is a list of CR6 power input terminals and the respective power types supported. The appendix Power Supplies (p. 607) lists power supplies available from Campbell Scientific, including alkaline and solar options. More information is in manuals and brochures at www.campbellsci.com - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 107
24 Vdc solar panel, or a Class 2, 24 Vdc power supply, such as Campbell Scientific pn 29796 (100 to 240 Vac / 24 Vdc power converter). The operational input often drops below the voltage required for datalogger operation. This may causes the CR6 to stop measurements until the voltage again equals - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 108
. Voltage on the 12V and SW12 terminals can vary widely and will fluctuate with the dc supply used to power the CR6, so be careful to match the datalogger power supply to the requirements of the sensors. U terminals configured for 5 Vdc output are internally regulated to within ±4%, which is good - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 109
-4 mA to 4 mA for making resistance measurements. Check the accuracy specification of these terminals in CR6 Specifications (p. 91) to understand their limitations. CRBasic instructions that control current excitation include the following: • ExciteI() • Resistance() See Sensors Requiring Current - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 110
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 U or C terminal is available from Campbell Scientific and is listed in the appendix Relay Drivers (p. 599). Note SW12 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 111
Section 7. Installation In the field, at a minimum, a proper earth ground will consist of a 6 to 8 foot copper-sheathed grounding rod driven into the earth and connected to the large brass ground lug on the wiring panel with a 12 AWG wire. In low-conductive substrates, such as sand, very dry soil, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 112
Section 7. Installation market, Campbell Scientific, for many years, has employed a simple and inexpensive design that protects most systems in most circumstances. It is, however, not infallible. Note Lightning strikes may damage or destroy the CR6 and associated sensors and power supplies. In - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 113
Single-Ended Measurement Reference Low-level, single-ended voltage measurements are sensitive to ground potential fluctuation. The grounding scheme in the CR6 has been designed to eliminate ground potential fluctuation due to changing return currents from 12V and SW12 terminals and U and C terminals - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 114
measurements MUST be used when the input ground is known to be at a different ground potential from CR6 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.6.3.1 Soil - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 115
to ground loop problems. Similar considerations CR6 Configuration - Details Reading List: • CR6 Configuration - Overview (p. 82) • CR6 Configuration - Details (p. 115) The CR6 ships from Campbell Scientific ready to communicate with Campbell Scientific datalogger support software (p. 89) on the USB - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 116
cable from the computer USB port to the USB port on the CR6 as shown previously in figure Power and Serial Communication Connections (p. 41). DevConfig can • communicate with devices with direct RS-232 or Ethernet, • send operating systems to supported device types, • set datalogger clocks and send - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 117
Datalogger. Update the OS on the CR6 as needed, first noting the following precautions. Since sending an OS to the CR6 resets memory, data conveniently accessible such that a site visit can be undertaken to correct a problem of reset settings without excessive expense? If the OS must be sent, and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 118
an operating system with DevConfig will erase all existing data and reset all settings to factory defaults. Text in the Send OS tab (figure DevConfig OS Download Window (p. 118) ) lists instructions for sending an operating system to the CR6. When the Start button is clicked, a file-open dialog - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 119
Campbell Scientific recommends upgrading operating systems only with a directhardwire link. However, the Send button in the datalogger support software (p. 604) allows the OS to be sent over all software supported may reset CR6 settings, even settings critical to supporting the telecommunication - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 120
troubleshooting software • Status table in CR6 memory - view as a data table • DataTableInfo table in CR6 memory - view as a data table • Station Status1 menu option - find in datalogger support software to correct the problem. For example, CR6 drops out of telecommunications. Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 121
SlowSequence instruction followed by any other code. 2. Send the file to the CR6 using tools in the File Control menu of datalogger support software (p. ", CPU:pakbus_broker.dld. The rules used by the CR6 when it starts are as follows: 1. If the logger is starting from power-up, any file that is - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 122
Section 7. Installation Figure 40. "Include File" Settings Via DevConfig Figure 41. "Include File" Settings Via PakBusGraph CRBasic Example 1. Using an 'Include' File 122 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 123
' file to the CPU: drive of the CR6 using the File Control menu ' of the datalogger support software (p. 604). Be sure to de-select the Run Now and Run On ' Power-up options that are presented by the software when sending the file. '3. Add the Include instruction to the main CRBasic program at the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 124
CR6 file in the CR6, the default.CR6 program should not use significant memory, such as occurs by allocating a large USR: drive, or by using a DataTable() instruction Run Priorities 1. When the CR6 starts, it executes commands in the powerup.ini file (on Campbell Scientific mass storage device or - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 125
networks. You interact with Network Planner through a drawing canvas upon which are placed PC and datalogger nodes. Links representing various telecommunication options are drawn between nodes. Activities to take place between the nodes are specified. Network Planner automatically specifies - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 126
. • It does not generate datalogger programs. • It does not understand Network Planner, please consult the LoggerNet manual, which is available at www.campbellsci. CRBasic Programming - Details (p. 126) • CRBasic Programming - Instructions (p. 515) • CRBasic Editor Help Programs are created with - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 127
Campbell Recorder BASIC). CRBasic Editor is a text editor that facilitates creation and modification of the ASCII text file that constitutes the CR6 application program. CRBasic Editor is a component of LoggerNet (p. 605), RTDAQ, and PC400 datalogger support software instructions - instructions - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 128
Send (p. 505) command in datalogger-support software (p. 89) • Program send command in Device Configuration Utility (DevConfig (p. 116)) • Campbell Scientific mass storage device (p. 603) or memory card A good practice is to always retrieve data from the CR6 before sending a program; otherwise - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 129
Read More See File Management (p. 384) and the Campbell Scientific mass storage device or memory card documentation available at www.campbellsci.com. 7.8.2.1 Preserving Data at Program Send When sending programs to the CR6 through the software options listed in table Program Send Options that Reset - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 130
be used, as shown in the table Formats for Entering Numbers in CRBasic (p. 130). Only standard, base-10 notation is supported by Campbell Scientific hardware and software displays. Table 17. Formats for Entering Numbers in CRBasic Format Example Base-10 Equivalent Value Standard 6.832 6.832 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 131
units to variable (optional). Units are strictly for documentation. The CR6 makes no use of Units nor checks Unit accuracy. Define data tables. Define stored data tables. Process / store trigger Set triggers when data should be stored. Triggers may be a fixed interval, a condition, or - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 132
Table 18. CRBasic Program Structure Other on-line storage devices Send data to a Campbell Scientific mass storage device or memory card if available. Processing of data List data to be stored in the data table, e.g. samples, averages, maxima, minima, etc. Processes or calculations repeated - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 133
this 'example) Measure Scan loop 'Call data table CallTable Temp 'Controls (None in this Instructions (p. 515) 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 134
keyboard display or software numeric monitors. Dim variables cannot. Public variables can be set as read-only using the ReadOnly instruction, so that the 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 135
Section 7. Installation Arrays • $ Names must start with a letter, underscore, or dollar sign. Spaces and quote marks are not allowed. Variable names are not case sensitive. Several variables can be declared on a single line, separated by commas: Public RefTemp, AirTemp2, Batt_Volt Variables can - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 136
Using variable array dimension indices (p. 136),), declaring the indices As Long variables is recommended. Doing so allows for more efficient use of CR6 resources. CRBasic Example 7. Using Variable Array Dimension Indices ' the use of dimension indices in arrays. The variable 'VariableName is - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 137
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 19. Data Types in Variable Memory Name Command Description - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 138
, counting number, and integers in final-data memory. If storing nonintegers, the fractional CR6 memory. Caution - when using a very long string in a variables declared as Public, the operations of datalogger support software by nonnumeric characters, the SplitStr() instruction can be used to parse - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 139
Size (Bytes) Notes Resolution / Range Zero Minimum Maximum 0.000 ±0.001 ±7999. FP2 FP2 Campbell Scientific floating point Default final-memory data type. Use FP2 for stored data requiring 3 or 4 Absolute Value Decimal Location 2 significant digits. If more significant digits are needed - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 140
time data. See NSEC Data Type (p. 202). String String ASCII string Minimum: 3 (4 with null terminator) Default: 24 Maximum: limited only to the size of available CR6 memory. Caution - when using a very long string in a variables declared as Public, the operations of datalogger support software - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 141
Flags are a useful program-control tool. While any variable of any data type can be used as a flag, using Boolean variables, especially of strings to report flag status. To run the demonstration, send this program 'to the CR6, then toggle variables Flag(1) and Flag(2) to true or false to see how the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 142
By default, variables are set equal to zero at the time the datalogger program compiles. Variables can be initialized to non-zero values in the how variables can be declared as specific data types. 'Variables not declared as a specific data type default to data type Float. Also 'demonstrated is the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 143
passing / receiving pairs with the same data types and applicable string lengths. 7.8.3.4.2 Constants C command in a terminal emulator (see Troubleshooting - Terminal Emulator (p. 484) ). Note Using constants include instruction names and valid alphanumeric names for instruction parameters. On - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 144
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 CR6 memory. The file is written to each time data are directed to that file - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 145
Subsequent lines contain data. Note Discrete data files (TOB1, TOA5, XML) can also be written to CR6 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 CR6 | CR6 Measurement and Control System - Page 146
programmer, FieldNames() instruction can be used to customize the names. TIMESTAMP, RECORD, Batt_Volt_Avg, PTemp_C_Avg, TempC_Avg(1), and TempC_Avg(2) are the default field names in the table Typical Data Table (p. 146). Table 22. Typical Data Table TOA5 CR6 CR6 TIMESTAMP RECORD BattVolt_Avg - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 147
of data table declaration DataTable(Table1,True,-1) DataInterval(0,1440,Min,0) 'Optional instruction to trigger table at 24-hour interval Minimum(1,Batt_Volt,FP2,False,False) 'Optional instruction to determine minimum Batt_Volt EndTable 'Main Program BeginProg Scan(5,Sec,1,0) 'Default Datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 148
and are not reported to the support software and so are not collected. Rules on table size change if a CardOut() instruction or TableFile() instruction with Option 64 are included in the table declaration. These instructions support writing of data to a memory card. Writing data to a card requires - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 149
CallTable() instruction. A data table consists of successive 1 kB data frames. Each data frame contains a time stamp, frame number, and one or more records. By default, a time stamp and record number are not stored with each record. Rather, the datalogger support software data extraction extraction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 150
intervals). Note Array-based dataloggers, such as CR10X and CR23X, use open intervals exclusively. Data-Output Processing Instructions 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 CR6 | CR6 Measurement and Control System - Page 151
of the Disable Variable ' the use of the 'disable' variable, or DisableVar, which 'is a parameter in many output processing instructions. Use of the 'disable' variable 'allows source data to be selectively included in averages, maxima, minima, etc. If the ''disable' variable equals -1, or true - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 152
To preserve measurement and processing integrity, the CR6 queues calls on the subroutine, allowing only sequences. 7.8.3.5.3 Incidental Sequences Data-table sequences are essential features Help. Web-Page Sequences The WebPageBegin / WebPageEnd instructions are used to declare a web page that - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 153
to use. Using the PipelineMode or SequentialMode instruction at the beginning of the program will force the program into one mode or the other. Mode information is included in a message returned by the datalogger, which is displayed by the datalogger support software (p. 604). The CRBasic Editor pre - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 154
instructions, processing in the current scan (including update of public variables and data all tasks are given equal processing time by the CR6. All tasks are given the same general priority Campbell Scientific mass storage device or memory card, occur. When running in sequential mode, the datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 155
some sort of messaging between the two tasks placed into the CRBasic program, unpredictable results are likely to occur. The SemaphoreGet() and SemaphoreRelease() instruction pair provide a tool to prevent unwanted access of an object (variable, COM port, etc.) by another task while the object is in - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 156
Instructions Instructions General Guidelines Syntax Form '. SubScan() '. '. '. NextSubScan NextScan EndProg 7.8.3.7.1 Scan() / NextScan Simple CR6 programs are often built entirely within a single Scan() / NextScan structure, with only variable and data (p. 474) for troubleshooting tips. 156 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 157
one second, three scans are buffered, and measurements and data storage continue indefinitely. 7.8.3.7.2 SlowSequence / EndSequence Slow sequences scan. Up to four slow-sequences scans can be defined in a program. Instructions in a slow-sequence scan are executed when the main scan is not active. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 158
250 ms, leaving 75% of available scan time unused. The CR6 can make efficient use of this interstitialscan time to optimize program execution sequences release the semaphore (p. 507) after complete execution of each measurement instruction to allow the main scan to acquire the semaphore when it needs - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 159
of these instructions. 7.8.3.8.1 Measurement and Data-Storage Processing CRBasic instructions have been created for making measurements and storing data. Measurement instructions set up CR6 hardware to make measurements and store results in variables. Data-storage instructions process measurements - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 160
Instruction Syntax (p. 160). CRBasic Example 15. Measurement Instruction Syntax ' the use of a single measurement instruction. In this 'case, the program measures the temperature of the CR6 , Rules for Names, may appear to be supported in a specific operating system. However, they may not be - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 161
above rules. Since 64 units are strings that ride along with the data, 20 they are not subjected to the stringent syntax checking that is use of an expressions as an argument in the TrigVar parameter of the DataTable() instruction: 'DataTable(Name, TrigVar, Size) DataTable(Temp, TC > 100, 5000) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 162
www.wikipedia.org. In summary, CR6 programmers should consider at least the programming extended-cyclical summation of non-integers, use the AddPrecise() instruction. Otherwise, as the size of the sum increases, fractional addends Data Types FLOATs, LONGs and Booleans are cross-converted to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 163
), zero becomes false (0) and non-zero becomes true (-1). CRBasic Example 16. Conversion of FLOAT / LONG to Boolean ' conversion of Float and Long data types to Boolean 'data type. Public Fa As Float Public Fb As Float Public L As Long Public Ba As Boolean Public Bb As Boolean Public Bc As - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 164
type before it is 'multiplied by 3.4. EndProg Constants Conversion Constants are not declared with a data type, so the CR6 assigns the data type as needed. If a constant (either entered as a number or declared with CONST) can be expressed correctly as an integer, the compiler will use the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 165
is not zero). When a variable of data type BOOLEAN is assigned any non-zero number, the CR6 internally converts it to -1. The CR6 is able to translate the conditions listed in Binary Conditions of TRUE and FALSE Condition CRBasic Instruction(s) Used Memory Location of Binary Result Time - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 166
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 CR6 evaluates the expression (X >= 5) and registers in system memory a -1 if the expression is true, or a 0 if the expression is false. If X >= 5 OR - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 167
CRBasic facilitates concatenation of string variables to variables of all data types using & and + operators. To ensure consistent results variables declared As String to 'other strings and to variables declared as other data types. ' 'Declare Variables Dim PhraseNum(2) As Long Dim Word(15) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 168
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. 568) ), the syntax is entered directly into the CRBasic program - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 169
table to go to get the value (optional). If left blank, the most recent record is acquired. Table 30. 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 CR6 | CR6 Measurement and Control System - Page 170
provide information on using signatures. • Signature() instruction in Diagnostics (p. 528). • RunSignature entry in data table for archiving. 7.9 Programming Resource Library This library of notes and CRBasic code addresses a narrow selection of CR6 applications. Consult a Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 171
in the 'OneMinute Table. 'Note : the DataEvent instruction must be used within a data table with a 'more frequent record interval than the Public PTemp_C, AirTemp_C, DeltaT_C Public EventCounter 'Declare Event Driven Data Table DataTable(Event,True,1000) DataEvent(0,DeltaT_C>=3,DeltaT_C - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 172
Groundwater Pump Test CRBasic example Groundwater Pump Test (p. 172) 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 CR6 | CR6 Measurement and Control System - Page 173
Subroutine Sub MeasureLevel LevelMeasureCount = LevelMeasureCount + 1 'Included to show passes through sub-routine 'Level measurement instructions goes here EndSub 'Main Program BeginProg 'Minute 0 to 10 of test: 10-second data-output interval Scan(10,mSec,0,60) 'There are 60 10-second scans in 10 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 174
scan Battery(Batt_volt) PanelTemp(PTemp,250) Call MeasureLevel 'Call Output Tables CallTable LogTable NextScan 'Minute 30 to 100 of test: 60-second data-output interval Scan(60,mSec,0,70)'There are 70 60-second scans in 70 minutes ScanCounter(3) = ScanCounter(3) + 1 'Included to show passes through - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 175
type, units, names, event counters, flags, data-output intervals, and control. CRBasic Example 23. Miscellaneous Program Features ' the use of a single measurement instruction. In this 'case, the program measures the temperature of the CR6 wiring panel. Public RefTemp 'Declare variable to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 176
,0,False) Sample(1,DeltaT_C, FP2) Sample(1,HowMany, FP2) EndTable 'Data table - event driven '-AND interval driven '-AND event range 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 177
return the number of data storage events 'that have occurred for an event driven table. This example looks in the data 'table "Event", which Event.EventCount(1,1) 'Call Data Tables CallTable(OneMin) CallTable(Event) NextScan EndProg 7.9.1.5 PulseCountReset Instruction PulseCountReset is used in - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 178
to measure the same terminal, multiple scans using the same terminal are allowed. PulseCount() information is not maintained globally, but for each individual instruction occurrence. So, if a program needs to alternate between fast and slow scan times, two separate scans can be used with logic to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 179
an argument of 3 in the Reps 'parameter of the TCDiff() instruction and scaling variable arrays as arguments in the 'Multiplier and Offset changes. Incorporating signature data into a the CR6 data set allows system administrators to track program changes and assure data quality. The following - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 180
different from that of the main 'program scan. Secondary scans are preceded with the SlowSequence instruction. 'Declare Public Variables Public PTemp Public Counter1 'Declare Data Table 1 DataTable(DataTable1,1,-1) Sample(1,PTemp,FP2) Sample(1, Counter1, fp2) EndTable 'DataTable1 is event driven - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 181
look at file extensions for specific loggers; it makes possible the writing of a single file of code to run on multiple CRBasic dataloggers. Note Do not confuse CRBasic files with .DLD extensions with files of .DLD type used by legacy Campbell Scientific dataloggers. As an example, pseudo code using - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 182
to be sent to the CR6, which may help keep costs down over very expensive telecommunication compilation than is conditional on datalogger 'model and program speed. Key instructions include #If, #ElseIf, Program BeginProg 'Return the selected speed and logger type for display. #If LoggerType = CR3000 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 183
Series VoltSe(ValueRead,1,mV2500,3,0,0,_50Hz,0.1,-30) #ElseIf LoggerType = CR6 'This instruction is used if the datalogger is a CR6 Series VoltSe(ValueRead,1,mV1000,U3,0,0,50,0.1,-30) #Else ValueRead = NAN #EndIf NextScan EndProg 7.9.3 Data Displays: Custom Menus - Details Reading List: • Custom - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 184
pick list. Order of items in list is determined by order of instruction; however, item displayed initially in MenuItem() is determined by the value of 186) lists CRBasic programming for a custom menu that facilitates viewing data, entering notes, and controlling a device. figure Custom Menu Example - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 185
Section 7. Installation Figure 47. Custom Menu Example - Make Notes Sub Menu Figure 48. Custom Menu Example - Predefined Notes Pick List Figure 49. Custom Menu Example - Free Entry Notes Window Figure 50. Custom Menu Example - Accept / Clear Notes Window 185 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 186
Menus ' the building of a custom external keyboard display menu. '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 CR6 | CR6 Measurement and Control System - Page 187
Const Clear = "Clear" 'Notes control word 'Declarations supporting Control menu item Const On = true Const Off = EnterNote,String) EndTable 'Set up Notes data table, written 'to when a note LED",CountDown) MenuPick(15,30,45,60) MenuItem("Manual LED",toggleLED) MenuPick(On,Off) 'Create Submenu - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 188
processing NextScan EndProg 7.9.4 Data Input: Loading Large Data Sets Large data sets, such as look up tables or tag numbers, can be loaded in the CR6 for use by the CRBasic program. This is efficiently accomplished by using the Data, DataLong, and Read instructions, as demonstrated in CRBasic - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 189
DataSetLong(10) As Long Dim x Can also be declared as Dim. 'Write data set to CR6 memory Data 1.1,2.2,3.3,4.4,5.5 Data -1.1,-2.2,-3.3,-4.4,-5.5 DataLong 1,2,3,4,5 DataLong -1,-2,-3,-4,-5 'Declare data table DataTable (DataSet_,True,-1) Sample (10,DataSetFloat(),Float) Sample (10,DataSetLong - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 190
using scalar or similarly located elements in different arrays and dimensions Note Array-assigned expression notation is an alternative to For/Next instructions, typically for use by more advanced programmers. It will probably not reduce processing time significantly over the use of For/Next. To - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 191
Section 7. Installation Table 31. CRBasic Example. Array Assigned Expression: Sum Columns and Rows 'This example sums three rows and two columns of a 3x2 array. 'Source array image: '1.23,2.34 '3.45,4.56 '5.67,6.78 Public Array(3,2) = {1.23,2.34,3.45,4.56,5.67,6.78}'load values into source array - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 192
scalar value 'set corresponding alarm boolean value true if temperature exceeds 20 degC TempC_Alarm() = TempC() > 20 'some, not all or most, instructions will accept this array notation to auto-index 'through the array 'round each temperature to the nearest tenth of a degree TempC_Rounded() = Round - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 193
set second column of Db to NAN Db(-1,1)() = Da(-1,1)() * DMultiplier() + DOffset() Db(-1,2)() = NAN NextScan EndProg 7.9.6 Data Output: Calculating Running Average The AvgRun() instruction calculates a running average of a measurement or calculated value. A running average (Dest) is the average of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 194
Section 7. Installation 194 duration). The signal is attenuated by a synchronizing filter with an order of 1 (simple averaging): Sin(πX) / (πX), where X is the ratio of the input signal frequency to the running-average frequency (running-average frequency = 1 / time length of the running average). - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 195
54. Running-Average Frequency Response Figure 55. Running-Average Signal Attenuation 7.9.7 Data Output: Triggers and Omitting Samples TrigVar is the third parameter in the DataTable() instruction. It controls whether or not a data record is written to final memory. TrigVar control is subject to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 196
uses TrigVar rather than DataInterval() to trigger data storage. Figure 56. Data from TrigVar Program CRBasic Example 30. Using TrigVar to Trigger Data Storage ' the use of the TrigVar parameter in the DataTable() 'instruction to trigger data storage. In this example, the variable Counter - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 197
'Declare Public Variables Public PTemp, batt_volt, airtempC, deltaT Public int_fast As Boolean Public int_slow As Boolean Public counter(4) As Long 'Declare Data Table ' 'Table is output on one of two intervals, depending on condition. 'Note the parenthesis around the TriggerVariable AND statements - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 198
data type, 256 bits are required (8 states * 32 bits per state). When programming with BOOL8 data type, repetitions in the output processing DataTable() instruction 59 = 00111011 (CR6 stores these bits in reverse order) When datalogger support software (p. 89) retrieves the BOOL8 data type, it splits - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 199
(p. 200) programs the CR6 to monitor the state of 32 "alarms" as a tutorial exercise. The alarms are toggled by manually entering zero or non- , as shown in figure Bool8 Data from Bit-Shift Example (PC Data File) (p. 200), when datalogger support software (p. 89) stores the data in an ASCII file, it - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 200
Section 7. Installation Figure 58. Bool8 Data from Bit-Shift Example (Numeric Monitor) Figure 59. Bool8 Data from Bit-Shift Example (PC Data File) 200 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 201
Section 7. Installation CRBasic Example 32. Programming with Bool8 and a Bit-Shift Operator ' the use of the Bool8 data type and the ">>" bit-shift 'operator. Public Alarm(32) Public Flags As Long Public FlagsBool8(4) As Long DataTable(Bool8Data,True,-1) DataInterval(0,1,Sec,10) 'store bits - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 202
Minimum(), and FileTime() instructions produce a time stamp that may be accessed from the program after being written to a data table. The time of other events, such as alarms, can be stored using the RealTime() instruction. • Accessing and storing a time stamp from another datalogger in a PakBus - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 203
. See CRBasic example NSEC - Two Element Time Array (p. 203). 3. Time-variable array dimensioned to (7) or (9) and As Long or As Float - Sample() instruction assumes data are stored in the variable array in the sequence year, month, day of year, hour, minutes, seconds, and milliseconds. See CRBasic - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 204
type to sample a time stamp into 'final-data memory using an array dimensioned to 7 or 9. 'A time stamp is retrieved into variable rTime(1) through rTime(9) as year, month, day, 'hour, minutes, seconds, and microseconds using the RealTime() instruction. The first 'seven time values are copied to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 205
36. NSEC -Convert Timestamp to Universal Time ' the use of NSEC data type to convert a data time stamp 'to universal time. ' 'Application: the CR6 needs to display Universal Time (UT) in human readable 'string forms. The CR6 can calculate UT by adding the appropriate offset to a 'standard time - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 206
the flexibility of the TableFile() instruction. Memory cards1 up to 16 GB are supported. TableFile() with Option 64, TOB3 is now available in CR6 operating systems 25 or greater. TableFile() is a CRBasic instruction that creates a file from a data table in datalogger CPU memory. Option 64 directs - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 207
you can afford to collect the data only once a month. 1Memory cards for the CR6 are the micro SD type. 2The CRD: drive is a memory drive created when a memory card is inserted into the CR6. 3CRBasic Editor is included in Campbell Scientific datalogger support software (p. 89) suites LoggerNet, PC400 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 208
,0) 'Measurement instructions go here. 'Processing instructions go here. CR6. The card must be ejected only after the Act light shows a solid green. Q: Why are individual files limited to 2 GB? A: In common with many other systems, the datalogger natively supports signed four-byte integers. This data - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 209
supports only the use of xyz brand micro SD cards. These cards are industrial-grade and have passed Campbell Scientific hardware testing. Following are listed advantages these cards have over less expensive commercial-grade cards: • less susceptible to failure and data loss • match the datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 210
FieldCal() or FieldCalStrain() instruction, a linear sensor output can be corrected in the CR6 after the measurement by adjusting the multiplier and offset. When included in the CR6 CRBasic program, FieldCal() and FieldCalStrain() can be used through a datalogger support software (p. 89) calibration - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 211
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 select LoggerNet or RTDAQ | Datalogger | Calibration Wizard to start the wizard. A list of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 212
and function of the FieldCal() and FieldCalStrain() instructions. This section is not a comprehensive treatment of field-calibration topics. The most comprehensive resource to date covering use of FieldCal() and FieldCalStrain() is RTDAQ software documentation available at www.campbellsci.com http - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 213
) during second point calibration. b. Mode = 6 (automatic) when calibration is complete. 7.9.12.4.3 Zero Basis Point Calibration Zero-basis calibration (FieldCal() instruction Option 4) is designed for use with static vibrating-wire measurements. It loads values into zero-point variables to track - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 214
CR6 terminals configured for excitation. To reset tests, use the support software File Control (p. 496) menu commands to delete .cal files, and then send the demonstration program again to the CR6 To simulate conditions for a 30-day-service calibration, again with desiccated chamber conditions, keep - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 215
zero calibration. 'You can set up the simulation by loading this program into the CR6 and interconnecting 'the following terminals with a jumper wire to simulate the relative-humidity FOR FieldCal() CONTROL Public CalMode 'DECLARE DATA TABLE FOR RETRIEVABLE CALIBRATION RESULTS DataTable(CalHist, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 216
data table CalHist CallTable(CalHist) NextScan EndProg 7.9.12.5.2 FieldCal() Offset (Opt 1) Example Most CRBasic measurement instructions At Seven-Day Service SimulatedSalinitySignal output 1350 example FieldCal() Offset (p. 217) to the CR6. A terminal configured for excitation has been - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 217
. When CalMode increments to 6, the seven-day-service offset calibration is complete. Calibrated offset will equal can set up the simulation by loading this program into the CR6 and interconnecting the 'following terminals with a jumper wire to simulate CalMode 'DECLARE DATA TABLE FOR RETRIEVABLE - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 218
data table CalHist CallTable(CalHist) NextScan EndProg 7.9.12.5.3 FieldCal() Slope and Offset (Opt 2) Example Most CRBasic measurement instructions Deployment At Seven-Day Service 300 mV 285 mV Two-Point Slope and Offset (p. 219) to the CR6. 2. To place the simulated flow sensor in a simulated - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 219
simulated sensor multiplier and offset drift. Simulate a seven-day service calibration to correct the drift as follows: a. Set variable . ' 'You can set up the simulation by loading this program into the CR6 and interconnecting 'the following terminals with a jumper wire to simulate a flow sensor - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 220
'NOTE: This program places a .cal file on the CPU: drive of the CR6. The .cal file must 'be erased to reset the demonstration. 'DECLARE SIMULATED 'DECLARE VARIABLE FOR FieldCal() CONTROL Public CalMode 'DECLARE DATA TABLE FOR RETRIEVABLE CALIBRATION RESULTS DataTable(CalHist,NewFieldCal,200) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 221
3) Example Most CRBasic measurement instructions have a multiplier and offset Wave form analysis, for example, may only require relative data to characterize change. Case: A soil-water sensor is CRBasic example FieldCal() Multiplier (p. 221) to the CR6. 2. To simulate the soil-water sensor signal - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 222
an offset. ' 'You can set up the simulation by loading this program into the CR6 and interconnecting 'the following terminals with a jumper wire to simulate a water content sensor signal FOR FieldCal() CONTROL Public CalMode 'DECLARE DATA TABLE FOR RETRIEVABLE CALIBRATION RESULTS DataTable(CalHist - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 223
, Reps, MultVar, OffsetVar, Mode, KnownVar, Index, Avg) FieldCal(3,WC,1,WCMultiplier,0,CalMode,KnownWC,1,30) 'If there was a calibration, store it into data table CalHist CallTable(CalHist) NextScan EndProg 7.9.12.5.5 Zero Basis (Option 4) Zero basis point calibration loads values into zero-point - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 224
Zero-Basis Point 'This program is written for use with AVW200 as a peripheral to the CR6. The CR6 is 'equipped to make these measurement without the AVW200. Adapt for the CR6. 'Declare Variables and Units Public Pressure1 : Units Pressure1 = PSI Public VW(1,6) Public Equation_Parameters(3) Alias - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 225
, and a measurement device such as the CR6 datalogger. The FieldCalStrain() instruction facilitates shunt calibration of strain-gage systems and but only to introduce use of the technique with the CR6 datalogger. Campbell Scientific strongly urges users to study shunt-calibration theory from other - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 226
reset calibration tests, use the support software File Control (p. 496) menu to delete .cal files, and then send the demonstration program again to the CR6. Case: A 1000 Ω () Calibration (p. 226) as a program to a CR6 datalogger. Figure 60. Quarter-Bridge Strain-Gage with RC Resistor Shunt 226 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 227
Section 7. Installation CRBasic Example 43. FieldCalStrain() Calibration ' the use of the FieldCalStrain() instruction by measuring 'quarter-bridge strain-gage measurements. Public Raw_mVperV Public MicroStrain 'Variables that are arguments in the Zero Function Public Zero_Mode Public - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 228
12.6.1 FieldCalStrain() Quarter-Bridge Shunt Example With CRBasic example FieldCalStrain() Calibration (p. 226) sent to the CR6, and the strain gage stable, use the external keyboard display or software numeric monitor to change the value in variable KnownRes to the nominal resistance of the gage - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 229
Figure 63. Zero Procedure Start Section 7. Installation Figure 64. Zero Procedure Finish 7.9.13 Measurement: Excite, Delay, Measure This example demonstrates how to make voltage measurements that require excitation of controllable length prior to measurement. Overcoming the delay caused by a very - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 230
data to final-data memory CallTable Voltage NextScan EndProg 7.9.14 Measurement: Faster Analog Rates Certain data acquisition applications require the CR6 ended analog voltage measurement instruction. Techniques discussed can also be used with the following instructions: VoltSE() VoltDiff() TCDiff - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 231
have duty cycles less than 100%. Need to work out rates for the CR6. Table 40. Summary of Analog Voltage Measurement Rates Maximum Rate 100 Hz 600 . A single CRBasic measurement instruction bursts on one channel. Multiple channels are measured using multiple instructions, but the burst on one - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 232
at rates between 100 and 600 Hz, the SubScan() / NextSubScan instruction pair is added. Measurements over 100 Hz do not have 100% duty of the scan interval, the CR6 processor catches up on overhead tasks and processes data stored in the buffers. For example, the CR6 can be programmed to measure - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 233
and MaxBuffDepth registers in the CR6 Status table may give insight NextScan buffers is exceeded, a skipped scan, and so a missed-data event, will occur. 7.9.14.2.1 Measurements from 101 to 600 Fields and Descriptions (p. 581). The EndScan instruction occupies an additional 100 µs of measure time - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 234
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. CRBasic Example 48. Measuring VoltSE() at 2000 Hz PipeLineMode - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 235
(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 measuring temperature. 7.9.15.1 PRT Calculation Standards Two CR6 instructions are provided to facilitate PRT measurement. 235 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 236
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 0005 °C (caused by rounding errors in CR6 math). For the range of -200 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 237
Section 7. Installation where R100 and R0 are the resistances of the PRT at 100 °C and 0 °C, respectively. Table 42. 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. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 238
Section 7. Installation 238 Table 44. PRTCalc() Type-Code-3 Sensor US Industrial Standard, alpha = 0.00391 (Reference: OMIL R84 (2003)) Constant Coefficient e 1.8089360E-05 f -1.1682000E-06 g 1.7010560E+00 h -2.6953500E+00 i 8.8564290E+00 j 2.5190880E+02 Table 45. PRTCalc() Type- - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 239
+00 j 2.5091300E+02 7.9.15.2 Measuring PT100s (100 Ω PRTs) PT100s (100 Ω PRTs) are readily available. The CR6 can measure PT100s in several configurations, each with its own advantages. The CR6 is also equipped to measure PRTs with current excitation. 7.9.15.2.1 Self-Heating and Resolution PRT - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 240
. The use of the same range eliminates range translation errors that can arise from the 0.01% tolerance of the range translation resistors internal to the CR6. Calculating the Excitation Voltage The voltage drop across the PRT is equal to VX multiplied by the ratio of RS to the total resistance, and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 241
Section 7. Installation Choosing Rf is: Rf/R0 = 1/0.9890 = 1.0111. The fixed 100 Ω resistor must be thermally stable. Its precision is not important because the exact resistance is incorporated, along with that of the PRT, into the calibrated multiplier. The 10 ppm/°C temperature coefficient of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 242
requirements in this example are the same as in PT100 in Four-Wire Half-Bridge (p. 239). 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 CR6 | CR6 Measurement and Control System - Page 243
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. 245), 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 CR6 | CR6 Measurement and Control System - Page 244
) is calculated as: RS = R1 X' / (1-X') where X' = X / 1000 + R3/(R2+R3) Thus, to obtain the value RS/R0, (R0 = RS @ 0 °C) for the temperature calculating instruction PRTCalc(), the multiplier and offset used in BRFull() are 0.001 and R3/(R2+R3), respectively. The multiplier (Rf) used in the bridge - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 245
Figure 67. PT100 in Four-Wire Full-Bridge Section 7. Installation CRBasic Example 51. PT100 in Four-Wire Full-Bridge ' the measurement of a 100-ohm four-wire full bridge. See 'FIGURE. PT100 in Four-Wire Full-Bridge (p. 245) for wiring diagram. Public BrFullOut Public Rs_Ro Public Deg_C - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 246
close to, but does not exceed, the maximum allowed by one of the CR6 analog-input voltage ranges. Excitation should be limited to avoid too much self CR6 will accommodate (14) 100 Ω PRTs or (4) 1000 Ω PRTs. The use of multiplexers will allow more PRTs to be measured. Contact a Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 247
Figure 68. PT100s with Current Excitation Section 7. Installation _CRBASIC Example -- 6 30 CRBasic Example 52. PT100s with Current Excitation ' the use of current excitation in the measurement of '100-ohm PRTs. See FIGURE. PT100s with Current Excitation (p. 247) for wiring diagram. Public Rs - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 248
Data The CR6 communicates with smart sensors that deliver measurement data through serial data protocols. Read More See Telecommunications and Data Retrieval (p. 393) for background on CR6 be translated into usable information, see the appendix FP2 Data Format (p. 591). Note ASCII / ANSI control - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 249
time can extend into several hours or days. 7.9.16.2 I/O Ports Caution - The following feature or information pertains to the CR6 datalogger in concept only. It is not yet adapted to CR6 specifics. The CR6 supports two-way serial communication with other instruments through ports listed in table - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 250
Campbell Scientific dataloggers. Modbus and DNP3 are industry-standard networking SCADA protocols that optionally operate in the CR6 -12, Modbus, and DNP3 also support addressing systems that allow multiplexing of . Term. baud rate The rate at which data are transmitted. Term. big endian "Big end - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 251
Sensors typically use 7 or 8 data bits. Term. duplex Can be half or full. Full-duplex is simultaneous, bi-directional data. Term. lf Line feed standard used to define the hardware signals and voltage levels. The CR6 supports several options of serial logic and voltage levels including RS-232 logic - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 252
a problem when data. SerialClose() must be used before SerialOpen() can be used again to reconfigure the same serial port, or before the port can be used to communicate with a PC. 7.9.16.5.1 Input Instruction Set Basics Caution - The following feature or information pertains to the CR6 datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 253
(perhaps integers, floats, data with NULL characters). • Destination can be of any type. • Buffer-size margin (one extra record + one byte). SerialOutBlock()1,3 • Binary • Can run in pipeline mode inside the digital measurement task (along with SDM instructions) if the COMPort parameter is set to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 254
Observe the input string in the input string variable in software numeric monitor. Note SerialIn() and SerialInRecord() receive the same data. SerialInRecord() is generally used for data streaming into the CR6, while SerialIn() is used for data that is received in discrete blocks. 4. Parse (split up - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 255
port in CRBasic. • Correctly wire the device to the CR6. • Match the port baud rate to the baud strings together using & instead of +. • Tip - CHR() instruction is used to insert ASCII / ANSI characters into a string. and SerialOutBlock() output the same data, except that SerialOutBlock() transmits - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 256
data streams. However, the CR6 uses Null terminated strings, so anytime a Null is received, a string is terminated. The termination is usually premature when reading binary data. To remedy this problem, the SerialInBlock() or SerialInRecord() instruction are viewed in software, the entire Public - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 257
following feature or information pertains to the CR6 datalogger in concept only. It is not yet adapted to CR6 specifics. CRBasic example Receiving an RS- Public SerialInString As String * 25 'Declare strings to accept parsed data. 'array can be declared as Float or Long Public InStringSplit(2) As - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 258
# character as filters SerialOpen(ComC3,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.9.16.6 Testing Applications A common problem when developing a serial I/O application is the lack - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 259
Section 7. Installation Figure 69. HyperTerminal New Connection Description Figure 70. HyperTerminal Connect-To Settings 259 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 260
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 260 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 261
RS-232 Data (p. 262) illustrates a use of CR6 serial I/O features. Problem: An energy company has a large network of older CR510 dataloggers into which new CR6 dataloggers are to be incorporated. The CR510 dataloggers are programmed to output data in the legacy Campbell Scientific Printable ASCII - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 262
to emulate CR10X and CR23X dataloggers. Solution: CRBasic example Measure Sensors / Send RS-232 Data (p. 262) imports and exports serial data with the CR6 RS-232 port. Imported data are expected to have the form of the legacy Campbell Scientific time set C command. Exported data has the form of the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 263
, LeapMOD400 Dim Leap4 As Boolean, Leap100 As Boolean, Leap400 As Boolean Dim LeapYear As Boolean Dim ClkSet(7) As Float 'One Minute Data Table DataTable(OneMinTable,true,-1) OpenInterval 'sets interval same as found in CR510 DataInterval(0,1,Min,10) Totalize(1, KWHH,FP2,0) Sample(1, KWHHold - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 264
Section 7. Installation If Leap4 = True Then LeapYear = True If Leap100 = True Then If Leap400 = True Then LeapYear = True Else LeapYear = False EndIf EndIf Else LeapYear = False EndIf 'If it is a leap year, use this section. If (LeapYear = True) Then Select Case DOY Case Is < 32 Month = 1 Date = - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 265
Section 7. Installation 'If it is not a leap year, use this section. Else Select Case DOY Case Is < 32 Month = 1 Date = DOY Case Is < 60 Month = 2 Date = DOY + -31 Case Is < 91 Month = 3 Date = DOY + -59 Case Is < 121 Month = 4 Date = DOY + -90 Case Is < 152 Month = 5 Date = DOY + -120 Case Is < - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 266
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 CR6 | CR6 Measurement and Control System - Page 267
must expire before shutting down. The 40 second timeout is generally circumvented when communicating with the datalogger support software (p. 89) because the software sends information as part of the protocol that lets the CR6 know that it can shut down the port. When in the "dormant" state with the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 268
of internal buffering in the CR6 and / or external interfaces, data may not appear in the serial port buffer for a period ranging up to 50 ms (depending on the serial port being used). This should be kept in mind when setting timeouts for the SerialIn() and SerialOut() instructions, or user-defined - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 269
Overview (p. 69) • Serial I/O: SDI-12 Sensor Support - Details (p. 269) 7.9.17.1 SDI-12 Transparent Mode System operators can manually interrogate and enter settings in probes using transparent mode. Transparent mode is useful in troubleshooting SDI-12 systems because it allows direct communication - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 270
Section 7. Installation emulator. Campbell Scientific DevConfig program has a terminal utility, as to other datalogger support software (p. 89). Keyboard displays cannot be used. To enter the SDI-12 transparent mode, enter the datalogger support software terminal emulator as shown in the figure - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 271
Send Data aD0! ... aD9! a or a Send Identification allccccccccmmmmmmvvvxxx...xx. For example, 013CampbellCS1234003STD.03.01 means address = 0, SDI-12 protocol aI! version number = 1.3, manufacturer is Campbell Scientific, CS1234 is the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 272
atttnn where: a is the sensor address ttt is the time (s) until measurement data are available nn is the number of values to be returned when one or v is a variable between 1 and 9. If supported by the sensor manufacturer, v requests variant data. Variants may include alternate units (e.g., °C or - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 273
5M7! elicites a similar response, but the appendage 7 instructs the sensor to return the voltage of the internal battery. aC! Start concurrent measurement. The CR6 requests a measurement, continues program execution, and picks up the requested data on the next pass through the program. A measurement - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 274
. Variables not declared As String will capture only numeric data. Another troubleshooting tool is the terminal-mode snoop utility, which allows data. In programmed mode, the CR6 provides command and timing services within a single line of code. For example, when the SDI12Recorder() instruction is - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 275
support this command. CR6: issues aAb! command CR6: issues aCv! command Sensor: responds with atttnn CR6: if ttt = 0, issues aDv! command(s). If nnn = 0 then NAN put in the first element of the array. Sensor: responds with data CR6: else, if ttt > 0 then moves to next CRBasic program instruction CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 276
sequence normal to the CR6 implementation of aCv!. Consider sensors requires 95 seconds to respond with data after a measurement request. Complicating the instruction begins, resulting is a real scan rate of about 6.5 minutes. 3. There is a 95 s time skew between each sensor measurement. Problem - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 277
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 CR6 | CR6 Measurement and Control System - Page 278
Public Temp(4) DataTable(Temp,True,0) DataInterval(0,5,Min,10) Sample(4,Temp(),FP2) EndTable BeginProg Scan(5,Sec,0,0) PanelTemp(Temp(1),250) 'Measure CR6 wiring panel temperature to use as base for 'simulated temperatures Temp(2), Temp(3), and Temp(4). Temp(2) = Temp(1) + 5 Temp(3) = Temp(1) + 10 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 279
Section 7. Installation SlowSequence Do SDI12SensorSetup(1,7,3,95) Delay(1,95,Sec) SDI12SensorResponse(Temp(4)) Loop EndSequence EndProg CRBasic Example 56. Using Alternate Concurrent Command (aC) ' the use of the special SDI-12 concurrent measurement 'command (aC) when back-to-back - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 280
If ttt not expired, load "1e9" into first variable 'then move to next instruction. If ttt expired, issue aDv! command(s). If ((Temp_Tmp(X) = 2e9) OR 'End of measurement sequence NextScan EndProg SDI-12 Extended Command Support SDI12Recorder() sends any string enclosed in quotation marks in the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 281
operating system version 1. The SDI12SensorSetup() / SDI12SensorResponse() instruction pair programs the CR6 to behave as an SDI-12 sensor. A common use of this feature is the transfer of data from the CR6 to other Campbell Scientific dataloggers over a single-wire interface (terminal configured for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 282
use of the SDI12SensorSetup()/SDI12SensorResponse() 'instruction pair to program the CR6 to emulate an SDI-12 sensor. A common use of this 'feature is the transfer of data from the CR6 to SDI-12 compatible instruments, including 'other Campbell Scientific dataloggers, over a single-wire interface - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 283
battery voltage 7.9.17.3 SDI-12 Power Considerations When a command is sent by the CR6 to an SDI-12 probe, all probes on the same SDI-12 port will wake up. However, only the probe addressed by the datalogger will respond. All other probes will remain active until the timeout period expires. Example - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 284
Section 7. Installation Table 52. Example Power Usage Profile for a Network of SDI-12 Probes Time (s) 16 17 29 30 31 35 Command 1D0! All Probes Awake Yes Time Out Expires Yes 1 mA 66 66 66 66 0.25 0.25 2 mA 66 66 66 66 0.25 0.25 3 mA 66 66 66 66 0.25 0.25 4 mA 66 66 66 66 0.25 0. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 285
Installation Table 53. String Operators Operator Description "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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 286
Float and As String. ' 'Declare Variables Public Num(12) As Float Public Str(2) As String Dim I BeginProg Scan(1,Sec,0,0) I = 0 'Set I to zero 'Data type of the following destination variables is Float 'because Num() array is declared As Float. I += 1 'Increment I by 1 to clock through sequential - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 287
type String, except in the 'case wherein a non-numeric string is encountered as follows. Data type of the 'following destination variables is String because Str() array is declared As String. I = 0 I += 1 Str(I) = 1 + 2 + "hey" + 4 + 5 + "6" I += 1 Str(I) = 1 + 2 + "hey" + (4 + 5) + "6" '= 3hey456 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 288
. To manipulate a string that has NULL characters within it (in addition to being terminated with another NULL), use MoveBytes() instruction. 7.9.18.4 Inserting String Characters CRBasic Example 60. Inserting String Characters Objective: Use MoveBytes() to change "123456789" to "123A56789" Given - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 289
of string variables. To run the 'demonstration, send this program to the CR6. String formatting will occur 'automatically. 'Objective: 'Extract "12.4 Volts" 0D0A 3338.00 7.9.19 Subroutines A subroutine is a group of programming instructions that is called by, but runs outside of, the main program. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 290
OutVar are local since they are declared as parameters in the Sub() instruction, Sub process(j(4) AS Long,OutVar). Variable j() is a four-element pi, then passes results back to the main 'program for storage in a data table. 'Global variables (Used only outside subroutine by choice) 'Declare Counter - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 291
Section 7. Installation 'Declare Data Table DataTable(pi_results,True,-1) ()) CallTable pi_results NextScan EndProg 7.9.20 Web Services The following TCP/IP protocols are supported by the CR6 or when using a cell modem with . For a list of CRBasic instructions, see the appendix TCP/IP (p. 570). 291 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 292
TCP/IP can be found in Campbell Scientific manuals for those modems. For information on manually refreshed to see new data. Links will also be created automatically for any HTML, XML, and JPEG files found on the CR6 drives. To copy files to these drives, choose File Control from the support software - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 293
. Home Page Created using WebPageBegin() Instruction (p. 294). The Campbell Scientific logo in the web page comes from a file called SHIELDWEB2.JPG. That file must be transferred to the CR6 CPU: drive using File Control in the datalogger support software. The CR6 can then access the graphic for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 294
Section 7. Installation Figure 77. Home Page Created Using WebPageBegin() Instruction Figure 78. Customized Numeric-Monitor Web Page 294 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 295
page (in this case, the Campbell 'Scientific logo) comes from a file called SHIELDWEB2.JPG. The graphic file must be copied to 'the CR6 CPU: drive using File Control in the datalogger support software. A second web 'page is created that contains links to the CR6 data tables. 'NOTE: The "_" character - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 296
through FTP. 7.9.20.5 FTP Client The CR6 can act as an FTP client to send a file or get a file from an FTP server, such as another datalogger or web camera. This is done using the CRBasic FTPClient() instruction. Refer to a manual for a Campbell Scientific network link (see the appendix Network - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 297
is connected. See the network-link manual and the CRBasic Editor Help for the TCPOpen() instruction for more information. Information on address in some datalogger instructions. 7.9.20.13 SMTP Simple Mail Transfer Protocol (SMTP) is the standard for e-mail transmissions. The CR6 can be programmed - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 298
supported. Vector direction and standard deviation of vector direction can be calculated weighted or unweighted for wind speed. 7.9.21.1 OutputOpt Parameters In the CR6 WindVector() instruction, the OutputOpt parameter defines the processed data 4 calculated using Campbell Scientific's wind speed - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 299
directions will not agree with CR6-computed hourly vector directions. Correct manual calculation of hourly vector direction / scan rate (secs) For example, if the scan rate is 1 second and the data-output interval is 60 minutes, the standard deviation is calculated from all 3600 scans when the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 300
the sample vectors is described by a vector of magnitude U and direction Θu. If the input sample interval is t, the number of samples in data-storage interval T is N = T / t. The mean vector magnitude is Ū = U / N. Scalar mean horizontal wind speed, S: where in the case of orthogonal sensors: Unit - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 301
. Mean Wind-Vector Graph where for polar sensors: or, in the case of orthogonal sensors: Resultant mean wind direction, Θu: Standard deviation of wind direction, σ (Θu), using Campbell Scientific algorithm: 301 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 302
Section 7. Installation The algorithm for σ (Θu) is developed by noting (FIGURE. Standard Deviation of Direction (p. 302) ) that where Standard Deviation of Direction Figure 81. Standard Deviation of Direction The Taylor Series for the Cosine function, truncated after 2 terms is: For deviations less - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 303
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 and have never - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 304
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 305
CR6 the flexibility to measure many sensor types. Contact a Campbell Scientific application engineer if assistance is required in assessing CR6 CR6. If a scan starts at 15:00:00, data measurement, if the CallTable() instruction is called from within the is not a problem with most applications because - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 306
Making measurements in the scan before time-consuming code. • Programming the CR6 such that the time stamp reflects the system time rather than the scan . The DataTime() instruction is a more recent introduction that facilitates time stamping with system time. See Data Table Declarations (p. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 307
rules. Consult CRBasic Editor Help for more information on specific instructions. 8.1.2 Analog Measurements - Details Reading List: • Analog Measurements - Overview (p. 57) • Analog Measurements - Details (p. 307) The CR6 measures the following sensor analog output types: • Voltage o Single-ended - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 308
type in a scan. If the Reps parameter of a measurement instruction is set to an argument >1, these measurements are slightly faster because 6. Apply multitplier (Mult) and offset (Offset) to measured result. The CR6 can make and store measurements from six differential or 12 singleended inputs at - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 309
time may be preferred at times to, • minimize time skew between successive measurements. • maximize throughput rate. • maximize life of the CR6 power supply. • minimize polarization of polar sensors such as those for measuring conductivity, soil moisture, or leaf wetness. Polarization may cause - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 310
the wiring panel. V+ corresponds to odd or even numbered U terminals on the CR6 wiring panel. The single-ended configuration is used with the following CRBasic instructions: • VoltSE() • BrHalf() • BrHalf3W() • TCSE() • Therm107() • Therm108() • Therm109() • Thermistor() Reading List: • Differential - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 311
too rapidly, range argument AutoRange allows the CR6 to automatically choose the voltage range. AutoRange the range picked by the first measurement. To avoid problems with a signal on the edge of a range, voltages between ±200 mV AutoRange1 datalogger determines the most suitable range 1 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 312
voltages on the V+ and V- inputs are within the specified input limits, which for the CR6 is ±5 Vdc relative to ground. Input voltages in which V+ or V- or both are measurement quality: • Preventing and Attacking Measurement Noise Problems • Benefits of Input Reversal and Excitation Reversal for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 313
time. • Sensor is not designed for differential measurements. Many Campbell Scientific sensors are not designed for differential measurement, but the draw single-ended measurement is referenced to CR6 ground, any difference in ground potential between the sensor and the CR6 will result in an error - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 314
output, or report a temperature that is approximately 25 °C too high. A common problem with ground-potential difference occurs in applications wherein external, signal-conditioning circuitry is powered by the same source as the CR6, such as an ac mains power receptacle. Despite being tied to the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 315
-40 to 70 °C -55 to 85 °C ±(0.03% of reading + offset) ±(0.03% of reading + offset) ±(0.03% of reading + offset) 1 Assumes the CR6 is within factory specifications Table 64. Analog-Voltage Measurement Offsets Input Voltage Range (mV) Differential Measurement With Input or Excitation Reversal - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 316
on large signals. Example: • Sensor-signal voltage: ≈1050 mV • CRBasic measurement instruction: VoltDiff() • Programmed input-voltage range (Range): mV5000 (±5000 mV) • Input measurement reversal (RevDiff): True • CR6 circuitry temperature: 10 °C Accuracy of the measurement is calculated as follows - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 317
and Attacking Measurement Noise Problems, which is available at www.campbellsci.com. The digital output from the CR6 delta sigma A-to-D is a parameter in CRBasic analog measurement instructions such as VoltDiff(). For example, 50 Hz or 60 Hz noise is common in areas serviced by 50 Hz or 60 Hz the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 318
both the source resistance and fixed-input capacitance (4.7 nfd) of the CR6. Rise and decay waveforms are exponential. Figure Input Voltage Rise and SettlingTime parameter of an analog measurement instruction allows tailoring of measurement instruction settling times with 100 µs resolution up - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 319
reversal results in a 4 ms increase in time for the CR6 to perform the instruction. Figure 86. Input-voltage rise and transient decay b Table cable can be measured with the CR6. Programming a series of measurements with increasing settling times will yield data that indicate at what settling time - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 320
The first six measurements are shown in table First Six Values of Settling-Time Data (p. 321). Each trace in figure Settling Time for Pressure Transducer (p. 321 CR6 wiring panel. Public RefTemp 'Declare variable to receive instruction BeginProg Scan(1,Sec,3,0) PanelTemp(RefTemp, 250) 'Instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 321
87. Settling Time for Pressure Transducer Table 67. First Six Values of Settling-Time Data TIMESTAMP REC PT(1) PT(2) PT(3) Smp Smp Smp 1/3/2000 23:34 0 is not necessary for the routine operation of the CR6. The information is included to foster a deeper understanding of the open-input detection - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 322
an open-input, such as a broken sensor or loose connection, is available in the CR6. • The option is selected by appending a C to the Range code. • Using this in the CRBasic measurement instruction to allow oscillations to decay before the Ato-D conversion may mitigate the problem. Table 68. Range - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 323
>5 mA are usually undesirable. The error can be avoided by routing power grounds from these other devices to a power ground G terminal on the CR6 wiring panel, rather than using a signal ground ( ) terminal. Ground currents can be caused by the excitation of resistive-bridge sensors, but these do - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 324
. For differential measurements without input reversal, this offset voltage measurement is performed as part of the routine CR6 self-calibration. Single-ended measurement instructions VoltSE() and TCSe() MeasOff parameter determines whether the offset voltage measured is done at the beginning of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 325
69. Offset Voltage Compensation Options CRBasic Measurement Instruction VoltDiff() VoltSe() TCDiff() TCSe() BrHalf() BrHalf3W (-4.997 mV) = 10.000 mV 10.000 mV / 2 = 5.000 mV When the CR6 reverses differential inputs or excitation polarity, it delays the same settling time after the reversal as it - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 326
When MeasOff is enabled (= True), the CR6 measures the offset voltage of the ground the increase in speed comes at the cost of accuracy because, 1 RevDiff, RevEx entered into the Reps parameter of the VoltDiff() or VoltSE() instruction. A close approximation is: time skew = settling time + - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 327
checked and re-calibrated by Campbell Scientific for applications with critical analog voltage measurement requirements. A minimum two-year recalibration cycle is recommended. Unless a Calibrate() instruction is present in the running CRBasic program, the CR6 automatically performs self-calibration - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 328
ranges. Results of this command are listed in the table Calibrate() Instruction Results. Table 70. Status Table Calibration Entries A table of calibration values is not yet available for the CR6 Table 71. Calibrate() Instruction Results A table of calibration values is not yet available for the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 329
Measurements section of the CR1000 Datalogger Operator's Manual, which is available at www Campbell Scientific Dataloggers (2MI-B) • CURS100 100 Ohm Current Shunt Terminal Input Module The CR6 voltage, resistance can be calculated. CRBasic instructions for measuring resistance include: BrHalf() - - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 330
, MeasOff, and RevEx .When more than one measurement per sensor are necessary, such as occur with the BrHalf3W(), BrHalf4W(), and BrFull6W instructions, input and excitation reversal are applied separately to each measurement. For example, in the fourwire half-bridge (BrHalf4W()), when excitation is - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 331
-Bridge Circuits with Voltage Excitation Resistive-Bridge Type and Circuit Diagram Three-Wire Half-Bridge1,3 CRBasic Instruction and Fundamental Relationship CRBasic Instruction: BrHalf3W() Fundamental Relationship2: Section 8. Operation Other Relationships Four-Wire Half-Bridge1,3 CRBasic - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 332
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. 597) for a list of available terminal input - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 333
Resistive-Bridge Type and Circuit Diagram Four-Wire Resistance2 CRBasic Instruction and Fundamental Relationship Section 8. Operation Relational Formulas CRBasic instruction: Resistance(). Fundamental relationship3: Full Bridge2 CRBasic Instruction: Resistance() Fundamental relationship3: 333 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 334
current; IxR = Current Return; V1 = sensor return voltage; Rs = "variable" or "sensing" resistor. 3Where X = result of the CRBasic bridge measurement instruction with a multiplier of 1 and an offset of 0. CRBasic Example 66. Four-Wire Full-Bridge Measurement and Processing ' the measurement - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 335
• Preventing and Attacking Measurement Noise Problems • Benefits of Input Reversal and Instructions. Note Error discussed in this section and error-related specifications of the CR6 do 315). Assumptions that support the ratiometric-accuracy specification include: • CR6 is within factory - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 336
the particular strain bridge configuration used. All strain gages supported by StrainCalc() use the full-bridge schematic. In bridge has four. StrainCalc() requires a bridge-configuration code. Table StrainCalc() Instruction Equations (p. 336) shows the equation used by each configuration code. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 337
measurement programming in CRBasic Editor Help for the PulseCount() and TimerIO() instructions. Note Peripheral devices are available from Campbell Scientific to expand the number of pulse-input channels measured by the CR6. Refer to the appendix Measurement and Control Peripherals Lists (p. 369 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 338
(p. 339) summarizes available measurements, terminals available for those measurements, and the CRBasic instructions used. The number of terminals configurable for pulse input is determined from the table CR6 Terminal Definitions (p. 73). For example, suppose you need to measure the seven pulse - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 339
Operation Figure 90. Terminals Configurable for Pulse Input Table 77. Pulse Measurements: Terminals and Programming Measurement U Terminals C Terminals CRBasic Instruction Low-level ac, counts Odd numbered only Low-level ac, Hz Odd numbered only PulseCount() Low-level ac, running average - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 340
Section 8. Operation TimerIO( ) Switch closure, running average Calculated period Calculated frequency Time from edge on previous port Time from edge on port 1 Count of edges Pulse count, period Pulse count, frequency 8.1.3.1 Terminal - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 341
20 mV RMS o 0.5 to 200 Hz at 200 mV RMS o 0.3 to 10 kHz at 2000 mV RMS o 0.3 to 20 kHz at 5000 mV RMS • CRBasic instruction: PulseCount() Internal ac coupling is used to eliminate dc-offset voltages of up to ±0.5 Vdc. C Terminals Low-level ac signals cannot be measured directly by - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 342
TimerIO()), improves the resulting frequency resolution from 1 Hz to 0.1 Hz. Averaging can be accomplished by the Average(), AvgRun(), and AvgSpa() instructions. Also, PulseCount() has the option of entering a number greater than 1 in the POption parameter. Doing so enters an averaging interval in - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 343
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 filtered, bounces can cause multiple counts per event. The CR6 automatically filters bounce. Because of the filtering, the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 344
540 ns • 8.1.3.6 Edge Counting Edge counts can be measured on U or C terminals. U and C Terminals • Maximum input frequency 250 kHz • CRBasic instruction: TimerIO() • Rising or falling edges of a square-wave signal are detected: o Rising edge - transition from 3.5 Vdc. o Falling edge - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 345
Specifications • Pay attention to specifications. Take time to understand the signal to be measured and compatible input terminals and CRBasic instructions. 8.1.3.7.2 Input Filters and Signal Attenuation U or C terminals are equipped with pulse-input filters to reduce electronic noise that can cause - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 346
filter) 8.1.4 Period Averaging - Details Reading List: • Period Averaging - Specifications (p. 95) • Period Averaging - Overview (p. 66) • Period Averaging - Details (p. 346) The CR6 can measure the period of a signal on any U terminal. The specified number of cycles is timed with a resolution of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 347
-to-peak, a dc blocking capacitor is recommended to center the signal at CR6 ground (threshold = 0) because of offset voltage drift along with limited accuracy 67) • Vibrating-Wire Measurements - Details (p. 347) The CR6 can measure vibrating-wire or vibrating-strip sensors, including strain gages, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 348
same frequency is induced on the cable connecting the sensor to the datalogger or interface. Measuring the resonant frequency by means of period averaging is the classic technique, but Campbell Scientific has developed static and dynamic spectralanalysis techniques (Vspect (p. 512)tm) that produce - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 349
instruction CDM-VW300(). Consult the analyzer user manual for system integration help. Campbell Scientific sensors with thermistor can be connected to the CR6. Use the Short Cut program generation utility Cut is distributed free of charge with datalogger support software (p. 493) and is available for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 350
Section 8. Operation 8.1.5.1.2 Static Vspect Measurement Theory The CR6 uses an audio A-to-D (p. 489) converter to capture vibrating-wire signals on U terminals. The graph in the figure Unconditioned Time-Domain Data (p. 351) shows raw time-series data recorded after the vibrating-wire sensor was - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 351
: • Decay ratio • Signal-to-noise ratio • Low signal-strength amplitude warning • Invalid voltage-supply warning The time-series data graphed in the figure Unconditioned Time-Series Data (p. 350) show the decay from the start of the sampling, labeled Beginning Amplitude, to the end of the sampling - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 352
data shown in the figure Unconditioned Spectrum-Analysis Data (p. 351) are derived from the time-series data through an FFT (p. 495). These data optional parameter in the AVW200 CRBasic Instruction. See Section 6.1 for details about CR6, which is an internal problem 116) software CR6 vibrating-wire - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 353
Section 8. Operation 6500 Hz. The narrow-swept measurement recorded the greatest sensor noise at a frequency of 935 Hz with a signal-to-noise ratio of 318 (more signal / less noise). Sweeping over the wide range shows noise at 4150 Hz with a signal-to-noise ratio of 21.4 (less signal / more noise). - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 354
Section 8. Operation Figure 99. Wide Sweep, Low Noise Additional measurements were made on the same sensor with an electric rotary drill operated 10 mm from the sensor. The measurements graphed in the figures Narrow Sweep, High Noise (p. 355) and Wide Sweep, High noise (p. 356) show the effect of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 355
Section 8. Operation Note Check the manufacturer specifications for the sensor frequency and excitation ranges to help determine the swept frequency range. Figure 100. Narrow Sweep, High Noise 355 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 356
frequency response while excitation is still active. Because wider-excitation sweeps take longer, the resonant response decays for a longer time before the CR6 can measure it. The resulting resonant amplitude is smaller. The figure Wide Sweep, High Noise (p. 354) shows this effect, with the resonant - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 357
leakage. Calculating Measurement Error See Appendix E in the manual CDM-VW300 Series Dynamic Vibrating-Wire Analyzers available at () instruction that control sweptfrequency range. The table VibratingWire() Instruction: Outputs (p. 358) lists outputs from the measurement. Frequency data are - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 358
measurements (takes _60Hz ms) Filters 60 Hz noise (takes 17.3 _50Hz ms) Filter 50 Hz noise (takes 20.7 Table 84. VibratingWire() Instruction: Outputs Output Units Description Resonant frequency Hz Frequency of the peak response Response amplitude1 mV RMS Amplitude of the peak response - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 359
Section 8. Operation Displacement = 3.87 inches The CRBasic example Vspect Vibrating-Wire Measurement (p. 364) lists code that performs this conversion. 359 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 360
Section 8. Operation Figure 102. Vibrating-Wire Sensor Calibration Report 360 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 361
8. Operation Vibrating-Wire Temperature Measurement Temperature data from the two-wire RTD that is vibrating-wire coil leads are connected. The RTD measurement is enabled in the VibratingWire() instruction with an argument other than zero in the ThermFnotch parameter . When the RTD measurement - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 362
Section 8. Operation • Temperature coefficient of the bridge resistors • Thermistor interchangeability • Error of the Steinhart-Hart equation or RTD coefficients • Cable resistance Of these, only errors induced by cable resistance have practical remedies. Higher temperatures and longer cables - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 363
Section 8. Operation Figure 104. Error from thermistor-wire resistance on 1000 ft (304.8 m) of cable. Computed for a two-wire thermistor embedded in a vibratingwire sensor. Thermistor lead wire resistance is 16 Ω per foot; size is 22 AWG.. Shows error increasing with cable temperature. Figure 105. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 364
-wire displacement sensor. Sensor 'outputs are frequency (hertz) as a function of displacement and resistance (ohms) as a 'function of temperature. The VibratingWire() instruction outputs displacement measurement 'in terms of hertz and temperature in terms of degrees Celcius. After the VibratingWire - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 365
- Details (p. 365) 8.1.6.1 SDI-12 Recording Read More SDI-12 Sensor Support (p. 269) and Serial Input / Output (p. 559). SDI-12 is a communication protocol developed to transmit digital data from smart sensors to data-acquisition units. It is a simple protocol, requiring only a single communication - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 366
. 8.1.6.2 RS-232 and TTL Read More Serial Input / Output Instructions (p. 559) and Serial I/O (p. 248). The CR6 can receive and record most TTL (0 to 5 Vdc) and true RS-232 data from devices such as smart sensors. See the table CR6 Terminal Definitions (p. 73) for those terminals and serial ports - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 367
, a 100 Ω resistor is connected in series at the switch to prevent arcing. This resistor is installed on all rain gages currently sold by Campbell Scientific. Figure 108. Current-Limiting Resistor in a Rain Gage Circuit 8.1.8.4 RS-232 Sensors RS-232 sensor cable lengths should be limited to 50 feet - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 368
signal. When cabling can be run from CR6 to CR6, each CR6 can catch the rising edge of a digital pulse from the Master CR6 and synchronize measurements or other functions, using the WaitDigTrig() instructions, independent of CR6 clocks or data time stamps. When programs are running in - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 369
datalogger in the network must be programmed with a PakBusClock() instruction. Note Use of PakBus clock functions re-synchronizes the Scan() instruction. Use should not exceed once per minute. CR6 peripherals that receive instruction from, and send data to, the CR6 using proprietary communication - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 370
Low-level ac input modules increase the number of low-level ac signals a CR6 can monitor by converting low-level ac to high-frequency pulse. Refer to the Several Campbell Scientific serial I/O modules are designed to facilitate reading and parsing serial data. Campbell Scientific recommends - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 371
of the CR6. Onboard PortSet() or WriteIO() instructions. Terminals can also Drivers Read More For more information see appendix Relay Drivers Modules List (p. 599). Several relay drivers are manufactured by Campbell Scientific. Compatible, inexpensive, and reliable single-channel relay drivers - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 372
with Relay (p. 372) shows a typical relay driver circuit in conjunction with a coil driven relay, which may be used to switch external power to a device. In this example, when the terminal configured for control is set high, 12 Vdc from the datalogger passes through the relay coil, closing the relay - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 373
in the datalogger support software (p. 89) File Control (p. 496) menu. By default, final-data memory (memory for stored data) is organized as ring memory. When the ring is full, oldest data are overwritten by newest data. The DataTable() instruction, however, has an option to set a data table to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 374
copy of requested final-memory 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 feature or information pertains to the CR6 datalogger in concept only. It is not yet adapted to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 375
Section 8. Operation Table 86. CR6 Main Memory Use Static Memory Comments Operational memory used by -up, recompile, and watchdog events if the PreserveVariables instruction is in the running program. Final-Data Memory Stores data. Fills memory remaining after all other demands are satisfied - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 376
a Campbell Scientific mass-storage device (p. 603) is connected. Caution - The following feature or information pertains to the CR6 datalogger in concept only. It is not yet adapted to CR6 specifics. Table 87. Data-Storage Drives Drive CPU:1 USR:2 USB: Recommended File Types CR6, .CAL CR6, .CAL - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 377
shown in datalogger support software File Control (p. 496) window. 8.3.1.1.4 USB: Drive USB: drive uses Flash memory on a Campbell Scientific mass storage device (see the appendix Mass Storage Devices (p. 603) ). Its primary purpose is the storage of ASCII data files. Measurement data can be stored - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 378
information on programming the CR6 to use memory cards. Note CardConvert software, included with mid- and top-level datalogger support software (p. 604), converts binary card data to the standard Campbell Scientific data format. When a data table is sent to a memory card, a data table of the same - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 379
support software (p. 89) graphing and reporting tools, header, time stamps, and record numbers are usually required. Fully compatible formats are indicated with an asterisk. A more detailed discussion of data-file formats is available in the Campbell Scientific publication LoggerNet Instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 380
Section 8. Operation Table 89. TableFile()-Instruction Data-File Formats TableFile() Format Option Base File Format Elements datalogger support software (p. 89) data-viewing and graphing utilities 2SeeWriting High-Frequency Data to CF Cards (p. 206) for more information on using option 64. Data - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 381
format.CR1 13.2921.04 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 382
similar information unless a non-header format option is selected in the TableFile() instruction in the CR6 CRBasic program. Line 1 - Data Origins Includes the following metadata series: file type, station name, CR6 model name, CR6 serial number, OS version, CRBasic program name, program signature - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 383
The CR6 reports back to the datalogger support software data at program send. 8.3.2.3 Manual Data-Table Reset Data-table memory is selectively reset from • Support software Station Status (p. 509) command • external keyboard display: Data | Reset Data Tables 8.3.2.4 Formatting Drives CPU:, USR:, USB - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 384
File Control Functions (p. 384), files in CR6 memory (program, data, CAL, image) can be managed or controlled with datalogger support software (p. 89), CR6 Web API (p. 418), or CoraScript (p. 492). Use of CoraScript is described in the LoggerNet software manual, which is available at www.campbellsci - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 385
(p. 376) 5Automatic with Campbell Scientific mass storage device or memory card and Powerup.ini. See Power-up (p. 387) 6CRBasic instructions (commands). See Data-Table Declarations (p. 518) and File Management (p. 384) and CRBasic Editor Help. 7Datalogger support software Retrieve (p. 496) command - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 386
optionally altered by a serial number inserted before the file type. This serial number is used by the datalogger to know which file to delete after the serial number exceeds the specified number of files to retain will grow to approximately 5 KB in size, and then new data will begin overwriting old - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 387
the CR6 with the support software Send command, data are always deleted before the program runs. When the program is sent using support software File memory device such as a USB: (p. 603) or CRD: (p. 603) drive. Steps to copy files from the external memory drive to the datalogger are: 1. Place a text - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 388
data memory management comparable to the support software File Control (p. 496) feature. Note that the CRD: drive has precedence over the USB drive of the CR6. The file is saved to the memory drive, along with the operating system or user program file, using the datalogger support software (p. 604) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 389
up to 22 characters long. • Device is the CR6 memory drive to which the accompanying operating system or 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 390
) file into FLASH as the new OS. 9,CR6.Std.28.obj Table 98. Powerup.ini Example. Run Program from USB: Drive 'A program file is carried on an external USB: drive. 'Do not copy program file from USB: 'Run program always, erase data. 13,toobigforcpu.cr1,usb: Table 99. Powerup.ini Example. Run Program - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 391
, the previous run-on-power-up program runs. 8.3.3.5 File Management Q & A Q: How do I hide a program file on the CR6 without using the CRBasic FileManage() instruction? A: Use the CoraScript (p. 492) File-Control command, or the web API (p. 418) FileControl command. 8.3.4 File Names The maximum - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 392
Root directory is full 17 Bad 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 21 Trying to mkdir an large program (too large to fit on the CPU: drive) can be compiled into CR6 main 392 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 393
Protocols The CR6 communicates with datalogger support software (p. 89) and other Campbell Scientific dataloggers (p. 595) using the PakBus (p. 503) protocol (PakBus Overview (p. 395) ). Modbus, DNP3, and web API are also supported. See Alternate Telecommunications and Data Retrieval - Overview - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 394
have access to a CR6 without disrupting the continuity of data. PakBus® allows multiple PCs to communicate with the CR6 simultaneously when proper telecommunication networks are installed. Typically, the PC initiates telecommunications with the CR6 with datalogger support software (p. 604). However - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 395
PakBus - Details (p. 395) The CR6 communicates with computers or other Campbell Scientific dataloggers with PakBus. PakBus is a proprietary PakBus Information and the PakBus Networking Guide, available at www.campbellsci.com. 8.5.1 PakBus Addresses CR6s are assigned PakBus® address 1 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 396
typically a central router. o Routers can be router-capable dataloggers or communication devices. The CR6 is a leaf node by factory default. It can be configured Datalogger • CR800 Datalogger • • CR1000 Datalogger • • CR3000 Datalogger • • CR5000 Datalogger • • LoggerNet Software - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 397
• 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. 395) ): • node • link • neighbor • neighbor-filters - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 398
negotiate or renegotiate a neighbor relationship with the broadcasting node. 8.5.3.4 Neighbor Lists PakBus devices in a network can be configured with a neighbor list. The CR6 sends out a hello-message to each node in the list whose CVI has expired at a random interval1. If a node responds, a hello - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 399
communications such as scheduled LoggerNet-data collections or datalogger-todatalogger communications. The idea Troubleshooting Various tools and methods have been developed to assist in troubleshooting that the CR6 sends is governed by the Max Packet Size setting for the datalogger as well as - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 400
500 bytes. Note Do not use packet sizes greater than 90 when pinging with 100 mW radio modems and radio enabled dataloggers. See the appendix Data Retrieval and Telecommunication - Peripherals Lists (p. 601). Pinging with ten repetitions of each packet size will characterize the link. Before pinging - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 401
the router with static routes that report that all of the dataloggers are neighbours to the server. The tree map configures static routes wherein "CR6" is configured as a neighbour and "CR6_2" and "CR6_3" are configured to use "CR6" as the router. Deeper nesting, while allowed, is meaningless in - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 402
uses the RS-232 port of the first CR6 to communicate with all CR6s. All LoggerNet functions, such as send programs, monitor measurements and collect data, are available to each CR6. CR6s can also be programmed to exchange data with each other (the data exchange feature is not demonstrated in this - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 403
instructions to power CR6s and connect them to the PC. Close other programs that may be using the PC COM port, such as LoggerNet, PC400, PC200W, HotSync, etc. 2. Click on the Connect button at the lower left. 3. Set CR6 settings using DevConfig as outlined in table PakBus-LAN Example Datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 404
Figure 118. DevConfig Deployment | Advanced Tab Table 104. PakBus-LAN Example Datalogger-Communication Settings Software→ Device Configuration Utility (DevConfig) Tab→ Deployment Sub-Tab→ Datalogger ComPort Settings Setting→ PakBus Adr COM1 COM2 Sub-Setting→ Baud Rate Neighbors1 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 405
Setup Figure 119. LoggerNet Network-Map Setup: COM port In LoggerNet Setup, click Add Root and add a ComPort. Then Add a PakBusPort, and (4) CR6 dataloggers to the device map as shown in figure LoggerNet Device-Map Setup (p. 405). Figure 120. LoggerNet Network-Map Setup: PakBusPort As shown in - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 406
8. Operation Figure 121. LoggerNet Network-Map Setup: Dataloggers As shown in figure LoggerNet Device-Map Setup: Dataloggers (p. 406), set the PakBus® address for each CR6 as listed in table PakBus-LAN Example Datalogger-Communication Settings (p. 404). 8.5.7 Route Filters Restricts routing - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 407
the value of the port number is ≥ 101, the connection is made through PakBus/TCP, either by the CR6 executing a TCPOpen() instruction or by having a connection made to the PakBus/TCP logger service. via neighbor adr Specifies address of neighbor/router to be used to send messages for this route. If - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 408
exchange encrypted commands and data. Encryption uses the AES CR6 can also communicate with an unencrypted datalogger. Use an EncryptExempt() instruction in the CRBasic program to define one or more PakBus addresses to which encrypted messages will not be sent. Campbell Scientific products supporting - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 409
List: • Alternate Telecommunications - Overview (p. 86) • Alternate Telecommunications - Details (p. 409) The CR6 communicates with datalogger support software (p. 89) and other Campbell Scientific dataloggers (p. 595) using the PakBus (p. 503) protocol (PakBus Overview (p. 395) ). Modbus, DNP3 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 410
CR6 program with DNP instructions will take arrays of real time or processed data and map them to DNP arrays in integer or binary format. The CR6 responds to any DNP master with the requested data or sends unsolicited responses to a specific DNP master. DNP communications are supported in the CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 411
the CR6 to return data when polled by the DNP3 master using the following three actions: 1. Place DNP() at the beginning of the program between BeginProg and Scan(). Set COM port, baud rate, and DNP3 address. 2. Setup the variables to be sent to the master using DNPVariable(). Dual instructions - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 412
68. Implementation of DNP3 ' a basic implementation of DNP3 in the CR6. The CR6 'is programmed to return data over IP when polled by the DNP3 master. Essential elements 'of the program are as follows: ' 1. DNP() instruction is placed at the beginning of the program between BeginProg ' and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 413
* 100 'Default Datalogger Battery Voltage measurement Batt_Volt CR6 supports Modbus master and Modbus slave communications for inclusion in Modbus SCADA networks. Modbus is a widely used SCADA communication protocol that facilitates exchange of information and data between computers / HMI software - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 414
Equivalents (p. 414) lists terminology equivalents to aid in understanding how CR6s fit into a SCADA system. Table 107. Modbus to Campbell Scientific Equivalents Modbus Domain Data Form Campbell Scientific Domain Coils Single Bit Ports, Flags, Boolean Variables Digital Registers 16 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 415
Modbus domain input / holding registers. 8.6.3.2.2 CRBasic Instructions (Modbus) Complete descriptions and options of commands are available in CRBasic Editor Help. ModbusMaster() Sets up a CR6 as a Modbus master to send or retrieve data from a Modbus slave. Syntax ModbusMaster(ResultCode, ComPort - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 416
bigendian to little-endian data. See the appendix Supported Modbus Function Codes Modbus protocol has many function codes. CR6 commands support the following. Table 109. Supported CR6 needs to output reverse-byte order words. To reverse the byte order in the CR6, use the MoveBytes() instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 417
Endianness (p. 593). 8.6.3.3 Troubleshooting (Modbus) Test Modbus functions on the CR6 with third party Modbus software. Further information is available option with the CR6. Contact Campbell Scientific for details. 8.6.3.5 Modbus Q and A Q: Can Modbus be used over an RS-232 link, 7 data bits, even - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 418
(1,Sec,0,0) 'In the case of the CR6 being the ModBus master then the 'ModbusMaster instruction would be used (instead of fixing 'the CR6 operating system (see operating system (p. 502) in the glossary). API commands are also used with Campbell Scientific's RTMC web server datalogger support software - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 419
available for PC to CR6 support (p. 89). 8.6.4.1 Authentication The CR6 passcode security scheme described ) software Net Services tab, Edit .csipasswd File button. When in Datalogger . but the CRBasic parameter SetValue in the WebPageBegin() instruction will function. However, if .csipasswd sets - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 420
Section 8. Operation where, ip_adr = the IP address of the CR6. CommandName = the the API command. parameters / arguments = DataQuery Specifies response format. Specifies range of data with which to respond. Argument(s) • source: dl (datalogger is data source): default, applies to all commands - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 421
Section 8. Operation p1 p2 value time action file file2 expr DataQuery DataQuery SetValueEx ClockSet FileControl FileControl FileControl NewestFile • maximum number of • integer number of records (when using records (when using most-recent argument). most-recent • beginning date and/or - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 422
&format=html&mode=date-range&p1=2010-07-27T12:00:00&p2=2010-0727T14:00:00 8.6.4.4 Data Management 8.6.4.4.1 BrowseSymbols Command BrowseSymbols allows a web client to poll the host CR6 for its data memory structure. Memory structure is made up of table name(s), field name(s), and array sub-scripts - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 423
Table 7 - Array 8 - Scalar is_enabled Boolean value that is set to true if the symbol is enabled for scheduled collection. This applies mostly to LoggerNet data sources. is_read_only Boolean value that is set to true if the symbol is considered to be read-only. A value of false would indicate an - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 424
Section 8. Operation XML Response Statusdl:Status6truefals etrue MainDatadl:MainData6true falsetrue BallastTank1dl:BallastTank16true< /td> - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 425
,"is_read_only": false,"can_expand": true}, {"name": "Public","uri": "dl:Public","type": 6,"is_enabled": true,"is_read_only": false,"can_expand": true} ] } 8.6.4.4.2 DataQuery Command DataQuery allows a web client to poll the CR6 for data. DataQuery typically takes the form: 425 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 426
optional. If table name is not used, the entire URI syntax is not needed as dl (CR6) is the default data source. mode Required. Modes for temporal-range of collected-data: most-recent returns data from the most recent number of records. p1 specifies maximum number of records. since-time returns - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 427
=2012-09-14T8:00:00&p2=2012-09-14T9:00:00 Response: collect all data from table MainData within the range of p1 to p2* http://192.168.24.106 determines the format of the response. For more detail concerning data response formats, see the Data File Formats (p. 379) section. HTML Response When html - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 428
-name>CPU:IndianaHarbor_081712.CR1 33322 66 66 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 429
v1> 66 When json is entered in the DataQuery format parameter, the response will be the DataQuery format parameter, the response will be formated as Campbell Scientific TOA5. Following is an example response: "TOA5","TXSoil"," - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 430
23:00:00",12,5,-0.9353842,-0.9822836,-0.930173,0.8936957,69.83805,0 When tob1 is entered in the DataQuery format parameter, the response will be formated as Campbell Scientific TOB1. Following is an example response. 430 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 431
functions by means of changing the value of a variable. 8.6.4.5.1 SetValueEx Command SetValueEx allows a web client to set a value in a host CR6 CRBasic variable. http://ip_address/?command=SetValueEx&uri=dl:table.variable&valu e=x.xx SetValueEx requires a minimum .csipasswd access level of 2 (set - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 432
- 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 A text description of the outcome code. HTML Response When - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 433
or if it is set to "datalogger" uri (uri=dl) or an empty string (uri=), the command is sent to the CR6 web server.1 format Specifies the format or invalid, the response is HTML. time Specifies the time to which the CR6 real-time clock is set. This value must conform to the format described for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 434
response formats, see the Data File Formats (p. 379) section. Responses contain three fields as described in the following table: Table 117. ClockSet API Command Response outcome 1 - The clock was set 5 - Communication with the CR6 failed 6 - Communication with the CR6 is disabled 8 - An invalid - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 435
is excluded, or if it is set to "datalogger" uri (uri=dl) or an empty string (uri=), the host CR6 real-time clock is returned.1 format Specifies the the format defaults to HTML. For more detail concerning data response formats, see the Data File Formats (p. 379) section. Responses contain three - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 436
Section 8. Operation HTML Response time Specifies the current value of the CR6 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 437
needing frequent management. 8.6.4.7.1 Sending a File to a Datalogger A file can be sent to the CR6 using an HTTPPut request. Sending a file requires a -XPUT -v Description Instructs Curl.exe to use the HTTPPut command Instructs Curl.exe to print all output to the screen -S Instructs Curl.exe to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 438
and compiles the new OS in the same manner as if it was sent via a datalogger support software (p. 89) Connect screen. Other files sent to a CR6 drive work just as they would in datalogger support software (p. 89) File Control. The exception is that CRBasic program run settings cannot be set. To - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 439
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 USR:APITest.dat& action=4 Response: APITest.dat is deleted from the CR6 USR: drive. http://192.168.24.106/?command=FileControl&file=CPU - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 440
can resume immediately. This parameter is needed because many of the commands will cause the CR6 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 441
: http://192.168.24.106/?command=ListFiles Response: returns the drive structure of the host CR6 (CPU:, USR:, CRD:, and USB:). http://192.168.24.106/CPU/?command=ListFiles Response: lists the files on the host CR6 CPU: drive. ListFiles Response The format of the response depend on the value of the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 442
Section 8. Operation 442 "http://www.w3.org/TR/html4/loose.dtd"> ListFiles Response ListFiles Response Path Is Directory Size - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 443
Section 8. Operation XML Response ListFiles Response Path Is Directory Size Last Write Run Now Run On Power Up Read Only Paused - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 444
match the expression is returned. For instance, a web page may be designed to show the newest image taken by a camera attached to the CR6. NewestFile takes the form: http://192.168.13.154/?command=NewestFile&expr=drive:filename.ex t Where filename can be a wildcard (*). NewestFile requires a minimum - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 445
LoggerNet Datalogger Support Software supports combined telecommunication options, customized data-monitoring displays, and scheduled data collection. It includes Short Cut and CRBasic Editor for creating CR6 programs. It also includes tools for configuring, troubleshooting, and managing datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 446
Weather Station Software supports Campbell Scientific weather stations. Version 3.0 or higher supports custom weather stations or the ET107, ET106, and MetData1 pre-configured weather stations. The software allows you to initialize the setup, interrogate the station, display data, and generate - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 447
Section 8. Operation Figure 122. Using the Keyboard / Display 447 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 448
Section 8. Operation 8.8.1 Data Display Figure 123. Displaying Data with the Keyboard / Display 448 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 449
Graphs Figure 124. Real-Time Tables and Graphs 8.8.1.2 Real-Time Custom The external keyboard display can be configured with a customized real-time display. The CR6 will keep the setup as long as the defining program is running. Read More Custom menus can also be programmed. See Custom Menus (p. 183 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 450
Section 8. Operation Figure 125. Real-Time Custom 450 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 451
8.8.1.3 Final-Memory Tables Figure 126. Final-Memory Tables Section 8. Operation 451 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 452
Section 8. Operation 8.8.2 Run/Stop Program Figure 127. Run/Stop Program 452 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 453
8.8.3 File Display Figure 128. File Display 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. 453 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 454
Section 8. Operation Figure 129. File: Edit 454 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 455
8.8.4 PCCard (Memory Card) Display Figure 130. PCCard (CF Card) Display Section 8. Operation 8.8.5 Ports and Status Read More See the appendix CR6 Registers. Figure 131. U or C Terminals (Ports) Status 455 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 456
Section 8. Operation 8.8.6 Settings Figure 132. Settings 8.8.6.1 Set Time / Date Move the cursor to time element and press Enter to change it. Then move the cursor to Set and press Enter to apply the change. 8.8.6.2 PakBus Settings In the Settings menu, move the cursor to the PakBus® element and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 457
in the Status table. 2. In the table definitions advertised to datalogger support software (p. 89), the CR6 advertises the greater of the number of records recorded in the Status table, if the tables are not fill-and-stop. 3. If either data area is flagged for fill-and-stop, then whichever area - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 458
datalogger support software (p. 89) tries to collect the oldest data at the same time. These extra records are not reported in the Status table and are not reported to the datalogger support software and therefore cannot be collected. 7. If the CardOut() or TableFile() with Option 64 instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 459
numbers less than 1263. Contact Campbell Scientific for information on upgrading the CR1000KD operating system. • LoggerNet o All datalogger functions and data are easily accessed via USB and Ethernet using Campbell Scientific datalogger support software. o Cora command find-logger-security-code 459 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 460
Campbell Scientific dataloggers simply as "security codes") are the oldest method of securing a datalogger datalogger or to the telecommunication hardware can, with only minimal trouble value, a positive code must be entered to unlock the CR6. That positive code will equal 65536 + (negative security - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 461
Campbell Scientific for information on upgrading the CR1000KD operating system. 8.11.3 Passwords Passwords are used to secure IP based communications. They are set in various telecommunication schemes with the .csipasswd file, CRBasic PakBus instructions, CRBasic TCP/IP instructions, and in CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 462
drive of the CR6. It contains credentials (usernames and passwords) required to access datalogger functions over IP telecommunications. See Web Service API (p. 418) for details concerning the .csipasswd file. 8.11.3.2 PakBus Instructions The following CRBasic PakBus instructions have provisions for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 463
proprietary code, prevent it from being copied, or making it tamper resistant. .CR files, or files specified by the Include() instruction, can be hidden using the FileHide() instruction. The CR6 can locate and use hidden files on the fly, but a listing of the file or the file name are not - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 464
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 465
desiccant, which is installed at the factory. This packet is replaced whenever the CR6 is repaired at Campbell Scientific. The module should not normally be opened except to replace the internal lithium Time. Clock will need resetting when the battery is replaced. o Final-memory data tables. 465 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 466
part numbers and key specifications. Table 127. Internal Lithium-Battery Specifications Manufacturer Tadiran Tadiran Model Number TL-5903/S Campbell Scientific, Inc. pn 30028 Voltage 3.6 V Capacity 2.4 Ah Self-discharge rate 1%/year @ 20 °C Operating temperature range -55 to 85 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 467
Section 9. Maintenance - Details Figure 135. Separate Back Shell from Module Figure 136. Disconnect Battery Connector 467 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 468
Replace Battery 9.3 Repair Occasionally, a CR6 requires repair. Consult with a Campbell Scientific application engineer before sending any product for repair. Be prepared to perform some troubleshooting procedures while on the phone with the application engineer. Many problems can be resolved with - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 469
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. 469 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 470
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 471
10. Troubleshooting If a system is not operating properly, please contact a Campbell Scientific application engineer for assistance. When using sensors, peripheral devices, or telecommunication hardware, look to the manuals for those products for additional help. Note If a Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 472
of these errors match up with like-sounding errors in the Station Status utility in datalogger support software. 10.4 Operating Systems One action that spans troubleshooting of many Campbell Scientific products is the operating system update. Operating systems are available, free of charge, at www - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 473
datalogger support software (p. 89) station status report. The message reports the following: • program compiled OK • warnings about possible problems any occurrence of this error to a Campbell Scientific application engineer, especially if the problem is reproducible. Any program generating these - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 474
logger will initiate a new self-calibration. If the error does not occur on power-up, the problem is corrected. If no invalid external signals are present and / or self-calibration fails again on power-up, the CR6 data will be stored in [tablename] because there is no CallTable() instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 475
Section 10. Troubleshooting the CR6 as having occurred during a single scan. The measured frequency can be much higher than actual. Be careful that scans that store data are not skipped. If any scan skips repeatedly, optimization of the datalogger program or reduction of on-line processing may be - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 476
-system or hardware problem. If power or transient problems are ruled out, the CR6 probably needs an operatingsystem update or repair (p. 3) by Campbell Scientific. Watchdoginfo.txt File A CPU: WatchdogInfo.txt file is created on the CPU: drive when the CR6 experiences a software reset (as opposed - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 477
for copies of old programs on the CPU: drive. The CR6 keeps copies of all program files unless they are deleted, logger, but it can be a useful tool for fine tuning a program. 10.5.4 NAN and ±INF NAN (not-a-number) and ±INF (infinite) are data words indicating an exceptional occurrence in datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 478
Section 10. Troubleshooting WDFlag = False Else WDFlag = True EndIf NAN can also be used in conjunction with the disable variable (DisableVar) in output processing (data storage) instructions as shown in CRBasic example Using NAN to Filter Data (p. 480). 10.5.4.1 Measurements and NAN A NAN - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 479
Section 10. Troubleshooting Table 129. Math Expressions and CRBasic Results Expression CRBasic Expression 0 / 0 0 / 0 ∞ - ∞ (1 / 0) - (1 / 0) (-1) ∞ -1 ^ (1 / 0) 0 • -∞ 0 • (-1 • (1 . Variable and Final-Memory Data Types with NAN and ±INF Final-Memory Data Type & Associated Stored Values - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 480
Section 10. Troubleshooting 1 except Average() outputs NAN 2 except Average() outputs 0 3 65535 in non-NAN measurements will be included in the output process. CRBasic example Using NAN to Filter Data (p. 480) demonstrates the use of conditional statements to set DisableVar to TRUE as needed to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 481
Else DisVar = False EndIf 'Call Data Tables and Store Data CallTable(TempC_Data) NextScan EndProg 10.6 Communications 10.6.1 RS-232 Baud rate mis-match between the CR6 and datalogger support software (p. 89) is often cause communication problems. By default, CR6 baud rate auto-adjusts to match - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 482
CR6 using PC200W with a serial connection, so long as the PakBus addresses of the host PCs are different. All Campbell Scientific datalogger support software may be required from Campbell Scientific to diagnose and correct a potentially serious communication problem. Sections CommsMemFree(1) (p. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 483
Section 10. Troubleshooting lrg = (CommsMemFree(1) / 100000000) % 100 Table 131. CommsMemFree(1) Defaults and Use Example, TLS Not Active Buffer Catagory Condition: reset, TLS not active. Buffer count: CommsMemFree(1) = 15251505. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 484
enter terminal mode, connect a PC to the CR6 with the same hard-wire serial connection used in the What You Will Need (p. 40) section. Open a terminal emulator program. Terminal emulator programs are available in: 1. Campbell Scientific datalogger support software (p. 89) Terminal Emulator (p. 484 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 485
Section 10. Troubleshooting 510) window 2. DevConfig (Campbell Scientific Device Configuration Utility Software) Terminal tab 3. HyperTerminal. Beginning with Windows Vista, HyperTerminal (or another terminal emulator utility) must be acquired and installed separately. As shown in figure DevConfig - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 486
for that data table and so allow datalogger support software (p. 604) 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 CR6 communication traffic. Campbell Scientific engineering tool - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 487
10. Troubleshooting Figure unless the port is first opened with the SerialOpen() command. If the CR6 attempts to enter a terminal session on the nine-pin RS-232 port or file is immune to this problem. 10.8 Logs Logs are meta data, usually about datalogger or software function. Logs are written by - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 488
through the recovery procedure, consider the following: If a CRD: drive (memory card) or a USB: drive (Campbell Scientific mass storage device) has been removed since the data was originally stored, then the Datalogger Data Recovery is run, the memory pointer will likely be in the wrong location, so - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 489
for electric current. Used to quantify the capacity of a power source or the requirements of a power-consuming device. Term. analog Data presented as continuously variable electrical signals. Term. argument See parameter (p. 503). Term. ASCII / ANSI Abbreviation for American Standard Code for - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 490
rate at which data are transmitted. instructions FieldCal() and FieldCalStrain(). It is found in LoggerNet (4.0 or higher) or RTDAQ. Term. Callback A name given to the process by which the CR6 initiates telecommunication with a PC running appropriate Campbell Scientific datalogger support software - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 491
for use with CR6 dataloggers. See the appendix Keyboard Display (p. 601). Term. CDM/CPI CPI is a proprietary interface for communications between Campbell Scientific dataloggers and Campbell Scientific CDM peripheral devices. It consists of a physical layer definition and a data protocol. CDM - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 492
CoraScript is a command-line interpreter associated with LoggerNet datalogger support software. Refer to the LoggerNet manual, available at www.campbellsci.com, for more information. Term. CPU Central processing unit. The brains of the CR6. Term. CR1000KD An optional hand-held keyboard display - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 493
in function to a CR6 final-memory data tables, the binary file for a datalogger is set up as ring memory. This means that as the file reaches its maximum size, the newest data will begin overwriting the oldest data. Term. datalogger support software Campbell Scientific software that includes at - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 494
presented data. Term. Dim A CRBasic command for declaring and dimensioning variables. Variables declared with Dim remain hidden during datalogger The Scientist and Engineer's Guide to Digital Signal Processing by Steven W. Smith available at dspguide.com. Term. DTE Data terminal equipment. While the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 495
simultaneous, bi-directional data. Term. duty cycle The percentage of available time a feature is in an active state. For example, if the CR6 is programmed with 507). Term. execution time Time required to execute an instruction or group of instructions. If the execution time of a program exceeds the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 496
of LoggerNet, PC400 and RTDAQ (p. 89) datalogger support software. It provides a view of the CR6 file system and a menu of file management data overwriting the oldest data. Term. final-memory data Data that resides in final-data memory. Term. FLOAT Four-byte floating-point data type. Default CR6 data - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 497
data type. Default CR6 data type for stored data. While IEEE four-byte floating point is used for variables and internal calculations, FP2 is adequate for most stored data variables, which are declared in the Sub() and Function() instructions. Term. ground Being or related to an electrical potential - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 498
floating-point data type. IEEE Standard 754. Same format as Float. Float is the name used when declaring data type for CR6 initiates telecommunications with a PC running appropriate Campbell Scientific datalogger support software. Also known as "Callback (p. 490)." Term. input/output instructions - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 499
CR6 function associated with IP data transmissions. In the evolution of the CR6 operating system, IP trace information was originally accessed through the CRBasic instruction Campbell Scientific offers optically isolated RS-232 to CS I/O interfaces as a CR6 CR6 datalogger. Term. lf Line feed 499 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 500
opposed to occurring under program control. Term. mass storage device USB: "thumb" drive. Term. MD5 digest 16-byte checksum of the VTP configuration. Term. MicroSD MicroSD® is a removable memory-card technology used in the CR6 datalogger. MicroSD® is a registered trademark of SD-3C, LLC. Term. milli - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 501
Term. modem/terminal Any device which: o has the ability to raise the CR6 ring line or be used with an optically isolated interface (see the appendix CS useful in troubleshooting dataacquisition system faults. Term. multiplier a term, often a parameter in a CRBasic measurement instruction, to - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 502
from DCE to DTE or from DTE to DCE. Term. Numeric Monitor A digital monitor is datalogger support software (p. 604). Term. offset a term, often a parameter in a CRBasic measurement instruction, to designate the y-intercept, shifting factor, or zeroing factor in a linear function. For example, when - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 503
developed by Campbell Scientific to facilitate communications between Campbell Scientific instrumentation. Term. 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 504
use with, and requiring, the CR6 (or another Campbell Scientific datalogger) to operate. Term. ping A software utility that attempts to contact peripheral See print device (p. 504). Term. processing instructions Used to further process input data values and return the result to a variable where - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 505
is a feature of LoggerNet, PC400, RTDAQ, and PC200W (datalogger support software (p. 89) ). LoggerNet - Send button is found on data in a data table or data file. All data on the line share a common time stamp. Term. regulator A device for conditioning an electrical power source. Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 506
Campbell Scientific datalogger to RS-232 smart-sensor communications is quite flexible. Term. sample rate The rate at which measurements are made by the CR6 at which a measurement can repeatedly be made by a single CRBasic instruction. Sample rate is how often an instrument reports a result at its - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 507
data between data recorders and sensors. Term. SDM Synchronous Device for Measurement. A processor-based peripheral device or sensor that communicates with the CR6 the main scan. Term. send The Send button in datalogger support software (p. 89). The Send command sends a CRBasic program, or an operating - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 508
series of alphanumeric characters. Term. Short Cut software A CRBasic program generator suitable for many CR6 applications. Knowledge of CRBasic is not required which assures a 99.998% probability that if either the data or the data sequence changes, the signature changes. Term. single-ended Denotes - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 509
Section 11. Glossary Term. 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. Term. string A datum consisting of alphanumeric characters. 509 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 510
Datalogger Support Software (p. 89). A complete listing of datalogger support software available from Campbell Scientific can be found in the appendix Software (p. 604). Software manuals program instructions by the CR6. Tasks include measurement, SDM, and processing. Tasks are prioritized by a CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 511
Campbell Scientific thermistor models 107, 108, and 109 are linearized by Steinhart-Hart as implemented in the Therm107(), Therm108(), and Therm109() instructions. Term. time domain Time domain describes data . A UPS can be constructed for most datalogger applications using ac line power, an ac/ac - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 512
a primary power source for Campbell Scientific power supplies. Do not connect high-level Vac directly to the CR6. The CR6 measures varying frequencies of low- troubleshooting data acquisition system faults. Term. volts SI unit for electrical potential. Term. Vspect trademark for Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 513
software timers, and program-related counters when the datalogger software problem may exist. When large numbers of watchdog-timer resets occur, consult with a Campbell Scientific the section Web Service API (p. 418), by the CR6 user in CRBasic define how well a data-acquisition system performs. To - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 514
produce data with resolution as high as appropriate for a given application. Figure 139. Relationships of Accuracy, Precision, and Resolution 12. Attributions Crydom, Newark, Mouser, MicroSoft, WordPad, HyperTerminal are trademarks of their respective owners. No endorsement of Campbell Scientific - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 515
(p. 515) • CRBasic Editor Help All CR6 CRBasic instructions are listed in the following sub-sections. Select instructions are explained more fully, some with example code, in Programming Resource Library (p. 170). Example code is throughout the CR6 manual. Refer to the table of contents CRBasic - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 516
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 CR6. Does not affect data files produced by support software / WebPageEnd See Information Services (p. 291). A.2.1 Variable - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 517
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 CR6 | CR6 Measurement and Control System - Page 518
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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 519
. CardFlush Immediately writes any buffered data from CR6 internal memory and file system to a Campbell Scientific mass storage device or memory card. TableFile() with Option 64 is often a preferred alternative to this instruction. Syntax CardFlush DSP4 Send data to the DSP4 display. Syntax - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 520
Interval, Units, OutStat, LastFileName) A.3.3 Processing for Output to Final-Data Memory Read More See Data Output-Processing Instructions (p. 150). FieldNames Immediately follows an output processing instruction to change default field names. Syntax FieldNames("Fieldname1 : Description1, Fieldname2 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 521
Instructions Minimum Stores the minimum value over the data-output interval. Syntax Minimum(Reps, Source, DataType, DisableVar, Time) Moment Stores the mathematical moment of a value over the data Source, DataType) SampleFieldCal Writes field calibration data to a table. See Calibration Functions - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 522
A. CRBasic Programming Instructions A.3.3.2 Multiple-Source ETsz Stores evapotranspiration (ETsz) and solar radiation (RSo). Syntax ETsz(Temp, RH, uZ, Rs, Longitude, Latitude, Altitude, Zw, Sz, DataType, DisableVar) RainFlowSample Stores a sample of the CDM_VW300RainFlow into a data table. Syntax - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 523
Program Control Instructions A.5.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 CR6 | CR6 Measurement and Control System - Page 524
and accompanying declaration sequences. Syntax EndSequence Exit Exits program. Syntax Exit For / To / Step / ExitFor / 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 CR6 | CR6 Measurement and Control System - Page 525
Appendix A. CRBasic Programming Instructions [statement block] ContinueScan [statement block] NextScan Select Case / Case / Case Is / Case Else / EndSelect Executes one of several statement blocks depending on the value of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 526
Programming Instructions WaitDigTrig Syntax While [condition] [StatementBlock] Wend A.5.2 Advanced Program Controls Data / Read / Restore Defines a list of Float constants to indicating True (-1) or False (0) based on the datalogger realtime clock. Syntax If (IfTime(TintoInt, Interval, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 527
CRBasic Programming Instructions Read [VarExpr] Restore Resets the location of the Read pointer back to the first value in the list defined by Data or a number indicating True (-1) or False (0) based on the datalogger realtime clock. Syntax Variable = TimeIntoInterval(TintoInt, Interval, Units) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 528
A.6 Measurement Instructions Read More For information on recording data from RS instruction in the program. Syntax InstructionTimes(Dest) PanelTemp This instruction measures the panel temperature in °C. Syntax PanelTemp(Dest, Integ) Signature Returns the signature for program code in a datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 529
Appendix A. CRBasic Programming Instructions Measures the voltage difference between high and low inputs of a differential analog-input channel. Syntax VoltDiff(Dest, Reps, Range, DiffChan, RevDiff, SettlingTime, Integ, Mult, Offset) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 530
Reps, Range, UChan, ExmV, RevEx, SettlingTime, fN1, A, B, C) A.6.5 Excitation ExciteI Sets a switched-current excitation channel to the specified current. Syntax ExciteI(IxChan, IxuA, Delay) ExciteV This instruction sets the specified switched-voltage excitation channel to the voltage specified. 530 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 531
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 CR6 | CR6 Measurement and Control System - Page 532
Appendix A. CRBasic Programming Instructions Syntax PortGet(Dest, Port) PortsConfig Configures U or C terminals as input or output ports. Syntax PortsConfig(Mask, Function) ReadIO Reads the status of CR6 C terminals. Syntax ReadIO(Dest, Mask) A.6.7.1 Control PortSet Sets the specified port high - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 533
to ac power mains conforms to applicable electrical codes. Contact a Campbell Scientific application engineer for information on available isolation transformers. CS616 Enables and measures a CS616 water content reflectometer. Syntax CS616(Dest, Reps, SEChan, Port, MeasPerPort, Mult, Offset) CS7500 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 534
to keep the CR6 clock correct or provide other information from the GPS such as location and speed. Proper operation of this instruction may require a rate of 38400, specify the new baud rate in the SerialOpen() instruction. HydraProbe Reads the Stevens Vitel SDI-12 Hydra Probe sensor. Syntax - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 535
Appendix A. CRBasic Programming Instructions Syntax LI7200(Dest, Reps, SDMAddress, Command) TGA Measures a TGA100A trace-gas analyzer system. Syntax TGA(Dest, SDMAddress, DataList, ScanMode) Therm107 Measures a Campbell Scientific 107 thermistor. Syntax Therm107(Dest, Reps, SEChan, Vx/ExChan, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 536
10 Peripheral Device Support Multiple SDM instructions can be used within a program. AM25T Controls the AM25T Multiplexer. Syntax AM25T(Dest, Reps, Range, AM25TChan, DiffChan, TCType, Tref, ClkPort, ResPort, VxChan, RevDiff, SettlingTime, Integ, Mult, Offset) AVW200 Enables CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 537
Appendix A. CRBasic Programming Instructions CDM_VW300Rainflow Obtains rainflow histogram data from the CDM_VW300. Syntax CDM_VW300Rainflow(CPIAddress, RF1, RF2, RF3, RF4, RF5, RF6, RF7, RF8) CDM_VW300Static Captures static vibrating-wire sensor readings from the CDM_VW300. Syntax - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 538
Instructions SDMCD16Mask Controls an SDM-CD16AC, SDM-CD16, or SDM-CD16D control device. Unlike the SDMCD16AC, it allows the CR6 to 5, Mode Ports 4 to 1, Mult, Offset) SDMSIO4 Controls and transmits / receives data from an SDM-SIO4 Interface. Syntax SDMSIO4(Dest, Reps, SDMAddress, Mode, Command, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 539
events to occur at a precise time. See the appendix Relay Drivers (p. 599). Syntax TimedControl(Size, SyncInterval, IntervalUnits, DefaultValue, CurrentIndex, Source, ClockOption A.7 Processing and Math Instructions A.7.1 Mathematical Operators Note Program declaration AngleDegrees() (see Program - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 540
Instructions A.7.2 Arithmetic Operators Table 134. Arithmetic Operators Symbol Name Notes Result is always promoted to a float (p. 162) to avoid problems protocol may output data that are compressed into integers that are composites of "packed" fields. This type of data compression is a common - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 541
Appendix A. CRBasic Programming Instructions A packed integer that is stored in variable input_val will be unpacked into three integers individually stored in value_1, value_2, and value_3. In the packed integer, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 542
Appendix A. CRBasic Programming Instructions A.7.4 Compound-Assignment Operators Table 135. Compound-Assignment Operators Symbol Name Function ^= Exponent assignment Raises the value of a variable to the power of an expression and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 543
Appendix A. CRBasic Programming Instructions Syntax result = expr1 XOR expr2 IIF Evaluates a variable or expression and returns one of two results based on the outcome of that evaluation. Syntax Result = - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 544
Appendix A. CRBasic Programming Instructions A.7.6.2 Intrinsic Functions ACOS Returns the arccosine of a number. Syntax x = ACOS(source) ASIN Returns the arcsin of a number. Syntax x = ASIN(source) ATN Returns the arctangent of a - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 545
CRBasic Programming Instructions x = SINH(Expr) TAN Returns the tangent of an angle. Syntax x = TAN(source) TANH Returns the hyperbolic tangent of an expression or value. Syntax x = TANH(Source) A.7.7 Arithmetic Functions ABS Returns the absolute value of a number. Returns a value of data type Long - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 546
Appendix A. CRBasic Programming Instructions Syntax x = INT(source) x = Fix(source) INTDV Performs an integer division of two numbers. Syntax X INTDV Y LN or LOG Returns the natural logarithm of a number. Ln - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 547
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 CR6 | CR6 Measurement and Control System - Page 548
Converts the output of a bridge-measurement instruction to microstrain. Syntax StrainCalc(Dest, Reps, Source, BrZero, 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 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 549
Appendix A. CRBasic Programming Instructions MinSpa(Dest, Swath, Source) RMSSpa Computes the RMS (root mean square) value of an array. Syntax RMSSpa(Dest, Swath, Source) SortSpa Sorts the elements of - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 550
Appendix A. CRBasic Programming Instructions A.7.10.1 Syntax RND(source) TotalRun Outputs a running total of a measurement. Syntax TotalRun(Dest, Reps, Source, Number, RunReset) Histograms Histogram Processes input data as either a standard histogram (frequency distribution) or a weighted-value - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 551
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 552
Appendix A. CRBasic Programming Instructions CheckSum Returns a checksum signature for the characters in a string. Syntax Variable = CheckSum(ChkSumString, ChkSumType, ChkSumSize) CHR Inserts an ANSI character into a string. Syntax CHR(Code) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 553
Appendix A. CRBasic Programming Instructions InStr Finds the location of a string within a string. Syntax Variable = InStr(Start, SearchString, FilterString, SearchOption) LTrim Returns a copy of a string with no leading spaces. Syntax - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 554
SplitResult, SearchString, FilterString, NumSplit, SplitOption) SPrintF Converts data to formatted strings. Returns length of formatted string. A.9 Time Keeping - Instructions Reading List: • Time Keeping - Overview (p. 72) • Time Keeping - Instructions (p. 554) Within the CR6, time is stored - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 555
Appendix A. CRBasic Programming Instructions ClockChange Returns milliseconds of clock change due to any setting of the clock that occurred since the last execution of ClockChange. Syntax variable = ClockChange ClockReport Sends the datalogger clock value to a remote datalogger in the PakBus network - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 556
TimeIsBetween Defines a positive countdown range based on the datalogger clock. Otherwise, the countdown is negative. Subsequent logic Timer(TimNo, Units, TimOpt) Voice-Modem Instructions Note Refer to the Campbell Scientific voice-modem manuals for complete information. DialVoice Defines the - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 557
Appendix A. CRBasic Programming Instructions Syntax DialVoice(DialString) VoiceBeg, EndVoice Marks the beginning and ending of voice code executed when the CR6 detects a ring from a voice modem. Syntax VoiceBeg [voice code to be executed] EndVoice VoiceHangup Hangs up the voice modem. Syntax - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 558
"String"..., Precision) Custom Keyboard and Display Menus Reading List: • Custom Menus - Overview (p. 80, p. 558) • Data Displays: Custom Menus - Details (p. 183) • Custom Menus - Instruction Set (p. 558) • Keyboard Display - Overview (p. 79) • CRBasic Editor Help for DisplayMenu() Custom menus are - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 559
Appendix A. CRBasic Programming Instructions A.12 Syntax: MenuItem("MenuItemName", Variable) MenuPick Creates a data. See the appendix Endianness (p. 593). Syntax MoveBytes(Destination, DestOffset, Source, SourceOffset, NumBytes) SerialBrk Sends a break signal with a specified duration to a CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 560
, BaudRate, Format, TXDelay, BufferSize) SerialOut Transmits a string over a datalogger communication port. Syntax SerialOut(ComPort, OutString, WaitString, NumberTries, TimeOut) SerialOutBlock Send binary data out a communication port. Used to support a transparent serial talk-through mode. 560 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 561
Networking Guide available at www.campbellsci.com. PakBus is a proprietary networking communication protocol designed to optimize communications between Campbell Scientific dataloggers and peripherals. PakBus features auto-discovery and self-healing. Following is a list of CRBasic instructions that - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 562
, is used. Use PakBusGraph Hop Metrics to calculate this time (see datalogger support software (p. 89) ). Because these communication instructions wait for a response or timeout before the program moves on to the next instruction, they can be used in a SlowSequence scan. A slow sequence will not - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 563
Appendix A. CRBasic Programming Instructions Syntax EncryptExempt(BeginPakBusAddr, EndPakBusAddr) GetDataRecord Retrieves the most recent record from a data table in a remote PakBus datalogger and stores the record in the CR6. Syntax GetDataRecord(ResultCode, ComPort, NeighborAddr, PakBusAddr, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 564
, "LocalFile", "RemoteFile") SendGetVariables Sends an array of values to the host PakBus datalogger, and / or retrieve an array of data from the host datalogger. Syntax SendGetVariables(ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, SendVariable, SendSwath, GetVariable, GetSwath - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 565
. Syntax StaticRoute(ComPort, NeighborAddr, PakBusAddr) TimeUntilTransmit The TimeUntilTransmit instruction returns the time remaining, in seconds, before communication with the host datalogger. Syntax TimeUntilTransmit Table 137. Asynchronous-Port Baud Rates -nnnn (autobaud1 starting at nnnn - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 566
Appendix A. CRBasic Programming Instructions A.15 Syntax Erase(EraseVar) FindSpa Searches a source array for a to access and manage files stored in CR6 memory. CalFile Stores variable data, such as sensor calibration data, from a program into a nonvolatile CR6 memory file. CalFile() pre-dates and - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 567
Instructions FileList Returns a list of files that exist on the specified drive. Syntax FileList(Drive,DestinationArray) FileManage Manages program files from within a running datalogger ) FileRename Changes the name of file on a CR6 drive. Syntax FileRename(drive:OldFileName, drive:NewFileName) FileSize - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 568
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) Data-Table Access and Management Commands to access - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 569
Instructions ResetTable(TableName) SetSetting Changes the value for datalogger setting or a field in the Status table. Syntax SetSetting("FieldName", Value) SetStatus Changes the value for a setting in the datalogger Determine if data was written to a specific data table the last time the data table - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 570
"worst case" data storage events into separate tables. Used in conjunction with DataEvent(). Syntax WorstCase(TableName, NumCases, MaxMin, Change, RankVar) TCP/IP These instructions address use of email, SMS, web pages, and other IP services. These services are available only when the CR6 is used - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 571
Appendix A. CRBasic Programming Instructions EthernetPower Controls power state of all Ethernet devices. Syntax enclosed file/data under the supplied URI. Syntax HTTPPUT(URI, Contents, Response, Header, NumRecs, FileOption) IPInfo Returns the IP address of the specified datalogger interface into - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 572
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 CR6 | CR6 Measurement and Control System - Page 573
Appendix A. CRBasic Programming Instructions A.18 SNMPVariable(Name, OID, Type, Access, Valid) TCPClose Closes to output") WebPageEnd XMLParse() Reads and parses an XML file in the datalogger. Syntax XMLParse(XMLContent, XMLValue, AttrName, AttrNameSpace, ElemName, ElemNameSpace, MaxDepth, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 574
Appendix A. CRBasic Programming Instructions A.19 DialModem Sends a modem-dial string out a datalogger communication port. Syntax DialModem( (p. 409) and Modbus (p. 413). Modbus and DNP3 instructions run as process tasks. DNP Sets up a CR6 as a DNP slave (outstation/server) device. Third parameter - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 575
A. CRBasic Programming Instructions A.20 ModBusMaster Sets up a datalogger as a ModBus master to send or retrieve data from a ModBus slave. Syntax ModBusMaster(ResultCode, ComPort, BaudRate, ModBusAddr, Function, Variable, Start, Length, Tries, TimeOut) ModBusSlave Sets up a datalogger as a ModBus - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 576
Stores the values in the FieldCal file to a data table. Syntax DataTable(TableName, NewFieldCal, Size) SampleFieldCal EndTable A.21 Satellite Systems Instructions for GOES, ARGOS, INMARSAT-C, OMNISAT. Refer to satellite transmitter manuals available at www.campbellsci.com. A.21.1 Argos ArgosData - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 577
Appendix A. CRBasic Programming Instructions ArgosTransmit(ResultCode, ST20Buffer) A.21.2 GOES GOESData Sends data to a Campbell Scientific GOES satellite data transmitter. Syntax GOESData(Dest, Table, TableOption, BufferControl, DataFormat) GOESGPS Stores GPS data from the satellite into two - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 578
Appendix A. CRBasic Programming Instructions Syntax OmniSatStatus(OmniStatusResult) 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, - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 579
Appendix A. CRBasic Programming Instructions function. Syntax Function (FunctionName) Param1, Param2, Optional Param3, Param4 579 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 580
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 581
software • Status table in CR6 memory - view as a data table • DataTableInfo table in CR6 memory - view as a data table • Station Status1 menu option - find in datalogger support software . This setting will be effective only if the PPP service is enabled using a PPP-compatible network link (p. 602 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 582
Appendix B. Status, Settings, and Data Table Information (Registers) Keyword (in bold) or Field Name PakBus/TCP Password Description An example specifying two connections follows: (192.168.4.203, 6785) (JOHN_DOE.server. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 583
a null modem with RS-232 is given in table Standard NullModem Cable or Adapter-Pin Connections (p. 585). The CR6 RS-232 port functions as either a DCE (data communication equipment) or DTE (data terminal equipment) device. For RS-232 to function as a DTE device, a null modem cable is required. The - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 584
timeout before shutting down. The 40 second timeout is generally circumvented when communicating with datalogger support software (p. 89) because it sends information as part of the protocol that lets the CR6 know it can shut down the port. When in sleep mode, hardware is configured to detect - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 585
Port Pinouts received packet, such as sending a beacon, then it will power up the interface, send the data, and return to sleep mode with no 40 second timeout. Table 140. Standard Null-Modem Cable or ) on the modem TX line to wake the datalogger and activate the DTR line or enable the modem. 585 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 586
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 587
D. ASCII / ANSI Table American Standard Code for Information Interchange (ASCII) / American National Standards Institute (ANSI) Table 141. Decimal and hexadecimal Codes and Characters Used with CR6 Tools 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 30 Hex - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 588
Appendix D. ASCII / ANSI Table Table 141. Decimal and hexadecimal Codes and Characters Used with CR6 Tools Dec 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 589
Appendix D. ASCII / ANSI Table Table 141. Decimal and hexadecimal Codes and Characters Used with CR6 Tools Dec 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 590
Appendix D. ASCII / ANSI Table Table 141. Decimal and hexadecimal Codes and Characters Used with CR6 Tools Dec 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 591
). Table 142. 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. 251). Largest 13-bit magnitude is 8191, but Campbell Scientific defines the largest - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 592
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 593
byte IEEE4 or integer data value has to be reversed before the value shows properly in the CR1000. Table 144. Endianness in Campbell Scientific Instruments Little Endian Instruments Big Endian Instruments CR6 datalogger CR9000X datalogger CRVW Series dataloggers CRS451 recording sensor CR200 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 594
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 595
are current as of the manual publication date. G.1 Dataloggers - List Reading List: • Datalogger - Quickstart (p. 37) • Datalogger - Overview (p. 71) • Dataloggers - List (p. 595) Other Campbell Scientific datalogging devices can be used in networks with the CR6. Data and control signals can pass - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 596
Appendix G. Supporting Products Lists • Measurement and Control Peripherals - Details (p. 369) • Measurement and Control Peripherals - Lists (p. 595) G.3 Sensor-Input Modules Lists Input peripherals expand sensor input capacity of the CR6, condition sensor signals, or distribute the measurement - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 597
Appendix G. Supporting Products Lists datalogger. Table 149. Vibrating-Wire Input Modules Model Description CDM-VW300 Lists Signal conditioners modify the output of a sensor to be compatible with the CR6. G.3.5.1 Resistive-Bridge TIM Modules List Table 150. Resistive Bridge TIM1 Modules Model - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 598
Supporting Products Lists G.3.5.4 Transient-Voltage Suppressors List Table 153. Transient Voltage Suppressors Model Description 16980 Surge-suppressor kit for UHF/VHF radios 14462 Surge-suppressor kit for RF401 radio & CR206 datalogger Terminal-Strip Covers Datalogger CR6 CR800 CR1000 CR3000 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 599
analog output G.4.3 Relay-Driver Modules List Relay drivers enable the CR6 to control large voltages. Table 157. Relay-Driver Modules Model Description A21REL-12 Four relays driven by four control ports A6REL-12 Six relays driven by six control ports / manual override LR4 Four-channel - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 600
Supporting Products Lists G.5.1 Wired-Sensor Types List The following wired-sensor types are available from Campbell Scientific for integration into CR6 systems. Contact a Campbell Scientific CWB100 Series Radio-base module for datalogger. CWS220 Series Infrared radiometer CWS655 Series - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 601
Appendix G. Supporting Products Lists Table 161. Sensors Types Available for Connection to Data Retrieval and Telecommunications - Details (p. 393) • Data Retrieval and Telecommunications Peripherals - Lists (p. 601) Many telecommunication devices are available for use with the CR6 datalogger. - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 602
Appendix G. Supporting Products Lists G.6.2 Hardwire, Single-Connection Comms Devices List Table 163. Hardwire, Single-Connection Comms Devices Model Description 27555 SC32B SC929 SC-USB 17394 10873 SRM-5A with SC932A SDM-CAN FC100 CR6 USB to PC USB cable (ships with CR6) Optically isolated CS - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 603
CR6 datalogger. Compatible with RF430. RF430 Series Spread-spectrum, 100 mW, USB Data Storage Devices - List (p. 603) Data-storage devices allow you to collect data on-site with a small device and carry it back to the PC ("sneaker net"). Campbell Scientific mass-storage devices attach to the CR6 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 604
Datalogger Support Software - Quickstart (p. 40) • Datalogger Support Software - Overview (p. 89) • Datalogger Support Software - Details (p. 445) • Datalogger Support Software - Lists (p. 604) Software products are available from Campbell Scientific to facilitate CR6 programming, maintenance, data - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 605
/IP from a remote PC. LoggerNet database software Generates displays of real-time or historical data, post-processes data files, and generates reports. It includes Split, RTMC, View Pro, and Data Filer. Campbell Scientific OPC Server. Feeds datalogger data into third-party, OPC-compatible graphics - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 606
Campbell Scientific devices. G.8.4 Software Development Kits List Table 174. Software Development Kits Software Compatibility LoggerNet-SDK PC, Windows Description Allows software developers to create custom client applications that communicate through a LoggerNet server with any datalogger - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 607
Allows software developers to create custom client applications that communicate through a LoggerNet server with any datalogger supported by Supplies - Troubleshooting • Power Supplies - Lists (p. 607) Several power supplies are available from Campbell Scientific to power the CR6. G.9.1 Battery - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 608
Appendix G. Supporting Products Lists G.9.2 Batteries List Table 176. Batteries Model BPALK BP7 BP12 BP24 BP84 Description D-cell, 12 Vdc alkaline battery pack 7 Ahr, sealed-rechargeable battery (requires regulator & primary source). Includes mounting bracket for Campbell Scientific enclosures. 12 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 609
Appendix G. Supporting Products Lists G.9.5 24 Vdc Power Supply Kits List Table 179. 24 Vdc Power Supply Kits Model Description 28370 24 Vdc, 3.8 A NEC Class-2 (battery not included) - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 610
Appendix G. Supporting Products Lists UT30 CM375 CM300 CM305 CM310 10 meter (30 ft) free-standing tower, aluminum, guying is an option 10 meter (30 ft) mast, galvanized - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 611
Baud Rate 250, 252, 559, 565, 576, 581 Beacon 398, 490, 581 Beginner Software 41, 43 Big Endian 250, 251, 593 Binary 490 Binary Control 371 Binary Format 130 Number 581 BOOL8 137, 200, 490 Bool8 Data Type 198, 201 Boolean 137, 163, 478, 490 BOOLEAN Data Type 137, 490 Bridge 62, 329, 330 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 612
221 Calibration - Functions 575 Calibration - Manual Field Calibration ...... 212 Calibration - Single 48 Closed Interval 149 Code 491 Coil 414 Collecting Data 48, 50 COM Port Connection 41 Commands - 523, 526 Control I/O 492 Control Instructions 504 Control Output Expansion 371 Control - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 613
Access 568 Data Table Header 165 Data Table Management 568 Data Table Modifier 518 Data Table Name 134, 581 Data Type 137, 138, 162, 163, 201 Data Type - Bool8 198 Data Type - LONG 500 Data Type - NSEC 202, 502 Data type - UINT2 511 Data Type Format 252 Datalogger Support Software 89 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 614
373, 496 Final-Data Memory 496 Final 498 Infinite 477 Information Services 291, 570 Initialize Instructions 498 Installation 37 Instruction 159 Instruction Times 528 Instructions - ABS 545 Instructions - AcceptDataRecords 561 Instructions - ACOS 544 Instructions - ACPower 533 Instructions - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 615
536 Instructions - CS110 533 Instructions - CS110Shutter 533 Instructions - CS616 533 Instructions - CS7500 533 Instructions - CSAT3 533 Instructions - CWB100 535 Instructions - CWB100Diagnostics 535 Instructions - CWB100Routes 535 Instructions - CWB100RSSI 535 Instructions - Data / Read - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 616
545 Instructions - INTDV 545 Instructions - IPInfo 570 Instructions - IPNetPower 570 Instructions - IPRoute 570 Instructions - IPTrace 570 Instructions - Is 570 Instructions - Left 551 Instructions - Len 551 Instructions - LevelCrossing 550 Instructions - LI7200 533 Instructions - LI7700 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 617
- RectPolar 545 Instructions - Replace 551 Instructions - ResetTable 568 Instructions - Resistance 329 Instructions - Restore 526 Instructions - Right 551 Instructions - RMSSpa 548 Instructions - RND 549 Instructions - Round 545 Instructions - Route 562 Instructions - RoutersNeighbors 562 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 618
568 Instructions - TAN 544 Instructions - TANH 544 Instructions - TCDiff 529 Instructions - TCPClose 570 Instructions - TCPOpen 570 Instructions - TCSe 529 Instructions - TDR100 536 Instructions - TGA 533 Instructions - Therm107 533 Instructions - Therm108 533 Instructions - Therm109 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 619
Manually Initiated 500 Marks and Spaces 251 Mass Storage Device 119, 124, 377, 387, 500, 603 Math 162, 478, 539 Mathematical Operation 162 Mathematical Operator 539 MD5 digest 500 ME Pin 583 MeasOff 323 Measurement 305 Measurement - Error 319 Measurement - Instruction NSEC Data Type 137 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 620
581 PC Program 482 PC Support Software 89 PC200W 41, 604 PC400 604 PCM 311 PDA Support 604 PDM 75, 371 Data Storage Processing Instruction .........159 Program - Data Table 144 Program - Data Type 137 Program - DataInterval() Instruction .......... 148 Program - DataTable() Instruction - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 621
Mathematical Operation 162 Program - Measurement Instruction............159 Program - Modbus 415 Program 113 Regulator 505 Relay 371, 372 Relay Driver 109, 371 Reliable Power 104 Requirement Resistor 506 Resolution - Concept 513 Resolution - Data Type 137, 506, 513 Resolution - Definition - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 622
interval 507 Scan Interval 155 Scan Time 156, 507 Scientific Notation 130 SDE Pin 583 SDI-12 269, 272 - Voltage 307 Sensor Power 81, 107 Sensor Support 305 Sequence 144 Sequence - Dial 152 Sequence - SMTP 297, 508 SNMP 296 SNP 508 Software 89 Software - Beginner 41, 43 SP 251 Spark - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 623
, 105, 283 Support Software 510 Surge Protection Troubleshooting - PakBus Network............399 Troubleshooting - SDI-12 269 True 165 TTL 511 TTL logic 511 TTL Recording 366 Tutorial 35 Tutorial Exercise 40 TVS 105 TX 252 TX Pin 583 U UDP 570 UINT2 137, 511 UPS 38, 81, 104, 511 USB - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 624
516 Variable Out of Bounds 581 Vdc 512 Vector 300, 301 Vehicle Power Connection 107 Verify Interval 581 Vibrating Wire Input Module 370 Viewing Data 41, 48 Visual Weather 604 Voice Modem 556 Volt Meter 512 Voltage Measurement 307, 528 Volts 512 W Warning Message 473 Watchdog Errors 168 - Campbell Scientific CR6 | CR6 Measurement and Control System - Page 625
- Campbell Scientific CR6 | CR6 Measurement and Control System - Page 626
. Pompeu Fabra 7-9, local 1 08024 Barcelona SPAIN www.campbellsci.es • [email protected] Campbell Scientific Canada Corp. (CSC) 14532 - 131 Avenue NW Edmonton AB T5L 4X4 CANADA www.campbellsci.ca • [email protected] Please visit www.campbellsci.com to obtain contact information for your
OPERATOR'S MANUAL
CR6 Measurement and
Control System
PRELIMINARY: 12/4/14
See the section Release Notes
(p. 30)
for
important information pertaining to this
preliminary version.
C o p y r i g h t © 2 0 0 0 – 2 0 1 4
Campbell Scientific, Inc.