OPERATOR’S MANUAL CR200/CR200X Series Dataloggers Revision: 1/14 C o p y r i g h t © 2 0 0 0 - 2 0 1 4 C a m p b e l l S c i e n t i f i c , I n c .
Warranty “PRODUCTS MANUFACTURED BY CAMPBELL SCIENTIFIC, INC. are warranted by Campbell Scientific, Inc. (“Campbell”) to be free from defects in materials and workmanship under normal use and service for twelve (12) months from date of shipment unless otherwise specified in the corresponding Campbell pricelist or product manual. Products not manufactured, but that are re-sold by Campbell, are warranted only to the limits extended by the original manufacturer.
Assistance Products may not be returned without prior authorization. The following contact information is for US and international customers residing in countries served by Campbell Scientific, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 227-9000.
Table of Contents Section 1. Introduction ............................................... 1 1.1 CR200(X) series Datalogger Models ..................................................................... 1 Section 2. Quickstart Tutorial .................................... 3 2.1 Primer - CR200(X) Data Acquisition..................................................................... 3 2.1.1 Components of a Data Acquisition System .............................................. 3 2.1.2 CR200(X) Mounting ......
Table of Contents 4.4 Pulse Count Measurement .................................................................................... 42 4.4.1 Pulse input Channels ............................................................................... 43 4.4.2 Pulse Input on Digital I/O Channels C1–C2 ........................................... 45 4.5 Period Averaging Measurements ......................................................................... 45 4.6 SDI-12 Recording .........................................
Table of Contents 9.7 Declarations II - Declared Sequences .................................................................. 77 9.7.1 Data Tables ............................................................................................. 77 9.7.2 Subroutines ............................................................................................. 83 9.8 Program Execution Timing .................................................................................. 83 9.9 Instructions......................
Table of Contents 11.4.3 SDI-12 Power Considerations ............................................................... 118 11.5 Wind Vector ..................................................................................................... 120 11.5.1 OutputOpt Parameters ........................................................................... 120 11.5.2 Wind Vector Processing ........................................................................ 120 11.
Table of Contents Section 16. Support Software .................................. 143 16.1 16.2 16.3 16.4 16.5 16.6 16.7 16.8 Short Cut .......................................................................................................... 143 PC200W ........................................................................................................... 143 Visual Weather ................................................................................................. 143 PC400 .....................
Table of Contents Index .............................................................................. 29 List of Figures Figure 1: Data Acquisition System Components........................................................... 3 Figure 2: CR200(X) Wiring Panel................................................................................. 5 Figure 3: Analog Sensor Wired to Single-Ended Channel #1 ....................................... 6 Figure 4: Half Bridge Wiring -- Wind Vane Potentiometer .............
Table of Contents Figure 49: PakBus Network Addressing. .................................................................. 134 Figure 50: Flat Map................................................................................................... 138 Figure 51: Tree Map.................................................................................................. 138 Figure 52: Enclosure .................................................................................................
Table of Contents CRBASIC EXAMPLE 17. CRBASIC EXAMPLE. Radio Power Minimization Program Examples ............................................................................................. 111 CRBASIC EXAMPLE 18. CRBASIC EXAMPLE. Two Rain Gages on a CR200(X) ........................................................................................................... 112 CRBASIC EXAMPLE 19. Using TrigVar to Trigger Data Storage ........................ 126 CRBASIC EXAMPLE 20. CRBASIC EXAMPLE.
Section 1. Introduction Whether in extreme cold in Antarctica, scorching heat in Death Valley, salt spray from the Pacific, micro-gravity in space, or the harsh environment of your office, Campbell Scientific dataloggers support research and operations all over the world. Our customers work a broad spectrum of applications, from those more complex than any of us imagined, to those simpler than any of us thought practical. The limits of the CR200(X) are defined by our customers.
Section 1. Introduction Table 1. CR200 series Dataloggers with Built-In Radio Model Frequency Where Used CR206X 910 to 918 MHz U.S./Canada 920 to 928 MHz Australia/Israel 2.450 to 2.482 GHz Worldwide CR206 (retired) CR205 (retired) CR211X CR211 (retired) CR210 (retired) CR216X CR216 (retired) CR215 (retired) Caution No product using the 24XStream radio, including CR216X, will be available for sale in Europe after 1/1/2015 due to changes in EU legislation.
Section 2. Quickstart Tutorial Quickstart tutorial gives a cursory look at CR200(X) data acquisition. 2.1 Primer - CR200(X) Data Acquisition Data acquisition with the CR200(X) is the result of a step wise procedure involving the use of electronic sensor technology, the CR200(X), a telecommunications link, and PC datalogger support software. 2.1.1 Components of a Data Acquisition System A typical data acquisition system is conceptualized in FIGURE. Data Acquisition System Components (p. 3).
Section 2. Quickstart Tutorial 2.1.1.3 Datalogger CR200(X)s can measure most sensors with an electrical response. CR200(X)s measure electrical signals and convert the measurement to engineering units, perform calculations and reduce data to statistical values. Every measurement does not need to be stored. The CR200(X) will store data in memory awaiting transfer to the PC via external storage devices or telecommunications. 2.1.1.
Section 2. Quickstart Tutorial Figure 2: CR200(X) Wiring Panel 2.1.4 Battery Backup A lithium battery backs up the CR200(X) clock, program, and memory if it loses power. 2.1.5 Power Supply The CR200(X) is powered by a nominal 12 volt DC source. Acceptable power range is 7 to 16 VDC. The CR200(X) does not have an internal power supply but does have connections for an external battery and a built-in charging regulator for charging a 12 V lead-acid battery from an external power source.
Section 2. Quickstart Tutorial 2.1.7 Analog Sensors Analog sensors output continuous voltages that vary with the phenomena measured. Analog sensors connect to analog terminals. Analog terminals are configured as single-ended, wherein sensor outputs are measured with respect to ground (FIGURE. Analog Sensor Wired to Single-Ended Channel #1 (p. 6)). The CR200(X) cannot perform differential voltage measurements. Figure 3: Analog Sensor Wired to Single-Ended Channel #1 2.1.
Section 2. Quickstart Tutorial Figure 4: Half Bridge Wiring -- Wind Vane Potentiometer 2.1.9 Pulse Sensors The CR200(X) can measure switch closures, low-level AC signals (waveform breaks zero volts), or voltage pulses. Compatible signal types are illustrated in FIGURE. Pulse Input Types (p. 7). A pulse input wiring example is shown in FIGURE. Pulse Input Wiring -- Anemometer Switch (p. 8). Note Period averaging sensors are connected to analog channels.
Section 2. Quickstart Tutorial Figure 6: Pulse Input Wiring -- Anemometer Switch 2.1.10 Digital I/O Ports The CR200(X) has 2 digital I/O ports selectable, under program control, as binary inputs or control outputs. These are multi-function ports including: device driven interrupts, switch closure pulse counting, high frequency pulse counting, and SDI-12 communications. FIGURE. Control and Monitoring with Digital I/O (p.
Section 2. Quickstart Tutorial Figure 7: Control and Monitoring with Digital I/O 2.1.11 RS-232 Sensors The CR200(X) has an RS-232 input as shown in FIGURE. Location of RS-232 Port p. 10. As indicated in FIGURE. Use of RS-232 when Reading RS-232 Devices, p. 10 RS-232 sensors can be connected to the RS-232 port. The port can be set up with various baud rates, parity options, stop bit options, and so forth as defined in CRBASIC Help.
Section 2. Quickstart Tutorial Figure 8: Location of RS-232 Port Figure 9: Use of RS-232 when Reading RS-232 Devices 2.2 Hands-on Exercise - Measuring Temperature This tutorial is designed to illustrate the function of the CR200(X). During the exercise, the following items will be described.
Section 2. Quickstart Tutorial 2.2.1 Hardware Setup With Reference to FIGURE. Power and RS-232 Connections (p. 11). 1. Connect external power (7 – 16VDC) to the CR200 by inserting the positive lead into the "Battery +". 2. Insert the negative lead into the "Battery-". 3. Connect the RS-232 cable (PN 10873, provided) between the RS-232 port on the CR200(X) and the RS-232 port on the PC. For computers that have only a USB port, a USB Serial Adaptor (PN 17394 or equivalent) is required.
Section 2. Quickstart Tutorial Example Selections (p. 12) indicates what information needs to be entered on each screen. Click on Next at the bottom of the screen to advance to the next screen. Table 2. PC200W EZSetup Wizard Example Selections. Start the wizard to follow table entries Screen Name Information Needed Introduction Provides and introduction to the EZSetup Wizard along with instructions on how to navigate through the wizard.
Section 2. Quickstart Tutorial Figure 11: PC200W Main Window 2.2.3.1 2.2.3.1.1 Programming With Short Cut Short Cut Programming Objectives This portion of the tutorial will use Short Cut to create a program that measures air temperature (°C) with a 109 Temperature Probe, and rainfall (mm) with a TE525WS rain gage. The CR200(X) will take samples every ten seconds and store averages of these values at one minute intervals.
Section 2. Quickstart Tutorial 2. A new window will appear showing the option to create a new program or open an existing program. Select New Program. 3. A drop-down list will appear showing different dataloggers. Select the CR200(X) and click OK. 4. The program will now ask for the scan interval. Set the interval to 10 seconds and click OK. 5. A second prompt will ask for a choice of "Sensor Support." Select "Campbell Scientific, Inc." 6.
Section 2. Quickstart Tutorial Figure 13: Short Cut Thermocouple Wiring 2.2.3.1.4 Procedure (Short Cut Step 10) 1. Click on the Wiring Diagram link to view the sensor wiring diagram. Attach the 109 Temperature Probe and TE525 Rain Gauge to the CR200(X) as shown in the diagram. Click on Outputs to advance to the next step. Figure 14: Short Cut Wiring Diagram 2.2.3.1.5 Procedure (Short Cut Step 11) 1.
Section 2. Quickstart Tutorial Figure 15: Short Cut Outputs Tab 2.2.3.1.6 16 Procedure (Short Cut Steps 12 –18) 1. By default, there are two Tables initially available. Both Tables have a Store Every field along with a drop-down box to select the time units. These are used to set the time interval when data is stored. 2. Only one Table is needed for this tutorial, so Table 2 can be removed. Select Table 2 by clicking on its tab, and then click on Delete Table. 3.
Section 2. Quickstart Tutorial Figure 16: Short Cut Output Table Definition 2.2.3.1.7 Procedure (Short Cut Step 19) 1. Click on Finish to compile the program. Give the program the name "QuickStart." A prompt will ask if you want to send the program to the datalogger. For this exercise choose No. A summary screen will appear showing the compiler results. Any errors during compiling will also be displayed. Figure 17: Short Cut Compile Confirmation 2.2.3.1.8 Procedure (Short Cut Step 20) 1.
Section 2. Quickstart Tutorial 2.2.3.2 2.2.3.2.1 Programming the CR200(X) and Collecting Data Procedure (PC200W Step 1) 1. From the PC200W Clock/Program tab, click on the Connect button to establish communications with the CR200(X). When communications have been established, the text on the button will change to Disconnect. Figure 18: PC200W Connect Button 2.2.3.2.2 18 Procedure (PC200W Steps 2–4) 1. Click the Set Clock button to synchronize the datalogger's clock with the computer's clock. 2.
Section 2. Quickstart Tutorial Figure 19: PC200W Monitor Data Tab 2.2.3.2.3 Procedure (PC200W Step 5) 1. In the Add Selection window, click on the OneMin table, and then click Paste. The OneMin table is now displayed in the main display. Figure 20: PC200W Monitor Data Tab 2.2.3.2.4 Procedure (PC200W Step 6) 1. Click on the Collect Data tab. From this window, data is chosen to be collected as well as the location where the collected data will be stored.
Section 2. Quickstart Tutorial Figure 21: PC200W Collect Data Tab 2.2.3.2.5 Procedure (PC200W Steps 7–9) 1. Click the OneMin box so a check mark appears in the box. Under the "What to Collect" heading, select "New data from datalogger." This selects which data will be collected. 2. Click on the Collect button. A progress bar will appear as the data is collected, followed by the message, "Collection Complete." Click OK to continue. 3. To view the data, click on the View icon at the top of the window.
Section 2. Quickstart Tutorial 2.2.3.2.6 Procedure (PC200W Step 10) 1. Click on the Open File icon to open a file for viewing. Select the "CR200Series_OneMin.dat" file and click on Open. The collected data is now shown. Figure 23: PC200W View Data Table 2.2.3.2.7 Procedure (PC200W Step 11) 1. Select any data column by clicking on it. To display the data in graphical form, click on one of the Show Graph buttons. A graph with one Y-axis or two Y-axes will be generated.
Section 2.
Section 3. Overview 3.1 CR200(X) Overview The CR200(X) Datalogger is a precision instrument designed for low-power measurement applications. CPU, analog inputs, digital outputs, and memory are controlled by the operating system in conjunction with the user program. The user program is written in CRBASIC, a programming language that includes data processing and analysis routines and a standard BASIC instruction set.
Section 3. Overview Figure 25: Features of a Data Acquisition System 3.1.1 Programmed Instructions Are Evaluated Sequentially The CR200(X) evaluates programmed instructions sequentially.
Section 3. Overview 3.1.2 Sensor Support Read More! See Sensor Support (p. 37) The following sensor types are supported by the CR200(X) datalogger. • Analog voltage • Analog current (with a shunt resistor) • Resistive bridges • Pulse output • Period output • Frequency output • SDI-12 sensors A library of sensor manuals and application notes are available at www.campbellsci.com to assist in measuring many sensor types.
Section 3. Overview Period Average: 4 channels (SE 1–4) • Maximum input voltage: 4000 mV. • Maximum frequency: 150 kHz • Voltage threshold: counts cycles on transition from < 900 mV to > 2100 mV. Note Both pulse count and period average measurements are used to measure frequency output sensors. Yet pulse count and period average measurement methods are different.
Section 3. Overview 3.1.3.2 Voltage Outputs Read More! See Control Output (p. 49). 3.1.3.3 • Switched Analog Output (Excitation): two channels (VX1/VX2) for precise voltage excitation ranging from +2500 mV or +5000 mV. These channels are regularly used with resistive bridge measurements. Each channel will source up to 25 mA. • Digital I/O: 2 channels (C1 - C2) configurable for on / off and pulse output duration.
Section 3. Overview 3.1.3.4 Power Terminals Read More! See CR200(X) Power Supply (p. 53). Power In • Power Supply: External battery is connected to Battery+ and Batteryterminals. • Input voltages in excess of 18 V may damage the CR200 and/or power supply. Power to charge a 12 V lead-acid battery (16-22 VDC) must be connected to the Charge+ and Charge- terminals NOT to Battery+ and Battery-. Power Out • 3.1.3.
Section 3. Overview 3.1.4 Power Requirements Read More! See CR200(X) Power Supply (p. 53). The CR200(X) operates from a DC power supply with voltage ranging from 7 to 16 V, and is internally protected against accidental polarity reversal. The CR200(X) has modest input power requirements, typically an average current drain of less than 3 mA. Models with built-in radios may have a higher average current drain, depending on the radio’s power mode and amount of time the radio is in use.
Section 3. Overview 3.1.5.1 Firmware: OS and Settings Read More! See CR200(X) Configuration (p. 59). Firmware consists of the operating system (OS) and durable configuration settings. OS and settings remain intact when power is cycled. Note The CR200(X) is shipped factory ready with all settings and firmware necessary to communicate with a PC via RS-232 and to accept and execute user application programs. OS upgrades are occasionally made available at www.campbellsci.com.
Section 3. Overview 512 kbytes in newer CR200s and in all CR200(X)s. CR200s with the increased memory have "512K" on their label. Figure 26: CR200(X) Wiring Panel 3.1.7 Communications Overview Read More! See Telecommunications and Data Retrieval (p. 131). The CR200(X) communicates with external devices to receive programs, send data, or act in concert with a network. The primary communication protocol is PakBus. Modbus is also supported. 3.1.7.1 PakBus Read More! See PakBus Overview (p. 133).
Section 3. Overview Advantages of PakBus: 3.1.7.2 • Simultaneous communication between the CR200(X) and other devices. • Peer-to-peer communication-no PC required. • Other PakBus dataloggers can be used as "sensors" to consolidate all data into one CR200(X). • Routing - the CR200(X) cannot act as a router, passing on messages intended for another logger, but other dataloggers can. PakBus supports automatic route detection and selection.
Section 3. Overview 3.1.8.2 Protection from Voltage Transients Read More! See Grounding (p. 55). The CR200(X) must be grounded to minimize the risk of damage by voltage transients associated with power surges and lightning induced transients. Earth grounding is required to form a complete circuit for voltage clamping devices internal to the CR200(X). 3.1.8.3 Calibration Read More! See Self-Calibration p. 41. The CR200(X) uses an internal voltage reference to routinely calibrate itself. 3.1.8.
Section 3. Overview Table 3. Internal Lithium Battery Specifications 3.2 Manufacturer Renata Model CR2016 (3.6V) Capacity 80 mAh Self-discharge rate 1%/year @ 23°C Operating temperature range -40°C to +85°C PC Support Software Read More! See Support Software (p. 143). Several datalogger support software products for Windows are available. Software for datalogger setup and simple applications, PC200W and Short Cut, are available at no cost at www.campbellsci.com.
Section 3. Overview 3.
Section 3.
Section 4. Sensor Support Several features give the CR200(X) the flexibility to measure many sensor types. Contact a Campbell Scientific applications engineer if assistance is required to assess sensor compatibility. 4.1 Powering Sensors Read More! See CR200(X) Power Supply (p. 53). The CR200(X) is a convenient router of power for sensors and peripherals requiring a 2.5, 5 or 12 VDC source.
Section 4. Sensor Support 4.1.3 Switched Unregulated (Nominal 12 Volt) Voltage on the SW Battery terminal will change with CR200(X) supply voltage. The CRBASIC instruction SWBatt () controls the SW Battery terminal. Table 4. Current Sourcing Limits Terminal Limit VX1, VX2 25 mA @ 2.5V 10 mA @ 5V SW Battery < 900 mA @ 20°C < 729 mA @ 40°C < 630 mA @ 50°C < 567 mA @ 60°C < 400 mA @ 85°C 4.2 Voltage Measurement 4.2.
Section 4. Sensor Support Note The accuracy specification includes only the CR200(X)’s contribution to measurement error. It does not include the error of sensors. For example, assume the following (see Specifications (p. 35)): • Input Voltage: +2000 mV • Programmed Measurement Instruction: VoltSE () • CR200(X) Temperature: Between -40°C and +50°C Accuracy of the measurement is calculated as follows: Error = Gain Error + Offset Error, where Gain Error = ± (2000 * 0.0025) = ±5 mV and Offset Error = 1.
Section 4. Sensor Support Figure 27: Voltage Measurement Accuracy (0° to 40° C) 4.2.3 Voltage Range The CR200(X) has one analog voltage range of 0 to 2.5 volts. The resolution for a single A/D conversion is 0.6 millivolts. 4.2.4 Integration Integration is used to reduce the noise included in a measurement. The CR200(X) uses a form of digital integration. It makes 10 A/D conversions and averages them for the result returned. The A/D conversions are made every 26 microseconds.
Section 4. Sensor Support 4.2.5 Self-Calibration A calibration measurement to measure the ground offset is made at the beginning of each measurement instruction that includes a voltage measurement. This calibration takes about 400 microseconds. Only one calibration measurement is made per instruction regardless of the number of reps. The battery voltage is checked every 8 seconds to ensure it is within the allowable range. 4.
Section 4. Sensor Support 4.3.1 Measurements Requiring AC Excitation Some resistive sensors require AC Excitation. These include electrolytic tilt sensors, soil moisture blocks, water conductivity sensors, and wetness sensing grids. The use of DC excitation in these sensors can result in polarization, which will cause erroneous measurement, shift calibration, or lead to rapid sensor decay. Other sensors, e.g.
Section 4. Sensor Support Note: The PulseCount () instruction should not be used in a conditional statement or subroutine. To ensure all pulses are detected, it must be executed each scan. Execution of PulseCount () within a scan involves determining the accumulated counts in each dedicated 16-bit counter since execution of the last PulseCount (). PulseCount () parameter (POption) determines if the output is in counts (POption = 0) or frequency (POption = 1).
Section 4. Sensor Support FIGURE. Pulse Input Types (p. 7) illustrates pulse input types measured by the CR200(X). Dedicated pulse input channel P_SW can be configured to read high- frequency pulses or switch closure, while P_LL can be configured to read a low-level AC signal. With a 100 kOhm pull-up resistor added to the wiring panel P_LL, C1, or C2 can measure pulse input signals (See Pulse Input (P_SW p. 44). Figure 30: Pulse Input Types 4.4.1.
Section 4. Sensor Support When a pulse channel is configured for pulse input mode, an internal 100 kΩ pull-up resistor to +5 Volt on the P_SW input is automatically employed. This pull-up resistor accommodates open-collector (open-drain) output devices for high-frequency input. An external 100 kΩ pull-up resistor connecting Battery+ to P_LL, C1, or C2 must be added to perform pulse counting on any of those channels (See Multiple Switch Closure Measurements p. 112).
Section 4. Sensor Support 4.6 SDI-12 Recording Read More! SDI-12 Sensor Support p. 112 and Serial Input / Output p. 105. SDI-12 is a communications protocol developed to transmit digital data from smart sensors to data acquisition units. It is a simple protocol, requiring only a single communication wire. Typically, the data acquisition unit also supplies power (12V and ground) to the SDI-12 sensor. The CR200(X) is equipped with 1 SDI-12 channel and an SDI12Recorder () CRBASIC instruction. 4.
Section 4. Sensor Support 4.7.3 Serial Sensors 4.7.3.1 SDI-12 Sensors The SDI-12 standard allows cable lengths of up to 200 feet. Campbell Scientific does not recommend SDI-12 sensor lead lengths greater than 200 feet; however, longer lead lengths can sometimes be accommodated by increasing the wire gage and/or powering the sensor with a second 12 vdc power supply placed near the sensor.
Section 4.
Section 5. Measurement and Control Peripherals Peripheral devices expand the CR200(X) input / output capacity. Classes of peripherals are discussed below according to use. Read More! For complete information on available measurement and control peripherals, go to APPENDIX. Sensors and Peripherals (Appendix p. 28), www.campbellsci.com, or contact a Campbell Scientific applications engineer. 5.1 Control Output Controlling power to an external device is a common function of the CR200(X).
Section 5. Measurement and Control Peripherals Figure 33: Control Port Current Sourcing 5.1.1.2 Switched 12 V Control The SW Battery port can be set low (0 V) or high (12 V) using the SWBatt () instruction. The port is often used to control low power devices such as sensors that require 12 V during measurement. Current sourcing must be limited to 900 mA or less at 20°C. See TABLE. Current Sourcing Limits (p. 38).
Section 5. Measurement and Control Peripherals In other applications it may be desirable to simply switch power to a device without going through a relay. FIGURE. Power Switching without Relay (p. 51) illustrates a circuit for switching external power to a device without using a relay. If the peripheral to be powered draws in excess of 75 mA at room temperature (limit of the 2N2907A medium power transistor), the use of a relay is required.
Section 5.
Section 6. CR200(X) Power Supply Reliable power is the foundation of a reliable data acquisition system. When designing a power supply, consideration should be made regarding worst-case power requirements and environmental extremes. Contact Campbell Scientific if assistance in selecting a power supply is needed, particularly with applications in extreme environments. 6.1 Power Requirement The CR200(X) operates from a DC power supply with voltage ranging from 7 to 16 V.
Section 6. CR200(X) Power Supply Auxiliary photovoltaic power sources may be used to maintain charge on lead acid batteries. Unregulated solar panels may be connected to Charge + and Charge – channels on the datalogger wiring panel. When selecting a solar panel, a rule-of-thumb is that on a stormy overcast day the panel should provide enough charge to meet the system current drain (assume 10% of average annual global radiation, kW/m2).
Section 7. Grounding Grounding the CR200(X) and its peripheral devices and sensors is critical in all applications. Proper grounding will ensure the maximum ESD (electrostatic discharge) protection and higher measurement accuracy. 7.1 ESD Protection ESD (electrostatic discharge) can originate from several sources, the most common, and most destructive, being primary and secondary lightning strikes. Primary lightning strikes hit the datalogger or sensors directly.
Section 7. Grounding 7.1.1 Lightning Protection The most common and destructive ESDs are primary and secondary lightning strikes. Primary lightning strikes hit instrumentation directly. Secondary strikes induce voltage in power lines or wires connected to instrumentation. While elaborate, expensive and nearly infallible lightning protection systems are available, Campbell Scientific has for many years employed a simple and inexpensive design that protects most systems in most circumstances.
Section 7. Grounding Figure 36: Lightning Protection Scheme 7.2 Single-Ended Measurement Reference Low-level single-ended voltage measurements are sensitive to ground potential fluctuations.
Section 7. Grounding Examples: 58 • Connect grounds associated with SW Battery, VX1 (EX1), VX2 (EX2), C1, and C2 to G terminals. • Connect the low side of single-ended sensors to the nearest ( ) terminal on the analog input terminal blocks. • Connect shield wires to the nearest ( ) terminal on the analog input terminal blocks.
Section 8. CR200(X) Configuration The CR200(X) may require changes to factory default settings depending on the application. Most settings concern telecommunications between the CR200(X) and a network or PC. Note The CR200(X) is shipped factory ready with all settings and firmware necessary to communicate with a PC via RS-232 and to accept and execute user application programs. Prior to running DevConfig, connect a serial cable from the computer COM port to the RS-232 on the datalogger as shown in Figure.
Section 8. CR200(X) Configuration Figure 37: DevConfig Utility 8.2 Sending the Operating System The CR200(X) is shipped with the operating system pre-loaded. However, OS updates are made available at www.campbellsci.com and can be sent to the CR200(X). Since sending an OS to the CR200(X) resets memory, data loss will certainly occur. Depending on several factors, the CR200(X) may also become incapacitated for a time. Consider the following before updating the OS. 1.
Section 8. CR200(X) Configuration Figure 38: DevConfig OS Download Window Text in the Send OS tab lists instructions for sending an operating system to the CR200(X). When the Start button is clicked, DevConfig offers a file open dialog box that prompts for the operating system file (*.obj file). When the CR200(X) is powered-up, DevConfig starts to send the operating system. When the operating system has been sent, a confirming message dialog box.
Section 8. CR200(X) Configuration The information in the dialog helps to corroborate the signature of the operating system sent. 8.3 8.3.1 Settings Settings via DevConfig The CR200(X) has a number of properties, referred to as "settings", some of which are specific to the PakBus® communications protocol. Read More! PakBus® is discussed in PakBus® Overview (p. 133) and the PakBus® Networking Guide available at www.campbellsci.com.
Section 8. CR200(X) Configuration double clicking on a value cell with the mouse. The grid will not allow readonly settings to be edited. The bottom of the Settings Editor displays help for the setting that has focus on the top of the screen. Once a setting is changed, click Apply or Cancel. These buttons will only become enabled after a setting has been changed. If the device accepts the settings, a configuration summary dialogue is shown (FIGURE. Summary of CR200(X) Configuration p.
Section 8. CR200(X) Configuration 8.3.1.1 Deployment Tab Figure 42: DevConfig Deployment Tab As shown in FIGURE. DevConfig Deployment Tab p. 64, the Deployment tab allows the user to configure the datalogger prior to deploying it. Deployment tab settings can also be accessed through the Setting Editor tab and the Status table. The CR200(X) default PakBus address is 1. Unless the CR200(X) is used in a network, there may be no need to change the PakBus address or any other default setting.
Section 8. CR200(X) Configuration Sequence value of the RF400 series base station used to communicate with the CR200(X) so they can contact each other. 8.3.1.2 • Network specifies the radio network address of the built-in radio which is combined with the radio address and sent as part of a packet header with each message. This value should be set to match the network address of the RF400 series base station used to communicate with the CR200(X).
Section 8. CR200(X) Configuration 8.3.2 • Clocks in the PC and CR200(X) are checked every second and the difference displayed. The System Clock Setting allows entering what offset, if any, to use with respect to standard time (Local Daylight Time or UTC, Greenwich mean time). The value selected for this control is remembered between sessions. Clicking the Set Clock button will synchronize the station clock to the current computer system time.
Section 8. CR200(X) Configuration The CR200(X) will time out and exit the terminal mode if it does not receive a command within 12 seconds. Enter a command by pressing the command followed by the carriage return. The commands are: Commands Action (what returns) A Trap Code 16 Information "OK" = memory ok "2005-7-14 13:56:6=16" = memory failure, 16 denotes trap code 16, date/time is when it occurred.
Section 8.
Section 9. Programming 9.1 Inserting Comments into Program Comments are non-functioning text placed within the body of a program to document or clarify program algorithms. As shown in CRBASIC EXAMPLE. Inserting Comments (p. 69), comments are inserted into a program by preceding the comment with a single quote ('). Comments can be entered either as independent lines or following CR200(X) code. When the CR200(X) compiler sees a single quote ('), it ignores the rest of the line. CRBASIC EXAMPLE 1.
Section 9. Programming in the LoggerNet / PC400 datalogger support software suites. Programs can be up to 19.6 KBytes in size although typical programs are smaller. 9.3.1 Short Cut Editor and Program Generator Short Cut is easy-to-use menu-driven software that presents the user with lists of predefined measurement, processing, and control algorithms from which to choose. The user makes choices and Short Cut writes the CRBASIC code required to perform the tasks.
Section 9. Programming processing instructions that compress many common calculations used in CR200(X) dataloggers. These four elements must be properly placed within the program structure. 9.4 Numerical Formats Four numerical formats are supported by CRBASIC. Most common is the use of base 10 numbers. Scientific notation, binary, and hexadecimal formats may also be used, as shown in TABLE. Formats for Entering Numbers in CRBASIC (p. 71).
Section 9. Programming 9.5 Structure TABLE. CRBASIC Program Structure (p. 72) delineates CRBASIC program structure: Table 6. CRBASIC Program Structure Declarations Define datalogger memory usage. Declare constants, variables, aliases, units, and data tables. Declare constants List fixed constants Declare Public variables List / dimension variables viewable during program execution Dimension variables List / dimension variables not viewable during program execution.
Section 9. Programming CRBASIC EXAMPLE 3. 9.6 Proper Program Structure Declarations I - Single-line Declarations Public variables, Dim variables, Constants, Units, Aliases, Data Tables and Subroutines are declared at the beginning of a CRBASIC program. TABLE. Rules for Names (p. 85) lists declaration names and allowed lengths 9.6.1 Variables A variable is a packet of memory, given an alphanumeric name, through which pass measurements and processing results during program execution.
Section 9. Programming Variable names can be up to 16 characters in length, but most variables should be no more than 12 characters long. This allows for the 4 additional characters that are added as a suffix to the variable name when it is output to a data table. Variable names cannot start with a number or contain spaces or quote marks (“), but can contain numbers and underscores (_). Several variables can be declared on a single line, separated by commas: Public RefTemp, AirTemp2, Batt_Volt 9.6.1.
Section 9. Programming CRBASIC EXAMPLE 4. Using a variable array in calculations Public TempC(4) Public TempF(4) Dim T BeginProg Scan (1,Sec,0,0) Therm109 (TempC(),4,1,Ex1,1.0,0) For T = 1 To 4 TempF(T) = TempC(T) * 1.8 + 32 Next NextScan EndProg 9.6.1.2 Dimensions The CR200(X) cannot use multi-dimensioned arrays. 9.6.1.3 Data Types Variables, calculations, and stored data use IEEE4 4-byte floating point, a binary format, with least significant bit first.
Section 9. Programming CRBASIC EXAMPLE 5. Flag Declaration and Use Public batt_volt Public Flag BeginProg Scan (1,Sec) Flag = IIF (Flag=0,0,-1) If Flag = true Then Battery (batt_volt) EndIf NextScan EndProg 9.6.2 Constants CRBASIC EXAMPLE. Using the Const Declaration (p. 76) shows use of the constant declaration. A constant can be declared at the beginning of a program to assign an alphanumeric name to be used in place of a value so the program can refer to the name rather than the value itself.
Section 9. Programming TABLE. Predefined Constants and Reserved Words (p. 77) lists predefined constants. Table 7. Predefined Constants and Reserved Words 9.6.3 Case Day DO FOR FALSE Hr If Msec min mv2500 mv5000 PROG SCAN Select SUB Sec TABLE TRUE Usec Until EX1 EX2 While Alias and Unit Declarations A variable can be assigned a second name, or alias, by which it can be called throughout the program. Aliasing is particularly useful when using arrays.
Section 9. Programming DataTable () Output Trigger Condition(s) Output Processing Instructions EndTable A data table is essentially a file that resides in CR200(X) memory. The file is written to each time data are directed to that file. The trigger that initiates data storage is tripped either by the CR200(X)'s clock, or by an event, such as a high temperature. Up to 8 data tables can be created by the program for a CR200(X) (4 data tables for a CR200).
Section 9. Programming The second header line reports field names. This line consists of a set of comma-delimited 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 will be followed by a comma separated list of subscripts within parentheses that identifies the array index.
Section 9. Programming CRBASIC EXAMPLE 8.
Section 9. Programming • TrigVar-Controls whether or not data records are written to storage. Data records are written to storage if TrigVar is true and if other conditions, such as DataInterval (), are met. Default setting is -1 (True). TrigVar may be a variable, expression, or constant. TrigVar does not control intermediate processing.
Section 9. Programming Consider the Average () instruction as an example of output processing instructions. Average () stores the average of a variable over the data storage output interval. Its parameters are: • Reps-number of elements in the variable array for which to calculate averages. Reps is set to 1 to average Batt_Volt, and set to 2 to average 2 thermistor temperatures, both of which reside in the variable array "T109_C". • Source-variable array to average.
Section 9. Programming If Flag = True Then DisableVar = True End If Else DisableVar = False EndIf 'Call Data Tables and Store Data CallTable (OscAvgData) NextScan EndProg Read More! For a complete list of output processing instructions, see Data Storage Output Processing (p. 94). 9.7.2 Subroutines Subroutines allow a section of code to be called by multiple processes in the main body of a program. Subroutines are defined before the main program body of a program. Program CRBASIC EXAMPLE.
Section 9. Programming Scan () determines how frequently instructions in the program are executed. Scan has two parameters: CRBASIC EXAMPLE 11. • Interval is the interval between scans. • Units is the time unit for the interval. Interval is 1sec <= Interval <= 1 day. BeginProg / Scan / NextScan / EndProg Syntax BeginProg Scan (1,Sec) Therm109 (TempC(),2,1,Ex1,1.0,0) CallTable Temp NextScan EndProg 9.
Section 9. Programming 9.9.2 Parameter Types Many instructions have parameters that allow different types of inputs. Common input type prompts are listed below. Allowed input types are specifically identified in the description of each instruction in CRBASIC Editor Help. 9.9.
Section 9. Programming 9.9.4 Expressions in Parameters Read More! See Expressions (p. 87) for more information on expressions. Many parameters allow the entry of expressions. If an expression is a comparison, it will return -1 if the comparison is true and 0 if it is false (Logical Expressions (p. 88)). CRBASIC EXAMPLE. Use of Expressions in Parameters (p. 86) shows an example of the use of expressions in parameters in the DataTable instruction, where the trigger condition is entered as an expression.
Section 9. Programming Read More! More information is available in CRBASIC Editor Help topic "Multipliers and Offsets with Repetitions". 9.10 Expressions An expression is a series of words, operators, or numbers that produce a value or result. Expressions are evaluated expression from left to right, with deference to precedence rules. Two types of expressions, mathematical and programming, are used in CRBASIC.
Section 9. Programming CRBASIC EXAMPLE. Use of Variable Arrays to conserve Code p. 88 shows example code to convert five temperatures in a variable array from C to F: CRBASIC EXAMPLE 15. Use of Variable Arrays to Conserve Code Space For I = 1 to 5 TempC(I) = TempC(I) * 1.8 + 32 Next I 9.10.3 Logical Expressions Measurements can indicate absence or presence of an event. For example, an RH measurement of 100% indicates a condensation event such as fog, rain, or dew.
Section 9. Programming The following commands and logical operators are used to construct logical expressions. CRBASIC EXAMPLE. Logical Expression Examples p. 89 demonstrate some logical expressions. • IF • AND • OR • NOT • XOR • IIF Table 11. Logical Expression Examples If X >= 5 then Y = 0 Sets the variable Y to 0 if the expression "X >= 5" is true, i.e. if X is greater than or equal to 5.
Section 9. Programming 9.11 Program Access to Data Tables CRBASIC has syntax provisions facilitating access to data in tables or information relating to a table. The syntax is entered directly into the CRBASIC program through a variable name. The general form is: "TableName.FieldName_Prc (Fieldname Index, Records Back)". Where: • TableName: name of the data table • FieldName: name of the variable from which the processed value is derived • Prc: Abbreviation of the name of the data process used.
Section 9. Programming Five special variable names are used to access information about a table: • FieldName • Output • Record • TableSize • TimeStamp Consult CRBASIC Editor Help Index topic "DataTable access" for complete information.
Section 9.
Section 10. CRBASIC Programming Instructions Read More! Parameter listings, application information, and code examples are available in CRBASIC Editor Help. CRBASIC Editor is part of LoggerNet / PC400 / RTDAQ. Select instructions are explained more fully, some with example code, in Programming Resource Library (p. 109). Example code is throughout the CR200(X) manual. Refer to the table of contents Example index. 10.1 Program Declarations 10.1.
Section 10. CRBASIC Programming Instructions 10.2 Data Table Declarations 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 10.2.1 Data Table Modifiers DataInterval Sets the time interval for an output table. Syntax DataInterval (TintoInt, Interval, Units,) 10.2.
Section 10. CRBASIC Programming Instructions StdDev Calculates the standard deviation over the output interval. Syntax StdDev (Reps, Source, DisableVar) Totalize Sums the total over the output interval. Syntax Totalize (Reps, Source, DisableVar) 10.2.2.2 Multiple-Source ETo Stores evapotranspiration (ETo) and other meteorological data. Most suitable for output intervals of less than 24 hours.
Section 10. CRBASIC Programming Instructions 10.4 Program Control Instructions 10.4.1 Common Controls BeginProg … EndProg Mark 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 CallTable Calls a data table, typically for output processing. Syntax CallTable [TableName] Delay Delays the program. Syntax Delay (Delay, Units) Do … While ... Until ... ExitDo ...
Section 10. CRBASIC Programming Instructions If ... Then ... Else … ElseIf ... EndIf Allows conditional execution, based on the evaluation of an expression. Else is optional. ElseIf is optional (EndSelect and EndIf call the same function). Syntax If [condition] Then [thenstatements] Else [elsestatements] -or- If [condition 1] Then [then statements] ElseIf [condition 2] Then [elseif then statements] Else [else statements] EndIf InterruptSequence Specifies code to run when an interrupt condition occurs.
Section 10. CRBASIC Programming Instructions While…Wend Execute a series of statements in a loop as long as a given condition is true. Syntax While Condition [StatementBlock] Wend 10.5 Measurement Instructions 10.5.1 Diagnostics Battery Measures input voltage. Syntax Battery (Dest) 10.5.2 Voltage VoltSe Measures the voltage at a single-ended input with respect to ground. Syntax VoltSe (Dest, Reps, SEChan, Mult, Offset) Read More! See Bridge Resistance Measurements (p. 41).
Section 10. CRBASIC Programming Instructions PulseCount Measures number or frequency of voltages pulses on a pulse channel. Syntax PulseCount (Dest, PChan, PConfig, POption, Mult, Offset) 10.5.4 Digital I/O AnalogPortGet Configures an analog port as a digital input and stores the status of the input in a variable. Syntax AnalogPortGet (Dest, Port) AnalogPortSet Configures an analog port as a digital output and sets the port either high or low.
Section 10. CRBASIC Programming Instructions SDI12SensorResponse Holds the source of the data to send to the SDI12 recorder. Syntax SDI12SensorSetup (Repetitions, SDIPort, SDIAddress, ResponseTime) SDI12SensorResponse (SDI12Source) 10.6 Processing and Math Instructions 10.6.1 Mathematical Operators ^ Raise to Power. * Multiply / Divide + Add - Subtract = Equals <> Not Equal > Greater Than < Less Than >= Greater Than or Equal <= Less Than or Equal 10.6.
Section 10. CRBASIC Programming Instructions OR Used to perform a logical disjunction on two expressions. Syntax result = expr1 OR expr2 XOR Performs a logical exclusion on two expressions. Syntax result = expr1 XOR expr2 10.6.3 Trigonometric Functions 10.6.3.1 Derived Functions TABLE. Derived Trigonometric Functions (p. 101) is a list of trigonometric functions that can be derived from functions intrinsic to CRBASIC. Table 13.
Section 10. CRBASIC Programming Instructions ASIN The ASIN function returns the arc sin of a number. Syntax x = ASIN(source) ATN Returns the arctangent of a number. Syntax x = ATN(source) ATN2 Returns the arctangent of y / x. Syntax x = ATN(y , x) COS Returns the cosine of an angle specified in radians. Syntax x = COS(source) SIN Returns the sine of an angle. Syntax x = SIN(source) TAN Returns the tangent of an angle. Syntax x = TAN(source) 10.6.
Section 10. CRBASIC Programming Instructions LOG Returns the natural logarithm of a number. Ln and Log perform the same function. Syntax x = LOG(source) x = LN(source) Note LOGN = LOG(X) / LOG(N) LOG10 The LOG10 function returns the base 10 logarithm of a number. Syntax x = LOG10 (number) MOD Divides two numbers and returns only the remainder. Syntax result = operand1 MOD operand2 RectPolar Converts from rectangular to polar coordinates. Syntax RectPolar (Dest, Source) SGN Finds the sign value of a number.
Section 10. CRBASIC Programming Instructions MinSpa Finds the minimum value in an array. Syntax MinSpa (Dest, Swath, Source) RMSSpa Computes the RMS (root mean square) value of an array. Syntax RMSSpa (Dest, Swath, Source) StdDevSpa Used to find the standard deviation of an array. Syntax StdDevSpa (Dest, Swath, Source) 10.6.6 Other Functions Randomize Initializes the random-number generator. Syntax Randomize (source) RND Generates a random number. Syntax RND (source) 10.
Section 10. CRBASIC Programming Instructions 10.8 Serial Input / Output Print Sends the values from program variables or other characters out through a communications port. Syntax Print (PrintPort, PrintBaud, PrintParams) SerialInput Reads a serial sensor connected to the CR200(X)'s RS232 port. Syntax SerialInput (Dest, Max_Values, Termination_Char, FilterString) 10.9 Peer-to-Peer PakBus Communications Read More! See PakBus Overview (p. 133) for more information.
Section 10. CRBASIC Programming Instructions GetValue Retrieves values from a variable in a data table of a PakBus datalogger. Syntax GetVariables (ResultCode, ComPort, NeighborAddr, PakBusAddr, Security, TimeOut, "TableName", "FieldName", Variable, Swath) ReadSendGetInfo Returns the interval and offset for the SendGetData instruction. Syntax ReadSendGetInfo (Dest, Port) SendData Sends the most recent record from a data table to a remote PakBus device.
Section 10. CRBASIC Programming Instructions TableName.FieldName Accesses a specific field from a record in a table Syntax TableName.FieldName (FieldNameIndex, RecordsBack) TableName.Output Determine if data was written to a specific DataTable the last time the DataTable was called. Syntax TableName.Output (1,1) TableName.Record Determines the record number of a specific DataTable record. Syntax TableName.Record (1,n) TableName.
Section 10. CRBASIC Programming Instructions 10.12 Satellite Systems Programming Instructions for GOES. Refer to satellite transmitter manuals available at www.campbellsci.com. 10.12.1 GOES The CR295 and CR295X dataloggers support communication through Campbell Scientific’s TX312 or HDR GOES satellite transmitters. The CR295(X) has an extra 9-pin serial port. The CR295 requires a special operating system and does not support radio telemetry or calculation of evapotranspiration and is not CE compliant.
Section 11. Programming Resource Library 11.1 Remote Sensor Interface The CR200(X) is frequently used as a remote sensor interface for a “Host” datalogger. Typically, the host datalogger and the sensor(s) (CR200(X)) will have programs that will enable the sensors to operate with the minimum quiescent current drain (110 µa). These programs synchronize the CR200(X) sensors so that they are reporting back the data in designated time slots.
Section 11. Programming Resource Library Either the output array or the input array or both can be specified as 0 meaning no data flow in the corresponding direction. The HostAddr parameter is the PakBus Address of the master of the network, the destination of the sensor’s data. The RouterAddr is the PakBus Address of a router if the distance is too far to reach the Host directly. Typically a router will not be present so this address with be identical to the HostAddr.
Section 11. Programming Resource Library CRBASIC EXAMPLE 17. Examples CRBASIC EXAMPLE.
Section 11. Programming Resource Library 11.3 Multiple Switch Closure Measurements Pulse channel P_SW detects switch closures but P_LL does not. In order to detect more than one switch closure device, a 100kOhm pull-up resistor must be connected between Battery+ and P_LL, C1, or C2. With the pull-up resistor in place P_LL or the control port can detect a switch closure. In the following example p.
Section 11. Programming Resource Library SDI-12 commands and responses are defined by the SDI-12 Support Group (www.sdi-12.org) and are summarized in TABLE. Standard SDI-12 Command & Response Set (p. 113). Sensor manufacturers determine which commands to support. The most common commands are detailed below. Table 14.
Section 11. Programming Resource Library 11.4.1.1 Addressing A single probe should be connected to an SDI-12 input when using these commands. 11.4.1.1.1 Address Query Command (?!) Command ?! requests the address of the connected sensor. The sensor replies to the query with the address, a. 11.4.1.1.2 Change Address Command (aAb!) Sensor address is changed with command aAb!, where a is the current address and b is the new address.
Section 11. Programming Resource Library 11.4.1.2.1 Start Measurement Command (aMv!) Qualifier 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 °F) • additional values (e.g., level and temperature) • diagnostic of the sensor’s internal battery Example: Command: 5M! Response: 500410 (atttnn, indicates address 5, data ready in 4 seconds, will report 10 values).
Section 11. Programming Resource Library logger issues aD1!, aD2!, etc., until all data are received. The limiting constraint is that the total number of characters that can be returned to a aDv! command is 35 characters (75 characters for aCv!). If the number of characters exceed the limit, the remainder of the response are obtained with subsequent aDv! commands wherein v increments with each iteration. 11.4.1.3.
Section 11. Programming Resource Library appears on the screen as shown in FIGURE. Entering SDI-12 Transparent Mode (p. 117). Press until the CR200(X) responds with the prompt “CR200(X)>”. Type “SDI12” at the prompt (without the quotes) and press . An “Entering SDI12 Terminal” response indicates that SDI-12 Transparent Mode is active and ready to transmit SDI-12 commands and display responses. The command entered cannot exceed 12 characters.
Section 11. Programming Resource Library SDIRecorder () Instruction SDICommand Entry Actions Internal to CR200(X) and Sensor CR200(X): Issues aMv! command Mv! Sensor: Responds with atttnn CR200(X): Waits until ttt1 seconds. Issues aDv! command(s) Sensor: Responds with data. CR200(X): Issues aCv! command Cv! Sensor: Responds with atttnn CR200(X): If ttt=0 then issues aDv! command(s) Sensor: Responds with data. CR200(X): else, if ttt>0 then moves to next CRBASIC program instruction.
Section 11. Programming Resource Library will respond, however, all other probes will remain active until the timeout period expires. Example: Probe: Water Content Power Usage: • Quiescent: 0.25 mA • Measurement: 120 mA • Measurement Time: 15 s • Active: 66 mA • Timeout: 15 s Probes 1, 2, 3, and 4 are connected to SDI-12 / Control Port 1. The time line in TABLE. Example Power Usage Profile for a Network of SDI-12 Probes (p. 119) shows a 35 second power usage profile example. Table 15.
Section 11. Programming Resource Library For most applications, total power usage of 318 mA for 15 seconds is not excessive, but if 16 probes were wired to the same SDI-12 port, the resulting power draw would be excessive. Spreading sensors over several SDI-12 terminals will help reduce power consumption. 11.5 Wind Vector 11.5.1 OutputOpt Parameters In the CR200(X) WindVector () instruction, the OutputOpt parameter is used to define the values which are stored.
Section 11. Programming Resource Library Note Cup anemometers typically have a mechanical offset which is added to each measurement. A numeric offset is usually encoded in the CRBASIC program to compensate for the mechanical offset. When this is done, a measurement will equal the offset only when wind speed is zero; consequently, additional code is often included to zero the measurement when it equals the offset so that WindVector () can reject measurements when wind speed is zero. 11.5.2.
Section 11. Programming Resource Library Scalar mean horizontal wind speed, S: where in the case of orthogonal sensors: Unit vector mean wind direction, where or, in the case of orthogonal sensors where Standard deviation of wind direction (Yamartino algorithm) where, and Ux and Uy are as defined above.
Section 11. Programming Resource Library 11.5.2.2.2 Mean Wind Vector Resultant mean horizontal wind speed, Ū: Figure 46: Mean Wind Vector where for polar sensors: or, in the case of orthogonal sensors: Resultant mean wind direction, Θu: Standard deviation of wind direction, σ (Θu), using Campbell Scientific algorithm: The algorithm for σ (Θu) is developed by noting (FIGURE. Standard Deviation of Direction (p.
Section 11. Programming Resource Library where Figure 47: Standard Deviation of Direction The Taylor Series for the Cosine function, truncated after 2 terms is: For deviations less than 40 degrees, the error in this approximation is less than 1%. At deviations of 60 degrees, the error is 10%.
Section 11. Programming Resource Library Resources Laboratory, NOAA, Idaho Falls, ID; and MERDI, Butte, MT. In these tests, the maximum differences in and have never been greater than a few degrees. The final form is arrived at by converting from radians to degrees (57.296 degrees/radian). 11.6 TrigVar and DisableVar - Controlling Data Output and Output Processing TrigVar is the third parameter in the DataTable () instruction. It controls whether or not a data record is written to final storage.
Section 11. Programming Resource Library CRBASIC EXAMPLE. Using TrigVar to Trigger Data Storage (p. 126) lists CRBASIC code that uses TrigVar () rather than DataInterval () to trigger data storage. FIGURE. Data from TrigVar Program (p. 126) shows data produced by the example code. CRBASIC EXAMPLE 19. Using TrigVar to Trigger Data Storage In this example, the variable "counter" is incremented by 1 each scan. The data table is c includes the Sample (), Average (), and Totalize () instructions.
Section 11. Programming Resource Library Time instructions in the TrigVar parameter of the DataTable declaration. Since DataInterval is not used, the table size cannot be autoallocated and table size should be carefully considered before being set to a specific number of records. CRBASIC EXAMPLE 20. one data table CRBASIC EXAMPLE. Programming for two data intervals in 'CRBASIC program to write to a single table with two different time 'intervals.
Section 11.
Section 12. Memory and Data Storage 12.1 Data Storage The CR200(X) can be programmed to store each measurement or, more commonly, to store processed values such as averages, maxima, minima, etc. Data are stored periodically or conditionally in data tables as directed by the CRBASIC program (CRBASIC EXAMPLE. Proper Program Structure p. 73). The DataTable () instruction allows the user to set the size of the data table.
Section 12. Memory and Data Storage 12.2 Memory Conservation One or more of the following memory saving techniques can be used on the rare occasions when a program reaches memory limits: • Declare variables as DIM instead of Public. DIM variables do not require buffer memory for data retrieval. • Reduce arrays to the minimum size needed. Each variable, whether or not part of an array, requires about the same amount of memory. Approximately 70 variables will fill available memory.
Section 13. Telecommunications and Data Retrieval Telecommunications, in the context of CR200(X) operation, is the movement of information between the CR200(X) and another computing device, usually a PC. The information can be programs, data, files, or control commands. Telecommunications systems require three principal components: hardware, carrier signal, and protocol. For example, a common way to communicate with the CR200(X) is with PC200W software by way of a PC COM port.
Section 13. Telecommunications and Data Retrieval NOTE: The CR200(X) operates at a baud rate of 9600 baud. Attempting to connect at a higher baud rate will result in communications errors. 13.2 Protocols The primary telecommunication protocol for the CR200(X) is PakBus (PakBus Overview (p. 133)). ModBus is also supported on board (Alternate Telecoms Resource Library (p. 139)). 13.
Section 14. PakBus Overview Read More! This section is provided as a primer to PakBus® communications. Complete information is available in Campbell Scientific's "PakBus Networking Guide", available at www.campbellsci.com. The CR200(X) communicates with computers or other Campbell Scientific dataloggers via PakBus®. PakBus® is a proprietary telecommunications protocol similar in concept to IP (Internet protocol).
Section 14. PakBus Overview • Routers are measurement or telecommunications devices that route packets to other linked routers or leaf nodes. • Routers can be branch routers. Branch routers only know as neighbors central routers, routers in route to central routers, and routers one level outward in the network. • Routers can be central routers. Central routers know the entire network. A PC running LoggerNet is typically a central router.
Section 14. PakBus Overview 14.4.1 Hello-message (two-way exchange) A hello-message is an interchange between two nodes that negotiates a neighbor link. A hello-message is sent out in response to one or both of either a beacon or a hello-request. 14.4.2 Beacon (one-way broadcast) A beacon is a broadcast sent by a node at a specified interval telling all nodes within hearing that a hello-message can be sent.
Section 14. PakBus Overview 14.4.6 Maintaining Links Links are maintained by means of the CVI (communications verification interval). The CVI can be specified in each node with DevConfig. The following rules 1 apply: • If Verify Interval = 0, then CVI = 2.
Section 14. PakBus Overview 14.5.1.1 Automatic Packet Size Adjustment The BMP5 file receive transaction allows the BMP5 client (LoggerNet) to specify the size of the next fragment of the file that the CR200(X) sends. Note The file receive transaction is used to get table definitions from the datalogger. Because LoggerNet must specify a size for the next fragment of the file, it uses whatever size restrictions that apply to the link.
Section 14. PakBus Overview 14.5.3 Traffic Flow Keep beacon intervals as long as possible with higher traffic (large numbers of nodes and / or frequent data collection). Long beacon intervals minimize collisions with other packets and resulting retries. The minimum recommended beacon interval is 60 seconds. If communications traffic is high, consider setting beacon intervals of several minutes.
Section 15. Alternate Telecoms Resource Library 15.1 Modbus 15.1.1 Overview Modbus is a widely used SCADA communication protocol that facilitates exchange of information and data between computers / HMI software, instruments (RTUs) and Modbus compatible sensors. The CR200(X) communicates via Modbus over RF and RS-232. Modbus systems consist of a master (PC), RTU / PLC slaves, field instruments (sensors), and the communications network hardware.
Section 15. Alternate Telecoms Resource Library 15.1.2.1 Glossary of Terms Coils (00001 to 09999) Originally, "coils" referred to relay coils. In CR200(X)s, coils are exclusively ports, flags, or a Boolean variable array. Ports are inferred if parameter 5 of the ModbusSlave instruction is set to 0. Coils are assigned to Modbus registers 00001 to 09999. Digital Registers 10001-19999 Hold values resulting from a digital measurement. Digital registers in the Modbus domain are read only.
Section 15. Alternate Telecoms Resource Library Table 20.
Section 15. Alternate Telecoms Resource Library • 05 Force Single Coil • 15 Force Multiple Coils • 16 Force Multiple Registers 15.1.3.5 Reading Inverse Format Registers Some Modbus devices require reverse byte order words (CDAB vs. ABCD). This can be true for either floating point, or integer formats. While other CRBasic dataloggers, such as the CR1000, can use the MoveBytes() instruction to output reverse byte order words, the CR200(X) does not have that capability.
Section 16. Support Software PC / Windows® compatible software products are available from Campbell Scientific to facilitate CR200(X) programming, maintenance, data retrieval, and data presentation. Short Cut, PC200W, and Visual Weather are designed for novice integrators, but have features useful in advanced applications. PC400 and LoggerNet provide increasing levels of power required for advanced integration, programming and networking applications.
Section 16. Support Software 16.4 PC400 PC400 is a mid-level software suite. It includes CRBASIC Editor, point-to-point communications over several communications protocols, simple real-time digital and graphical monitors, and report generation. It does not support scheduled collection or multi-mode communication networks. 16.5 RTDAQ RTDAQ is targeted for industrial and other high-speed data acquisition applications. 16.
Section 16. Support Software Table 22. LoggerNet Clients These LoggerNet clients require, but are not sold with, the LoggerNet Server. Baler Handles data for third-party application feeds. RTMCRT RTMC viewer only. RTMC Web Server Converts RTMC graphics to HTML. RTMC Pro Enhanced version of RTMC. LoggerNetData Displays / Processes real-time and historical data. CSI OPC Server Feeds data into third-party OPC applications. 16.
Section 16.
Section 17. Care and Maintenance Temperature and humidity can affect the performance of the CR200(X). The internal lithium battery must be replaced periodically. Factory replacement is recommended. Contact Campbell Scientific to obtain an RMA prior to shipping the CR200(X). 17.1 Temperature Range The CR200(X) is designed to operate reliably from -40ºC to +50°C in noncondensing environments. 17.
Section 17. Care and Maintenance Figure 52: Enclosure 17.4 Replacing the Internal Battery Caution Fire, explosion, and severe burn hazard! Misuse or improper installation of the lithium battery can cause severe injury. Do not recharge, disassemble, heat above 100°C (212°F), solder directly to the cell, incinerate, or expose contents to water. Dispose of spent lithium batteries properly. The CR200(X) contains a lithium battery that operates the clock and SRAM when the CR200(X) is not powered.
Section 17. Care and Maintenance A replacement lithium battery can be purchased from Campbell (part number 15598). TABLE. CR200(X) Lithium Battery Specifications p. 33 lists the specifications of the battery. However, Campbell Scientific recommends that the battery be replaced at the factory. Table 23. Internal Lithium Battery Specifications Manufacturer Renata Model CR2016 (3.
Section 17.
Section 18. Troubleshooting Note If any component needs to be returned to the factory for repair or recalibration, remember that an RMA number is required. Contact a Campbell Scientific applications engineer to receive the RMA number. 18.1 Programming A properly deployed CR200(X) measures sensors accurately and stores all data as instructed by its program. Experienced users analyze data soon after deployment to ensure the CR200(X) is measuring and storing data as intended.
Section 18. Troubleshooting 18.1.1.5 TrapCode Normally this value is zero. If set to a value of 16, TrapCode indicates an EEPROM memory failure. When this occurs the datalogger stops running its program and the red LED flashes twice per scan interval. The datalogger must be returned to CSI to replace the Serial Flash EEPROM. Contact a Campbell Scientific applications engineer to receive an RMA number. 18.1.1.6 Compile and Download Errors When a user program is compiled , it is checked for errors.
Section 18. Troubleshooting 18.1.2 NAN and ±INF NAN (not-a-number) and ±INF (infinite) are data words indicating an exceptional occurrence in CR200(X) function or processing. NAN is a constant that can be used in expressions such as in CRBASIC EXAMPLE. Using NAN in Expressions (p. 153) NAN can also be used in the disable variable (DisableVar) in output processing (data storage) instructions, as indicated in CRBASIC EXAMPLE. Using NAN in Expressions p. 153. CRBASIC EXAMPLE 21.
Section 18. Troubleshooting Table 25. Math Expressions and CRBASIC Results Expression CRBASIC Expression Result 0/0 0/0 NAN ∞-∞ (1 / 0) - (1 / 0) NAN -1 ^ (1 / 0) NAN 0 * -∞ 0 * (-1 * (1 / 0)) NAN ±∞ / ±∞ (1 / 0) / (1 / 0) NAN 1∞ 1 ^ (1 / 0) NAN 0*∞ 0 * (1 / 0) NAN x/0 1/0 NAN x / -0 1 / -0 NAN -x / 0 -1 / 0 NAN -x / -0 -1 / -0 NAN ∞0 (1 / 0) ^ 0 1 0∞ 0 ^ (1 / 0) 0 00 0^0 1 (-1) ∞ 18.2 Communications 18.2.
Section 18. Troubleshooting 18.3 Power Supply 18.3.1 Overview Power supply systems may include batteries, charger/regulators, and charging sources such as solar panels or transformers. All of these components may need to be checked if the power supply is not functioning properly. Diagnosis and Fix Procedures (p.
Section 18. Troubleshooting 18.3.3 Diagnosis and Fix Procedures 18.3.3.
Section 18. Troubleshooting 18.3.3.
Section 18. Troubleshooting 18.3.3.
Section 18. Troubleshooting 18.3.3.
Section 18.
Appendix A. Glossary A.1 Terms AC A/D See VAC (Appendix p. 12). Analog-to-digital conversion. The process that translates analog voltage levels to digital values. accuracy A measure of the correctness of a measurement. See also Accuracy, Precision, and Resolution (Appendix p. 13). Amperes (Amps) Base unit for electric current. Used to quantify the capacity of a power source or the requirements of a power consuming device. analog Data presented as continuously variable electrical signals.
Appendix A. Glossary baud rate settings of two pieces of equipment must match each other. The baud rate for CR200(X) communication should be set to 9600. Beacon A signal broadcasted to other devices in a PakBus® network to identify "neighbor" devices. A beacon in a PakBus® network ensures that all devices in the network are aware of other devices that are viable. If configured to do so, a clock set command may be transmitted with the beacon.
Appendix A. Glossary datalogger support software Includes PC200W, PC400, RTDAQ, LoggerNet data point A data value which is sent to Final Storage as the result of an output processing (data storage) instruction. Strings of data points output at the same time make up a record in a data table. DC See VDC. DCE Data communications equipment. While the term has much wider meaning, in the limited context of practical use with the CR200(X), it denotes the pin configuration, gender and function of an RS-232 port.
Appendix A. Glossary Earth Ground use of a grounding rod or another suitable device to tie a system or device to the earth. Earth ground is a sink for electrical transients and possibly damaging potentials, such as those produced by a nearby lightning strike. Earth ground is the preferred reference potential for analog voltage measurements. Note that most objects have a "an electrical potential" and the potential at different places on the earth - even a few meters away - may be different.
Appendix A. Glossary Hello Exchange The process of verifying a node as a neighbor. Hertz Abbreviated Hz. Unit of frequency described as cycles or pulses per second. IEEE4 4 byte floating point data type. INF Infinite or undefined. A data word indicating the result of a function is infinite or undefined. input/output instructions Used to initiate measurements and store the results in Input Storage or to set or read Control/Logic Ports. integer A number written without a fractional or decimal component.
Appendix A. Glossary modem/terminal Any device which: • has the ability to raise the CR200(X) ring line and put the CR200(X) in the Telecommunications Command State • has an asynchronous serial communication port which can be configured to communicate with the CR200(X). multi-meter An inexpensive and readily available device useful in troubleshooting data acquisition system faults. mV The SI abbreviation for milliVolts. NAN Not a number. A data word indicating a measurement or processing error.
Appendix A. Glossary Ohms Law Describes the relationship of current and resistance to voltage. Voltage equals the product of current and resistance (V = I*R). on-line data transfer Routine transfer of data to a peripheral left on-site. Transfer is controlled by the program entered in the datalogger. output A loosely applied term.
Appendix A. Glossary period average A measurement technique utilizing a high-frequency digital clock to measure time differences between signal transitions. Sensors commonly measured with period average include vibrating wire transducers and water content reflectometers. peripheral Any device designed for use with, and requiring, the CR200(X) (or another CSI datalogger) to operate. precision A measure of the repeatability of a measurement. See also Accuracy, Precision, and Resolution (Appendix p. 13).
Appendix A. Glossary resistance A feature of an electronic circuit that impedes or redirects the flow of electrons through the circuit. resistor A device that provides a known quantity of resistance. resolution A measure of the fineness of a measurement. See also Accuracy, Precision, and Resolution (Appendix p. 13). ring line (Pin 3) Line pulled high by an external device to "awaken" the CR200(X). Ring Memory A memory configuration for data tables allowing the oldest data to be overwritten.
Appendix A. Glossary the table is executed at midnight and every execution interval thereafter. The table is executed for the first time at the first occurrence of the Execution Interval after compilation. If the Execution Interval does not divide evenly into 24 hours, execution will start on the first even second after compilation. SDI-12 Serial/Digital Data Interface at 1200 bps. Communication protocol for transferring data between data recorders and sensors. SDM Synchronous Device for Measurement.
Appendix A. Glossary state Whether a device is on or off. string A datum consisting of alpha-numeric characters. CR200(X) dataloggers do not support the STRING variable type. support software Includes PC200W, PC400, RTDAQ, LoggerNet. synchronous The transmission of data between a transmitting and receiving device occurs as a series of zeros and ones. For the data to be "read" correctly, the receiving device must begin reading at the proper point in the series.
Appendix A. Glossary VAC Volts Alternating Current. Mains or grid power is high-level VAC, usually 110 VAC or 220 VAC at a fixed frequency of 50 Hz or 60 Hz. High-level VAC is used as a primary power source for Campbell Scientific power supplies. Do not connect high-level VAC directly to the CR200(X). The CR200(X) measures varying frequencies of low-level VAC in the range of ±20 VAC. VDC Volts Direct Current. The CR200(X) operates with a nominal 12 VDC power supply.
Appendix A. Glossary A.2 Concepts A.2.1 Accuracy, Precision, and Resolution Three terms often confused are accuracy, precision, and resolution. Accuracy is a measure of the correctness of a single measurement, or the group of measurements in the aggregate. Precision is a measure of the repeatability of a group of measurements. Resolution is a measure of the fineness of a measurement. Together, the three define how well a data acquisition system performs.
Appendix A.
Appendix B. Status Table and Settings The CR200(X) status table contains system operating status information accessible via PC software DevConfig, LoggerNet, PC400, RTDAQ, or PC200W. TABLE. Common Uses of the Status Table (Appendix p. 15) lists some of the more common uses of status table information. TABLE. Status Table Fields and Descriptions (Appendix p. 16) is a comprehensive list of status table variables with brief descriptions.
Appendix B. Status Table and Settings Table 26. Status Table Fields and Descriptions Status Table Fieldname Description RecNum Increments for successive status table data records TimeStamp Time the record was generated ProgName Variable Type Normal Range Default User can change? Info Type _ 0 to 2^32_ _ Time _ _ _ Name of current (running) program. String _ _ _ Status OSVersion Version of the Operating System String _ _ _ Status OSDate Date OS was released.
Appendix B. Status Table and Settings Table 26.
Appendix B. Status Table and Settings Table 27. CR200(X) Settings Settings are accessed through Campbell Scientific's Device Configuration Utility (DevConfig) for direct serial connection, or through PakBusGraph for most telecommunications options. Setting Description Default Entry Max Packet Size Specified the maximum size packet in bytes that should ever be sent to the device. 1000 PakBus Address This setting specifies the PakBus® address for this device.
Appendix B. Status Table and Settings Table 27. CR200(X) Settings Settings are accessed through Campbell Scientific's Device Configuration Utility (DevConfig) for direct serial connection, or through PakBusGraph for most telecommunications options. Setting Description Default Entry 1 Sec Indicates that the radio receiver is to use the one second duty cycle. 8 Sec Indicates that the radio receiver is to use the eight second duty cycle.
Appendix B.
Appendix C. Serial Port Pin Outs C.1 RS-232 Communications Port C.1.1 Pin-Out Pin configuration for the CR200(X) RS-232 9-pin port is listed in TABLE. CR200(X) RS-232 Pin-Out p. 21. The CR200(X) RS-232 port is a DCE (Data Communication Equipment) device. A limited version of the RS-232 port is supported with no hardware flow control. The most common use of the Datalogger's RS-232 port is a connection to a computer DTE device.
Appendix C.
Appendix D.
Appendix D.
Appendix D.
Appendix D.
Appendix E. Antenna Usage and Compliance E.1 Use of Antenna with CR200(X) An FCC authorized antenna is required for use with CR200(X) models that have a built-in radio. Several models are available from Campbell Scientific. These antennas have been tested at an authorized FCC open-field test site and are certified to be in compliance with FCC emissions limits. All antennas or antenna cables have an SMA female connector for connection to the CR200(X).
Appendix F. Sensors and Peripherals E.2.1 Use of Approved Antennas FCC OET Bulletin No. 63 (October 1993) Changing the antenna on a transmitter can significantly increase, or decrease, the strength of the signal that is ultimately transmitted. Except for cable locating equipment, the standards in Part 15 are not based solely on output power but also take into account the antenna characteristics.
Index A Abbreviations • 90 ac • 1 ac Excitation • 6 ac Sine Wave • 7 Accuracy • 3, 1, 13 Address • 16 Address -- Modbus • 141 Address -- SDI-12 • 112 Ampers (Amps) • 1 Analog • 6, 25, 1 Analog Input Range • 35, 40 Analog Measurement • 153 Analog Sensor • 46 Analog Sensors • 6, 35 AND Operator • 88 ANSI • 1, 23 Arithmetic • 87 Arithmetic Functions • 102 Array • 75, 86, 88, 7 Asynchronous Comunication • 8, 1 B Background Calibration • 41 Backup Battery • 33 Battery Backup • 33 Baud • 11, 59, 105, 154 Baud Ra
Index Debugging • 151 Declaration • 73, 77, 93 Declaration -- Data Table • 94 Declaration -- Modbus • 140 Desiccant • 32, 3 DevConfig • 59, 3 Device Configuration • 59 Device Map • 138 Diagnosis -- Power Supply • 156 Diagnostics • 98 Differential • 3 Digital • 3 Digital I/O • 8, 25, 37, 45, 49, 99 Dimension • 75 Disable Variable • 81, 82, 125, 153 DisableVar • 125, 153 Documentation • 69 DTE • 28, 3, 6 Durable Settings • 67 E Earth Ground • 27, 55, 4 Editor • 13 Editor -- Short Cut • 70 Enclosures • 147 En
Index Instructions -- Dim • 93, 3 Instructions -- Do ... Loop • 96 Instructions -- EXP • 102 Instructions -- FieldNames • 94 Instructions -- FIX • 102 Instructions -- For ...
Index O Offset • 86 Ohm • 6 Ohms Law • 7 On-Line Data Transfer • 7 Operating System • 60 Operator • 100 OS • 60 OS Date • 16 OS Version • 16 Output • 7 Output Array • 7 Overview • 23 Overview -- Modbus • 139 Overview -- Power Supply • 53 P PakBus • 105, 133, 7, 33 PakBus Information • 31, 7 PakBus Overview • 133 Parameter • 7 Parameter Type • 85 PC Program • 13, 69 PC Support Software • 34, 143 PC200W • 11, 143 PC400 • 144 PDA Support • 145 Peer-To-Peer • 105 Period Average • 8 Peripheral • 8 Peripherals
Index Reliable Power • 53 Requirement -- Power • 53 Reset • 60 Resistance • 3, 6, 7, 9 Resistive Bridge • 6, 41 Resistor • 9 Resolution • 9, 13 Resolution -- Concept • 13 Resolution -- Data Type • 75 Resolution -- Definition • 9 Retrieving Data • 131, 132 Ring Memory • 4, 9 RMS • 9 Router • 31 RS-232 • 154, 9 RS-232 Pin Out • 21 RS-232 Port • 9, 21 RTDAQ • 144, 3 RTU • 140 Runtime Signature • 10 S Sample Rate • 9 Satellite • 108 SCADA • 107 Scan • 9 Scan (Execution Interval) • 9 Scan Interval • 72, 9 Scien
Index U UPS • 11 User Program • 30 UTC Offset • 66 V Vac • 12 Variable • 70, 73 Variable Array • 74 Variable Declaration • 73 Variable Modifier • 76 Variable Out of Bounds • 151 Vdc • 12 Vector • 120 Verify Interval • 135, 136 Viewing Data • 20 Visual Weather • 143 Volt Meter • 12 34 Voltage Measurement • 27, 38 Volts • 12 W Watchdog Error • 151, 16 Watchdog Timer • 12 Weather Tight • 12 Wind Vector • 120 Wind Vector Processing • 120 Wiring • 15 Wiring Panel • 4 Writing Program • 13, 69 X XOR • 88, 10
Campbell Scientific Companies Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com • info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA www.csafrica.co.za • cleroux@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA) PO Box 8108 Garbutt Post Shop QLD 4814 AUSTRALIA www.campbellsci.com.au • info@campbellsci.com.au Campbell Scientific do Brasil Ltda. (CSB) Rua Apinagés, nbr.