Campbell CR1000 Operator's Manual

Other manuals for CR1000: Operator's Manual, Operator's Manual
Manual is about: Measurement and Control System

Summary of CR1000

  • Page 1

    Cr1000 measurement and control system operator’s manual issued: 16.7.13 copyright 2000-2013 campbell scientific inc. Printed under licence by campbell scientific ltd. Csl 531.

  • Page 3: Guarantee

    Guarantee this equipment is guaranteed against defects in materials and workmanship. This guarantee applies for thirty-six months from date of delivery. We will repair or replace products which prove to be defective during the guarantee period provided they are returned to us prepaid. The guarantee ...

  • Page 5: Please Read First

    Please read first about this manual please note that this manual was originally produced by campbell scientific inc. Primarily for the north american market. Some spellings, weights and measures may reflect this origin. Some useful conversion factors: area: 1 in 2 (square inch) = 645 mm 2 length: 1 ...

  • Page 7: Table of Contents

    7 table of contents section 1. Introduction...................................................27 1.1 hello ................................................................................................... 27 1.2 typography ..............................................................................

  • Page 8

    Table of contents 8 section 5. System overview ..........................................57 5.1 cr1000 datalogger................................................................................. 58 5.1.1 clock..............................................................................................

  • Page 9

    Table of contents 9 section 7. Installation.....................................................81 7.1 moisture protection................................................................................. 81 7.2 temperature range ..........................................................................

  • Page 10

    Table of contents 10 7.7.3.4 single-line declarations.................................................... 115 7.7.3.4.1 variables................................................................... 115 7.7.3.4.2 constants .................................................................. 122 7.7.3.4....

  • Page 11

    Table of contents 11 7.8.2.5 ftp client.......................................................................... 171 7.8.2.6 telnet ................................................................................. 171 7.8.2.7 snmp........................................................................

  • Page 12

    Table of contents 12 7.8.13.4 inserting string characters............................................... 239 7.8.13.5 extracting string characters ............................................ 239 7.8.13.6 string use of ascii / ansii codes ................................ 239 7.8.13.7 formatting stri...

  • Page 13

    Table of contents 13 8.1.2.8.2 measuring the necessary settling time ................... 287 8.1.2.9 self-calibration.................................................................. 289 8.1.2.10 time skew between measurements ................................ 294 8.1.3 resistance measurements.........

  • Page 14

    Table of contents 14 8.3.1.1 data storage....................................................................... 332 8.3.1.1.1 data table sram .................................................... 333 8.3.1.1.2 cpu: drive ............................................................... 333 8.3.1.1.3 u...

  • Page 15

    Table of contents 15 8.6.2 modbus........................................................................................ 367 8.6.2.1 overview............................................................................ 367 8.6.2.2 terminology.............................................................

  • Page 16

    Table of contents 16 section 10. Troubleshooting........................................423 10.1 status table......................................................................................... 423 10.2 operating systems..............................................................................

  • Page 17

    Table of contents 17 a.2.2 data destinations........................................................................ 476 a.2.3 final data storage (output) processing ..................................... 477 a.2.3.1 single-source .................................................................... 4...

  • Page 18

    Table of contents 18 a.21 user defined functions...................................................................... 525 appendix b. Status table and settings ......................527 appendix c. Serial port pinouts..................................549 c.1 cs i/o communications port ................

  • Page 19

    Table of contents 19 f.10.3 software tools .......................................................................... 571 f.10.4 software development kits ...................................................... 571 index ..............................................................................57...

  • Page 20

    Table of contents 20 figure 49: quarter-bridge strain-gage schematic with rc-resistor shunt ... 163 figure 50: strain-gage shunt calibration started.......................................... 165 figure 51: strain-gage shunt calibration finished........................................ 165 figure 52: ...

  • Page 21

    Table of contents 21 figure 104: current limiting resistor in a rain gage circuit ......................... 325 figure 105: control port current sourcing................................................... 328 figure 106: relay driver circuit with relay ..................................................

  • Page 22

    Table of contents 22 table 19. Binary conditions of true and false.................................... 146 table 20. Logical expression examples ..................................................... 146 table 21. Abbreviations of names of data processes................................. 148 table 22....

  • Page 23

    Table of contents 23 table 71. Frequency resolution comparison ............................................. 319 table 72. Example of differing specifications for pulse-input channels .. 320 table 73. Time constants (τ) ...................................................................... 321 table...

  • Page 24

    Table of contents 24 table 125. Standard null-modem cable or adapter-pin connections* ..... 551 table 126. Fp2 data-format bit descriptions ............................................ 557 table 127. Fp2 decimal-locater bits......................................................... 557 table 128. Wir...

  • Page 25

    Table of contents 25 crbasic example 15. Beginprog / scan() / nextscan / endprog syntax .. 136 crbasic example 16. Scan syntax............................................................. 136 crbasic example 17. Measurement instruction syntax............................. 140 crbasic example 18. Use ...

  • Page 26

    Table of contents 26 crbasic example 68. Using nan in expressions ..................................... 428 crbasic example 69. Using nan to filter data ....................................... 431 crbasic example 70. Using bit-shift operators ....................................... 495 crbasic examp...

  • Page 27: Section 1. Introduction

    27 section 1. Introduction 1.1 hello 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 ...

  • Page 28

    Section 1. Introduction 28 italic — titles of publications, software, sections, tables, figures, and examples. Bold italic — crbasic instruction parameters and arguments within the body text. Blue — crbasic instructions when set on a dedicated line. Italic teal — crbasic program comments lucida sans...

  • Page 29

    29 section 2. Cautionary statements the cr1000 is a rugged instrument and will give years of reliable service if a few precautions are observed: • protect from over-voltage • protect from water • protect from esd disuse accelerates depletion of the internal battery, which backs up several functions....

  • Page 30

    Section 2. Cautionary statements 30

  • Page 31

    31 section 3. Initial inspection • the cr1000 datalogger ship with, o 1 each pn 8125 small, flat-bladed screwdriver o 1 each pn 1113 large, flat-bladed screwdriver o 1 each pn 3315 five-inch long, type-t thermocouple for use as a tutorial device o one datalogger program pre-loaded into the cr1000 o ...

  • Page 32

    Section 3. Initial inspection 32.

  • Page 33

    33 section 4. Quickstart tutorial this tutorial presents an introduction to cr1000 data acquisition. 4.1 primer – cr1000 data-acquisition data acquisition with the cr1000 is the result of a step-wise procedure involving the use of electronic sensor technology, the cr1000, a telecommunications link, ...

  • Page 34

    Section 4. Quickstart tutorial 34 modems, radios, satellite transceivers, and tcp/ip network modems are available for the most demanding applications. Figure 1: data-acquisition system components 4.1.2 cr1000 module and power supply 4.1.2.1 wiring panel as shown in figure cr1000 wiring panel (p. 35)...

  • Page 35

    Section 4. Quickstart tutorial 35 figure 2: wiring panel 4.1.2.2 power supply the cr1000 is powered by a nominal 12 vdc source. Acceptable power range is 9.6 to 16 vdc. External power connects through the green power in on the face of the cr1000. The power in connection is internally reverse-polarit...

  • Page 36

    Section 4. Quickstart tutorial 36 4.1.3 sensors most electronic sensors, whether or not manufactured or sold by campbell scientific, can be interfaced to the cr1000. Check for on-line content concerning interfacing sensors at www.Campbellsci.Com, or contact a campbell scientific applications enginee...

  • Page 37

    Section 4. Quickstart tutorial 37 table 1. Single-ended and differential input channels differential channel single-ended channel 1h 1 1l 2 2h 3 2l 4 3h 5 3l 6 4h 7 4l 8 5h 9 5l 10 6h 11 6l 12 7h 13 7l 14 8h 15 8l 16 4.1.3.2 bridge sensors many sensors use a resistive bridge to measure phenomena. Pr...

  • Page 38

    Section 4. Quickstart tutorial 38 figure 5: half-bridge wiring -- wind vane potentiometer figure 6: full-bridge wiring -- pressure transducer 4.1.3.3 pulse sensors pulse sensors are measured on cr1000 pulse-measurement channels. The output signal generated by a pulse sensor is a series of voltage wa...

  • Page 39

    Section 4. Quickstart tutorial 39 4.1.3.3.1 pulses measured figure pulse sensor output signal types (p. 39) illustrates three pulse sensor output signal types. Figure 7: pulse-sensor output signal types 4.1.3.3.2 pulse-input channels table pulse-input channels and measurements (p. 39) lists devices,...

  • Page 40

    Section 4. Quickstart tutorial 40 channel. Connect the other wire to a pulse channel. Sometimes the sensor will require power from the cr1000, so there will be two more wires – one of which is always ground. Connect power ground to a g channel. Do not confuse the pulse wire with the positive power w...

  • Page 41

    Section 4. Quickstart tutorial 41 figure 9: location of rs-232 ports figure 10: use of rs-232 and digital i/o when reading rs-232 devices 4.1.4 digital i/o ports the cr1000 has eight digital i/o ports selectable as binary inputs or control outputs. These are multi-function ports. Edge timing, switch...

  • Page 42

    Section 4. Quickstart tutorial 42 figure 11: control and monitoring with digital i/o 4.1.5 sdm channels sdm (serial device for measurement) devices expand the input and output capacity of the cr1000. Brief descriptions of sdm device capabilities are found in the appendix sensors and peripherals . Th...

  • Page 43

    Section 4. Quickstart tutorial 43 4.2.1 what you will need the following items are needed to complete this exercise: • campbell scientific cr1000 datalogger • campbell scientific ps100 12 vdc power supply (or compatible power supply) with red and black wire leads. • thermocouple (included with the c...

  • Page 44

    Section 4. Quickstart tutorial 44 figure 12: power and rs-232 connections 4.2.3 pc200w software setup 1. Install the pc200w software onto a pc. Follow on-screen prompts during the installation process. Use the default program and destination folders. 2. Open the pc200w software (figure pc200w main w...

  • Page 45

    Section 4. Quickstart tutorial 45 figure 13: pc200w main window table 3. 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 t...

  • Page 46

    Section 4. Quickstart tutorial 46 table 3. Pc200w ezsetup wizard example selections start the wizard to follow table entries. Screen name information needed wizard. After exiting the wizard, the main pc200w window becomes visible. The window has several tabs available. By default, the clock/program ...

  • Page 47

    Section 4. Quickstart tutorial 47 figure 14: short cut temperature sensor folder 4.2.4.2 procedure: (short cut steps 7 to 9) 7. Double-click wiring panel temperature to add it to selected. Alternatively, single-click wiring panel temperature, then click on . 8. Double-click type t thermocouple to ad...

  • Page 48

    Section 4. Quickstart tutorial 48 figure 15: short cut thermocouple wiring 4.2.4.3 procedure: (short cut steps 10 to 11) historical note in the space-race era, measuring thermocouples in the field was a complicated and cumbersome process incorporating a thermocouple wire with three junctions, a micr...

  • Page 49

    Section 4. Quickstart tutorial 49 11. Outputs displays the list selected sensors on the left and data storage tables, under selected outputs, on the right. Figure 16: short cut outputs tab 4.2.4.4 procedure: (short cut steps 12 to 16) 12. By default, there are two tables initially available. Both ta...

  • Page 50

    Section 4. Quickstart tutorial 50 figure 17: short cut output table definition 4.2.4.5 procedure: (short cut step 17 to 18) 17. Click finish to compile the program. Give the program the name quickstart. A summary screen will appear showing the compiler results. Any errors during compiling will also ...

  • Page 51

    Section 4. Quickstart tutorial 51 18. Close this window by clicking on x in the upper right corner. 4.2.5 send program and collect data pc200w support software objectives: this portion of the tutorial will use pc200w to send the program to the cr1000, collect data from the cr1000, and store the data...

  • Page 52

    Section 4. Quickstart tutorial 52 cr1000. To view the onemin table, select an empty cell in the display area, then click add. Figure 20: pc200w monitor data tab – public table 4.2.5.3 procedure: (pc200w step 5) 5. In the add selection window tables field, click on onemin, then click paste. The onemi...

  • Page 53

    Section 4. Quickstart tutorial 53 4.2.5.4 procedure: (pc200w step 6) 6. Click on the collect data tab. From this window, data are chosen to be collected as well as the location where the collected data will be stored. Figure 22: pc200w collect data tab 4.2.5.5 procedure: (pc200w steps 7 to 9) 7. Cli...

  • Page 54

    Section 4. Quickstart tutorial 54 figure 23: pc200w view data utility 4.2.5.6 procedure: (pc200w steps 10 to 11) 10. Click on to open a file for viewing. In the dialog box, select the cr1000_onemin.Dat file and click open. 11. The collected data are now shown..

  • Page 55

    Section 4. Quickstart tutorial 55 figure 24: pc200w view data table 4.2.5.7 procedure: (pc200w steps 12 to 13) 12. Click on any data column. To display the data in a new line graph, click on . Figure 25: pc200w view line graph.

  • Page 56

    Section 4. Quickstart tutorial 56 13. Close the graph and view windows, and then close the pc200w program..

  • Page 57: Section 5. System Overview

    57 section 5. System overview a campbell scientific data-acquisition system is made up of the following basic components: • sensors • datalogger o clock o measurement and control circuitry o telecommunications circuitry o user-entered crbasic program • telecommunications device • datalogger support ...

  • Page 58: 5.1 Cr1000 Datalogger

    Section 5. System overview 58 figure 26: features of a data-acquisition system 5.1 cr1000 datalogger the cr1000 datalogger is one part of a data acquisition system. It is a precision instrument designed for demanding, low-power measurement applications. Cpu, analog and digital measurements, analog a...

  • Page 59

    Section 5. System overview 59 sensors transduce phenomena into measurable electrical forms, outputting voltage, current, resistance, pulses, or state changes. The cr1000, sometimes with the assistance of various peripheral devices, can measure nearly all electronic sensors. The cr1000 measures analo...

  • Page 60

    Section 5. System overview 60 a library of sensor manuals and application notes are available at www.Campbellsci.Com to assist in measuring many sensor types. Consult with a campbell scientific applications engineer for assistance in measuring unfamiliar sensors. 5.1.3 cr1000 wiring panel the wiring...

  • Page 61

    Section 5. System overview 61 as compared to pulse-count measurements. The frequency resolution of pulse- count measurements can be improved by extending the measurement interval by increasing the scan interval and by averaging. For information on frequency resolution, see frequency resolution . Pul...

  • Page 62

    Section 5. System overview 62 • continuous analog output — available by adding a peripheral analog output device available from campbell scientific. Refer to the appendix cao modules (p. 563) for information on available output-expansion modules. 5.1.3.3 grounding terminals read more! See grounding ...

  • Page 63

    Section 5. System overview 63 • peripheral 5-vdc power source — 1 terminal (5v) and associated ground (g) supply power to sensors and peripheral devices requiring regulated 5 vdc. 5.1.3.5 communications ports read more! See sections rs-232 and ttl recording (p. 323), telecommunications and data retr...

  • Page 64

    Section 5. System overview 64 crbasic programming in the cr1000 facilitates creation of custom menus for the external keyboard / display. Figure custom menu example (p. 70) shows windows from a simple custom menu named dataview. Dataview appears as the main menu on the keyboard display. Dataview has...

  • Page 65

    Section 5. System overview 65 common power devices are: • batteries o alkaline d-cell — 1.5 vdc / cell o rechargeable lead-acid battery • charge sources o solar panels o wind generators o vac / vac or vac / vdc wall adapters refer to the appendix power supplies (p. 564) for specific model numbers of...

  • Page 66

    Section 5. System overview 66 5.1.6.2 user programming read more! See sections programming (p. 108) and crbasic programming instructions (p. 473), and crbasic editor help for more programming assistance. A crbasic program directs the cr1000 how and when sensors are to be measured, calculations made,...

  • Page 67

    Section 5. System overview 67 • main memory o 4-mb sram o battery backed o os variables o crbasic compiled program binary structure (490 kb maximum) o crbasic variables o final storage o communications memory o usr: drive user allocated fat32 ram drive photographic images (see the appendix cameras (...

  • Page 68

    Section 5. System overview 68 data stored on campbell scientific mass storage devices are retrieved through a telecommunication link to the cr1000 or by removing the device, connecting it to a pc, and copying / moving files using windows explorer. 5.1.8.3 via cf card caution when installing a cf (p....

  • Page 69

    Section 5. System overview 69 the cr1000 communicates with external devices to receive programs, send data, or act in concert with a network. The primary communication protocol is pakbus. Modbus and dnp3 communication protocols are also supported. Refer to the appendix telecommunications hardware fo...

  • Page 70

    Section 5. System overview 70 the cr1000 supports dnp3 slave communication for inclusion in dnp3 scada networks. 5.1.9.4 keyboard display read more! See using the keyboard display (p. 399). The external keyboard / display is a powerful tool for field use. It allows complete access to most datalogger...

  • Page 71

    Section 5. System overview 71 supplied void of active security measures. By default, rs-232, telnet, ftp and http services, all of which give high level access to cr1000 data and programs, are enabled without password protection. Campbell scientific encourages cr1000 users who are concerned about se...

  • Page 72

    Section 5. System overview 72 loggernet: • all datalogger functions and data are easily accessed via rs-232 and ethernet using campbell scientific datalogger support software. • cora command find-logger-security-code. Telnet: • watch ip traffic in detail. Ip traffic can reveal potentially sensitive ...

  • Page 73

    Section 5. System overview 73 up to three levels of lockout can be set. Valid pass codes are 1 through 65535 (0 is no security). Note if a pass code is set to a negative value, a positive code must be entered to unlock the cr1000. That positive code will equal 65536 + (negative security code). For e...

  • Page 74

    Section 5. System overview 74 5.1.10.2.1 security by-pass security can be bypassed at the datalogger using a external keyboard / displaykeyboard display. Pressing and holding the "del" key while powering up a cr1000 will cause it to abort loading a program and provide a 120 second window to begin ch...

  • Page 75

    Section 5. System overview 75 5.1.10.3.4 settings several cr1000 settings accessible with devconfig enable the entry of various passwords. See settings (p. 96). • ppp password • pakbus/tcp password • ftp password • tls password (transport layer security (tls) enabled) • tls private key password • ae...

  • Page 76

    Section 5. System overview 76 5.1.11 maintenance read more! See maintenance (p. 417). With reasonable care, the cr1000 should give many years of reliable service. 5.1.11.1 protection from water the cr1000 and most of its peripherals must be protected from moisture. Moisture in the electronics will s...

  • Page 77

    Section 5. System overview 77 5.2 datalogger support software read more! For a complete listing of available datalogger support software, see the appendix software (p. 569). • pc200w starter software is available at no charge at www.Campbellsci.Com. It supports a transparent rs-232 connection betwee...

  • Page 78

    Section 5. System overview 78.

  • Page 79

    79 section 6. Cr1000 specifications 1.1 cr1000 specifications are valid from ─25° to 50°c in non‐condensing environments unless otherwise specified. Recalibration is recommended every two years. Critical specifications and system configurations should be confirmed with a campbell scientific applicat...

  • Page 80

    Section 6. Cr1000 specifications 80

  • Page 81: Section 7. Installation

    81 section 7. Installation 7.1 moisture protection when humidity tolerances are exceeded and condensation occurs, damage to cr1000 electronics can result. Effective humidity control is the responsibility of the user. Internal cr1000 module moisture is controlled at the factory by sealing the module ...

  • Page 82: 7.4 Power Sources

    Section 7. Installation 82 figure 29: enclosure 7.4 power sources note 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. For example, the power requi...

  • Page 83

    Section 7. Installation 83 scientific application engineer if assistance in selecting a power supply is needed, particularly with applications in extreme environments. 7.4.1 cr1000 power requirement the cr1000 operates on dc voltage ranging from 9.6 to 16 vdc. It is internally protected against acci...

  • Page 84

    Section 7. Installation 84 with the largest voltage to power the cr1000 and prevents the second backup supply from attempting to power the vehicle. Figure 30: connecting to vehicle power supply 7.4.5 powering sensors and devices read more! See power sources (p. 82). The cr1000 wiring panel is a conv...

  • Page 85

    Section 7. Installation 85 table 4. Current source and sink limits terminal limit 1 5v + cs i/o (combined) 5 1 "source" is positive amperage; "sink" is negative amperage (-). 2 exceeding current limits limits will cause voltage output to become unstable. Voltage should stabilize once current is agai...

  • Page 86: 7.5 Grounding

    Section 7. Installation 86 note table current source and sink limits (p. 84) has more information on excitation load capacity. 7.4.5.3 continuous unregulated (nominal 12 volt) voltage on the 12v terminals will change with cr1000 supply voltage. 7.4.5.4 switched unregulated (nominal 12 volt) the sw-1...

  • Page 87

    Section 7. Installation 87 protection at installation. Spark-gap protection is usually an option with these products, so it should always be requested when ordering. Spark gaps for these devices must be connected to either the earth ground lug, the enclosure ground, or to the earth (chassis) ground....

  • Page 88

    Section 7. Installation 88 figure 31: schematic of grounds 7.5.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 inst...

  • Page 89

    Section 7. Installation 89 lightning strike. Figure lightning-protection scheme (p. 89) shows a simple lightning-protection scheme utilizing a lightning rod, metal mast, heavy-gage ground wire, and ground rod to direct damaging current away from the cr1000. Figure 32: lightning-protection scheme 7.5...

  • Page 90

    Section 7. Installation 90 grounds ( ) and power grounds (g). To take advantage of this design, observe the following grounding rule: note always connect a device ground next to the active terminal associated with that ground. Several ground wires can be connected to the same ground terminal. Exampl...

  • Page 91

    Section 7. Installation 91 7.5.4 ground looping in ionic measurements when measuring soil-moisture with a resistance block, or water conductivity with a resistance cell, the potential exists for a ground loop error. In the case of an ionic soil matric potential (soil moisture) sensor, a ground loop ...

  • Page 92: 7.6 Cr1000 Configuration

    Section 7. Installation 92 figure 33: model of a ground loop with a resistive sensor 7.6 cr1000 configuration the cr1000 ships from campbell scientific to communicate with campbell scientific datalogger support software (p. 77) via rs-232. Some applications, however, require changes to the factory d...

  • Page 93

    Section 7. Installation 93 • provide a terminal emulator useful in configuring devices not directly supported by devconfig graphical user interface. • show help as prompts and explanations. Help for the appropriate settings for a particular device can also be found in the user manual for that device...

  • Page 94

    Section 7. Installation 94 note beginning with os 25, the os has become large enough that a cr1000 with serial number ≤ 11831, which has only 2 mb of sram, may not have enough memory to receive it under some circumstances. If problems are encountered with a 2 mb cr1000, sending the os over a direct ...

  • Page 95

    Section 7. Installation 95 figure 35: devconfig os download window figure 36: dialog box confirming os download 7.6.2.2 sending os with program send operating system files can be sent using the program send command. Beginning with the os indicated in table os version introducing preserve settings vi...

  • Page 96

    Section 7. Installation 96 program send (p. 96), this has the benefit of usually (but not always) preserving cr1000 settings. Table 5. Operating system version in which preserve settings via program send instituted datalogger os version / date cr1000 16 / 11-10-08 cr800 7 / 11-10-08 cr3000 9 / 11-10...

  • Page 97

    Section 7. Installation 97 clicking the factory defaults button on the settings editor will send a command to the device to revert to its factory default settings. The reverted values will not take effect until the final changes have been applied. This button will remain disabled if the device does ...

  • Page 98

    Section 7. Installation 98 figure 38: summary of cr1000 configuration 7.6.3.1.1 deployment tab illustrated in figure devconfig deployment tab (p. 99), the deployment tab allows the user to configure the datalogger prior to deploying it. Deployment tab settings can also be accessed through the settin...

  • Page 99

    Section 7. Installation 99 figure 39: devconfig deployment tab datalogger sub-tab • serial number displays the cr1000 serial number. This setting is set at the factory and cannot be edited. • os version displays the operating system version that is in the cr1000. • station name displays the name tha...

  • Page 100

    Section 7. Installation 100 • beacon interval sets the interval (in seconds) on which the datalogger will broadcast beacon messages on the port specified by selected port. • verify interval specifies the interval (in seconds) at which the datalogger will expect to have received packets from neighbor...

  • Page 103

    Section 7. Installation 103 figure 42: devconfig logger control tab 7.6.3.2 settings via crbasic some variables in the status table can be requested or set during program execution using crbasic commands setstatus() and setsecurity(). Entries can be requested or set by setting a public or dim variab...

  • Page 104

    Section 7. Installation 104 campbell scientific recommends implementing one or both of the provisions described in "include" file (p. 104) and default.Cr1 file (p. 106) to help preserve remote communication, or other vital settings. 7.6.3.3.1 "include" file the include file is a crbasic program file...

  • Page 105

    Section 7. Installation 105 figure 44: "include file" settings via pakbusgraph crbasic example 1. Using an "include file" to control sw‐12 'assumes that the include file in crbasic example "include file" to control sw-12 (p. 105) 'is loaded onto the cr1000 cpu: drive. 'the include file will control ...

  • Page 106

    Section 7. Installation 106 ' slowsequence scan (1,sec,0,0) if timeintointerval (9,24,hr) then sw12 (1) 'modem on at 9:00 am if timeintointerval (17,24,hr) then sw12 (0) 'modem off at 5:00 pm nextscan ' 7.6.3.3.2 default.Cr1 file default.Cr1 can be stored on the cr1000 cpu: drive. At power up, the c...

  • Page 107

    Section 7. Installation 107 6. If there is no default.Cr1 file or it cannot be compiled, the cr1000 will not automatically run any program. 7.6.3.5 network planner figure 45: network planner setup 7.6.3.5.1 overview network planner allows the user to: • create a graphical representation of a network...

  • Page 108: 7.7 Programming

    Section 7. Installation 108 • it does not understand distances or topography; that is, it does not warn the user when broadcast distances are exceeded or identify obstacles to radio transmission. For more detailed information on network planner, please consult the loggernet manual, which is availabl...

  • Page 109

    Section 7. Installation 109 7.7.1 writing and editing programs 7.7.1.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, a...

  • Page 110

    Section 7. Installation 110 7.7.1.2.1 inserting comments into program comments are non-executable text placed within the body of a program to document or clarify program algorithms. As shown in crbasic example inserting comments (p. 110), comments are inserted into a program by preceding the comment...

  • Page 112

    Section 7. Installation 112 7.7.3 syntax 7.7.3.1 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. 112). On...

  • Page 113

    Section 7. Installation 113 table 9. Crbasic program structure declarations define cr1000 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. Dimens...

  • Page 114

    Section 7. Installation 114 'define public variables public reftemp public tc(6) 'define units units reftemp = degc units tc = degc declare public variables, dimension array, and declare units. Declarations 'define data tables datatable (temp,1,2000) datainterval (0,10,min,10) average (1,reftemp,fp2...

  • Page 115

    Section 7. Installation 115 operator is located in the help files of crbasic editor, which is included with loggernet, pc400, and rtdaq datalogger support software suites. 7.7.3.3.1 multiple statements on one line multiple short statements can be placed on a single text line if they are separated wi...

  • Page 116

    Section 7. Installation 116 variables can be viewed through the external keyboard / display or software numeric monitors. Dim variables cannot. All user defined variables are initialized once when the program starts. Additionally, variables that are used in the function() or sub() declaration,or tha...

  • Page 117

    Section 7. Installation 117 in this example, a for/next structure with a changing variable is used to specify which elements of the array will have the logical operation applied to them. The crbasic for/next function will only operate on array elements that are clearly specified and ignore the rest....

  • Page 118

    Section 7. Installation 118 beginprog scan () aaa = 3 bbb = 2 ccc = 4 variablename(aaa,bbb,ccc) = 2.718 nextscan endprog dimensioning strings strings can be declared to a maximum of two dimensions. The third "dimension" is used for accessing characters within a string. See string operations (p. 236)...

  • Page 119

    Section 7. Installation 119 table 10. Data types name: command or argument description / word size where used notes resolution / range fp2 campbell scientific floating point / 2 byte final data storage default final storage data type. Use fp2 for stored data requiring 3 or 4 significant digits. If m...

  • Page 120

    Section 7. Installation 120 table 10. Data types name: command or argument description / word size where used notes resolution / range as boolean boolean signed integer / 4 byte dim & public variables final data storage use to store true or false states, such as with flags and control ports. 0 is al...

  • Page 121

    Section 7. Installation 121 datatable (tablename,true,-1) 'fp2 data storage example sample (1,z,fp2) 'ieee4 / float data storage example sample (1,x,ieee4) 'uint2 data storage example sample (1,poscounter,uint2) 'long data storage example sample (1,posnegcounter,long) 'string data storage example sa...

  • Page 122

    Section 7. Installation 122 variable initialization by default, variables are set equal to zero at the time the datalogger program compiles. Variables can be initialized to non-zero values in the declaration. Examples of syntax are shown in crbasic example initializing variables (p. 122). Crbasic ex...

  • Page 123

    Section 7. Installation 123 crbasic example 12. Using the const declaration public ptempc, ptempf const ctof_mult = 1.8 const ctof_offset = 32 beginprog scan (1,sec,0,0) paneltemp (ptempc,250) ptempf = ptempc * ctof_mult + ctof_offset nextscan endprog predefined contants several words are reserved f...

  • Page 124

    Section 7. Installation 124 table 11. Predefined constants and reserved words mv50cr mv500c mv7_5 mv7_5c mvx10500 mv50r nsec prog scan mvx1500 select string sub sec table true typeb subscan typej typek typen typee types typet uint2 typer usec v10 v2 until v2c v50 v60 v20 ex1 vx15 vx2 vx1 vx105 ex2 e...

  • Page 125

    Section 7. Installation 125 crbasic example 13. Foreign‐language support ‘declare a constant to concatenate six non-english characters const ptempunits = chr(hextodec ("c9"))+ chr(hextodec ("e3"))+ chr(hextodec("ca")) _ + chr(hextodec ("cf")) + chr(hextodec("b6")) + chr(hextodec ("c8")) ‘declare a c...

  • Page 126

    Section 7. Installation 126 • name of the crbasic program running in the datalogger • name of the data table (limited to 20 characters) • alphanumeric field names to attach at the head of data columns this information is referred to as "table definitions." table typical data table (p. 127) shows a d...

  • Page 127

    Section 7. Installation 127 table 13. Typical data table toa5 cr1000 cr1000 1048 cr1000.Std.13.06 cpu:data.Cr1 35723 onemin timestamp record battvolt_avg ptempc_avg tempc_avg(1) tempc_avg(2) ts rn volts deg c deg c deg c avg avg avg avg 7/11/2007 16:10 0 13.18 23.5 23.54 25.12 7/11/2007 16:20 1 13.1...

  • Page 128

    Section 7. Installation 128 'define data tables datatable (onemin,true,-1) datainterval (0,1,min,10) average (1,batt_volt,fp2,false) average (1,ptemp_c,fp2,false) average (2,temp_c(1),fp2,false) endtable datatable (table1,true,-1) datainterval (0,1440,min,0) minimum (1,batt_volt,fp2,false,false) end...

  • Page 129

    Section 7. Installation 129 • size -table size is the number of records to store in a table before new data begins overwriting old data. If "10" is entered, 10 records are stored in the table -- the eleventh record will overwrite the first record. If "-1" is entered, memory for the table is automati...

  • Page 130

    Section 7. Installation 130 lapse occurs, the skippedrecords status entry is incremented, and a 16-byte sub- header with time stamp and record number is inserted into the data frame before the next record is written. Consequently, programs that lapse frequently waste significant memory. If lapses is...

  • Page 131

    Section 7. Installation 131 data output-processing instructions final data storage processing instructions (aka "output processing" instructions) determine what data are stored in a data table. When a data table is called in the crbasic program, final data storage processing instructions process var...

  • Page 132

    Section 7. Installation 132 7.7.3.5.2 subroutines read more! See subroutines (p. 187) for more information on programming with 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 ...

  • Page 133

    Section 7. Installation 133 instructions or commands that are handled by each sequencer are listed in table task processes (p. 133). The measurement task sequencer is a rigidly timed sequence that measures sensors and outputs control signals for other devices. The digital task sequencer manages meas...

  • Page 134

    Section 7. Installation 134 the sequence in which the instructions are executed may not be in the order in which they appear in the program. Therefore, conditional measurements are not allowed in pipeline mode. Because of the precise execution of measurement instructions, processing in the current s...

  • Page 135

    Section 7. Installation 135 note measurement tasks have priority over other tasks such as processing and communication to allow accurate timing needed within most measurement instructions. Care must be taken when initializing variables when multiple sequences are used in a program. If any sequence r...

  • Page 136

    Section 7. Installation 136 table 17. Program timing instructions instructions general guidelines syntax form subscan / nextsubscan use when measurements or processing must run at faster frequencies than that of the main program. Beginprog scan() '. '. '. Subscan() '. '. '. Nextsubscan nextscan endp...

  • Page 137

    Section 7. Installation 137 allows the processing in the scan to lag behind measurements at times without affecting measurement timing. Use of the crbasic editor default size is normal. Refer to section skippedscan (p. 425) for troubleshooting tips. • count —number of scans to make before proceeding...

  • Page 138

    Section 7. Installation 138 measurement hardware until the main scan, including measurements and processing, is complete. Main scans execution of the main scan usually occurs quickly, so the processor may be idle much of the time. For example, a weather-measurement program may scan once per second, ...

  • Page 139

    Section 7. Installation 139 figure 47: sequential-mode scan priority flow diagrams 7.7.3.8 instructions in addition to basic syntax, additional instructions are included in crbasic to facilitate measurements and store data. Crbasic programming instructions (p. 473) contains a comprehensive list of t...

  • Page 140

    Section 7. Installation 140 paneltemp is the keyword. Two parameters follow: dest , a destination variable name in which the temperature value is stored; and integ , a length of time to integrate the measurement. To place the panel temperature measurement in the variable reftemp , using a 250-µs int...

  • Page 141

    Section 7. Installation 141 table 18. Rules for names name category 1 maximum length (number of characters) allowed characters data-table name 20 field name 39 field-name description 64 and other names. 1 variables, constants, units, aliases, station names, field names, data table names, and file na...

  • Page 142

    Section 7. Installation 142 crbasic example 19. Use of arrays as multipliers and offsets public pressure(3), mult(3), offset(3) datatable (avgpress,1,-1) datainterval (0,60,min,10) average (3,pressure(),ieee4,0) endtable beginprog 'calibration factors: mult(1)=0.123 : offset(1)=0.23 mult(2)=0.115 : ...

  • Page 143

    Section 7. Installation 143 note single-precision float has 24 bits of mantissa. Double precision has a 32-bit extension of the mantissa, resulting in 56 bits of precision. Instructions that use double precision are addprecise(), average(), avgrun(), avgspa(), covspa(), moveprecise(), rmsspa(), stdd...

  • Page 144

    Section 7. Installation 144 beginprog fa = 0 fb = 0.125 l = 126 ba = fa 'this will set ba = false (0) bb = fb 'this will set bb = true (-1) bc = l 'this will set bc = true (-1) endprog float from long or boolean when a long or boolean is converted to float, the integer value is loaded into the float...

  • Page 145

    Section 7. Installation 145 crbasic example 22. Constants to longs or floats public i as long public a1, a2 const id = 10 beginprog a1 = a2 + id i = id * 5 endprog in crbasic example constants to longs or floats (p. 145), i is an integer. A1 and a2 are floats. The number 5 is loaded as float to add ...

  • Page 146

    Section 7. Installation 146 true is safe, it may not always be the best programming technique. Consider the expression if condition(1) then ... Since = true is omitted from the expression, condition(1) is considered true if it equals any non-zero value. Table 19. Binary conditions of true and false ...

  • Page 147

    Section 7. Installation 147 table 20. Logical expression examples if x >= 5 and z = 2 then y = 0 sets y = 0 only if both x >= 5 and z = 2 are true. If 6 then y = 0. If 6 is true since 6 (a non-zero number) is returned, so y is set to 0 every time the statement is executed. If 0 then y = 0. If 0 is f...

  • Page 148

    Section 7. Installation 148 'program beginprog scan (1,sec,0,0) 'assign strings to string variables wrd(1) = " ":wrd(2) = "good":wrd(3) = "morning":wrd(4) = "don't" wrd(5) = "do":wrd(6) = "that":wrd(7) = ",":wrd(8) = "dave" 'assign integers to long variables phrasenum(1) = 1:phrasenum(2) = 2 'concat...

  • Page 149

    Section 7. Installation 149 table 21. Abbreviations of names of data processes abbreviation process name max maximum min minimum smm sample at max or min std standard deviation mmt moment no abbreviation sample hst histogram 1 h4d histogram4d fft fft cov covariance rfh rainflow histogram lcr level c...

  • Page 150

    Section 7. Installation 150 7.7.3.11 system signatures signatures help assure system integrity and security. The following resources provide information on using signatures. • signature() instruction in diagnostics (p. 483). • runsignature entry in table status table fields and descriptions (p. 528)...

  • Page 151

    Section 7. Installation 151 7.8 programming resource library this library of notes and crbasic code addresses a narrow selection of cr1000 applications. Consult a campbell scientific applications engineer if other resources are needed. 7.8.1 calibration using fieldcal() and fieldcalstrain() calibrat...

  • Page 152

    Section 7. Installation 152 each with two supporting instructions: • loadfieldcal() — an optional instruction that evaluates the validity of, and loads values from a cal file. • samplefieldcal — an optional data-storage output instruction that writes the latest calibration values to a data table (no...

  • Page 153

    Section 7. Installation 153 mode variable interpretation > 0 and ≠ 6 calibration in progress 0 calibration encountered an error 2 calibration in process 6 calibration complete. 7.8.1.4.2 two-point calibrations (multiplier / gain) use this two-point calibration procedure to adjust multipliers (slopes...

  • Page 154

    Section 7. Installation 154 "offset" = "y‐ intercept" = "zero" "multiplier" = "slope" = "gain" 7.8.1.5.1 zero or tare (option 0) zero option simply adjusts a sensor's output to zero. It does not affect the multiplier. Case: a sensor measures the relative humidity (rh) of air. Multiplier is known to ...

  • Page 155

    Section 7. Installation 155 5. To simulate conditions for a 30-day, service-calibration, again with desiccated chamber conditions, set variable knownrh to 0.0. Change the value in variable calmode to 1 to start calibration. When calmode increments to 6, simulated 30-day, service zero calibration is ...

  • Page 156

    Section 7. Installation 156 table 23. Calibration report for salinity sensor parameter parameter at deployment parameter at 7-day service mv output 1350 mv 1345 mv knownsalt (standard solution) 30 mg/l 30 mg/l multiplier 0.05 mg/l/mv 0.05 mg/l/mv offset -37.50 mg/l -37.23 mg/l rh reading 30 mg/l 30 ...

  • Page 157

    Section 7. Installation 157 beginprog multiplier = .05 offset = 0 loadfieldcal (true) 'load the cal file, if possible scan (100,msec,0,0) 'simulate measurement by exciting channel vx1/ex1 excitev (vx1,mv,0) 'make the calibrated measurement voltse (saltcontent,1,mv2500,6,1,0,250,multiplier,offset) 'p...

  • Page 158

    Section 7. Installation 158 calibration report for pressure transducer parameter measurement before zero measurement after zero piezometer output (digits) 8746 0 piezometer temperature (°c) 21.4 0 barometer pressure (mb) 991 0 1. Send crbasic example fieldcal() zero basis demo program (p. 158) to th...

  • Page 159

    Section 7. Installation 159 'avw200(avwrc,com1,0,200,vw(1,1),1,1,1,1000,4000,1,_60hz,1,0) ' 'instruction (commented out) 'digits_measured=(vw(1,1)^2)/1000 ' digits_measured = 8746 'temp_measured=1/(1.4051e-3 + 2.369e-4 * ln(vw(1,6))+1.019e-7 * ln(vw(1,6)) ^3)-273.15 temp_measured = 21.4 'voltse(bp_m...

  • Page 160

    Section 7. Installation 160 4. When variable calmode increments to 6, the deployment calibration is complete. Calibrated multiplier is -0.08. Calibrated offset is 53.978. 5. To continue this example, simulate a two-stage, 7-day service calibration wherein both multiplier and offset drift (output @ 3...

  • Page 161

    Section 7. Installation 161 7.8.1.5.5 two-point slope only (option 3) some measurement applications do not require determination of offset. Wave form analysis, for example, may only require relative data to characterize change. Case: a soil-water sensor is to be used to detect a pulse of water movin...

  • Page 162

    Section 7. Installation 162 scan (100,msec,0,0) 'simulate measurement by exciting channel vx1/ex1 excitev (vx1,mv,0) 'make the calibrated measurement voltse (relh2ocontent,1,mv2500,6,1,0,250,multiplier,offset) 'perform a calibration if calmode = 1 fieldcal (3,relh2ocontent,1,multiplier,offset,calmod...

  • Page 163

    Section 7. Installation 163 4. The zero function of fieldcalstrain() allows the user to set a particular strain as an arbitrary zero, if desired. Zeroing is normally done after the shunt calibration. Zero and shunt options can be combined through a single cr1000 program. The following program is pro...

  • Page 164

    Section 7. Installation 164 crbasic example 31. Fieldcalstrain() calibration demonstration 'program to measure quarter bridge strain gage 'measurements public raw_mvperv public microstrain 'variables that are arguments in the zero function public zero_mode public zero_mvperv 'variables that are argu...

  • Page 165

    Section 7. Installation 165 7.8.1.6.1 quarter-bridge shunt (option 13) with crbasic example fieldcalstrain() calibration demo (p. 164) sent to the cr1000, and the strain gage stable, use the external keyboard / display or software numeric monitor to change the value in variable knownres to the nomin...

  • Page 166

    Section 7. Installation 166 figure 52: starting zero procedure figure 53: zero procedure finished 7.8.2 information services support of information services (ftp, http, xml, pop3, smtp, telnet, ntcip, ntp, html) is extensive in the cr1000, to the point of requiring another manual at least as thick a...

  • Page 167

    Section 7. Installation 167 • pakbus communication over tcp/ip. • callback (datalogger-initiated communication) using the crbasic tcpopen() instruction • datalogger-to-datalogger communication • http protocol and web server • ftp server and client for transferring files to and from the datalogger • ...

  • Page 168

    Section 7. Installation 168 figure 54: preconfigured html home page 7.8.2.3 custom http web server although the default home page cannot be accessed by the user for editing, it can be replaced with the html code of a customized web page. To replace the default home page, save the new home page under...

  • Page 169

    Section 7. Installation 169 figure 55: home page created using webpagebegin() instruction figure 56: customized numeric-monitor web page.

  • Page 170

    Section 7. Installation 170 crbasic example 32. Html 'note: lines ending with "+" are wrapped to the next line to fit on the printed page 'note continued: do not wrap lines when entering program into crbasic editor. Dim commands as string * 200 public time(9), reftemp, public minutes as string , sec...

  • Page 171

    Section 7. Installation 171 beginprog scan (1,sec,3,0) paneltemp (reftemp,250) realtime (time()) minutes = formatfloat (time(5),"%02.0f") seconds = formatfloat (time(6),"%02.0f") temperature = formatfloat (reftemp, "%02.02f") calltable (crtemp) nextscan endprog 7.8.2.4 ftp server the cr1000 automati...

  • Page 172

    Section 7. Installation 172 7.8.2.9 micro-serial server the cr1000 can be configured to allow serial communication over a tcp/ip port. This is useful when communicating with a serial sensor over ethernet via micro- serial server (third-party serial to ethernet interface) to which the serial sensor i...

  • Page 173

    Section 7. Installation 173 • programmed mode automates much of the sdi-12 protocol and provides for data recording. 7.8.3.1 sdi-12 transparent mode system operators can manually interrogate and enter settings in probes using transparent mode. Transparent mode is useful in troubleshooting sdi-12 sys...

  • Page 174

    Section 7. Installation 174 7.8.3.1.1 sdi-12 transparent mode commands commands have three components: sensor address (a) – a single character, and is the first character of the command. Sensors are usually assigned a default address of zero by the manufacturer. Wildcard address (?) is used in addre...

  • Page 175

    Section 7. Installation 175 table 25. Standard sdi-12 command and response set command name command syntax 1 response 2 start concurrent measurement ac! Atttnn additional concurrent measurements ac1! . . . Ac9! Atttnn atttnn atttnn atttnn atttnn additional concurrent measurements and request crc acc...

  • Page 176

    Section 7. Installation 176 serial number = 101 start measurement commands (am! & ac!) a measurement is initiated with m! Or c! Commands. The response to each command has the form atttnn, where • a = sensor address • ttt = time, in seconds, until measurement data are available • nn = the number of v...

  • Page 177

    Section 7. Installation 177 send data commands (ad0! To ad9!) these commands requests data from the sensor. They are normally issued automatically by the cr1000 after measurement commands amv! Or acv!. In transparent mode, the user asserts these commands in series to obtain data. If the expected num...

  • Page 178

    Section 7. Installation 178 is programmed with the m! Command (note that the sdi-12 address is a separate instruction parameter), the cr1000 issues the am! And ad0! Commands with proper elapsed time between the two. The cr1000 automatically issues retries and performs other services that make the sd...

  • Page 179

    Section 7. Installation 179 table 26. Sdi12recorder() commands sdirecorder() instruction sdicommand entry actions internal to cr1000 and sensor 2 use variable replacement in program to use same instance of sdi12recorder() as issued acv! (see the crbasic example using sdi12recorder() c command ). Alt...

  • Page 180

    Section 7. Installation 180 scan (5,sec,0,0) 'non-sdi-12 measurements here nextscan slowsequence scan (5,min,0,0) sdi12recorder (temp(1),1,0,"m!",1.0,0) sdi12recorder (temp(2),1,1,"m!",1.0,0) sdi12recorder (temp(3),1,2,"m!",1.0,0) sdi12recorder (temp(4),1,3,"m!",1.0,0) nextscan endsequence endprog h...

  • Page 181

    Section 7. Installation 181 crbasic example 33. Using alternate concurrent command (ac) 'code to use when back to back sdi-12 concurrent measurement commands not desired 'main program beginprog 'preset first measurement command to c! For x = 1 to 4 cmd(x) = "c!" next x 'set 5 s scan rate scan (5,sec...

  • Page 182

    Section 7. Installation 182 else 'c!/c command sequence complete move (temp_meas(x),1,temp_tmp(x),1) 'copy measurements to sdi_val(10) cmd(x) = "c!" 'start next measurement with "c!" inddone(x) = -1 endif next x 'summarize measurement event success for x = 1 to 4 groupdone = groupdone + inddone(x) n...

  • Page 183

    Section 7. Installation 183 slowsequence do 'note sdi12sensorsetup / sdi12sensorresponse must be renewed 'after each successful sdi12recorder() poll. Sdi12sensorsetup (1,1,0,95) delay (1,95,sec) sdi12sensorresponse (temp(1)) loop endsequence slowsequence do sdi12sensorsetup (1,3,1,95) delay (1,95,se...

  • Page 184

    Section 7. Installation 184 crbasic example 35. Using an sdi‐12 extended command 'sdi-12 extended command "xt23.61!" sent to ch200 charging regulator 'correct response is "0ok", if zero (0) is the sdi-12 address. ' 'declare variables public sdi12command as string public sdi12result as string 'main p...

  • Page 185

    Section 7. Installation 185 crbasic example 36. Sdi‐12 sensor setup public ptemp, batt_volt public source(10) beginprog scan (5,sec,0,0) paneltemp (ptemp,250) battery (batt_volt) source(1) = ptemp 'temperature, deg c source(2) = batt_volt 'primary power, vdc source(3) = ptemp * 1.8 + 32 'temperature...

  • Page 186

    Section 7. Installation 186 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 ...

  • Page 187

    Section 7. Installation 187 7.8.4 subroutines a subroutine is a group of programming instructions that is called by, but runs outside of, the main program. Subroutines are used for the following reasons: • to reduce program length. Subroutine code can be executed multiple times in a program scan. • ...

  • Page 188

    Section 7. Installation 188 'global variables (used only outside subroutine by choice) 'declare counter in the main scan. Public counter(2) as long 'declare product of pi * counter(2). Public pi_product(2) as float 'global variable (used only in subroutine by choice) 'for / next incrementor used in ...

  • Page 189

    Section 7. Installation 189 table 29. Outputopt options option description (wvc() is the output array) 0 wvc(1): mean horizontal wind speed (s) wvc(2): unit vector mean wind direction (Θ1) wvc(3): standard deviation of wind direction σ(Θ1). Standard deviation is calculated using the yamartino algori...

  • Page 190

    Section 7. Installation 190 standard deviation of horizontal wind fluctuations from sub-intervals is calculated as follows: where: is the standard deviation over the data-storage interval, and are sub-interval standard deviations. A sub-interval is specified as a number of scans. The number of scans...

  • Page 191

    Section 7. Installation 191 figure 58: 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: the algorithm for σ (Θu) is developed by noting (figure....

  • Page 192

    Section 7. Installation 192 standard deviation of direction figure 59: 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 i...

  • Page 193

    Section 7. Installation 193 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). 7.8.6 custom menus read more! More information concerning use of the keyboard is found in sections using the keyboard display (p. 39...

  • Page 194

    Section 7. Installation 194 submenu() / endsubmenu defines the beginning and end of a second‐level menu. Note submenu() label must be at least 6 characters long to mask default display clock. Crbasic example custom menus (p. 196) lists crbasic programming for a custom menu that facilitates viewing d...

  • Page 195

    Section 7. Installation 195 figure 63: custom menu example — predefined-notes pick list figure 64: custom menu example — free-entry notes window figure 65: custom menu example — accept / clear notes window figure 66: custom menu example — control sub menu.

  • Page 196

    Section 7. Installation 196 figure 67: custom menu example — control-led pick list figure 68: custom menu example — control-led boolean pick list note see figures custom menu example — home screen (p. 194) through custom menu example — control led boolean pick list (p. 196) in reference to the follo...

  • Page 197

    Section 7. Installation 197 const off = false 'assign "off" as boolean false public startflag as boolean 'led control process variable public countdown as long 'led count down variable public toggleled as boolean 'led control variable 'define note datatable 'set up notes data table, written datatabl...

  • Page 198

    Section 7. Installation 198 'measure two thermocouples tcdiff (tctemp(),2,mv2500c,1,typet,reftemp,true,0,250,1.0,0) calltable tempc 'call data table 'menu item "make notes" support code if cyclenotes = "accept" then calltable notes 'write data to notes data table cyclenotes = "accepted" 'write "acce...

  • Page 199

    Section 7. Installation 199 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 this feature might be written as: #const destination = "cr1000" #if destination = "cr3000" then #elseif destinat...

  • Page 200

    Section 7. Installation 200 #elseif loggertype = cr800 const sourcserialport = com1 #else const sourcserialport = com1 #endif 'public variables public valueread, selectedspeed as string * 50 'main program beginprog 'return the selected speed and logger type for display. #if loggertype = cr3000 selec...

  • Page 201

    Section 7. Installation 201 7.8.8.1 introduction serial denotes transmission of bits (1s and 0s) sequentially, or "serially." a byte is a packet of sequential bits. Rs-232 and ttl standards use bytes containing eight bits each. Imagine that an instrument transmits the byte "11001010" to the cr1000. ...

  • Page 202

    Section 7. Installation 202 7.8.8.2 i/o ports the cr1000 supports two-way serial communication with other instruments through ports listed in table cr1000 serial ports (p. 202). A serial device will often be supplied with a nine-pin d-type connector serial port. Check the manufacture's pinout for sp...

  • Page 203

    Section 7. Installation 203 note if an instrument or sensor optionally supports sdi-12, modbus, or dnp3, consider using these protocols before programming a custom protocol. These higher-level protocols are standardized among many manufacturers and are easy to use, relative to a custom protocol. Sdi...

  • Page 204

    Section 7. Installation 204 marks and spaces rs‐232 signal levels are inverted logic compared to ttl. The different levels are called marks and spaces. When referenced to signal ground, the valid rs‐232 voltage level for a mark is ‐3 to ‐25, and for a space is +3 to +25 with ‐3 to + 3 defined as the...

  • Page 205

    Section 7. Installation 205 • baudrrate — baud rate mismatch is frequently a problem when developing a new application. Check for matching baud rates. Some developers prefer to use a fixed baud rate during initial development. When set to -nnnn (where nnnn is the baud rate) or 0, auto baud-rate dete...

  • Page 206

    Section 7. Installation 206 • 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 a constant argument such as com1 , com2 , com3 , or com4 , and...

  • Page 207

    Section 7. Installation 207 • does the record have a delimiter character, e.G. ",", spaces, or tabs? These delimiters are useful for parsing the record into usable numbers. • will the sensor be sending multiple data strings? Multiple strings usually require filtering before parsing. • how fast will ...

  • Page 208

    Section 7. Installation 208 7.8.8.5.3 output programming basics applications with the purpose of transmitting data to another device usually include the following procedures. Other procedures may be required depending on the application. 1. Open a serial port (serialopen() command) to configure it f...

  • Page 209

    Section 7. Installation 209 example (humidity, temperature, and pressure sensor): serialinstring = "rh= 60.5 %rh t= 23.7 °c tdf= 15.6 °c td= 15.6 °c a= 13.0 g/m3 x= 11.1 g/kg tw= 18.5 °c h2o= 17889 ppmv pw=17.81 hpa pws 29.43 hpa h= 52.3 kj/kg dt= 8.1 °c" • hex pairs: bytes are translated to hex pai...

  • Page 210

    Section 7. Installation 210 • string declarations: string variables are memory intensive. Determine how large strings are and declare variables just large enough to hold the string. If the sensor sends multiple strings at once, consider declaring a single string variable and read incoming strings on...

  • Page 211

    Section 7. Installation 211 scan (5,sec, 3, 0) 'serial out code 'transmits string "*27.435,56.789#" out com1 serialopen (com1,9600,0,0,10000) 'open a serial port 'build the output string serialoutstring = "*" & tempout & "," & rhout & "#" 'output string via the serial port serialout (com1,serialouts...

  • Page 212

    Section 7. Installation 212 figure 69: hyperterminal new connection description figure 70: hyperterminal connect-to settings.

  • Page 214

    Section 7. Installation 214 7.8.8.6.2 create send text file create a file from which to send a serial string. The file shown in figure hyperterminal send text-file example (p. 214) will send the string [2008:028:10:36:22]c to the cr1000. Use notepad (microsoft windows utility) or some other text edi...

  • Page 215

    Section 7. Installation 215 recognize the c command. Cr1000 dataloggers, however, require custom programming to output and accept these same ascii strings. A similar program can be used to emulate cr10x and cr23x dataloggers. Solution: crbasic example measure sensors / send rs-232 data (p. 215) impo...

  • Page 216

    Section 7. Installation 216 'one minute data table datatable (onemintable,true,-1) openinterval 'sets interval same as found in cr510 datainterval (0,1,min,10) totalize (1, kwhh,fp2,0) sample (1, kwhhold,fp2) totalize (1, kvarh,fp2,0) sample (1, kvarhold,fp2) sample (1, stationid,fp2) endtable 'cloc...

  • Page 217

    Section 7. Installation 217 'if it is a leap year, use this section. If (leapyear = true) then select case doy case is month = 1 date = doy case is month = 2 date = doy + -31 case is month = 3 date = doy + -60 case is month = 4 date = doy + -91 case is month = 5 date = doy + -121 case is month = 6 d...

  • Page 218

    Section 7. Installation 218 case is month = 4 date = doy + -90 case is month = 5 date = doy + -120 case is month = 6 date = doy + -151 case is month = 7 date = doy + -181 case is month = 8 date = doy + -212 case is month = 9 date = doy + -243 case is month = 10 date = doy + -273 case is month = 11 d...

  • Page 219

    Section 7. Installation 219 '///////////////serial time set input section/////////////// 'accept old c command -- [2008:028:10:36:22]c -- parse, process, set 'clock (note: chr(91) = "[", chr(67) = "c") serialinrecord (comrs232,instring,91,0,67,instringsize,01) if instringsize 0 then splitstr (instri...

  • Page 220

    Section 7. Installation 220 7.8.8.7 q & a q: i am writing a cr1000 program to transmit a serial command that contains a null character. The string to transmit is: chr(02)+chr(01)+"cwgt0"+chr(03)+chr(00)+chr(13)+chr(10) how does the logger handle the null character? Is there a way that we can get the...

  • Page 221

    Section 7. Installation 221 then tempdata(1,1,2) = "top", tempdata(1,1,3) = "op", _ tempdata(1,1,1) = "stop" to handle single-character manipulations, declare the string with a size of 1. That single-character string can be used to search for specific characters. In the following example, the first ...

  • Page 222

    Section 7. Installation 222 a: a common caution is, “the destination variable should not be used in more than one sequence to avoid using the variable when it contains old data.” however, there are more elegant ways to handle the root problem. There is nothing unique about serialin() with regard to ...

  • Page 223

    Section 7. Installation 223 figure 75: data from trigvar program crbasic example 42. Using trigvar to trigger data storage 'in this example, the variable "counter" is incremented by 1 each scan. The data table 'is called every scan, which includes the sample(), average(), and totalize() 'instruction...

  • Page 224

    Section 7. Installation 224 produce a time stamp that may be accessed from the program after being written to a data table. The time of other events, such as alarms, can be stored using the realtime() instruction. • accessing and storing a time stamp from another datalogger in a pakbus network. 7.8....

  • Page 225

    Section 7. Installation 225 crbasic example 44. Nsec — two element time array 'timestamp is retrieved into variables timeofmaxvar(1) and timeofmaxvar(2). Because 'the variable is dimensioned to 2, nsec assumes, '1) timeofmaxvar(1) = seconds since 00:00:00 1 january 1990, and '2) timeofmaxvar(2) = μs...

  • Page 226

    Section 7. Installation 226 'declarations public rtime(9) as long '(or float) public rtime2(7) as long '(or float) dim x datatable (secondtable,true,-1) datainterval (0,5,sec,10) sample (1,rtime,nsec) sample (1,rtime2,nsec) endtable 'program beginprog scan (1,sec,0,0) realtime (rtime) for x = 1 to 7...

  • Page 227

    Section 7. Installation 227 '3) sample time to three string forms using the tablename.Fieldname notation. 'form 1: "mm/dd/yyyy hr:mm:ss uttime(1) = timetable.Timelong(1,1) 'form 2: "dd/mm/yyyy hr:mm:ss uttime(2) = timetable.Timelong(3,1) 'form 3: "ccyy-mm-dd hr:mm:ss (iso 8601 int'l date) uttime(3) ...

  • Page 228

    Section 7. Installation 228 variable aliasing (p. 124) can be employed in the crbasic program to make the data more understandable. Figure 76: alarms toggled in bit-shift example figure 77: bool8 data from bit-shift example (numeric monitor).

  • Page 229

    Section 7. Installation 229 figure 78: bool8 data from bit-shift example (pc data file) crbasic example 47. Programming with bool8 and a bit‐shift operator public alarm(32) public flags as long public flagsbool8(4) as long datatable (bool8data,true,-1) datainterval (0,1,sec,10) 'store bits 1 through...

  • Page 230

    Section 7. Installation 230 'if bit in or bit in the result 'flags is bin/hex is is '---------- ---------- ---------- ' 0 0 0 ' 0 1 1 ' 1 0 1 ' 1 1 1 'binary equivalent of hex: if alarm(1) then flags = flags or &h1 ' &b10 if alarm(3) then flags = flags or &h4 ' &b100 if alarm(4) then flags = flags o...

  • Page 231

    Section 7. Installation 231 flagsbool8(1) = flags and &hff 'and 1st 8 bits of "flags" & 11111111 flagsbool8(2) = (flags >> 8) and &hff 'and 2nd 8 bits of "flags" & 11111111 flagsbool8(3) = (flags >> 16) and &hff 'and 3rd 8 bits of "flags" & 11111111 flagsbool8(4) = (flags >> 24) and &hff 'and 4th 8 ...

  • Page 232

    Section 7. Installation 232 table 32. Table. Summary of analog voltage measurement rates maximum rate 100 hz 600 hz 2000 hz number of simultaneous channels multiple channels fewer channels one channel maximum duty cycle 100% maximum measaurements per burst n/a variable 65535 description near simulta...

  • Page 233

    Section 7. Installation 233 beginprog scan (1,sec,0,0) ' voltse (fastse(),1,mv2_5,1,false,100,250,1.0,0) calltable fastsetable nextscan endprog by modifying the interval , units , and buffers arguments, voltse() can be executed at 100 hz at 100% duty cycle. The following program measures 16 analog i...

  • Page 234

    Section 7. Installation 234 many variations of this 200-hz measurement program are possible to achieve other burst rates and duty cycles. The subscan() / nextsubscan instruction pair introduce added complexities. The subscan() / nextsubscan details , introduces some of these. Caution dictates that a...

  • Page 235

    Section 7. Installation 235 • one more way to view sub-scans is that they are a convenient (and only) way to put a loop around a set of measurements. Subscan() / nextsubscan specifies a timed loop for so many times around a set of measurements that can be driven by the task sequencer. 7.8.12.3 measu...

  • Page 236

    Section 7. Installation 236 200 table 37. Parameters for analog burst mode (601 to 2000 hz) crbasic analog voltage input parameters description when in burst mode destination a variable array dimensioned to store all measurements from a single channel. For example, the command, dim fasttemp(500) dim...

  • Page 237

    Section 7. Installation 237 7.8.13.1 string operators the table string operators (p. 237) list and describes available string operators. String operators are case sensitive. Table 38. String operators operator description & concatenates strings. Forces numeric values to strings before concatenation....

  • Page 238

    Section 7. Installation 238 table 39. String concatenation examples expression comments result str(1) = 5.4 + 3 + " volts" add floats, concatenate strings "8.4 volts" str(2) = 5.4 & 3 & " volts" concatenate floats and strings "5.43 volts" lng(1) = "123" convert string to long 123 lng(2) = 1+2+"3" ad...

  • Page 239

    Section 7. Installation 239 7.8.13.4 inserting string characters crbasic example 48. Inserting string characters objective: use movebytes() to change "123456789" to "123a56789" given: stringvar(7) = "123456789" 'result is "123456789" try (does not work): stringvar(7,1,4) = "a" 'result is "123a56789"...

  • Page 240

    Section 7. Installation 240 7.8.13.7 formatting strings table 43. Formatting strings examples expression result str(1)=123e4 str(2)=formatfloat(123e4,"%12.2f") str(3)=formatfloat(values(2)," the battery is %.3g volts ") str(4)=strings(3,1,instr(1,strings(3),"the battery is ",4)) str(5)=strings(3,1,i...

  • Page 241

    Section 7. Installation 241 'data tables 'table output on two intervals depending on condition. 'note the parenthesis around the triggervariable and statements 'status table datafilldays field is low datatable (twoint,(int_fast and timeintointerval (0,5,sec)) or (int_slow and _ timeintointerval (0,1...

  • Page 242

    Section 7. Installation 242 scan times, two separate scans can be used with logic to jump between them. If a pulsecount() is used in both scans, then a pulsecountreset is used prior to entering each scan. 7.8.16 program signatures a program signature is a unique integer calculated from all character...

  • Page 243

    Section 7. Installation 243 'function scan (1,sec,0,0) progsig = status.Progsignature 'set variable to status table entry '"progsignature" runsig = status.Runsignature 'set variable to status table entry '"runsignature" x = 24 exesig(1) = signature 'signature includes code since initial 'signature i...

  • Page 244

    Section 7. Installation 244 'declare public (viewable) variables public batt_volt as float 'declared as float public ptemp_c 'float by default public airtemp_c 'float by default public airtemp_f 'float by default public airtemp2_f 'float by default public deltat_c 'float by default public howmany 'f...

  • Page 245

    Section 7. Installation 245 minimum (1,airtemp_c,fp2,0,false) 'stores temperature minimum in low 'resolution format sample (1,deltat_c, fp2) 'stores temp difference sample in low 'resolution format sample (1,howmany, fp2) 'stores how many data events in low 'resolution format endtable beginprog 'a s...

  • Page 246

    Section 7. Installation 246 'count how many times the dataevent “deltat_c>=3” has occurred. The 'tablename.Eventcount syntax is used to return the number of data storage events 'that have occurred for an event driven table. This example looks in the data 'table “event”, which is declared above, and ...

  • Page 247

    Section 7. Installation 247 'main program beginprog 'begin executable section of program scan (1,sec,0,0) 'begin main scan paneltemp (ptemp,250) counter1 = counter1 + 1 nextscan 'end main scan slowsequence 'begin slow sequence 'declare public variables for secondary scan (can be declared at head of ...

  • Page 248

    Section 7. Installation 248 'declare variables public ptemp, batt_volt, level, timeintotest public counter(10) public flag(8) as boolean 'define data tables datatable (logtable,1,-1) minimum (1,batt_volt,fp2,0,false) sample (1,ptemp,fp2) sample (1,level,fp2) sample (1,timeintotest, fp2) endtable 'ma...

  • Page 249

    Section 7. Installation 249 '1 minute data interval scan (1,min,0,70) counter(4) = counter(4) + 1 battery (batt_volt) paneltemp (ptemp,250) tcdiff (level,1,mv2_5,1,typet,ptemp,true ,0,250,1.0,0) if timeintointerval (0,1,min) then timeintotest = timeintotest + 1 endif 'call output tables calltable lo...

  • Page 250

    Section 7. Installation 250 '10 minute data interval scan (10,min,0,0) counter(6) = counter(6) + 1 battery (batt_volt) paneltemp (ptemp,250) tcdiff (level,1,mv2_5,1,typet,ptemp,true,0,250,1.0,0) if timeintointerval (0,1,min) then timeintotest = timeintotest + 1 endif 'call output tables calltable lo...

  • Page 251

    Section 7. Installation 251 'begin program beginprog 'load scaling array (multipliers and offsets) mult(1) = 1.8 : offset(1) = 32 mult(2) = 1 : offset(2) = 2 mult(3) = 1 : offset(3) = 3 mult(4) = 1 : offset(4) = 4 mult(5) = 1 : offset(5) = 5 mult(6) = 1 : offset(6) = 6 mult(7) = 1 : offset(7) = 7 mu...

  • Page 252

    Section 7. Installation 252 'declare units units ptemp_c = deg c units airtemp_c = deg c units deltat_c = deg c 'declare output table -- output conditional on delta t >=3 'table stores data at the scan rate (once per second) when condition met 'because datainterval instruction is not included in tab...

  • Page 253

    Section 7. Installation 253 'declare event driven data table datatable (event,true,1000) dataevent (0,deltat_c>=3,deltat_c sample (1,ptemp_c, fp2) sample (1,airtemp_c, fp2) sample (1,deltat_c, fp2) endtable 'declare time driven data table datatable (onemin,true,-1) datainterval (0,1,min,10) sample (...

  • Page 254

    Section 7. Installation 254 non-standard types. Measured temperatures are compared against the its-90 scale, a temperature instrumentation-calibration standard. Prtcalc() follows the principles and equations given in the us astm e1137-04 standard for conversion of resistance to temperature. For temp...

  • Page 255

    Section 7. Installation 255 table 45. Prtcalc() type-code-1 sensor iec 60751:2008 (iec 751), alpha = 0.00385. Now internationally adopted and written into standards astm e1137-04, jis 1604:1997, en 60751 and others. This type code is also used with probes compliant with older standards din43760, bs1...

  • Page 256

    Section 7. Installation 256 table 47. Prtcalc() type-code-3 sensor us industrial standard, alpha = 0.00391 (reference: omil r84 (2003)) constant coefficient i 8.8564290e+00 j 2.5190880e+02 table 48. Prtcalc() type-code-4 sensor old japanese standard, alpha = 0.003916 (reference: jis c 1604:1981, nat...

  • Page 257

    Section 7. Installation 257 table 50. Prtcalc() type-code-6 sensor standard its-90 sprt, alpha = 0.003926 (reference: minco / instrunet) constant coefficient a 3.9848000e-03 d -2.3480000e-06 e 1.8226630e-05 f -1.1740000e-06 g 1.6319630e+00 h -2.4709290e+00 i 8.8283240e+00 j 2.5091300e+02 7.8.18.2 me...

  • Page 258

    Section 7. Installation 258 figure pt100 in four-wire half-bridge (p. 259) shows the circuit used to measure a 100-Ω prt. The 10-kΩ resistor allows the use of a high excitation voltage and a low input range. This ensures that noise in the excitation does not have an effect on signal noise. Because t...

  • Page 259

    Section 7. Installation 259 0.15°c over the -10 to 40°c temperature range. Because the measurement is ratiometric (r s /r f ), the properties of the 10-kΩ resistor do not affect the result. A terminal-input module (tim) can be used to complete the circuit shown in figure pt100 in four-wire half-brid...

  • Page 260

    Section 7. Installation 260 example prt specifications: • alpha = 0.00385 (prttype 1) the temperature measurement requirements in this example are the same as in pt100 in four-wire half-bridge (p. 257). In this case, a three-wire half-bridge and crbasic instruction brhalf3w() are used to measure the...

  • Page 261

    Section 7. Installation 261 figure 80: pt100 in three-wire half-bridge crbasic example 60. Pt100 in three‐wire half‐bridge 'see figure. Pt100 in three-wire half-bridge (p. 260) for wiring diagram. Public rs_ro public deg_c beginprog scan (1,sec,0,0) 'brhalf3w(dest,reps,range1,sechan,exchan,mpe,ex_mv...

  • Page 262

    Section 7. Installation 262 where, v s = measured bridge‐output voltage v x = excitation voltage or, x = 1000 (r s /(r s +r 1 )‐r 3 /(r 2 +r 3 )). With reference to figure pt100 in four-wire full-bridge ( p. 263 ), the resistance of the prt (r s ) is calculated as: r s = r 1 x' / (1‐x') where x' = x...

  • Page 263

    Section 7. Installation 263 figure 81: pt100 in four-wire full-bridge crbasic example 61. Pt100 in four‐wire full‐bridge 'see figure. Pt100 in four-wire full-bridge (p. 263) for wiring diagram. Public brfullout public rs_ro public deg_c beginprog scan (1,sec,0,0) 'brfull(dst,reps,range,dfchan,vx1,mp...

  • Page 264

    Section 7. Installation 264 where x n is the most recent value of the source variable and x n-1 is the previous value (x 1 is the oldest value included in the average, i.E., n-1 values back from the most recent). Nans are ignored in the processing of avgrun() unless all values in the population are ...

  • Page 265

    Section 7. Installation 265 note n = number of points in running average) to calculate the delay in time, multiply the result from the above equation by the period at which the running average is executed (usually the scan period): delay in time = (scan period) (n ‐ 1) / 2 for the example above, the...

  • Page 266

    Section 7. Installation 266 figure 84: running-average signal attenuation 7.8.20 writing high-frequency data to cf an advanced method for writing high-frequency time-series data to compactflash (cf) cards is now available for cr1000 dataloggers. It supports 16-gb or smaller cf cards. It improves the...

  • Page 267

    Section 7. Installation 267 also be used in applications where the site cannot be accessed for extended periods. However, large cf cards do not eliminate the risk of data loss. 1 the crd: drive is a memory drive created when a cf card is connected to the datalogger through the appropriate peripheral...

  • Page 268

    Section 7. Installation 268 crbasic example 62. Using tablefile() with option 64 with cf cards 'the following crbasic program shows how the instruction is used in micrometeorology 'eddy-covariance programs. The file naming scheme used in tablefile() in this example is 'customized using variables, co...

  • Page 269

    Section 7. Installation 269 cfm100 modules. The card must only be ejected after the status 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- 4-byte integers. This data type can represent a number as ...

  • Page 270

    Section 7. Installation 270 • better vibration and shock resistance • longer life spans (more read/write cycles) note more cf card recommendations are presented in the application note, cf card information, which is available at www.Campbellsci.Com. Q: why not use sd cards? A: cf cards offer advanta...

  • Page 271

    Section 7. Installation 271 2 "rings": the datalogger has a ring memory. In other words, once filled, rather than stopping when full, oldest data are overwritten by new data. In this context, "rings" designates when new data begins to overwrite the oldest data. 3 cpu data table fill times can be con...

  • Page 272

    Section 7. Installation 272.

  • Page 273: Section 8. Operation

    273 section 8. Operation 8.1 measurements several features give the cr1000 the flexibility to measure many sensor types. Contact a campbell scientific applications engineer if assistance is required in assessing cr1000 compatibility to a specific application or sensor type. Some sensors require prec...

  • Page 274

    Section 8. Operation 274 basic code requirements. The datatime() instruction is a more recent introduction that facilitates time stamping with system time. See data table declarations (p. 475) and crbasic editor help for more information. Crbasic example 63. Time stamping with system time 'declare v...

  • Page 275

    Section 8. Operation 275 instructions brfull(), brfull6w(), brhalf4w(), tcdiff(), and voltdiff () instructions perform diff voltage measurements. Figure 85: pgi amplifier a pgia processes the difference between the h and l inputs, while rejecting voltages that are common to both inputs. Figure pgia ...

  • Page 276

    Section 8. Operation 276 is reduced to ±2.5 vdc, whereas input limits are always ±5 vdc. Hence for non- negligible diff signals, "input limits" is more descriptive than "common-mode range." note two sets of numbers indicate analog channel assignments. When differential channels are identified, analo...

  • Page 277

    Section 8. Operation 277 sensors with a low signal-to-noise ratio, such as thermocouples, should normally be measured differentially. However, if the measurement to be made does not require high accuracy or precision, such as thermocouples measuring brush-fire temperatures, a single-ended measuremen...

  • Page 278

    Section 8. Operation 278 table 51. Crbasic parameters varying measurement sequence and timing crbasic parameter description measofs correct ground offset on single-ended measurements. Revdiff reverse high and low differential inputs. Settlingtime sensor input settling time. Integ duration of input s...

  • Page 279

    Section 8. Operation 279 where gain error = ± (2500 * 0.0006) = ±1.5 mv and offset error = 1.5 • 667 µv + 1 µv = 1.00 mv therefore, error = gain error + offset error = ±1.5 mv + 1.00 µv = ±2.50 mv in contrast, the error for a 500‐mv input under the same constraints is ±1.30 mv. The figure voltage me...

  • Page 280

    Section 8. Operation 280 8.1.2.5 voltage range in general, a voltage measurement should use the smallest fixed-input range that will accommodate the full-scale output of the sensor being measured. This results in the best measurement accuracy and resolution. The cr1000 has fixed input ranges for vol...

  • Page 281

    Section 8. Operation 281 8.1.2.5.2 fixed voltage ranges an approximate 9% range overhead exists on fixed input voltage ranges. For example, over-range on the ±2500 mv-input range occurs at approximately +2725 mv and -2725 mv. The cr1000 indicates a measurement over-range by returning a nan (not a nu...

  • Page 282

    Section 8. Operation 282 8.1.2.6 offset voltage compensation analog measurement circuitry in the cr1000 may introduce a small offset voltage to a measurement. Depending on the magnitude of the signal, this offset voltage may introduce significant error. For example, an offset of 3 μv on a 2500- mv s...

  • Page 283

    Section 8. Operation 283 when the cr1000 reverses differential inputs or excitation polarity, it delays the same settling time after the reversal as it does before the first measurement. So, there are two delays per channel when either revdiff or revex is used. If both revdiff and revex are true , f...

  • Page 284

    Section 8. Operation 284 duration. Consequently, noise at 1 / (integer multiples) of the integration duration is effectively rejected by an analog integrator. Table crbasic measurement integration times and codes (p. 284) lists three integration durations available in the cr1000 and associated crbas...

  • Page 285

    Section 8. Operation 285 figure 88: ac power line noise rejection techniques ac noise rejection on large signals if rejecting ac-line noise when measuring with the 2500 mv ( mv2500 ) and 5000 mv ( mv5000 ) ranges, the cr1000 makes two fast measurements separated in time by one-half line cycle (see f...

  • Page 286

    Section 8. Operation 286 table 56. Ac noise rejection on large signals 2. During a/d, cr1000 turns off excitation for ≈170 µs. 3. Excitation is switched on again for one-half cycle, then the second measurement is made. Restated, when the cr1000 is programmed to use the half-cycle 50-hz or 60-hz reje...

  • Page 287

    Section 8. Operation 287 table 57. Crbasic measurement settling times settling time entry input voltage range integration code settling time 1 0 all 250 450 µs (default) 0 all _50hz 3 ms (default) 0 all _60hz 3 ms (default) >100 all x 2 μs entered 1 minimum settling time required to allow the input ...

  • Page 288

    Section 8. Operation 288 steady-state conditions so changes in measured voltage are attributable to settling time rather than changes in pressure. Reviewing the section programming (p. 108) may help in understanding the crbasic code in the example. The first six measurements are shown in table first...

  • Page 289

    Section 8. Operation 289 figure 90: settling time for pressure transducer table 58. First six values of settling-time data timestamp rec pt(1) pt(2) pt(3) pt(4) pt(5) pt(6) smp smp smp smp smp smp 1/3/2000 23:34 0 0.03638599 0.03901386 0.04022673 0.04042887 0.04103531 0.04123745 1/3/2000 23:34 1 0.0...

  • Page 290

    Section 8. Operation 290 unless a calibrate() instruction is present in the running crbasic program, the cr1000 automatically performs self-calibration during spare time in the background as an automatic slow sequence (p. 138), with a segment of the calibration occurring every 4 seconds. If there is...

  • Page 291

    Section 8. Operation 291 measurements (b) to be determined during cr1000 self-calibration (maximum of 54 values). These values can be viewed in the status table, with entries identified as listed in table status table calibration entries (p. 291). Automatic self-calibration can be overridden with th...

  • Page 292

    Section 8. Operation 292 table 59. Status table calibration entries descriptions of status table elements status table element differential (diff) single-ended (se) offset or gain ±mv input range integration calgain(18) gain 2.5 50-hz rejection calseoffset(1) se offset 5000 250 ms calseoffset(2) se ...

  • Page 293

    Section 8. Operation 293 table 59. Status table calibration entries descriptions of status table elements status table element differential (diff) single-ended (se) offset or gain ±mv input range integration caldiffoffset(16) diff offset 25 50-hz rejection caldiffoffset(17) diff offset 7.5 50-hz rej...

  • Page 294

    Section 8. Operation 294 table 60. Calibrate() instruction results descriptions of array elements array cal() element differential (diff) single-ended (se) offset or gain ±mv input range integration typical value 27 gain 250 60-hz rejection -0.067 mv/lsb 28 se offset 25 60-hz rejection ±5 lsb 29 dif...

  • Page 295

    Section 8. Operation 295 1 a/d (analog-to-digital) conversion time = 15 µs 2 reps/no reps -- if reps > 1 (i.E., multiple measurements by a single instruction), no additional time is required. If reps = 1 in consecutive voltage instructions, add 15 µs per instruction. 8.1.3 resistance measurements ma...

  • Page 296

    Section 8. Operation 296 table 61. Resistive-bridge circuits with voltage excitation resistive-bridge type and circuit diagram crbasic instruction and fundamental relationship relationships half-bridge 1 crbasic instruction: brhalf() fundamental relationship 2 : three-wire half-bridge 1,3 crbasic in...

  • Page 297

    Section 8. Operation 297 table 61. Resistive-bridge circuits with voltage excitation resistive-bridge type and circuit diagram crbasic instruction and fundamental relationship relationships 1 key: v x = excitation voltage; v 1 , v 2 = sensor return voltages; r f = "fixed", "bridge" or "completion" r...

  • Page 298

    Section 8. Operation 298 other sensors, e.G., lvdts (linear variable differential transformers), require an ac excitation because they rely on inductive coupling to provide a signal. Dc excitation will provide no output. Cr1000 bridge measurements can reverse excitation polarity to provide ac excita...

  • Page 299

    Section 8. Operation 299 • effects due to the following are not included in the specification: o bridge-resistor errors o sensor noise o measurement noise the ratiometric-accuracy specification is applied to a three-wire half-bridge measurement that uses the brhalf() instruction as follows: the rela...

  • Page 300

    Section 8. Operation 300 8.1.3.3 strain calculations read more! The fieldcalstrain() demonstration program (p. 153) section has more information on strain calculations. A principal use of the four-wire full bridge is the measurement of strain gages in structural stress analysis. Straincalc() calcula...

  • Page 301

    Section 8. Operation 301 table 63. Straincalc() instruction equations straincalc() brconfig code configuration 6 full-bridge strain gage. Half the bridge has two gages parallel to + and - , and the other half to - and + : where: • : poisson's ratio (0 if not applicable) • gf: gage factor • v r : 0.0...

  • Page 302

    Section 8. Operation 302 reference junction and 0 °c. This compensation voltage, combined with the measured thermocouple voltage, can be used to compute the absolute temperature of the thermocouple junction. To facilitate thermocouple measurements, a thermistor is integrated into the cr1000 wiring p...

  • Page 303

    Section 8. Operation 303 outside the chamber. The temperature of this bar was also measured by another datalogger. Differences between the temperature measured by one of the thermocouples and the actual temperature of the bar are due to the temperature difference between the terminals the thermocoup...

  • Page 304

    Section 8. Operation 304 figure 93: panel-temperature gradients (low temperature to high) figure 94: panel-temperature gradients (high temperature to low) 8.1.4.1.2 thermocouple limits of error the standard reference that lists thermocouple output voltage as a function of temperature (reference junc...

  • Page 305

    Section 8. Operation 305 standards and technology) monograph 175 (1993). Ansi (american national standards institute) has established limits of error on thermocouple wire which is accepted as an industry standard (ansi mc 96.1, 1975). Table limits of error for thermocouple wire (p. 305) gives the an...

  • Page 306

    Section 8. Operation 306 resolution (p. 306) lists high resolution ranges available for various thermocouple types and temperature ranges. The following four example calculations of thermocouple input error demonstrate how the selected input voltage range impacts the accuracy of measurements. Figure...

  • Page 307

    Section 8. Operation 307 figure 95: input error calculation input error examples: type t thermocouple @ 45°c these examples demonstrate that in the environmental temperature range, input- offset error is much greater than input-gain error because a small input range is used. Conditions: cr1000 modul...

  • Page 308

    Section 8. Operation 308 error calculations with input reversal = true µv error = gain term + offset term = (830.7 µv * 0.12%) + (1.5 * 0.67 µv + 1.0 µv) = 0.997 µv + 2.01 µv = 3.01 µv (= 0.071 °c) error calculations with input reversal = false µv error = gain term + offset term = (830.7 µv * 0.12%)...

  • Page 309

    Section 8. Operation 309 error calculations with input reversal = false µv error = gain term + offset term = (44500 µv * 0.12%) + (3 * 66.7 µv + 2.0 µv) = 53.4 µv + 200 µv = 7.25 µv (= 7.25 °c) 8.1.4.1.4 ground looping error when the thermocouple measurement junction is in electrical contact with th...

  • Page 310

    Section 8. Operation 310 table 66. Limits of error on cr1000 thermocouple polynomials tc type range °c limits of error °c relative to nist standards -130 to 200 ±0.005 200 to 1000 ±0.02 k -50 to 1372 -50 to 950 ±0.01 950 to 1372 ±0.04 8.1.4.1.7 reference-junction error thermocouple instructions tcdi...

  • Page 311

    Section 8. Operation 311 the magnitude of the errors discussed in error analysis (p. 302) show that the greatest sources of error in a thermocouple measurement are usually, • the typical (and industry accepted) manufacturing error of thermocouple wire • the reference temperature the table thermocoup...

  • Page 312

    Section 8. Operation 312 greater than the extension-wire range. In any case, errors can arise if temperature gradients exist within the junction box. Figure diagram of a thermocouple junction box (p. 312) illustrates a typical junction box wherein the reference junction is the cr1000. Terminal strip...

  • Page 313

    Section 8. Operation 313 figure 97: pulse-sensor output signal types figure 98: switch-closure pulse sensor table 69. Pulse-input channels and measurements pulse-input channel input type data option crbasic instruction p1, p2 • high-frequency • low-level ac • switch-closure • counts • frequency • ru...

  • Page 314

    Section 8. Operation 314 8.1.5.1 pulse-input channels (p1 - p2) read more! Review pulse counter specifications at cr1000 specifications . Review pulse counter programming in crbasic editor help for the pulsecount() instruction. Dedicated pulse-input channels (p1 through p2), as shown in figure pulse...

  • Page 315

    Section 8. Operation 315 8.1.5.1.1 high-frequency pulse (p1 - p2) high-frequency pulse inputs are routed to an inverting cmos input buffer with input hysteresis. The cmos input buffer is an output zero level with its input ≥ 2.2 v, and an output one level with its input ≤ 0.9 v. When a pulse channel...

  • Page 316

    Section 8. Operation 316 8.1.5.2.1 high frequency mode digital i/o channels have a small 25-ns input rc-filter time constant between the terminal block and the cmos input buffer, which allows for higher-frequency pulse counting (up to 400 khz) when compared with pulse-input channels p1 – p2 (250 khz...

  • Page 317

    Section 8. Operation 317 8.1.5.3 pulse measurement tips • the pulsecount() instruction, whether measuring pulse inputs on pulse channels (p1 through p2) or on digital i/o channels (c1 – c8), uses dedicated 24-bit counters to accumulate all counts over the user-specified scan interval. The resolution...

  • Page 318

    Section 8. Operation 318 using a pull-up resistor on digital i/o channels c1 - c8 8.1.5.3.1 frequency resolution frequency resolution of a pulsecount() frequency measurement is calculated as where: fr = resolution of the frequency measurement (hz) s = scan interval of crbasic program resolution of t...

  • Page 319

    Section 8. Operation 319 table 70. Example. E for a 10 hz input signal scan rising edge / scan e 5.0 50 50 0.5 5 5 0.05 0.5 1 timerio() instruction measures frequencies of ≤ 1 khz with higher frequency resolution over short (sub-second) intervals. In contrast, sub-second frequency measurement with p...

  • Page 320

    Section 8. Operation 320 8.1.5.4 pulse measurement problems 8.1.5.4.1 pay attention to specifications the table example of differing specifications for pulse input channels (p. 320) compares specifications for pulse-input channels to emphasize the need for matching the proper device to application. ...

  • Page 321

    Section 8. Operation 321 table 73. Time constants (τ) measurement τ pulse channel, high-frequency mode 1.2 pulse channel, switch-closure mode 3300 pulse channel, low-level ac mode see table filter attenuation of frequency signals (p. 321) footnote digital i/o, high-frequency mode 0.025 digital i/o, ...

  • Page 322

    Section 8. Operation 322 8.1.5.4.3 switch bounce and nan nan will be the result of a timerio() measurement if one of two conditions occurs: 1. Timeout expires 2. A signal on the channel is too fast (> 3 khz) when the input channel experiences this type of signal, the cr1000 operating system disables...

  • Page 323

    Section 8. Operation 323 figure 102: input conditioning circuit for period averaging 8.1.7 sdi-12 recording read more! Sdi-12 sensor support (p. 172) and serial input / output (p. 509). Sdi-12 is a communications protocol developed to transmit digital data from smart sensors to data-acquisition unit...

  • Page 324

    Section 8. Operation 324 figure 103: circuit to limit control port input to 5 vdc 8.1.9 field calibration read more! Field calibration of linear sensors (fieldcal) (p. 151) has complete information. Calibration increases accuracy of a measurement device by adjusting its output, or the measurement of...

  • Page 325

    Section 8. Operation 325 figure 104: current limiting resistor in a rain gage circuit 8.1.10.3 rs-232 sensors rs-232 sensor cable lengths should be limited to 50 feet. 8.1.10.4 sdi-12 sensors the sdi-12 standard allows cable lengths of up to 200 feet. Campbell scientific does not recommend sdi-12 se...

  • Page 326

    Section 8. Operation 326 each cr1000 can catch the rising edge of a digital pulse from the master cr1000 and synchronize measurements or other functions, using the waitdigtrig() instructions, independent of cr1000 clocks or data time stamps. When programs are running in pipeline mode, measurements c...

  • Page 327

    Section 8. Operation 327 over a proprietary, three-wire serial communications link utilizing channels c1, c2 and c3. Read more! For complete information on available measurement and control peripherals, go to the appendix sensors and peripherals , www.Campbellsci.Com, or contact a campbell scientifi...

  • Page 328

    Section 8. Operation 328 figure 105: control port current sourcing 8.2.4.2 relays and relay drivers several relay drivers are manufactured by campbell scientific. For more information, see the appendix relay drivers (p. 563), contact a campbell scientific applications engineer, or go to www.Campbell...

  • Page 329

    Section 8. Operation 329 figure 106: relay driver circuit with relay figure 107: power switching without relay 8.2.5 analog control / output devices the cr1000 can scale measured or processed values and transfer these values in digital form to an analog output device. The analog output device perfor...

  • Page 330

    Section 8. Operation 330 cutting the output voltage of sensors to voltage levels compatible with the cr1000, modules for completion of resistive bridges, and shunt modules for measurement of analog-current sensors. Refer to the appendix signal conditioners (p. 561) for information concerning availab...

  • Page 331

    Section 8. Operation 331 internal serial flash 3 12 kb: device settings 500 kb: cpu: drive device settings — a backup of settings such as pakbus address, station name, beacon intervals, neighbor lists, etc. Rebuilt when a setting changes. Cpu: drive — holds program files, field calibration files, an...

  • Page 332

    Section 8. Operation 332 table 76. Cr1000 sram memory use comments ---------------------------------- variables & constants stores variables in the user program. These values may persist through power- up, recompile, and watchdog events if the preservevariables instruction is in the running program....

  • Page 333

    Section 8. Operation 333 crd: principal use is to expand final storage (p. 454), but it is also used to store .Jpg, cr1, and .Dat files. 1 the cpu: drive uses a fat16 file system, so it is limited to 128 file. If the file names are longer than 8.3 characters (e.G. 12345678.123), you can store less. ...

  • Page 334

    Section 8. Operation 334 note placing an optional usr: size setting in the user program over-rides manual changes to usr: size. When usr: size is changed manually, the user program restarts and the programmed size for usr: takes immediate effect. The usr: drive holds any file type within the constra...

  • Page 335

    Section 8. Operation 335 campbell scientific cf card modules connect to the cr1000 peripheral port. Each has a slot for type i or type ii cf cards. A maximum of 30 data tables can be created on a cf card. Refer to writing high-frequency data to cf cards (p. 266) for information on programming the cr...

  • Page 336

    Section 8. Operation 336 table 78. Tablefile()-instruction data-file formats elements included tablefile() format option base file format header information time stamp record number 0 1 tob1 x x x 1 tob1 x x 2 tob1 x x 3 tob1 x 4 tob1 x x 5 tob1 x 6 tob1 x 7 tob1 8 1 toa5 x x x 9 toa5 x x 10 toa5 x ...

  • Page 337

    Section 8. Operation 337 example: "tob1","11467","cr1000","11467","cr1000.Std.20","cpu:file format.Cr1","61449","test" "seconds","nanoseconds","record","battfivoltfimin","ptemp" "seconds","nanoseconds","rn","","" "","","","min","smp" "ulong","ulong","ulong","fp2","fp2" }Ÿp' e1hŒŸp' e1h›Ÿp' e1hªŸp' e...

  • Page 338

    Section 8. Operation 338 example: "signature": 38611,"environment": {"stationfiname": "11467","tablefiname": "test","model": "cr1000","serialfino": "11467", "osfiversion": "cr1000.Std.21.03","progfiname": "cpu:file format.Cr1"},"fields": [{"name": "battfivoltfimin","type": "xsd:float", "process": "m...

  • Page 339

    Section 8. Operation 339 record element 1 – timestamp data without timestamps are usually meaningless. Nevertheless, the tablefile() instruction optionally includes timestamps in some formats. Record element 2 – record number record numbers are optionally provided in some formats as a means to ensur...

  • Page 340

    Section 8. Operation 340 • initializes system variables. • clears communications memory. Full memory reset does not affect the crd: drive directly. Subsequent user program uploads, however, can erase crd:. Operating systems can also be sent using the program send feature in datalogger support softwa...

  • Page 341

    Section 8. Operation 341 table 79. File-control functions file-control functions accessed through sending programs to the cr1000 program send 1 , file control send 2 , devconfig 3 , keyboard with cf card (crd: drive) or campbell scientific mass-storage media (usb: drive) 4 , power-up with cf card (c...

  • Page 342

    Section 8. Operation 342 table 79. File-control functions file-control functions accessed through 1 datalogger support software (p. 77) program send command 2 datalogger support software file control (p. 454) utility 3 device configuration utility (devconfig) (p. 92) software 4 manual with cf card (...

  • Page 343

    Section 8. Operation 343 table 80. Cr1000 file attributes attribute function attribute for programs sent to cr1000 with: 1 support software program send (p. 454) command. See software help. 2 support software file control (p. 454). See software help & preserving data at program send (p. 110). 3 auto...

  • Page 344

    Section 8. Operation 344 power-up functions include • sending programs to the cr1000. • optionally setting run attributes of cr1000 program files. • sending an os to the cr1000. • formatting memory drives. • deleting data files associated with the previously running program. Note back in the old day...

  • Page 345

    Section 8. Operation 345 syntax syntax for the powerup.Ini file is: command,file,device where, • command = one of the numeric commands in table powerup.Ini commands (p. 345). • file = accompanying operating system or user program file. Name can be up to 22 characters long. • device: the cr1000 memor...

  • Page 346

    Section 8. Operation 346 • command 13 copies the specified program to the designated drive and sets the run attribute of the program to run always. Data on a cf card from the previously running program will be erased. • command 14 copies the specified program to the designated drive and sets the run...

  • Page 347

    Section 8. Operation 347 8.3.4.4 file management q & a q: how do i hide a program file on the cr1000 without using the crbasic filemanage() instruction? A: use the corascript file-control command, or the web api filecontrol command. 8.3.5 file names the maximum size of the file name that can be stor...

  • Page 348

    Section 8. Operation 348 table 82. File system error codes error code description 19 bad function argument supplied 20 seek out-of-file bounds 21 trying to mkdir an existing dir 22 bad partition sector signature 23 unexpected system id byte in partition entry 24 path already open 25 access to uninit...

  • Page 349

    Section 8. Operation 349 hardware are the pc com port, the cr1000 rs-232 port, and a serial cable. The carrier signal is rs-232, and the protocol is pakbus®. Of these three, a user most often must come to terms with only the hardware, since the carrier signal and protocol are transparent in most app...

  • Page 350

    Section 8. Operation 350 digital display direct connect cs i/o serial comms external keyboard / display direct connect serial comms 8.4.2 protocols the cr1000 communicates with datalogger support software (p. 77) and other campbell scientific dataloggers (p. 563) using the pakbus (p. 461) protocol (...

  • Page 351: 8.5 Pakbus Overview

    Section 8. Operation 351 of the query can be seen in the devconfig and pakbusgraph settings tables. Sdc queries occur whether or not an sdc device is attached. 8.5 pakbus overview read more! This section is provided as a primer to pakbus ® communications. More information is available in pakbus netw...

  • Page 352

    Section 8. Operation 352 o 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. O routers can be central routers. Central routers know the entire network. A pc running loggernet is typ...

  • Page 353

    Section 8. Operation 353 table 84. Pakbus leaf-node and router device configuration network device description pakbus leaf node pakbus router pakbus aware transparent network link 1 nl120 peripheral port network link 1 • nl200 serial port network link nl240 wireless network link md485 multidrop • • ...

  • Page 354

    Section 8. Operation 354 discovery occurs when nodes exchange hellos. A hello-exchange occurs during a hello-message between two nodes. 8.5.3.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 respons...

  • Page 355

    Section 8. Operation 355 • if verify interval = 0, then cvi = 2.5 x beacon interval* • if verify interval = 60, then cvi = 60 seconds* • if beacon interval = 0 and verify interval = 0, then cvi = 300 seconds* • if the router or master does not hear from a neighbor for one cvi, it begins again to sen...

  • Page 356

    Section 8. Operation 356 8.5.4.2 ping link integrity can be verified with the following procedure by using pakbusgraph ping node. Nodes can be pinged with packets of 50, 100, 200, or 500 bytes. Note do not use packet sizes greater than 90 when pinging with 100 mw radio modems and radio enabled datal...

  • Page 357

    Section 8. Operation 357 figure 110: tree map 8.5.6 pakbus lan example to demonstrate pakbus ® networking, a small lan (local area network) of cr1000s can be configured as shown in figure configuration and wiring of pakbus lan (p. 358). A pc running loggernet uses the rs-232 port of the first cr1000...

  • Page 358

    Section 8. Operation 358 figure 111: configuration and wiring of pakbus lan 8.5.6.2 lan setup configure cr1000s before connecting them to the lan: 1. Start device configuration utility (devconfig). Click on device type: cr1000. Follow on-screen instructions to power cr1000s and connect them to the p...

  • Page 361

    Section 8. Operation 361 8.5.6.3 loggernet setup figure 115: loggernet network-map setup: com port in loggernet setup, click add root and add a comport. Then add a pakbusport, and (4) cr1000 dataloggers to the device map as shown in figure loggernet device-map setup (p. 361)..

  • Page 362

    Section 8. Operation 362 figure 116: loggernet network-map setup: pakbusport as shown in figure loggernet device map setup: pakbusport (p. 362), set the pakbusport maximum baud rate to 115200. Leave other settings at the defaults. Figure 117: loggernet network-map setup: dataloggers.

  • Page 363

    Section 8. Operation 363 as shown in figure loggernet device-map setup: dataloggers (p. 362), set the pakbus® address for each cr1000 as listed in table pakbus-lan example datalogger-communications settings (p. 360). 8.5.7 pakbus encryption pakbus encryption allows two end devices to exchange encryp...

  • Page 364

    Section 8. Operation 364 note setting the encryption key for a pakbus port device will force all messages it sends to use encryption. 8.6 alternate telecommunications the cr1000 communicates with datalogger support software (p. 77) and other campbell scientific dataloggers (p. 563) using the pakbus ...

  • Page 365

    Section 8. Operation 365 table 87. Dnp3 implementation — data types required to store data in public tables for object groups data type group description boolean 1 binary input 2 binary input change 10 binary output 12 control block long 30 analog input 32 analog change event 40 analog output status...

  • Page 366

    Section 8. Operation 366 syntax dnpupdate (dnpslaveaddr,dnpmasteraddr) 8.6.1.2.3 programming for data-acquisition as shown in crbasic example implementation of dnp3 (p. 366), program the cr1000 to return data when polled by the dnp3 master using the following three actions: 1. Place dnp() at the beg...

  • Page 367

    Section 8. Operation 367 'object group 30, variation 2 is used to return analog data when the cr1000 'is polled. Flag is set to an empty 8 bit number(all zeros), dnpevent is a 'reserved parameter and is currently always set to zero. Number of events is 'only used for event data. Dnpvariable (iarray,...

  • Page 368

    Section 8. Operation 368 8.6.2.2 terminology table modbus to campbell scientific equivalents (p. 368) lists terminology equivalents to aid in understanding how cr1000s fit into a scada system. Table 88. Modbus to campbell scientific equivalents modbus domain data form campbell scientific domain coil...

  • Page 369

    Section 8. Operation 369 rtu / plc remote telemetry units (rtus) and programmable logic controllers (plcs) were at one time used in exclusive applications. As technology increases, however, the distinction between rtus and plcs becomes more blurred. A cr1000 fits both rtu and plc definitions. 8.6.2....

  • Page 370

    Section 8. Operation 370 syntax movebytes(dest, destoffset, source, sourceoffset, numbytes) 8.6.2.3.3 addressing (modbusaddr) modbus devices have a unique address in each network. Addresses range from 1 to 247. Address 0 is reserved for universal broadcasts. When using the nl100, use the same number...

  • Page 371

    Section 8. Operation 371 8.6.2.5 modbus over ip modbus over ip functionality is an option with the cr1000. Contact campbell scientific for details. 8.6.2.6 modbus tidbytes q: can modbus be used over an rs‐232 link, 7 data bits, even parity, one stop bit? A: yes. Precede modbusmaster() / modbusslave(...

  • Page 372

    Section 8. Operation 372 scan (1,sec,0,0) 'in the case of the cr1000 being the modbus master then the 'modbusmaster instruction would be used (instead of fixing 'the variables as shown between the beginprog and scan instructions). Modbusmaster (result,comrs232,-115200,5,3,register(),-1,2,3,100) 'mov...

  • Page 373

    Section 8. Operation 373 four levels of access are available through basic access authentication: • all access denied (level 0) • all access allowed (level 1) • set variables allowed (level 2) • read-only access (level 3) multiple user accounts and security levels can be defined. .Csipasswd is creat...

  • Page 374

    Section 8. Operation 374 and arguments and the commands wherein they are used. Parameters and arguments for specific commands are listed in the following sections. Table 91. Api commands, parameters, and arguments parameter commands in which the parameter is used function of parameter argument(s) ur...

  • Page 375

    Section 8. Operation 375 p2 dataquery specifies ending date and/or time when using date-range argument. Time expressed in defined format (see time syntax (p. 375) section) value setvalueex specifies the new value. Numeric or string time clockset specifies set time. Time in defined format action file...

  • Page 376

    Section 8. Operation 376 table 92. Browsesymbols api command parameters uri optional. Specifies the uri (p. 470) for the data source. When querying a cr1000, uri source , tablename and fieldname are optional. If source is not specified, dl (cr1000) is assumed. A field name is always specified in ass...

  • Page 377

    Section 8. Operation 377 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 expectation that the symbol value can be changed using the setvalueex command. Can_expand boolean value that is set to true if the symbol has child ...

  • Page 378

    Section 8. Operation 378 d> e xml response when xml is entered in the browsesymbols format parameter, the response will be formated as csixml (p. 68) with a browsesymbolsresponse root element name. Following is an example response. Example page source output: .. Name="status" uri="dl:status" type="6...

  • Page 379

    Section 8. Operation 379 is_read_only="false" can_expand="true"/> name="public" uri="dl:public" type="6" is_enabled="true" is_read_only="false" can_expand="true"/> json response when json is entered in the browsesymbols format parameter, the response will be formated as csijson (p. 68). Following is...

  • Page 380

    Section 8. Operation 380 table 94. Dataquery api command parameters uri optional. Specifies the uri (p. 470) for data to be queried. Syntax: dl:tablename.Fieldname . Field name is optional. Field name is always specified in association with a table name. If field name is not specified, all fields ar...

  • Page 381

    Section 8. Operation 381 http://192.168.24.106/?Command=dataquery&uri=dl:maindata.Cond41& format=html&mode=most-recent&p1=70 response: collect the five most recent records from table maindata* http://192.168.24.106/?Command=dataquery&uri=dl:maindata.Cond41& format=html&mode=since-time&p1=2012-09-14t...

  • Page 382

    Section 8. Operation 382 xml response when xml is entered in the dataquery format parameter, the response will be formatted as csixml. Following is an example response. Q2 ballastline cr1000 18583 cr1000.Std.25 cpu:indianaharbor_081712.Cr1 33322 66 66 66 66 66.

  • Page 383

    Section 8. Operation 383 json response when json is entered in the dataquery format parameter, the response will be formatted as csijson. Following is an example response: { .."head": { ...."transaction": 0, ...."signature": 26426, ...."environment": { ......"station_name": "q2", ......"table_name":...

  • Page 384

    Section 8. Operation 384 "2012-05-03 19:00:00",2,0,-0.9210536,-0.9679532,-0.9106316,- 0.8637322,72.297,0 "2012-05-03 20:00:00",3,0,-0.8624293,-0.9145398,-0.8624293,- 0.8311631,72.68445,0 "2012-05-03 21:00:00",4,0,-0.8949984,-0.9471089,-0.9002095,- 0.8585211,72.79237,0 "2012-05-03 22:00:00",5,0,-0.92...

  • Page 385

    Section 8. Operation 385 "seconds","nanoseconds","rn","","" "","","","min","smp" "ulong","ulong","ulong","fp2","fp2" 376 }Ÿp' e1hŒŸp' e1h›Ÿp' e1hªŸp' e1h¹Ÿp' e1h 8.6.3.5 control crbasic program language logic can be configured to allow remote access to many control functions by means of changing the...

  • Page 386

    Section 8. Operation 386 setvalueex response the setvalueex format parameter determines the format of the response.. If a format is not specified, the format defaults to html for more detail concerning data response formats, see the data file formats section. Responses contain two fields. In the xml...

  • Page 387

    Section 8. Operation 387 xml response when xml is entered in the setvalueex format parameter, the response will be csixml with a setvalueexresponse root element name.. Following is an example response: description="description-text"/> json response when json is entered in the setvalueex format param...

  • Page 388

    Section 8. Operation 388 clockset response the clockset format parameter determines the format of the response. If a format is not specified, the format defaults to html. For more detail concerning data response formats, see the data file formats section. Responses contain three fields as described ...

  • Page 389

    Section 8. Operation 389 json response when json is entered in the clockset format parameter, the response will be formated as csijson (p. 68). Following is an example response. {"outcome": 1,"time": "2011-12-01t11:40:32.61","description": " the clock was set"} 8.6.3.6.2 clockcheck command clockchec...

  • Page 390

    Section 8. Operation 390 time specifies the current value of the cr1000 real-time clock 2 . This value will only be valid if the value of outcome is set to 1. This value will be formatted in the same way that record time stamps are formatted for the dataquery response. Description a text string that...

  • Page 391

    Section 8. Operation 391 8.6.3.7 files management web api commands allow a web client to manage files on host cr1000 memory drives. Camera image files are examples of collections often needing frequent management. 8.6.3.7.1 sending a file to a datalogger a file can be sent to the cr1000 using an htt...

  • Page 392

    Section 8. Operation 392 *done waiting for 100-continue * connection #0 to host 192.168.7.126 left intact * closing connection #0 when a file with extension .Obj is uploaded to the cr1000 cpu: drive, the cr1000 sees the file as a new operating system (os) and does not actually upload it to cpu:. Rat...

  • Page 393

    Section 8. Operation 393 table 102. Filecontrol api command parameters action 1 — compile and run the file specified by file and mark it as the program to be run on power up. 2 — mark the file specified by file as the program to be run on power up. 3 — mark the file specified by file as hidden. 4 — ...

  • Page 394

    Section 8. Operation 394 filecontrol response all output formats contain the following parameters. Any action (for example, 9) that performs a reset, the response is returned before the effects of the command are complete. Table 103. Filecontrol api command response outcome a response of zero indica...

  • Page 395

    Section 8. Operation 395 examples: http://192.168.24.106/?Command=listfiles response: returns the drive structure of the host cr1000 (cpu:, usr:, crd:, and usb:). Http://192.168.24.106/cpu/?Command=listfiles response: lists the files on the host cr1000 cpu: drive. Listfiles response the format of th...

  • Page 396

    Section 8. Operation 396 html page source: public "-//w3c//dtd html 4.01 transitional//en" "http://www.W3.Org/tr/html4/loose.Dtd"> public "-//ietf//dtd html//en">.

  • Page 397

    Section 8. Operation 397 page source template: public "-//ietf//dtd html//en"> xml response when xml is entered in the listfiles format parameter, the response will be formated as csixml (p. 68) with a listfilesresponse root element name. Following is an example response. Is_dir="true" path="cpu:" s...

  • Page 398

    Section 8. Operation 398 path="cpu:lights-web.Cr1" last_write="yyyy-mm-ddthh:mm:ss.Xxx" size="16994" run_now="true" run_on_power_up="true" read_only="false" paused="false"/> json response when json is entered in the listfiles format parameter, the response will be formated as csijson (p. 68). Follow...

  • Page 399: 8.7 Support Software

    Section 8. Operation 399 table 106. Newestfile api command parameters expr specifies the complete path and wildcard expression for the desired set of files 1 . Expr=usr:*.Jpg selects the newest of the collection of files on the usr: drive that have a .Jpg extension. 1 the pc based web server will re...

  • Page 400

    Section 8. Operation 400 table 107. Special keyboard-display key functions key special function [2] and [8] navigate up and down through the menu list one line at a time [enter] selects the line or toggles the option of the line the cursor is on [esc] back up one level in the menu [home] move cursor...

  • Page 401

    Section 8. Operation 401 figure 118: using the keyboard / display.

  • Page 402

    Section 8. Operation 402 8.8.1 data display figure 119: displaying data with the keyboard / display.

  • Page 403

    Section 8. Operation 403 8.8.1.1 real-time tables and graphs figure 120: real-time tables and graphs 8.8.1.2 real-time custom the external keyboard / display can be configured with a user-defined, real-time display. The cr1000 will keep the setup if the same program is running, or until it is change...

  • Page 404

    Section 8. Operation 404 figure 121: real-time custom.

  • Page 405

    Section 8. Operation 405 8.8.1.3 final-storage tables figure 122: final-storage tables.

  • Page 406

    Section 8. Operation 406 8.8.2 run/stop program figure 123: run/stop program.

  • Page 407

    Section 8. Operation 407 8.8.3 file display figure 124: file display 8.8.3.1 file: edit the crbasic editor is recommended for writing and editing datalogger programs. When making minor changes in the field with the external keyboard / display, restart the program to activate the changes..

  • Page 408

    Section 8. Operation 408 figure 125: file: edit.

  • Page 409

    Section 8. Operation 409 8.8.4 pccard (cf card) display figure 126: pccard (cf card) display 8.8.5 ports and status read more! See the appendix status table and settings (p. 527)..

  • Page 410

    Section 8. Operation 410 figure 127: ports and status 8.8.6 settings figure 128: settings.

  • Page 411

    Section 8. Operation 411 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 press enter to change it. After mod...

  • Page 412

    Section 8. Operation 412 a: compressing a file has the potential of significantly reducing its size. Actual reduction depends primarily on the number and proximity of redundant blocks of information in the file. A reduction in file size means fewer bytes are transferred when sending a file to a data...

  • Page 413

    Section 8. Operation 413 c) when prompted, set the archive format to “gzip”. D) select ok . The resultant file names will be of the type “myprogram.Cr1.Gz” and “cr1000.Std.25.Obj.Gz”. Note that the file names end with “.Gz”. The ".Gz” extension must be preceded with the original file extension (.Cr1...

  • Page 414

    Section 8. Operation 414 8.10 cf cards & records number the number of records in a data table when cardout() or tablefile() with option 64 is used in a data-table declaration is governed by these rules: 1. Both cf card memory (crd: drive) and internal memory (cpu) keep copies of data tables in binar...

  • Page 415

    Section 8. Operation 415 the cpu buffer before final-data storage stops altogether, resulting in a few more records than advertised able to be collected. For example — on a cr1000 storing a four-byte value at a 10-ms rate, the cpu not fill-and-stop, crd: set to fill-and-stop after 500 records — afte...

  • Page 417: Section 9. Maintenance

    417 section 9. Maintenance temperature and humidity can affect the performance of the cr1000. The internal lithium battery must be replaced periodically. 9.1 moisture protection when humidity tolerances are exceeded and condensation occurs, damage to cr1000 electronics can result. Effective humidity...

  • Page 418

    Section 9. Maintenance 418 o time. Clock will need resetting when the battery is replaced. O final-storage data tables. A replacement lithium battery (pn 13519) can be purchased from campbell scientific or another supplier. Table internal lithium-battery specifications (p. 418) lists battery specifi...

  • Page 419

    Section 9. Maintenance 419 figure 131: pulling edge away from panel pull one edge of the canister away from the wiring panel to loosen it from three connector seatings. Figure 132: removing nuts to disassemble canister.

  • Page 420: 9.3 Repair

    Section 9. Maintenance 420 remove six nuts, then open the clam shell. Figure 133: remove and replace battery remove the lithium battery by gently prying it out with a small flat point screwdriver. Reverse the disassembly procedure to reassemble the cr1000. Take particular care to ensure the canister...

  • Page 421

    Section 9. Maintenance 421 for all returns, the customer must fill out a "statement of product cleanliness and decontamination" form and comply with the requirements specified in it. The form is available from our web site at www.Campbellsci.Com/repair. A completed form must be either emailed to rep...

  • Page 422

    Section 9. Maintenance 422.

  • Page 423: Section 10. Troubleshooting

    423 section 10. Troubleshooting some troubleshooting tools, concepts, and hints are provided here. If a campbell scientific system is not operating properly, please contact a campbell scientific applications engineer for assistance. When using sensors, peripheral devices, or telecommunications hardw...

  • Page 424

    Section 10. Troubleshooting 424 10.3.1.1 compileresults reports messages generated by the cr1000 at program upload and compile-time. A message will report that the program compiled ok, provide warnings about possible problems, or indicate there are run-time errors. Error messages may not be obvious ...

  • Page 425

    Section 10. Troubleshooting 425 table 110. Warning message examples example of warning message meaning warning: machine self-calibration failed. Indicates a problem with the analog measurement hardware during the self calibration. An invalid external sensor signal applying a voltage beyond the inter...

  • Page 426

    Section 10. Troubleshooting 426 incremented by all events that leave gaps in data, including cycling power to the cr1000. 10.3.1.5 progerrors if not zero, investigate. 10.3.1.6 memoryfree a number less than 4 kb is too small and may lead to memory buffer-related errors. 10.3.1.7 varoutofbounds when ...

  • Page 427

    Section 10. Troubleshooting 427 10.3.1.8.2 watchdoginfo.Txt file a cpu: watchdoginfo.Txt file is created on the cpu: drive when the cr1000 experiences a software reset (as opposed to a hardware reset that increment the status-table watchdogerror register). Postings of watchdoginfo.Txt files are rare...

  • Page 428

    Section 10. Troubleshooting 428 the measurement and processing times in the status table (measuretime, processtime, maxproctime) for all scans, then try experimenting with the instructiontimes() instruction in the program. Analyzing instructiontimes() results can be difficult due to the multitasking...

  • Page 429

    Section 10. Troubleshooting 429 10.3.4.2 floating-point math, nan, and ±inf table math expressions and crbasic results (p. 429) lists math expressions, their crbasic form, and ieee floating point-math result loaded into variables declared as float or string. 10.3.4.3 data types, nan, and ±inf nan an...

  • Page 430

    Section 10. Troubleshooting 430 0 / 0 -2,147,483,648 -7999 - 2.147484e09 0 2147483648 -2147483648 true true -2,147,483,648 as boolean 1 / 0 true -1 -1 65535 4294967295 -1 true true -1 0 / 0 true -1 -1 65535 4294967295 -1 true true -1 as string 1 / 0 +inf inf inf 65535 2147483647 +inf true true 21474...

  • Page 431: 10.4 Communications

    Section 10. Troubleshooting 431 crbasic example 69. Using nan to filter data 'declare variables and units public tc_refc public tc_tempc public disvar as boolean 'define data tables datatable (tempc_data,true,-1) datainterval (0,30,sec,10) average (1,tc_tempc,fp2,disvar) 'output process endtable 'ma...

  • Page 432

    Section 10. Troubleshooting 432 10.4.2 communicating with multiple pcs the cr1000 can communicate with multiple pcs simultaneously. For example, the cr1000 may be a node of an internet pakbus network communicating with a distant instance of loggernet. An onsite technician can communicate with the cr...

  • Page 433

    Section 10. Troubleshooting 433 mid = (commsmemfree(1) / 10000) % 100 med = (commsmemfree(1) / 1000000) % 100 lrg = (commsmemfree(1) / 100000000) % 100 table 113. Commsmemfree(1) defaults and use example, tls not active example buffer catagory condition: reset, tls not active. Buffer count: commsmem...

  • Page 434

    Section 10. Troubleshooting 434 commsmemfree(2) number will be. A pakbusnodes setting of 50 is normally enough, and can probably be reduced in small networks to free memory, if needed. Reducing pakbusnodes by one frees 224 bytes. If commsmemfree(2) drops and stays down for no apparent reason (a very...

  • Page 435: 10.5 Power Supplies

    Section 10. Troubleshooting 435 10.5 power supplies 10.5.1 overview power-supply systems may include batteries, charging regulators, and a primary power source such as solar panels or ac/ac or ac/dc transformers attached to mains power. All components may need to be checked if the power supply is no...

  • Page 436

    Section 10. Troubleshooting 436 10.5.3 diagnosis and fix procedures 10.5.3.1 battery test the procedure outlined in this flow chart tests sealed-rechargeable or alkaline batteries in the ps100 charging regulator, or a sealed-rechargeable battery attached to a ch100 charging regulator. If a need for ...

  • Page 437

    Section 10. Troubleshooting 437 battery test if using a rechargeable power supply, disconnect the charging source (i.E., solar panel or ac transformer) from the battery pack. Wait 20 minutes before proceeding with this test. Test voltage at charging regulator set a voltmeter to read dc voltage as hi...

  • Page 438

    Section 10. Troubleshooting 438 charging regulator with solar-panel test disconnect any wires attached to the 12v and g (ground) terminals on the ps100 or ch100 charging regulator. Unplug any batteries. Connect the solar panel to the two chg terminals. Polarity of inputs does not matter. Only the so...

  • Page 439

    Section 10. Troubleshooting 439 10.5.3.3 charging regulator with transformer test the procedure outlined in this flow chart tests ps100 and ch100 charging regulators that use ac/ac or ac/dc transformers as power source. If a need for repair is indicated after following the procedure, see warranty an...

  • Page 440

    Section 10. Troubleshooting 440 charging regulator with ac or dc transformer test disconnect any wires attached to the 12v and g (ground) terminals on the ps100 or ch100 charging regulator. Unplug any batteries. Connect the power input ac or dc transformer to the two chg terminals. Polarity of the i...

  • Page 441

    Section 10. Troubleshooting 441 no adjusting charging circuit 1) place a 5-kΩ resistor between a 12v terminal and a g (ground) ground terminal on the charging regulator. Use a voltmeter to measure the voltage across the 5-kΩ resistor. 2) connect a power source that supplies a voltage >17 v to the in...

  • Page 442: 10.6 Terminal Emulator

    Section 10. Troubleshooting 442 figure 134: potentiometer r3 on ps100 and ch100 charger / regulator 10.6 terminal emulator cr1000 terminal mode includes command prompts designed to aid campbell scientific engineers in operating system development. It has some features that advanced users may find us...

  • Page 443

    Section 10. Troubleshooting 443 as shown in figure devconfig terminal emulator (p. 445), after entering a terminal emulator, press enter a few times until the prompt cr1000> is returned. Terminal commands consist of a single character and enter. Sending an h and enter will return the terminal emulat...

  • Page 444

    Section 10. Troubleshooting 444 table 115. Cr1000 terminal commands option description use reboot program recompile typing “reboot” rapidly will recompile the cr1000 program immediately after the last letter, "t", is entered. Table memory is retained. Note when typing reboot, characters are not echo...

  • Page 445

    Section 10. Troubleshooting 445 figure 135: devconfig terminal emulator tab 10.6.1 serial talk through and sniffer in the p: serial talk through and w: serial comms sniffer modes, the timeout can be changed from the default of 40 seconds to any value ranging from 1 to 86400 seconds (86400 seconds = ...

  • Page 446

    Section 10. Troubleshooting 446.

  • Page 447: Section 11. Glossary

    447 section 11. Glossary 11.1 terms ac see vac (p. 470). Accuracy a measure of the correctness of a measurement. See also the appendix accuracy, precision, and resolution (p. 471). A/d analog‐to‐digital conversion. The process that translates analog voltage levels to digital values. Amperes (amps) b...

  • Page 448

    Section 11. Glossary 448 asynchronous accepted abbreviation for "gauge." awg is the accepted unit when identifying wire diameters. Larger awg values indicate smaller cross‐ sectional diameter wires. Smaller awg values indicate large‐diameter wires. For example, a 14 awg wire is often used for ground...

  • Page 449

    Section 11. Glossary 449 cache data the data cache is a set of binary files kept on the hard disk of the computer running the datalogger support software. A binary file is created for each table in each datalogger. These files are set up to mimic the storage areas in datalogger memory, and by defaul...

  • Page 450

    Section 11. Glossary 450 com port com is a generic name given to physical and virtual serial communications ports. Compactflash compactflash ® (cf) is a memory‐card technology utilized by campbell scientific card‐storage modules. Compactflash ® is a registered trademark of the compactflash ® associa...

  • Page 451

    Section 11. Glossary 451 cr10x older generation campbell scientific datalogger replaced by the cr1000. Cr carriage return crbasic editor compile, save and send crbasic editor menu command that compiles, saves, and sends the program to the datalogger. Crd an optional memory drive that resides on a cf...

  • Page 452

    Section 11. Glossary 452 data point a data value which is sent to final storage (p. 454) 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 (p. 470). Dce data communications equipment. While th...

  • Page 453

    Section 11. Glossary 453 dimension to code for a variable array. Dim example(3) creates the three variables example(1), example(2), and example(3). Dim example(3,3) creates nine variables. Dim example (3,3,3) creates 27 variables. Dns domain name system. A tcp/ip application protocol. Dte data termi...

  • Page 454

    Section 11. Glossary 454 ess environmental sensor station excitation application of a precise voltage, usually to a resistive bridge circuit. Execution time time required to execute an instruction or group of instructions. If the execution time of a program exceeds the scan() interval , the program ...

  • Page 455

    Section 11. Glossary 455 float four‐byte floating‐point data type. Default cr1000 data type for public or dim variables. Same format as ieee4. Ieee4 is the name used when declaring data type for stored data table data. Fp2 two‐byte floating‐point data type. Default cr1000 data type for stored data. ...

  • Page 456

    Section 11. Glossary 456 line, the clk/hs (pin 7) line in the datalogger cs i/o port is primarily used to detect the presence or absence of peripherals. Hello exchange the process of verifying a node as a neighbor. Hertz abbreviated "hz." unit of frequency described as cycles or pulses per second. H...

  • Page 457

    Section 11. Glossary 457 integer a number written without a fractional or decimal component. 15 and 7956 are integers; 1.5 and 79.56 are not. Intermediate storage the portion of memory allocated for the storage of results of intermediate calculations necessary for operations such as averages or stan...

  • Page 458

    Section 11. Glossary 458 long data type used when declaring integers. Loop a series of instructions in a program that are repeated a prescribed number of times and followed by an "end" instruction which exits the program from the loop. Loop counter increments by one with each pass through a loop. Ma...

  • Page 459

    Section 11. Glossary 459 msb most significant bit (the leading bit). Multi‐meter an inexpensive and readily available device useful in troubleshooting data‐acquisition system faults. Multipler a term, often a parameter in a crbasic measurement instruction, to designate the slope, scaling factor, or ...

  • Page 460

    Section 11. Glossary 460 null‐modem a device, usually a multi‐conductor cable, which converts an rs‐232 port from dce to dte or from dte to dce. Offset a term, often a parameter in a crbasic measurement instruction, to designate the y‐intercept, shifting factor, or zeroing factor in a linear functio...

  • Page 461

    Section 11. Glossary 461 output interval the time interval between initiations of a particular data‐table record. Output processing instructions process data values and generate output arrays. Examples of output processing instructions include totalize(), maximize(), minimize(), average(). The data ...

  • Page 462

    Section 11. Glossary 462 peripheral any device designed for use with, and requiring, the cr1000 (or another campbell scientific datalogger) to operate. Ping a software utility that attempts to contact another specific device in a network. Poisson ratio a ratio used in strain measurements equal to tr...

  • Page 463

    Section 11. Glossary 463 public a crbasic command for declaring and dimensioning variables. Variables declared with public can be monitored during datalogger operation. Pulse an electrical signal characterized by a sudden increase in voltage follow by a short plateau and a sudden voltage decrease. R...

  • Page 464

    Section 11. Glossary 464 rms root‐mean square, or quadratic mean. A measure of the magnitude of wave or other varying quantities around zero. Rs‐232 recommended standard 232. A loose standard defining how two computing devices can communicate with each other. The implementation of rs‐232 in campbell...

  • Page 465

    Section 11. Glossary 465 seebeck effect induces micro‐volt level thermal electromotive forces (emf) across junctions of dissimilar metals in the presence of temperature gradients. This is the principle behind thermocouple temperature measurement. It also causes small, correctable voltage offsets in ...

  • Page 466

    Section 11. Glossary 466 single‐ended denotes a sensor or measurement terminal wherein the analog voltage signal is carried on a single lead, which is measured with respect to ground. Skipped scans occurs when the cr1000 program is too long for the scan interval. Skipped scans can cause errors in pu...

  • Page 467

    Section 11. Glossary 467 station status command a command available in most datalogger support software available from campbell scientific. The following figure is a sample of the station status output. String a datum consisting of alphanumeric characters..

  • Page 468

    Section 11. Glossary 468 support software includes pc200w, pc400, rtdaq, loggernet, and loggernet clients. Brief descriptions are found in datalogger support software (p. 77). A complete listing of datalogger support software available from campbell scientific can be found in the appendix software (...

  • Page 469

    Section 11. Glossary 469 terminal emulator is available in most datalogger support software available from campbell scientific. Thermistor a thermistor is a resistive element whose change in resistance with temperature is wide, stable, and well‐characterized. It can be used as a device to measure te...

  • Page 470

    Section 11. Glossary 470 user program the crbasic program written by the cr1000 user in the crbasic editor or the short cut program generator. Usr: a portion of cr1000 memory dedicated to the storage of image or other files. Uri uniform resource identifier url uniform resource locater variable a pac...

  • Page 471: 11.2 Concepts

    Section 11. Glossary 471 watchdog timer an error‐checking system that examines the processor state, software timers, and program‐related counters when the datalogger is running its program. If the processor has bombed or is neglecting standard system updates or if the counters are outside the limits...

  • Page 472

    Section 11. Glossary 472 group of measurements. Resolution is a measure of the fineness of a measurement. Together, the three define how well a data-acquisition system performs. To understand how the three relate to each other, consider "target practice" as an analogy. Figure accuracy, precision, an...

  • Page 473: Instructions

    473 appendix a. Crbasic programming instructions read more! Parameter listings, application information, and code examples are available in crbasic editor (p. 109) help. All cr1000 crbasic instructions are listed in the following sub-sections. Select instructions are explained more fully, some with ...

  • Page 474

    Appendix a. Crbasic programming instructions 474 syntax sub subname (argument list) [statement block] exit sub [statement block] end sub webpagebegin / webpageend see information services (p. 166). A.1.1 variable declarations & modifiers alias assigns a second name to a variable. Syntax alias [varia...

  • Page 475: A.2 Data-Table Declarations

    Appendix a. Crbasic programming instructions 475 readonly flags a comma separated list of variables (public or alias name) as read‐only. Syntax readonly [variable1, variable2, ...] units assigns a unit name to a field associated with a variable. Syntax units [variable] = [unit name] a.1.2 constant d...

  • Page 476

    Appendix a. Crbasic programming instructions 476 datainterval sets the time interval for an output table. Syntax datainterval(tintoint, interval, units, lapses) fillstop sets a data table to fill and stop. Syntax fillstop note to reset a table after it fills and stops, use resettable() instruction i...

  • Page 477

    Appendix a. Crbasic programming instructions 477 tablefile writes a file from a data table to a cr1000 memory drive. Syntax tablefile("filename", options, maxfiles, numrecs / timeintointerval, interval, units, outstat, lastfilename) a.2.3 final data storage (output) processing read more! See data ou...

  • Page 478

    Appendix a. Crbasic programming instructions 478 moment stores the mathematical moment of a value over the output interval. Syntax moment(reps, source, order, datatype, disablevar) peakvalley detects maxima and minima in a signal. Syntax peakvalley(destpv, destchange, reps, source, hysteresis) sampl...

  • Page 479

    Appendix a. Crbasic programming instructions 479 windvector processes wind speed and direction from either polar or orthogonal sensors. To save processing time, only calculations resulting in the requested data are performed. Syntax windvector(repetitions, speed/east, direction/north, datatype, disa...

  • Page 480

    Appendix a. Crbasic programming instructions 480 calltable calls a data table, typically for output processing. Syntax calltable [tablename] delay delays the program. Syntax delay(option, delay, units) do / loop repeats a block of statements while a condition is true or until a condition becomes tru...

  • Page 481

    Appendix a. Crbasic programming instructions 481 -or- if [condition 1] then [then statements] elseif [condition 2] then [elseif then statements] else [else statements] endif scan / exitscan / continuescan / nextscan establishes the program scan rate. Exitscan and continuescan are optional. See faste...

  • Page 482

    Appendix a. Crbasic programming instructions 482 triggersequence used with waittriggersequence to control the execution of code within a slow sequence. Syntax triggersequence(sequencenum, timeout) waittriggersequence used with triggersequence to control the execution of code within a slow sequence. ...

  • Page 483

    Appendix a. Crbasic programming instructions 483 semaphoreget acquires semaphore (p. 465) 1‐3 to avoid resource conflicts. Syntax semaphoreget() semaphorerelease releases semaphore (p. 465) previously acquired with semaphoreget (). Syntax semaphorerelease() shutdownbegin begins code to be run in the...

  • Page 484

    Appendix a. Crbasic programming instructions 484 paneltemp this instruction measures the panel temperature in °c. Syntax paneltemp(dest, integ) signature returns the signature for program code in a datalogger program. Syntax variable = signature a.5.2 voltage voltdiff measures the voltage difference...

  • Page 485

    Appendix a. Crbasic programming instructions 485 brfull6w measures ratio of v diff2 / v diff1 of a six‐wire full‐bridge. Reports 1000 * (v diff2 / v diff1 ). Syntax brfull6w(dest, reps, range1, range2, diffchan, vx/exchan, measpex, exmv, revex, revdiff, settlingtime, integ, mult, offset) brhalf meas...

  • Page 486

    Appendix a. Crbasic programming instructions 486 pulsecount measures number 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 fre...

  • Page 487

    Appendix a. Crbasic programming instructions 487 a.5.7.2 measurement pwm performs a pulse‐width modulation on a control i/o port. Syntax pwm(source,port,period,units) timerio measures interval or frequency on a digital i/o port. Syntax timerio(dest, edges, function, timeout, units) a.5.8 sdi-12 read...

  • Page 488

    Appendix a. Crbasic programming instructions 488 cs110shutter controls the shutter of a cs110 electric‐field meter. Syntax cs110shutter(status, move) cs616 enables and measures a cs616 water content reflectometer. Syntax cs616(dest, reps, sechan, port, measperport, mult, offset) cs7500 communicates ...

  • Page 489

    Appendix a. Crbasic programming instructions 489 li7700 communicates with the li7700 open path co 2 and h 2 o sensor. Syntax li7200(dest, reps, sdmaddress, command) tga measures a tga100a trace‐gas analyzer system. Syntax tga(dest, sdmaddress, datalist, scanmode) therm107 measures a campbell scienti...

  • Page 490

    Appendix a. Crbasic programming instructions 490 cwb100rssi polls wireless sensors in a wireless‐sensor network for radio signal strength. Syntax cwb100rssi(cwbport) a.5.10 peripheral device support multiple sdm instructions can be used within a program. Am25t controls the am25t multiplexer. Syntax ...

  • Page 491

    Appendix a. Crbasic programming instructions 491 muxselect selects the specified channel on a multiplexer. Syntax muxselect(clkport, resport, clkpulsewidth, muxchan, mode) sdmao4 sets output voltage levels in an sdm‐ao4 analog output device. Syntax sdmao4(source, reps, sdmadress) sdmao4a sets output...

  • Page 492

    Appendix a. Crbasic programming instructions 492 sdmio16 sets up and measures an sdm‐io16 control‐port expansion device. Syntax sdmio16(dest, status, address, command, mode ports 16-13, mode ports 12-9, mode ports 8-5, mode ports 4-1, mult, offset) sdmsio4 controls and transmits / receives data from...

  • Page 493

    Appendix a. Crbasic programming instructions 493 a.6 processing and math instructions a.6.1 mathematical operators note program declaration angledegrees() (see program declarations (p. 473) ) sets math functions to use degrees instead of radians. A.6.2 arithmetic operators table 116. Arithmetic oper...

  • Page 494

    Appendix a. Crbasic programming instructions 494 the result of these operators is the value of the left hand operand with all of its bits moved by the specified number of positions. The resulting "holes" are filled with zeroes. Consider a sensor or protocol that produces an integer value that is a c...

  • Page 495

    Appendix a. Crbasic programming instructions 495 crbasic example 70. Using bit‐shift operators dim input_val as long dim value_1 as long dim value_2 as long dim value_3 as long 'read input_val somehow value_1 = (input_val and &b11000000) >> 6 value_2 = (input_val and &b00110000) >> 4 'note that valu...

  • Page 496

    Appendix a. Crbasic programming instructions 496 a.6.6 trigonometric functions a.6.6.1 derived functions table derived trigonometric functions (p. 496) is a list of trigonometric functions that can be derived from functions intrinsic to crbasic. Table 118. Derived trigonometric functions function cr...

  • Page 497

    Appendix a. Crbasic programming instructions 497 cos returns the cosine of an angle specified in radians. Syntax x = cos(source) cosh returns the hyperbolic cosine of an expression or value. Syntax x = cosh(source) sin returns the sine of an angle. Syntax x = sin(source) sinh returns the hyperbolic ...

  • Page 498

    Appendix a. Crbasic programming instructions 498 floor rounds a value to a lower integer. Syntax variable = floor(number) frac returns the fractional part of a number. Syntax x = frac(source) int or fix return the integer portion of a number. Syntax x = int(source) x = fix(source) intdv performs an ...

  • Page 499

    Appendix a. Crbasic programming instructions 499 round rounds a value to a higher or lower number. Syntax variable = round (number, decimal) sgn finds the sign value of a number. Syntax x = sgn(source) sqr returns the square root of a number. Syntax x = sqr(number) a.6.8 integrated processing dewpoi...

  • Page 500

    Appendix a. Crbasic programming instructions 500 vaporpressure calculates vapor pressure from temperature and relative humidity. Syntax vaporpressure(dest, temp, rh) wetdrybulb calculates vapor pressure (kpa) from wet‐ and dry‐bulb temperatures and barometric pressure. Syntax wetdrybulb(dest, drytem...

  • Page 501

    Appendix a. Crbasic programming instructions 501 a.6.10 other functions addprecise used in conjunction with moveprecise, allows high‐precision totalizing of variables or manipulation of high‐precision variables. Syntax addprecise(precisionvariable, x) avgrun stores a running average of a measurement...

  • Page 502: A.7 String Functions

    Appendix a. Crbasic programming instructions 502 levelcrossing processes data into a one‐ or two‐dimensional histogram using a level‐crossing counting algorithm. Syntax levelcrossing(source, datatype, disablevar, numlevels, 2nddim, crossingarray, 2ndarray, hysteresis, option) rainflow processes data...

  • Page 503

    Appendix a. Crbasic programming instructions 503 string output processing the sample() instruction will convert data types if the source data type is different than the sample() data type. Strings are disallowed in all output processing instructions except sample(). A.7.2 string commands arraylength...

  • Page 504

    Appendix a. Crbasic programming instructions 504 hextodec converts a hexadecimal string to a float or integer. Syntax variable = hextodec(expression) instr finds the location of a string within a string. Syntax variable = instr(start, searchstring, filterstring, searchoption) ltrim returns a copy of...

  • Page 505: A.8 Clock Functions

    Appendix a. Crbasic programming instructions 505 strcomp compares two strings by subtracting the characters in one string from the characters in another syntax variable = strcomp(string1, string2) splitstr splits out one or more strings or numeric variables from an existing string. Syntax splitstr(s...

  • Page 506

    Appendix a. Crbasic programming instructions 506 date returns a formatted date/time string of type long derived from seconds since 1990. Syntax date(secssince1990, option) daylightsaving defines daylight saving time. Determines if daylight saving time has begun or ended. Optionally advances or turns...

  • Page 507

    Appendix a. Crbasic programming instructions 507 timer returns the value of a timer. Syntax variable = timer(timno, units, timopt) a.9 voice-modem instructions note refer to the campbell scientific voice-modem manuals for complete information. Dialvoice defines the dialing string for a com310 voice ...

  • Page 508

    Appendix a. Crbasic programming instructions 508 voicespeak defines the voice string that should be spoken by the voice modem. Syntax voicespeak("string" + variable + "string"…, precision) a.10 custom keyboard and display menus read more! More information concerning use of the keyboard is found in s...

  • Page 509: A.11 Serial Input / Output

    Appendix a. Crbasic programming instructions 509 menupick creates a list of selectable options that can be used when editing a menuitem value. Syntax: menupick(item1, item2, item3...) displayvalue defines the name and associated data‐table value or variable for an item in a custom menu. Syntax: disp...

  • Page 510

    Appendix a. Crbasic programming instructions 510 serialinblock stores incoming serial data. This function returns the number of bytes received. Syntax serialinblock(comport, dest, maxnumberbytes) serialinchk returns the number of characters available in the datalogger serial buffer. Syntax serialinc...

  • Page 511

    Appendix a. Crbasic programming instructions 511 • com310 • comsdc7 • comsdc8 • comsdc10 • comsdc11 • com1 (c1,c2) • com2 (c3,c4) • com3 (c5,c6) • com4 (c7,c8) • com32 – com46 (available when using a single-channel expansion peripheral. See the appendix serial input expansion modules ) baud rate on ...

  • Page 512

    Appendix a. Crbasic programming instructions 512 clockreport sends the datalogger clock value to a remote datalogger in the pakbus network. Syntax clockreport(comport, routeraddr, pakbusaddr) datagram initializes a serialserver / datagram / pakbus application in the datalogger when a program is comp...

  • Page 513

    Appendix a. Crbasic programming instructions 513 route returns the neighbor address of (or the route to) a pakbus datalogger. Syntax variable = route(pakbusaddr) routersneighbors returns a list of all pakbus routers and their neighbors known to the datalogger. Syntax routersneighbors( destarray(maxr...

  • Page 514: A.13 Variable Management

    Appendix a. Crbasic programming instructions 514 timeuntiltransmit the timeuntiltransmit instruction returns the time remaining, in seconds, before communication with the host datalogger. Syntax timeuntiltransmit table 119. Asynchronous-port baud rates -nnnn (autobaud 1 starting at nnnn) 0 (autobaud...

  • Page 515: A.14 File Management

    Appendix a. Crbasic programming instructions 515 findspa searches a source array for a value and returns the value's position in the array. Syntax findspa(soughtlow, soughthigh, step, source) move moves the values in a range of variables into different variables or fills a range of variables with a ...

  • Page 516

    Appendix a. Crbasic programming instructions 516 filemanage manages program files from within a running datalogger program. Syntax filemanage("device: filename", attribute) fileopen opens an ascii text file or a binary file for writing or reading. Syntax filehandle = fileopen("filename", "mode", see...

  • Page 517

    Appendix a. Crbasic programming instructions 517 newfile determines if a file stored on the datalogger has been updated since the instruction was last run. Typically used with image files. Syntax newfile(newfilevar, "filename") runprogram runs a datalogger program file from the active program file. ...

  • Page 518: A.16 Information Services

    Appendix a. Crbasic programming instructions 518 tablename.Output determine if data was written to a specific data table the last time the data table was called. Syntax tablename.Output(1,1) tablename.Record determines the record number of a specific data table record. Syntax tablename.Record(1,n) t...

  • Page 519

    Appendix a. Crbasic programming instructions 519 emailrecv polls an smtp server for email messages and stores the message portion of the email in a string variable. Syntax variable = emailrecv("serveraddr", "toaddr", "fromaddr", "subject", message, "authen", "username", "password", result) emailsend...

  • Page 520

    Appendix a. Crbasic programming instructions 520 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(...

  • Page 521: A.17 Modem Control

    Appendix a. Crbasic programming instructions 521 udpopen opens a port for transferring udp packets. Syntax udpopen(ipaddr, udpport, udpbuffsize) webpagebegin / webpageend declares a web page that is displayed when a request for the defined html page comes from an external source. Syntax webpagebegin...

  • Page 522: A.19 Calibration Functions

    Appendix a. Crbasic programming instructions 522 dnp sets up a cr1000 as a dnp slave (outstation/server) device. Third parameter is optional. Syntax dnp(comport, baudrate, disablelinkverify) dnpupdate determines when the dnp slave will update arrays of dnp elements. Specifies the address of the dnp ...

  • Page 523: A.20 Satellite Systems

    Appendix a. Crbasic programming instructions 523 loadfieldcal loads values from the fieldcal file into variables in the datalogger. Syntax loadfieldcal(checksig) newfieldcal triggers storage of fieldcal values when a new fieldcal file has been written. Syntax datatable (tablename, newfieldcal, size)...

  • Page 524

    Appendix a. Crbasic programming instructions 524 argostransmit initiates a single transmission to an argos satellite when the instruction is executed. Syntax argostransmit(resultcode, st20buffer) a.20.2 goes goesdata sends data to a campbell scientific goes satellite data transmitter. Syntax goesdat...

  • Page 525: A.21 User Defined Functions

    Appendix a. Crbasic programming instructions 525 omnisatstsetup sets up the omnisat transmitter to send data over the goes or meteosat satellite at a self‐timed transmission rate. Syntax omnisatstsetup(resultcodest, resultcodetx, omniplatformid, omnimsgwindow, omnichannel, omnibaud, stinterval, stof...

  • Page 526

    Appendix a. Crbasic programming instructions 526.

  • Page 527

    527 appendix b. Status table and settings the cr1000 status table contains system operating-status information accessible via the external keyboard / display (p. 567), devconfig (p. 92), or datalogger support software (p. 77). Table common uses of the status table (p. 527) lists some of the more com...

  • Page 528

    Appendix b. Status table and settings 528 table 120. Common uses of the status table feature or suspect constituent status field(s) to consult rs-232handshaking rs-232timeout commactive commconfig baudrate pakbus isrouter pakbusnodes (p. 433) (see commsmemfree(2) (p. 433) ) centralrouters beacon ver...

  • Page 529

    Appendix b. Status table and settings 529 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type revboard xxx.Yyy xxx = hardware revision number; yyy = clock chip software revision; stored in flash memory. Integer status stationname1 sets a ...

  • Page 530

    Appendix b. Status table and settings 530 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type low12vcount5 number of times system voltage dropped below 9.6 between resets. When this condition is detected, the cr1000 ceases measurements an...

  • Page 531

    Appendix b. Status table and settings 531 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type memoryfree bytes of unallocated memory on the cpu (sram). All free memory may not be available for data tables. As memory is allocated and freed...

  • Page 532

    Appendix b. Status table and settings 532 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type fullmemreset a value of 98765 written to this location will initiate a full memory reset. Full memory reset will reinitialize ram disk, final st...

  • Page 533

    Appendix b. Status table and settings 533 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type measuretime time (μs) required to make the measurements in this scan, including integration and settling times. Processing occurs concurrent wit...

  • Page 534

    Appendix b. Status table and settings 534 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type maxslowproctime9,13 the maximum time (μs) required to process slowsequence scan(s). Integer array status portstatus array of boolean values post...

  • Page 535

    Appendix b. Status table and settings 535 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type commactive 15 array of boolean values telling if communications are currently active on the corresponding port. Commactivers-232 commactiveme co...

  • Page 536

    Appendix b. Status table and settings 536 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type centralrouters 18 array of (8) pakbus addresses for central routers. Integer array of 8 0 yes config pb beacon array of beacon intervals (in sec...

  • Page 537

    Appendix b. Status table and settings 537 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type tcpport specifies the port used for ethernet socket communications. Long 6785 0 - 65535 yes pppinterface controls which datalogger port ppp serv...

  • Page 538

    Appendix b. Status table and settings 538 table 121. Status-table fields and descriptions fieldname description variable type default range edit? Info type calseoffset 19 calibration table of single- ended offset values. Each integration / range combination has a single- ended offset associated with...

  • Page 539

    Appendix b. Status table and settings 539 13 displays 0 until a slowsequence scan runs. 14 security can be changed via deviceconfig, external keyboard / display, pakbusgraph, status table, and setsecurity() instruction. Shows -1 if the security code has not been given, or if it has been deactivated....

  • Page 540

    Appendix b. Status table and settings 540 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 541

    Appendix b. Status table and settings 541 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 542

    Appendix b. Status table and settings 542 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 543

    Appendix b. Status table and settings 543 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 544

    Appendix b. Status table and settings 544 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 545

    Appendix b. Status table and settings 545 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 546

    Appendix b. Status table and settings 546 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 547

    Appendix b. Status table and settings 547 table 122. Cr1000 settings settings are accessed through the campbell scientific device configuration utility (devconfig) via direct-serial and ip connections, or through pakbusgraph via most cr1000 supported telecommunications options. Setting description d...

  • Page 548

    Appendix b. Status table and settings 548.

  • Page 549

    549 appendix c. Serial port pinouts c.1 cs i/o communications port pin configuration for the cr1000 cs i/o port is listed in table cs i/o pin description (p. 549). Table 123. Cs i/o pin description abr: abbreviation for the function name. Pin: pin number. O: signal out of the cr1000 to a peripheral....

  • Page 550

    Appendix c. Serial port pinouts 550 as a connection to a computer dte device. A standard db9-to-db9 cable can connect the computer dte device to the cr1000 dce device. The following table describes rs-232 pin function with standard dce-naming notation. Note pins 1, 4, 6, and 9 function differently t...

  • Page 551

    Appendix c. Serial port pinouts 551 table 125. Standard null-modem cable or adapter-pin connections* db9 db9 pin 1 & 6 ---------- pin 4 pin 2 ---------- pin 3 pin 3 ---------- pin 2 pin 4 ---------- pin 1 & pin 6 pin 5 ---------- pin 5 pin 7 ---------- pin 8 pin 8 ---------- pin 7 pin 9 xxxxx pin 9 ...

  • Page 552

    Appendix c. Serial port pinouts 552.

  • Page 553

    553 appendix d. Ascii / ansi table american standard code for information interchange (ascii) / american national standards institute (ansi) decimal and hexadecimal codes and characters used with cr1000 tools dec hex keyboard display char loggernet char hyper- terminal char dec hex keyboard display ...

  • Page 554

    Appendix d. Ascii / ansi table 554 dec hex keyboard display char loggernet char hyper- terminal char dec hex keyboard display char loggernet char hyper- terminal char 30 1e ▲ 158 9e ž pt 31 1f ▼ 159 9f Ÿ ƒ 32 20 sp sp 160 a0 á 33 21 ! ! ! 161 a1 ¡ í 34 22 " " " 162 a2 ¢ ó 35 23 # # # 163 a3 £ ú 36 2...

  • Page 555

    Appendix d. Ascii / ansi table 555 dec hex keyboard display char loggernet char hyper- terminal char dec hex keyboard display char loggernet char hyper- terminal char 65 41 a a a 193 c1 Á ┴ 66 42 b b b 194 c2 ┬ 67 43 c c c 195 c3 Ã ├ 68 44 d d d 196 c4 Ä ─ 69 45 e e e 197 c5 Å ┼ 70 46 f f f 198 c6 Æ...

  • Page 556

    Appendix d. Ascii / ansi table 556 dec hex keyboard display char loggernet char hyper- terminal char dec hex keyboard display char loggernet char hyper- terminal char 100 64 d d d 228 e4 ä Σ 101 65 e e e 229 e5 å σ 102 66 f f f 230 e6 æ µ 103 67 g g g 231 e7 ç τ 104 68 h h h 232 e8 è Φ 105 69 i i i ...

  • Page 557: Appendix E. Fp2 Data Format

    557 appendix e. Fp2 data format fp2 data are two-byte big-endian values. Representing bits in each byte pair as abcdefgh ijklmnop, bits are described in table fp2 data-format bit descriptions (p. 557). Table 126. Fp2 data-format bit descriptions bit description a polarity, 0 = +, 1 = – b, c decimal ...

  • Page 558

    Appendix e. Fp2 data format 558.

  • Page 559: Products

    559 appendix f. Other campbell scientific products campbell scientific products expand the measurement and control capability of the cr1000. Consult product literature at www.Campbellsci.Com or a campbell scientific applications engineer to determine what products are most suited to particular appli...

  • Page 560: F.2 Sensor Input Modules

    Appendix f. Other campbell scientific products 560 f.1.2 wireless sensor network wireless sensors use the campbell wireless sensor (cws) spread-spectrum radio technology. The following wireless sensor devices are available. Table 129. Wireless sensor modules model description cwb100 series radio-bas...

  • Page 561

    Appendix f. Other campbell scientific products 561 f.2.2 pulse / frequency input expansion modules these modules expand and enhance pulse- and frequency-input capacity. Table 132. Pulse / frequency input-expansion modules model description sdm-int8 eight-channel interval timer sdm-sw8a eight-channel...

  • Page 562: F.3 Cameras

    Appendix f. Other campbell scientific products 562 4whb10k 10-kΩ, four-wire, half-bridge tim module 4wpb100 100-Ω, four-wire, prt-bridge tim module 4wpb1k 1-kΩ, four-wire, prt-bridge tim module f.2.5.2 voltage dividers table 136. Voltage dividers model description vdiv10:1 10:1 voltage divider vdiv2...

  • Page 563: F.4 Control Output Modules

    Appendix f. Other campbell scientific products 563 f.4 control output modules f.4.1 digital i/o (control port) expansion digital i/o expansion modules expand the number of channels for reading or outputting or 5-vdc logic signals. Table 140. Digital i/o expansion modules model description sdm-io16 1...

  • Page 564: F.6 Power Supplies

    Appendix f. Other campbell scientific products 564 via pakbus®, modbus, dnp3, rs-232, sdi-12, or canbus using the sdm-can module. Table 143. Measurement and control devices model description cr200x series five-analog, two-pulse, two-control channels cr800 six-analog, two-pulse, four-control channels...

  • Page 565

    Appendix f. Other campbell scientific products 565 f.6.2 batteries table 145. Batteries model description bpalk d-cell, 12-vdc alkaline battery pack bp12 12-ahr, sealed-rechargeable battery (requires regulator & primary source). Includes mounting bracket for campbell scientific enclosures. Bp24 24-a...

  • Page 566: F.7 Enclosures

    Appendix f. Other campbell scientific products 566 f.6.5 primary power sources table 148. Primary power sources model description 9591 18-vac, 1.2-a wall-plug charger (accepts 110-vac mains power, requires regulator) 14014 18-vdc wall-plug charger (accepts 90- to 264-vac mains power, requires regula...

  • Page 567

    Appendix f. Other campbell scientific products 567 f.8 telecommunications products many telecommunications devices are available for use with the cr1000 datalogger. F.8.1 keyboard display table 151. Keyboard displays keyboard displays are either integrated into the datalogger or communicate through ...

  • Page 568: F.9 Data Storage Devices

    Appendix f. Other campbell scientific products 568 f.8.4 telephone m table 154. Telephone modems model description com220 9600 baud com320 9600 baud, synthesized voice ravenx series cellular network link f.8.5 private network radios m table 155. Private network radios model description rf400 series ...

  • Page 569

    Appendix f. Other campbell scientific products 569 table 158. Cf-card storage module model description cfm100 cf card slot only nl115 network link with cf card slot f.10 data acquisition support software f.10.1 starter software short cut, pc200w, and visualweather are designed for novice integrators...

  • Page 570

    Appendix f. Other campbell scientific products 570 table 160. Datalogger support software software compatibility description rtdaq pc, windows datalogger support software for industrial and real time applications. Visualweather pc, windows datalogger support software specialized for weather and agri...

  • Page 571

    Appendix f. Other campbell scientific products 571 table 161. Loggernet adjuncts and clients 1,2 software description rtmcrt allows viewing and printing multi-tab displays of real-time data. Displays are created in rtmc or rtmc pro. Rtmc web server converts real-time data displays into html files, a...

  • Page 572

    Appendix f. Other campbell scientific products 572 table 163. Software development kits software compatibility description java-sdk pc, windows allows software developers to write java applications to communicate with dataloggers..

  • Page 573: Index

    573 index 1 12v terminal..................................................62 12‐volt supply ...............................................86 5 5 v‐low ..........................................................528 50 hz rejection ..............................................82, 284 5‐v pin............

  • Page 574

    Index 574 b background calibration................................. 134, 282, 283, 289, 528 backup........................................................... 35, 76 backup battery.............................................. 35, 76, 418 battery .........................................................

  • Page 575

    Index 575 communications memory errors ..................432, 528 communications memory free .....................432, 528 communications ports ..................................528 compactflash ................................................96, 266, 343, 409 compile errors ...........................

  • Page 576

    Index 576 datatable / endtable.................................... 128, 475 datatable() instruction ................................. 128 date............................................................... 411 daylightsaving............................................... 505 daylightsavingus ..........

  • Page 577

    Index 577 expression......................................................141, 142, 143, 144, 146, 454 expression ‐ logical........................................145 expression ‐ string .........................................147 extended commands ‐‐ sdi‐12 ......................183 external power...

  • Page 578

    Index 578 gypsum block ............................................... 297 h half bridge .................................................... 37, 295 half duplex.................................................... 455, 456 handshake, handshaking.............................. 455 header.................

  • Page 579

    Index 579 ip information................................................540 iproute ..........................................................518 iptrace ...........................................................518 is ....................................................................518 j juncti...

  • Page 580

    Index 580 monitoring data............................................ 44, 51 mounting ...................................................... 34, 81 move ............................................................. 514 movebytes .................................................... 369, 509 movepreci...

  • Page 581

    Index 581 paneltemp.....................................................483 parameter......................................................461 parameter type .............................................140 password .......................................................70, 540 pc program .............

  • Page 582

    Index 582 program generator....................................... 46, 109 program name.............................................. 140, 528 programmed settings ................................... 103 programming ................................................ 44, 65, 110, 427 protection ...........

  • Page 583

    Index 583 runtime errors...............................................424, 426, 427 runtime signatures .......................................528 rx...................................................................204 rx pin.............................................................549 s sample ...

  • Page 584

    Index 584 signature....................................................... 70, 94, 242, 465, 483, 528 signatured packet ......................................... 69 signatures ..................................................... 150 sin..................................................................

  • Page 585

    Index 585 tcdiff .............................................................484 tcp.................................................................166, 172, 518 tcp/ip ............................................................167, 468 tcp/ip information ........................................5...

  • Page 586

    Index 586 variable modifier .......................................... 474 variable out of bounds................................. 528 vdc ................................................................ 470 vector............................................................ 191 vehicle power connect...

  • Page 588

    Campbell scientific companies campbell scientific, inc. (csi) 815 west 1800 north logan, utah 84321 united states www.Campbellsci.Com • info@campbellsci.Com campbell scientific africa pty. Ltd. (csaf) po box 2450 somerset west 7129 south africa www.Csafrica.Co.Za • sales@csafrica.Co.Za campbell scie...