Campbell Scientific RTDAQ User Manual

RTDAQ
Revision: 3/12
Copyright © 2008-2012
Campbell Scientific, Inc.

Campbell Scientific, Inc. Software End User License Agreement (EULA)

This software can be installed as a trial version or as a fully licensed copy. All terms and conditions contained herein apply to both versions of software unless explicitly stated.
TRIAL VERSION: Campbell Scientific distributes a trial version of this software free of charge to enable users to work with Campbell Scientific data acquisition equipment. You may use the trial version of this software for 30 days on a single computer. After that period has ended, to continue using this product you must purchase a fully licensed version.
This trial may be freely copied. However, you are prohibited from charging in any way for any such copies and from distributing the software and/or the documentation with any other products (commercial or otherwise) without prior written permission from Campbell Scientific.
LICENSE FOR USE: Campbell Scientific grants you a non-exclusive license to use this software in accordance with the following:
(1) The purchase of this software allows you to install and use the software on
one computer only.
(2) This software cannot be loaded on a network server for the purposes of
distribution or for access to the software by multiple operators. If the software can be used from any computer other than the computer on which it is installed, you must license a copy of the software for each additional computer from which the software may be accessed.
(3) If this copy of the software is an upgrade from a previous version, you
must possess a valid license for the earlier version of software. You may continue to use the earlier copy of software only if the upgrade copy and earlier version are installed and used on the same computer. The earlier version of software may not be installed and used on a separate computer or transferred to another party.
(4) This software package is licensed as a single product. Its component parts
may not be separated for use on more than one computer.
(5) You may make one (1) backup copy of this software onto media similar to
the original distribution, to protect your investment in the software in case of damage or loss. This backup copy can be used only to replace an unusable copy of the original installation media.
WARRANTIES: The following warranties are in effect for ninety (90) days from the date of shipment of the original purchase. These warranties are not extended by the installation of upgrades or patches offered free of charge.
Campbell Scientific warrants that the installation media on which the software is recorded and the documentation provided with it are free from physical defects in materials and workmanship under normal use. The warranty does not cover any installation media that has been damaged, lost, or abused. You are urged to make a backup copy (as set forth above) to protect your investment. Damaged or lost media is the sole responsibility of the licensee and will not be replaced by Campbell Scientific.
Campbell Scientific warrants that the software itself will perform substantially in accordance with the specifications set forth in the instruction manual when properly installed and used in a manner consistent with the published recommendations, including recommended system requirements. Campbell Scientific does not warrant that the software will meet licensee’s requirements for use, or that the software or documentation are error free, or that the operation of the software will be uninterrupted.
Campbell Scientific will either replace or correct any software that does not perform substantially according to the specifications set forth in the instruction manual with a corrected copy of the software or corrective code. In the case of significant error in the installation media or documentation, Campbell Scientific will correct errors without charge by providing new media, addenda, or substitute pages. If Campbell Scientific is unable to replace defective media or documentation, or if it is unable to provide corrected software or corrected documentation within a reasonable time, it will either replace the software with a functionally similar program or refund the purchase price paid for the software.
All warranties of merchantability and fitness for a particular purpose are disclaimed and excluded. Campbell Scientific shall not in any case be liable for special, incidental, consequential, indirect, or other similar damages even if Campbell Scientific has been advised of the possibility of such damages. Campbell Scientific is not responsible for any costs incurred as a result of lost profits or revenue, loss of use of the software, loss of data, cost of re-creating lost data, the cost of any substitute program, telecommunication access costs, claims by any party other than licensee, or for other similar costs.
This warranty does not cover any software that has been altered or changed in any way by anyone other than Campbell Scientific. Campbell Scientific is not responsible for problems caused by computer hardware, computer operating systems, or the use of Campbell Scientific’s software with non-Campbell Scientific software.
Licensee’s sole and exclusive remedy is set forth in this limited warranty. Campbell Scientific’s aggregate liability arising from or relating to this agreement or the software or documentation (regardless of the form of action; e.g., contract, tort, computer malpractice, fraud and/or otherwise) is limited to the purchase price paid by the licensee.
COPYRIGHT: This software is protected by United States copyright law and international copyright treaty provisions. This software may not be sold, included or redistributed in any other software, or altered in any way without prior written permission from Campbell Scientific. All copyright notices and labeling must be left intact.
RTDAQ Table of Contents
PDF viewers: These page numbers refer to the printed version of this document. Use the PDF reader bookmarks tab for links to specific sections.
Preface — What's New in RTDAQ? ................................ xi
1. Introduction...............................................................1-1
1.1 RTDAQ Overview................................................................................ 1-2
1.1.1 Main Screen ................................................................................ 1-2
1.1.2 Clock/Program and the EZSetup Wizard.................................... 1-3
1.1.3 Monitor Data............................................................................... 1-3
1.1.3.1 Real-time Monitors............................................................ 1-3
1.1.4 Collect Data ................................................................................ 1-6
1.1.5 Field Calibration and the Calibration Wizard ............................. 1-7
1.1.6 RTMC Development, Run-time and Pro Development.............. 1-7
1.1.7 View Pro ..................................................................................... 1-8
1.1.8 Split............................................................................................. 1-9
1.1.9 CardConvert................................................................................ 1-9
1.1.10 Short Cut................................................................................... 1-9
1.1.11 CRBasic Editor ....................................................................... 1-10
1.1.12 CR5000/CR9000X Program Generators................................. 1-10
1.2 Getting Help for RTDAQ Applications.............................................. 1-11
1.3 Windows Conventions........................................................................ 1-11
2. System Requirements ..............................................2-1
2.1 Hardware and Software ........................................................................ 2-1
3. Installation, Operation and Backup Procedures....3-1
3.1 CD-ROM Installation ........................................................................... 3-1
3.2 RTDAQ Operations and Backup Procedures ....................................... 3-2
3.2.1 RTDAQ Directory Structure and File Descriptions.................... 3-2
3.2.1.1 Program Directory............................................................. 3-2
3.2.1.2 Working Directories.......................................................... 3-2
3.2.2 Backing up the Network Map and Data Files ............................. 3-3
3.2.2.1 Performing a Backup......................................................... 3-4
3.2.2.2 Restoring the Network from a Backup File....................... 3-4
3.2.3 Loss of Computer Power ............................................................ 3-4
4. The RTDAQ Main Screen .........................................4-1
4.1 Overview .............................................................................................. 4-1
4.1.1 Program Startup and Main Screen Functionality........................ 4-1
4.1.2 Datalogger Connectivity, Help and Program Exit ...................... 4-3
4.2 EZSetup Wizard ................................................................................... 4-3
4.2.1 Add Datalogger........................................................................... 4-3
4.2.2 Communication Setup................................................................. 4-4
i
RTDAQ Table of Contents
4.2.3 Datalogger Settings .....................................................................4-4
4.2.3.1 Max Time Online............................................................... 4-5
4.2.4 Summary, Communications Test, and Clock Set........................ 4-5
4.2.5 Send Program.............................................................................. 4-5
4.2.6 Editing and Deleting Dataloggers ...............................................4-5
4.3 Clock/Program Tab............................................................................... 4-6
4.3.1 Basic Operation........................................................................... 4-6
4.4 Monitor Data Tab.................................................................................. 4-7
4.4.1 Field Monitor ..............................................................................4-7
4.4.2 Editing Variable Values ..............................................................4-7
4.4.3 Specialized Real-time Monitor Screens ......................................4-8
4.5 Collect Data Tab ...................................................................................4-8
4.6 Pull-down Menus.................................................................................. 4-9
4.6.1 File Menu ....................................................................................4-9
4.6.1.1 Saving and Loading Configurations .................................. 4-9
4.6.1.2 Exit ....................................................................................4-9
4.6.2 View Menu.................................................................................. 4-9
4.6.3 Datalogger Menu....................................................................... 4-10
4.6.3.1 Connect/Disconnect......................................................... 4-10
4.6.3.2 Update Table Definitions................................................. 4-10
4.6.3.3 Status Table .....................................................................4-10
4.6.3.4 File Control...................................................................... 4-12
4.6.3.5 Calibration Wizard ..........................................................4-15
4.6.3.6 Terminal Emulator........................................................... 4-16
4.6.4 Network Menu ..........................................................................4-17
4.6.4.1 Add/Delete/Edit/Rename Datalogger ..............................4-17
4.6.4.2 Backup/Restore Network................................................. 4-17
4.6.4.3 Computer’s Global PakBus Address ...............................4-17
4.6.5 Tools Menu ...............................................................................4-18
4.6.5.1 Auxiliary Applications ....................................................4-18
4.6.5.2 Options ............................................................................4-19
4.6.5.3 LogTool ........................................................................... 4-19
4.6.5.4 PakBus Graph.................................................................. 4-21
4.7 The RTDAQ Toolbar.......................................................................... 4-23
5. Program Creation and Editing ................................ 5-1
5.1 CRBasic Editor .....................................................................................5-1
5.1.1 Overview..................................................................................... 5-1
5.1.2 Inserting Instructions................................................................... 5-2
5.1.2.1 Parameter Dialog Box .......................................................5-2
5.1.2.2 Right-Click Functionality .................................................. 5-4
5.1.3 Toolbar ........................................................................................ 5-5
5.1.3.1 Compile .............................................................................5-7
5.1.3.2 Compile, Save, and Send................................................... 5-8
5.1.3.3 Conditional Compile and Save ........................................ 5-11
5.1.3.4 Templates......................................................................... 5-11
5.1.3.5 Program Navigation using BookMarks and GoTo .......... 5-12
5.1.3.6 CRBasic Editor File Menu............................................... 5-12
5.1.3.7 CRBasic Editor Edit Menu .............................................. 5-13
5.1.3.8 CRBasic Editor View Menu ............................................ 5-13
5.1.3.9 CRBasic Editor Tools Menu............................................ 5-16
5.1.3.10 Available Help Information........................................... 5-19
ii
RTDAQ Table of Contents
5.1.4 CRBasic Programming ............................................................. 5-20
5.1.4.1 Programming Sequence................................................... 5-20
5.1.4.2 Program Declarations...................................................... 5-21
5.1.4.3 Mathematical Expressions............................................... 5-21
5.1.4.4 Measurement and Output Processing Instructions .......... 5-22
5.1.4.5 Line Continuation............................................................ 5-22
5.1.4.6 Inserting Comments Into Program .................................. 5-23
5.1.4.7 Example Program............................................................ 5-24
5.1.4.8 Data Tables...................................................................... 5-24
5.1.4.9 The Scan -- Measurement Timing and Processing.......... 5-26
5.1.4.10 Numerical Entries.......................................................... 5-27
5.1.4.11 Logical Expression Evaluation...................................... 5-27
5.1.4.12 Flags .............................................................................. 5-29
5.1.4.13 Parameter Types............................................................ 5-29
5.1.4.14 Program Access to Data Tables..................................... 5-30
5.2 Short Cut............................................................................................. 5-31
5.2.1 Overview................................................................................... 5-31
5.2.2 Creating a Program Using Short Cut ........................................ 5-32
5.2.2.1 Step 1 – Create a New File or Open Existing File .......... 5-33
5.2.2.2 Step 2 – Select Datalogger and Specify Scan Interval .... 5-33
5.2.2.3 Step 3 – Choose Sensors to Monitor ............................... 5-36
5.2.2.4 Step 4 – Setup Output Tables.......................................... 5-43
5.2.2.5 Step 5 – Generate the Program in the Format Required
by the Datalogger .................................................................. 5-46
5.2.3 Short Cut Settings ..................................................................... 5-47
5.2.3.1 Program Security............................................................. 5-47
5.2.3.2 Datalogger ID.................................................................. 5-47
5.2.3.3 Power-up Settings ........................................................... 5-47
5.2.3.4 Select CR200 Compiler................................................... 5-48
5.2.3.5 Sensor Support ................................................................ 5-48
5.2.3.6 Integration ....................................................................... 5-49
5.2.3.7 Font ................................................................................. 5-49
5.2.3.8 Set Working Directory .................................................... 5-49
5.2.3.9 Enable Creation of Custom Sensor Files......................... 5-49
5.2.4 Editing Programs Created by Short Cut.................................... 5-49
5.2.5 New Sensor Files ...................................................................... 5-50
5.2.6 Custom Sensor Files ................................................................. 5-50
5.3 Program Creation with the RTDAQ Program Generator ................... 5-50
5.3.1 Basic Operation......................................................................... 5-50
5.3.2 Program Startup ........................................................................ 5-51
5.3.3 Using the CR5000 or CR9000X Program Generator................ 5-52
5.3.4 Supporting Functionality .......................................................... 5-53
5.3.4.1 File | New ........................................................................ 5-53
5.3.4.2 File | Open… ................................................................... 5-53
5.3.4.3 File | Save As................................................................... 5-54
5.3.4.4 File | Edit Generator Program.......................................... 5-54
5.3.4.5 File | Open Wire Diagram ............................................... 5-54
5.3.4.6 File | <Previously opened programs>.............................. 5-55
5.3.4.7 File | Exit ......................................................................... 5-55
5.3.4.8 Edit | Color Options......................................................... 5-55
5.3.4.9 Edit | CR9000X Generator Options, Edit | CR5000
Generator Options ................................................................. 5-56
5.3.4.10 Help | Program Generator.............................................. 5-56
5.3.4.11 Help | About .................................................................. 5-56
iii
RTDAQ Table of Contents
6. View Pro.................................................................... 6-1
5.3.5 Using Save and Send................................................................. 5-56
5.3.5.1 Download ........................................................................5-57
5.3.5.2 Run Options..................................................................... 5-58
5.3.5.3 Datalogger Response ....................................................... 5-58
6.1 Overview............................................................................................... 6-1
6.2 The Toolbar........................................................................................... 6-2
6.3 Opening a File....................................................................................... 6-4
6.3.1 Opening a Data File .................................................................... 6-4
6.3.2 Opening Other Types of Files ..................................................... 6-4
6.3.3 Opening a File in Hexadecimal Format.......................................6-4
6.4 Viewing a LoggerNet Database Table .................................................. 6-4
6.4.1 Selecting a Database.................................................................... 6-5
6.4.2 Selecting a Table ......................................................................... 6-8
6.5 Importing a CSV File............................................................................ 6-9
6.6 Data View ...........................................................................................6-11
6.6.1 Column Size .............................................................................. 6-12
6.6.2 Header Information ................................................................... 6-12
6.6.3 Locking the TimeStamp Column .............................................. 6-12
6.6.4 File Information ........................................................................6-12
6.6.5 Background Color ..................................................................... 6-12
6.6.6 Font ...........................................................................................6-12
6.6.7 Window Arrangement............................................................... 6-13
6.7 Graphs................................................................................................. 6-13
6.7.1 Line Graph ................................................................................6-14
6.7.1.1 Selecting Data to be Graphed .......................................... 6-15
6.6.1.2 Graph Width .................................................................... 6-15
6.7.1.3 Scrolling ..........................................................................6-16
6.7.1.4 Graph Cursor ................................................................... 6-16
6.7.1.5 Line Graph Toolbar ......................................................... 6-17
6.7.2 Histogram.................................................................................. 6-18
6.7.2.1 Selecting Data to be Viewed ........................................... 6-20
6.7.2.2 Options ............................................................................6-21
6.7.2.3 Histogram Toolbar........................................................... 6-21
6.7.3 XY Plot ..................................................................................... 6-22
6.7.3.1 Selecting Data to be Plotted............................................. 6-23
6.7.3.2 Deleting a Series from an XY Plot .................................. 6-23
6.7.3.3 XY Plot Toolbar .............................................................. 6-23
6.7.4 Rainflow Histogram .................................................................. 6-24
6.7.4.1 Selecting Data to be View ............................................... 6-25
6.7.4.2 Options ............................................................................6-26
6.7.4.3 Rainflow Histogram Toolbar........................................... 6-26
6.7.5 FFT............................................................................................ 6-28
6.7.5.1 Selecting Data to be Graphed .......................................... 6-29
6.7.5.2 Options ............................................................................6-30
6.7.5.3 FFT Toolbar..................................................................... 6-30
6.8 Right-click-Menus ..............................................................................6-31
6.8.1 Data View.................................................................................. 6-31
6.8.2 Graphs ....................................................................................... 6-33
6.8.3 Traces ........................................................................................ 6-33
iv
RTDAQ Table of Contents
6.9 Printing Options.................................................................................. 6-33
6.9.1 Print Setup................................................................................. 6-33
6.9.2 Printing Text ............................................................................. 6-34
6.9.3 Printing Graphs ......................................................................... 6-34
6.10 View Pro Online Help ...................................................................... 6-34
6.11 Assigning Data Files to View ........................................................... 6-34
7. Monitoring Data in Real-time ...................................7-1
7.1 Using the Monitor Data Screen ............................................................ 7-1
7.1.1 Connect to Target Datalogger..................................................... 7-1
7.1.2 Selecting Items for Display in the Monitor Data Screen ............ 7-2
7.1.3 Using the Start/Stop Button ........................................................ 7-3
7.1.4 Customizing the Display of Data in the Monitor Data Screen.... 7-4
7.1.5 Setting the Monitor Data Screen Options ................................... 7-4
7.1.5.1 Display Tab ....................................................................... 7-5
7.1.5.2 Alarms Tab........................................................................ 7-6
7.1.5.3 Setup Tab .......................................................................... 7-7
7.1.6 Specialized Real-time Monitoring Screens................................. 7-7
7.2 Ports and Flags...................................................................................... 7-8
7.3 Table Monitor ....................................................................................... 7-9
7.3.1 Using the Table Monitor............................................................. 7-9
7.3.2 Displaying Tables on the Table Monitor .................................. 7-11
7.3.2.1 Start and Stop .................................................................. 7-11
7.3.2.2 Reset Table...................................................................... 7-12
7.3.2.3 Fields and Values ............................................................ 7-12
7.3.2.4 Save | Load Configurations ............................................. 7-13
7.3.2.5 Saving Displayed Data to a File ...................................... 7-13
7.3.3 Moving and Resizing the Table Monitor Window ................... 7-14
7.4 Real Time Graph................................................................................. 7-14
7.4.1 Using Graph Window ............................................................... 7-14
7.4.2 Adding Items for Display on the Graph.................................... 7-16
7.4.3 Moving and Resizing the Graph Window ................................ 7-16
7.4.4 Basic Graph Operation.............................................................. 7-16
7.4.5 Zooming and Scaling the Graph Window................................. 7-18
7.4.6 Data Retrieval Methods used by the Graph Screen .................. 7-19
7.4.7 Drawing Methods used by the Graph Screen............................ 7-20
7.4.8 Graph Window Display and Print Options ............................... 7-21
7.4.9 Setting the Options for the Graph Screen ................................. 7-22
7.4.9.1 Scaling the Axes.............................................................. 7-22
7.4.9.2 Data Display Options ...................................................... 7-23
7.4.9.3 Visual Display Options ................................................... 7-25
7.4.9.4 Customizing the Traces on the Display........................... 7-26
7.4.9.5 Using Saved Configurations............................................ 7-28
7.4.10 Accepting or Abandoning Changes to the Graph Options...... 7-29
7.5 Fast Graph........................................................................................... 7-29
7.5.1 Using the Fast Graph ................................................................ 7-29
7.5.2 Similarity between the Real Time Graph and the Fast Graph... 7-30
7.6 XY Plot............................................................................................... 7-30
7.6.1 Using the XY Plot..................................................................... 7-30
7.6.2 Setting up the XY Plot for Display ........................................... 7-32
7.6.2.1 Setting Values for Display .............................................. 7-32
7.6.2.2 Number of Points per Field ............................................. 7-34
7.6.2.3 Right-Click Functionality................................................ 7-35
7.6.3 Using the Control Buttons ........................................................ 7-36
v
RTDAQ Table of Contents
7.6.4 Using the Graphical Display Area of the XY Plot .................... 7-40
7.6.5 Zooming with the XY Plot........................................................ 7-41
7.6.6 Using the Special Options of the XY Plot................................. 7-42
7.6.6.1 Scaling Tab...................................................................... 7-43
7.6.6.2 Data Display Tab............................................................. 7-44
7.6.6.3 Visual Display Tab .......................................................... 7-45
7.6.6.4 Trace Tab......................................................................... 7-45
7.6.6.5 Save Tab .......................................................................... 7-47
7.6.7 Applying Changes to the XY Plot Screen................................. 7-48
7.7 Histogram Monitoring ........................................................................7-48
7.7.1 Histogram Overview ................................................................. 7-48
7.7.2 Displaying Histograms.............................................................. 7-49
7.8 Fast Fourier Transform Spectra ..........................................................7-50
7.8.1 Brief Overview of Fourier Analysis.......................................... 7-50
7.8.2 FFT vs. FFTSample................................................................... 7-51
7.8.3 Opening FFT Viewer Windows ................................................ 7-51
7.9 Configuration of FFT and Histogram Windows................................. 7-52
7.9.1 Moving and Resizing the FFT/Histo Window .......................... 7-53
7.9.2 Displaying FFT Spectra or Histograms..................................... 7-53
7.9.3 Using the Buttons...................................................................... 7-54
7.9.4 3D View .................................................................................... 7-55
7.9.5 X-Axis Mode............................................................................. 7-57
7.9.6 Zooming in on the Spectrum or Histogram............................... 7-58
7.9.7 Save and Print Options.............................................................. 7-58
7.9.8 Setting the Options for the FFT/Histogram Screen................... 7-60
7.9.8.1 Scaling the Axes .............................................................. 7-60
7.9.8.2 Data Display Options....................................................... 7-61
7.9.8.3 Visual Display Options.................................................... 7-62
7.9.8.4 Individual Trace Options................................................. 7-63
7.9.8.5 Using Saved Configurations............................................ 7-64
7.9.9 Accepting or Abandoning Changes to the FFT/Histogram
Options .........................................................................................7-65
7.10 Rainflow Histogram Monitoring....................................................... 7-66
7.10.1 Rainflow Histogram Overview ...............................................7-66
7.10.2 Opening Rainflow Histograms................................................ 7-66
7.10.3 Movement and Resizing of the Rainflow Window................. 7-68
7.10.4 Selecting Tables and Bins For Display ...................................7-68
7.10.5 Using the Buttons and Controls ..............................................7-69
7.10.6 X-Axis Mode........................................................................... 7-72
7.10.7 Zooming in on the Histogram .................................................7-72
7.10.8 Save and Print Options............................................................ 7-73
7.10.9 Setting the Options for the Rainflow Screen........................... 7-75
7.10.9.1 Scaling the Axes ............................................................ 7-75
7.10.9.2 Visual Display Options.................................................. 7-76
7.10.9.3 Trace Options ................................................................7-77
7.10.9.4 Using Saved Configurations.......................................... 7-78
7.10.10 Accepting or Abandoning Changes to the Rainflow
Options .........................................................................................7-79
7.11 Saving and Loading Configurations .................................................7-80
7.11.1 Saving and Loading Configuration Files for Real-Time
Data Screens ................................................................................. 7-80
7.11.2 Using Configurations in the Field Monitor ............................. 7-81
7.11.3 Using Configurations in the Table Monitors........................... 7-82
7.11.4 Saving and Loading Global Configuration Files..................... 7-82
vi
RTDAQ Table of Contents
8. Real-Time Monitoring and Control Software..........8-1
8.1 Development Mode .............................................................................. 8-1
8.1.1 The RTMC Workspace ............................................................... 8-3
8.1.2 Single Datalogger RTMC Projects ............................................. 8-3
8.1.3 Display Components................................................................... 8-3
8.1.4 Functions Available from the RTMC Menus.............................. 8-5
8.1.4.1 File Menu .......................................................................... 8-5
8.1.4.2 Edit Menu.......................................................................... 8-6
8.1.4.3 View Menu........................................................................ 8-6
8.1.4.4 Project Menu ..................................................................... 8-7
8.1.4.5 Screen Menu...................................................................... 8-7
8.1.4.6 Component Menu.............................................................. 8-8
8.1.4.7 Window Menu................................................................... 8-9
8.1.4.8 Help Menu......................................................................... 8-9
8.1.5 Expressions ................................................................................. 8-9
8.1.5.1 Operators ......................................................................... 8-12
8.1.5.2 Order of Precedence........................................................ 8-12
8.1.5.3 Predefined Constants....................................................... 8-13
8.1.5.4 Predefined Time Constants ............................................. 8-13
8.1.5.5 Functions ......................................................................... 8-13
8.1.5.6 Logical Functions............................................................ 8-15
8.1.5.7 String Functions .............................................................. 8-15
8.1.5.8 Conversion Functions...................................................... 8-16
8.1.5.9 Time Functions................................................................ 8-16
8.1.5.10 Start Option Functions .................................................. 8-16
8.1.5.11 Functions with State ...................................................... 8-17
8.2 RTMC Run-time................................................................................. 8-18
9. Calibration and Zeroing ...........................................9-1
9.1 Calibration Essentials ........................................................................... 9-1
9.1.1 Definition of Calibration............................................................. 9-1
9.1.2 Basic Calibration Process............................................................ 9-1
9.2 Writing Calibration Programs with the CRBasic Editor....................... 9-2
9.2.1 The FieldCal Instruction ............................................................. 9-2
9.2.2 Calibration File Details ............................................................... 9-3
9.3 Five Kinds of Calibration ..................................................................... 9-3
9.3.1 Zeroing........................................................................................ 9-3
9.3.2 Offset Calibration........................................................................ 9-4
9.3.3 Two-Point Multiplier and Offset Calibration.............................. 9-4
9.3.4 Two-Point Multiplier Only Calibration ...................................... 9-5
9.3.5 Zero Basis Point Calibration....................................................... 9-5
9.4 Performing a Manual Calibration ......................................................... 9-6
9.4.1 How to Use the Mode Variable for Calibration Status and
Control............................................................................................ 9-6
9.4.2 Using the Mode Variable for Manual Single-Point Calibration . 9-7
9.4.3 Using the Mode Variable for Manual Two-Point Calibration .... 9-7
9.5 Generating Calibration Programs ......................................................... 9-8
9.6 Using the Calibration Wizard with Running Programs ........................ 9-9
9.6.1 Calibration Wizard Basic Operation ........................................... 9-9
9.6.2 Using the Wizard to Perform Two-Point Multiplier and Offset
Calibrations .................................................................................... 9-9
9.6.3 Using the Wizard to Perform Zeroing Calibrations .................. 9-13
9.6.4 Using the Wizard to Perform Offset Calibrations..................... 9-15
9.7 Strain and Shunt Calibration............................................................... 9-16
vii
RTDAQ Table of Contents
10. Utilities .................................................................. 10-1
10.1 CardConvert...................................................................................... 10-1
10.1.1 Input/Output File Settings ....................................................... 10-1
10.1.2 Destination File Options.......................................................... 10-2
10.1.2.1 File Format ....................................................................10-2
10.1.2.2 File Processing............................................................... 10-3
10.1.2.3 File Naming ................................................................... 10-4
10.1.2.4 TOA5/TOB1 Format .....................................................10-4
10.1.3 Converting the File.................................................................. 10-5
10.1.4 Repairing/Converting Corrupted Files .................................... 10-5
10.1.5 Viewing a Converted File .......................................................10-6
10.1.6 Running CardConvert from a Command Line........................ 10-6
10.2 Device Configuration Utility ............................................................10-7
10.2.1 Overview................................................................................. 10-7
10.2.2 Main DevConfig Screen.......................................................... 10-8
10.2.3 Downloading an Operating System......................................... 10-9
10.2.4 Terminal Tab......................................................................... 10-11
10.2.5 The Unknown Device Type .................................................. 10-12
10.2.6 Off-line Mode........................................................................ 10-12
10.3 Split................................................................................................. 10-13
10.3.1 Functional Overview............................................................. 10-13
10.3.2 Getting Started ...................................................................... 10-14
10.3.3 Split Parameter File Entries................................................... 10-20
10.3.3.1 Input Files.................................................................... 10-20
10.3.3.2 Output Files ................................................................. 10-54
10.3.4 Help Option........................................................................... 10-60
10.3.5 Editing Commands................................................................ 10-61
10.3.6 Running Split From a Command Line .................................. 10-61
10.3.6.1 Splitr Command Line Switches................................... 10-61
10.3.6.2 Using Splitr.exe in Batch Files .................................... 10-62
10.3.6.3 Processing Alternate Files ........................................... 10-62
10.3.6.4 Processing Multiple Parameter Files with One
Command Line ........................................................................... 10-66
10.3.7 Log Files................................................................................ 10-66
10.4 Log Files and the LogTool Application.......................................... 10-67
10.4.1 Event Logging....................................................................... 10-67
10.4.1.1 Log Categories............................................................. 10-67
10.4.1.2 Log File Message Formats........................................... 10-68
10.4.2 CQR Log (RF Link) .............................................................. 10-84
10.5 SDM-CAN Helper Software........................................................... 10-84
Appendices
A. Campbell Scientific File Formats........................... A-1
A.1 PC File Data Formats.......................................................................... A-1
A.1.1 TOA5......................................................................................... A-1
A.1.2 TOB1......................................................................................... A-2
A.2 Datalogger Data Formats ....................................................................A-3
A.2.1 TOB2 or TOB3.......................................................................... A-3
A.3 Binary Data Value Types.................................................................... A-5
A.3.1 FP2 (2 Byte Low Resolution Format) ....................................... A-5
A.3.2 FP4 (4 Byte High Resolution Format)....................................... A-5
viii
RTDAQ Table of Contents
A.3.3 IEEE4........................................................................................ A-5
A.3.4 IEEE8........................................................................................ A-6
A.4 Converting Binary File Formats ......................................................... A-6
A.4.1 Split........................................................................................... A-6
A.4.2 CardConvert.............................................................................. A-6
B. Importing Files into Excel ...................................... B-1
B.1 Table-Based Data File Import (TOA5) ................................................B-1
Step 1 of 3.............................................................................................B-1
Step 2 of 3.............................................................................................B-2
Step 3 of 3.............................................................................................B-3
Figures
3.2-1. Typical Working Directories for RTDAQ ....................................... 3-3
Tables
5.1-1. Formats for Output Data................................................................. 5-26
5.1-2. Formats for Entering Numbers in CRBasic.................................... 5-27
5.1-3. Synonyms for True and False......................................................... 5-28
5.1-4. Rules for Names............................................................................. 5-29
9.2-1. The FieldCal Instruction “Family”................................................... 9-2
10.3-1. Comma Separated, Field Formatted, Printable ASCII, and
Table Oriented ASCII Input File Format Types................................ 10-21
10.3-2. Example of Event Driven Test Data Set..................................... 10-30
10.3-3. Processed Data File Using Option C.......................................... 10-31
10.3-4. Input File Entries to Process the First Data Point for each Test. 10-32
10.3-5. Effects of Out of Range Values for Given Output Options........ 10-34
10.3-6. Split Operators and Math Functions........................................... 10-36
10.3-7. Time Series Functions................................................................ 10-38
10.3-8. Split SPECIAL FUNCTIONS.................................................... 10-43
10-4-1. Transaction Log Messages......................................................... 10-69
10.4-2. Communication Status Log Messages........................................ 10-82
ix
RTDAQ Table of Contents
x

Preface — What's New in RTDAQ?

The most significant changes in RTDAQ 1.1 are in the Short Cut program generator. These include:
A new Datalogger step has been added to the Progress panel. In this step,
you select the datalogger model and set the scan interval. When generating a program for a CR9000X, the CR9000X Configuration box also appears on this screen.
When adding a sensor, if more than one of the selected sensor can be
added, the choice of how many sensors to add is included as part of the sensor’s form rather than as a separate dialog box.
When adding more than one sensor, a dialog box is available that allows
you to input unique values for certain calibration and/or conversion factors (e.g., multiplier, offset, gage factor) for each sensor being measured.
Each sensor form now includes a wiring tab that shows the wiring for the
sensor. This tab allows you to manually change the wiring location, if desired.
For some sensors that require an excitation voltage, the sensor form now
includes parameters that allow you to calculate Sensors per Excitation Channel. (Exciting more than one sensor with an excitation channel is helpful when the sensors to be measured outnumber the available excitation channels.)
An SC115 CS I/O-to-USB Flash Memory Drive check box has been added
to the Outputs screen. When this box is selected, new data will be copied to an SC115 when it is plugged into the CS I/O port of the datalogger.
Selected Sensors are now shown in a tree format and branches of the tree
can be collapsed or expanded as desired. This can be especially useful when the Selected Sensor tree contains multiplexers.
New Sensor files for the 03002 Wind Speed and Direction Sensor, 105E
(chromel-constantan) Thermocouple, the WindSonic1 (RS-232) Two­Dimensional Ultrasonic Wind Sensor, the WindSonic4 (SDI-12) Two­Dimensional Ultrasonic Wind Sensor, the HMP155 Temperature and Relative Humidity Sensor, the SR50A Sonic Ranging Sensor (SDI-12 Output), the CS450/455 Pressure Transducer, a Vibrating Wire Sensor (for generic vibrating wire sensors and the AVW200), the 27106T Wind Speed Sensor, the CS525 ISFET pH Probe, the CS650/655 Water Content Reflectometer, the CS506 Fuel Moisture Sensor, the NR-LITE2 Net Radiometer, the CNR4 Net Radiometer, a Quarter Bridge Strain Gage, the Geokon 4000/4050 Vibrating Wire Strain Gage, the Geokon 4100 Series Vibrating Wire Strain Gage, the Geokon 4420 Vibrating Wire Crackmeter, and the Geokon 4500 Series Vibrating Wire Piezometer.
xi
Preface — What's New in RTDAQ?
In addition to these Short Cut changes, RTDAQ has some changes including:
The user can now select an image for the background of a Graph, Fast
The Add, Delete, Delete All, and Trace Option buttons have been moved
You can now edit fields in the Table Monitor.
You can now toggle between data displays by pressing the data display
A status bar has been added to the graphs to show the timestamp and
The processing and displaying of data has been optimized in the Fast
An option to provide feedback on RTDAQ has been added to the RTDAQ
Graph, or XY Plot.
to a toolbar on the Graph, Fast Graph, and XY Plot.
type button (e.g. Graph) on the toolbar with multiple data displays of that type already open.
record number of the last record.
Graph.
Toolbar’s Help menu.
Other applications included with RTDAQ have new features as described below:
CRBasic Editor
A “Select .PCK Values” button has been added to the SDMCAN
instruction parameter dialog box in the CRBasic Editor. When pressed, the user can specify a PCK file from which to select the CAN-bus value to be returned. (PCK files are generated by the DBC to SDMCan converter.)
The CRBasic Editor now gives you the option to Save and Encrypt a file.
Encrypted files can be compiled in the datalogger but cannot be read by a user.
Dim variables can now be declared within a subroutine or function and are
local to that subroutine or function. The same variable name can be used within other subroutines or functions or as a global variable without conflict. The F9 and F10 pop-up pick list will include the local variables for a specific subroutine or function if the cursor is within that subroutine or function.
F11 can now be used to bring up a pop-up pick list that contains all user-
defined functions found in the program.
A new button has been added to the toolbar (blue arrow) which takes the
cursor to user-defined functions and subroutines.
A new shortcut, CTRL-Y, has been added that will delete the current line.
Several options have been added to the Editor Preferences dialog box
including: Variable Name Matching, Create .TDF File at Compile, Clear
xii
Preface — What's New in RTDAQ?
Undo/Redo List on File Save, Syntax Highlighting for Variables and Local Variables.
The CRBasic Editor also now has the capability to open a read-only copy
of any file. This gives you the ability to open multiple copies of a program and examine multiple areas of a very large program at the same time.
You can also now continue an instruction onto multiple lines by placing
the line continuation indicator (a single space followed by an underscore “_”) at the end of each line that is to be continued.
The bookmarks in a CRBasic program are now persistent from session to
session.
A new Constant Customization feature allows you to define values for one
or more constants in a program prior to performing a conditional compile.
A Conditional Compile and Save option has been added that is used to
generate a new CRBasic program from code that uses conditional compile syntax (#If/Else/ElseIf statements) and/or Constant Customization.
RTMC
RTMC has a new layout toolbar which gives quick access to the Align,
Space Evenly, Make Same Size, Center, and Order menu items from RTMC's Component menu.
Many new functions have been added that may be used when building
expressions in RTMC. These include string functions, time functions, start option functions, and function with state. The ability to declare aliases for data values used in expressions has also been added.
Graphics Options have been added to the Edit | Preferences menu item that
allow you to choose the maximum number of frames per second, whether animation is enabled, and whether high quality or high speed is more important. From this menu item, you can also choose the visual theme for RTMC. This determines the look and feel of the application (i.e. colors, button appearance, etc.). These options are available in both RTMC Development and RTMC Run-time.
An Edit | Customize menu item has been added which allows you to
customize RTMC's toolbars and menus. This menu item is available in both RTMC Development and RTMC Run-time.
Panning functionality has been added to charts in RTMC Run-time.
View Pro
The ability to lock the timestamp column on the left of the data file has
been added to View Pro. This keeps the timestamp visible as you scroll through columns of data.
PageUp and PageDown can now be used to scroll through a graph one
graph width at a time.
xiii
Preface — What's New in RTDAQ?
The timestamp has been placed in the status bar and is displayed when the
The Line Graph now has the ability to add a right Y-axis.
Device Configuration Utility
The Device Configuration Utility has a new off-line mode which allows
Split
Split has a new “Time Sync to First Record” option that can be used with
Also, a range of time values rather than a single time can now be entered
CardConvert
CardConvert can now be run from a command line without user
vertical cursor is used to step through values.
you to look at the settings for a certain device type without actually being connected to a device.
the time-sync function to avoid blank lines at the start of the output file.
in a Split Copy Condition.
interaction.
Miscellaneous other changes and bug fixes have also been implemented in this version.
xiv

Section 1. Introduction

RTDAQ (Real-time Data Acquisition) is a software application targeted to industrial and other high-speed data collection implementations which use Campbell Scientific’s dataloggers. RTDAQ replaces PC9000 as the company’s flagship product offering in the industrial marketplace. This software supports configuration, programming, communications, and data collection for the majority of dataloggers using the CRBasic datalogger programming language. Support is included for the CR800, CR850, CR1000, CR3000, CR5000, and CR9000X. RTDAQ runs on the Windows XP, Windows Vista, and Windows 7 platforms.
RTDAQ contains numerous improvements over the previous PC9000 product line. It features a new user-interface, including a look and feel similar to other Campbell Scientific datalogger software such as LoggerNet and PC400. Its underlying architecture uses the same communications server used by LoggerNet (the “LoggerNet Server”). This technology enables connection to PakBus dataloggers (including the CR1000 and CR3000) as well as tight integration with other Campbell Scientific products and utilities such as RTMC and PakBus Graph.
Datalogger communications technologies supported include “direct connect” (or RS-232 via local serial cable, short haul modems, or other “transparent” links), telephone, TAPI, TCP/IP, VHF/UHF radios, RF400-series spread spectrum radios, and multidrop interfaces (MD9 and MD485).
RTDAQ represents a significant milestone in bringing ease of use, improved datalogger support, and configurable data monitoring to Campbell Scientific’s industrial customer base. Customized data monitoring is accomplished via graphical real-time windows and specialized engineering displays. RTDAQ is an ideal solution for users desiring high-speed data collection over a single telecommunications medium, but who do not rely on scheduled data collection.
1-1
Section 1. Introduction

1.1 RTDAQ Overview

1.1.1 Main Screen

The main screen of RTDAQ provides three tabs with datalogger interaction functions (Clock/Program, Monitor Data, and Collect Data), as well as a toolbar with buttons to launch frequently-used utilities and auxiliary applications.
The toolbar includes utilities for working with data files (View Pro, Split, and CardConvert) as well as utilities for generating and editing datalogger programs (Short Cut, CRBasic, and the CR5000/CR9000X Program Generator). Datalogger setup and status functions are also available, along with access to RTMC (Real-time Monitoring and Control) applications. You can also launch the Device Configuration Utility which is used to send new operating systems to dataloggers and other peripheral devices, and to configure settings in the dataloggers and other devices. All of the toolbar functionality is also accessible from the RTDAQ menu, along with other tools, such as the Terminal Emulator, PakBus Graph, and LogTool (a program for viewing and storing communication logs). Each application includes extensive, online help.
Some utilities installed with RTDAQ can be opened independently from the main RTDAQ program by using the Windows Start Menu item Programs | RTDAQ | Utilities. These utilities include the Device Configuration Utility (or DevConfig), View Pro, and CardConvert. DevConfig is described above. View Pro enables the viewing and graphing of collected data, and CardConvert converts data files originating from removable card storage into other useful formats.
1-2

1.1.2 Clock/Program and the EZSetup Wizard

Setting up the RTDAQ datalogger network is a relatively simple process with the EZSetup Wizard, which guides you through the steps necessary to add and enter settings for dataloggers. Once a datalogger is added to the list, you
Section 1. Introduction
can choose the Edit Datalogger button change those settings. Progress through the Wizard is shown on the left side of the screen, with steps for choosing a datalogger, defining the communications path between the computer and the datalogger, fine tuning settings for the datalogger (e.g., baud rate or security code), testing communications, checking or setting the clock, and finally sending a program or viewing a program file which is already running. After a datalogger has been added, you can select and connect to that datalogger from the Clock/Program tab via point and click operations.
to activate the Wizard again and

1.1.3 Monitor Data

Once you’ve added and connected to a datalogger, the Monitor Data tab switches to a view that lets you monitor the latest values measured on the datalogger. You can monitor variables as they are updated after each execution of the datalogger program scan or monitor the latest data items that have been stored into the datalogger’s tables.
The Monitor Data tab also lets you edit public variables directly, or view data using several available real-time monitors.
1.1.3.1 Real-time Monitors
RTDAQ has a variety of windows for viewing datalogger data in near real­time. After the Monitor Data tab is selected, these options show as buttons which open separate windows when pressed.
1-3
Section 1. Introduction
The status of ports, flags, or any boolean variables can be monitored and
controlled within the Ports and Flags window.
The Table Monitor allows quick numeric viewing of entire output tables.
With both the Graph and Fast Graph, graphical data traces from a
datalogger can be monitored in a window width as small as 1 millisecond, with resolution support for individual points up to 100 KHz.
1-4
The XY Plot allows up to four values to be plotted against another
measured value (other than the timestamp).
With the Fast Fourier Transform viewer, both single-valued (amplitude
or power spectrum) and dual-valued (real-imaginary or amplitude-phase) FFT spectra can be viewed.
Section 1. Introduction
Histograms calculated by the datalogger can be shown as they are made
available by program calculations and storage.
Display of rainflow-style histograms is also supported using the Rainflow
viewer. This display works with programs utilizing the Rainflow output instruction in the CRBasic datalogger program.
1-5
Section 1. Introduction

1.1.4 Collect Data

Once a program is storing data in the datalogger you can collect a copy of that data to a file on the PC. The Collect Data tab shows a list of tables in the datalogger as defined by the currently running program. You can retrieve the uncollected data, appending it to a file on the PC, or you can retrieve all of the data from the datalogger. You can also use other custom configurations for the collection. The Change File Name button lets you choose a folder and file name in which to store the data.
1-6
Section 1. Introduction

1.1.5 Field Calibration and the Calibration Wizard

RTDAQ includes the Calibration Wizard for performing real-time, non­intrusive calibration of measurements. Datalogger programs that use the FieldCal CRBasic instruction activate this Wizard for use. This feature allows calibration to occur within a simple interface, instead of requiring manual calibration via the numeric displays or with the keypad display at the datalogger site.

1.1.6 RTMC Development, Run-time and Pro Development

Seamless integration with the RTMC and RTMC Pro product line allows creation of data monitoring and control screens for individual dataloggers.
Custom screens are created using the RTMC Development program
RTMC Pro Development program
.
or the
1-7
Section 1. Introduction
Execution of these screens is done with the RTMC Run-time program. Both programs can be started using buttons from the main RTDAQ interface.

1.1.7 View Pro

The Standard RTMC Development and RTMC Run-time applications are included with RTDAQ. RTMC Pro must be purchased and installed separately from RTDAQ, but will operate within the RTDAQ environment after installation.
RTDAQ includes View Pro, the “professional” version of Campbell
Scientific’s newly-updated data viewing application. View Pro examine data files (*.DAT files) collected onto the PC from the datalogger, and displays data in either comma-separated or tabular format, record by record. A graph can be displayed showing multiple traces (columns) of data. This program also allows the viewing of specialized data records such as FFT spectra and histograms.
lets you
1-8
Section 1. Introduction
View Pro can be launched from a button on RTDAQ’s main screen. View Pro is a simple analysis tool, and includes some basic printing and export capabilities.

1.1.8 Split

Split is a stand-alone application used to post-process data files on the PC and generate reports. A button on RTDAQ’s main screen launches the Split
application file, perform calculations, and change date/time formats. Split can create reports or new files for input to other data analysis and display applications, including HTML formats.

1.1.9 CardConvert

CardConvert is a utility to retrieve binary data from Compact Flash cards containing program output data, and convert the data to an ASCII file or other useful formats.

1.1.10 Short Cut

Short Cut is a datalogger program “generator.” You select the datalogger
type, sensors, and desired outputs, and then Short Cut program file to send to the datalogger. Users don’t need to learn about the individual programming instructions generated within the datalogger program. Short Cut includes support for multiplexers and a limited number of other peripherals, and also provides a wiring diagram that you can print to leave in the field with the datalogger.
. It can be used to merge data from multiple stations into one
creates a simple
1-9
Section 1. Introduction
Short Cut is also an excellent way to learn about the CRBasic programming language. The CRBasic programs created by Short Cut can be loaded directly into the CRBasic Editor for inspection or editing.

1.1.11 CRBasic Editor

The CRBasic Editor is a program editor for CRBasic datalogger programs, including programs for the CR800, CR850, CR1000, CR3000, CR5000, and CR9000X. It is used to manually create programs or to edit existing or generated programs.
Program instructions are defined within the editor for variable declarations, data table configuration, measurements and control operations, numeric processing, logical operations, data output, and program control. Extensive assistance and program examples are provided in the online help system.

1.1.12 CR5000/CR9000X Program Generators

RTDAQ includes updated versions of the program generators for the
CR9000X and CR5000
which were previously available in PC9000.
1-10
Section 1. Introduction
CR9000X and CR5000 programs can be generated using a detailed, instruction-level interface resulting in extensive control over generated programs.

1.2 Getting Help for RTDAQ Applications

Detailed descriptions of each application or tool are included in later sections of this manual. Each application also has its own built-in help system. Context sensitive help for an application can usually be accessed by moving the focus to (i.e., clicking on) a particular item and pressing the F1 key or by selecting Help from the application's menu.
Contact your Campbell Scientific representative if you are unable to resolve your questions after reviewing the above noted resources.

1.3 Windows Conventions

There are numerous conventions and expectations about the way a software program looks and behaves when running under Microsoft Windows. Campbell Scientific has adopted many of these conventions in RTDAQ.
This manual describes a collection of screens, dialogs, and functions to interoperate with Campbell Scientific’s dataloggers. As with most Windows­based software there is usually more than one way to access each function. We encourage you to look around and experiment with different options to find which methods work best for you.
To keep this manual as concise and readable as possible, we will not always list all of the methods for getting to every function. Typically each function will have two methods of access and some will have as many as four.
1-11
Section 1. Introduction
The most common methods for accessing functionality are:
Menus – Text menus are displayed at the top of most windows. Menu items are accessed either by a left mouse click, or using a hot key combination (e.g., Alt+F opens the File menu). When the menu is opened, you can click on an item to select it, or use arrow keys to highlight it and press the Enter key, or just type the underlined letter.
By convention, menu items that bring up dialog boxes or new windows requiring interaction will be followed by an ellipsis (…). Other items execute functions directly or can be switched on or off. Some menu items show a check mark if a function is enabled and no check mark if disabled.
Items with Program Focus – On each screen one button, text area, or other control is selected at a time to “have the focus.” The “Focus” is usually indicated when the item is surrounded by a dotted line or is bolded. Pressing the tab key can move the focus from item to item. Typing text changes a selected text edit box that has the focus. Pressing the space bar toggles a selected check box. A selected button can also be activated by pressing the Enter key.
Buttons – Buttons are an easy way to access a function. They are normally used for the functions that need to be called frequently or are very important. Clicking a button executes that function or brings up another window. Button functions can also be accessed from the keyboard using the tab key to move among items on a screen and pressing the Enter key to execute the button function. Most text-based buttons have a hot-key.
Right-Click Menus – Some areas have pop-up menus that bring up frequently used tasks or provide shortcuts. Just right-click on an area and if a context menu appears, left-click the menu item you want.
Hot Keys or Keyboard Shortcuts – Many of the menus and buttons can be accessed using Hot Keys. An underlined letter identifies the hot key for a button or function. To get to a menu or execute a function on a button hold down the Alt key and type the underlined letter in the menu name or the button text. The hot key letters may not appear until after you’ve pressed the Alt key.
Pop-Up Hints – Hints are available for many of the on-screen controls. Let the mouse pointer hover over a control, text box or other screen feature and the hint will appear automatically and remain visible for a few seconds. These hints will often explain the purpose of a control or a suggested action. For text boxes where some of the text is hidden, the full text will appear in the hint.
1-12

Section 2. System Requirements

2.1 Hardware and Software

RTDAQ is an integrated application of 32-bit programs designed to run on Intel-based computers running Microsoft Windows operating systems. Recommended platforms for running RTDAQ include Windows XP, Windows Vista, and Windows 7.
RTDAQ also requires that TCP/IP support be installed on the PC.
2-1
Section 2. System Requirements
2-2

Section 3. Installation, Operation and Backup Procedures

3.1 CD-ROM Installation

The following instructions assume that drive D: is a CD-ROM drive on the computer from which the software is being installed. If the drive letter is different, substitute the appropriate drive letter.
1. Put the installation CD in the CD-ROM drive. The install application
should come up automatically. Skip to step 3.
2. If the install does not start, then from the Windows system menu, select
Start | Run. Type “d:\setup.exe” in the Open field or use the Browse button to access the CD-ROM drive and select the setup executable. This activates the RTDAQ Installation Utility.
3. Follow the prompts on the screen to complete the installation. The
installation will require a CD key. You will find this code printed on the back of the jewel case of the original installation CD.
A shortcut to launch RTDAQ is added to your computer’s Start menu under Programs | Campbell Scientific | RTDAQ. If the default location is used, RTDAQ executable files and help files are placed in the C:\Program Files\CampbellSci\ directory (folder), with the main RTDAQ application located in the C:\Program Files\CampbellSci\RTDAQ directory.
Working directories will also be created in the C:\Campbellsci directory for RTDAQ’s configurations and data files, user programs, and settings for the accessory applications and utilities.
Trial Version
If you are installing the trial version of RTDAQ, you will have 30 days to use this fully functional trial version. Each time you run RTDAQ, you will be advised as to how many days are remaining on your trial version. At the end of the 30 days, the trial version of RTDAQ will no longer function.
If you choose to purchase RTDAQ, you will need to run the install program on the RTDAQ CD and input the CD Key from the back of your CD case. This can be done either before or after the 30-day trial period has expired.
Note that the trial version will install some applications in the C:\Program Files\Campbellsci\Demo directory. When the purchased version of RTDAQ is installed, these applications will each be installed in their own directory under C:\Program Files\Campbellsci. The versions in the Demo directory will no longer be used. Therefore, to avoid having these unused versions remain on your computer, you may wish to uninstall the trial version before installing the purchased version of RTDAQ.
3-1
Section 3. Installation, Operation and Backup Procedures

3.2 RTDAQ Operations and Backup Procedures

This section describes some of the concepts and procedures recommended for routine operation and security of the RTDAQ software. Since the occurrence of operational issues cannot be fully eliminated on most computer systems, the following guidelines and procedures are provided to help minimize possible problems that may occur.

3.2.1 RTDAQ Directory Structure and File Descriptions

3.2.1.1 Program Directory
As described earlier in the installation procedures, the files for program execution are stored in the C:\Program Files\Campbellsci\ directory. This includes the executables, DLLs, and most of the application help files. This directory does not need to be included in back up efforts. RTDAQ and its applications rely on registry entries to run correctly; therefore, any restoration of the program should be done by reinstalling the software from the original CD.
3.2.1.2 Working Directories
In this version of RTDAQ, each major application keeps its own working directory. The working directory holds the user files created by the application, as well as configuration and initialization (*.INI) files.
This scheme was implemented because Campbell Scientific uses the underlying tools and many of the applications (the communications server, library files, datalogger program editors, etc.) in a number of different products. By providing a common working directory for each major application, you should see consistent file organization as you move from one product to another.
3-2
Section 3. Installation, Operation and Backup Procedures
The following figure shows the typical working directories for RTDAQ if the default options were selected during installation:
FIGURE 3.2-1. Typical Working Directories for RTDAQ

3.2.2 Backing up the Network Map and Data Files

As with any computer system that contains important information, the data stored in the RTDAQ working directory should be backed up to a secure archive on a regular basis. This is a prudent measure in case the hard disk crashes or the computer suffers some other hardware failure that prevents access to the stored data on the disk.
The maximum interval for backing up data files collected from dataloggers depends primarily on the amount of data maintained in the datalogger memory. The datalogger’s data tables are typically configured as ring memory. Records will be stored to a table until the number of records reaches a predefined size, and then each new record will overwrite the oldest record. If the data is backed up more often than the oldest records in the datalogger are overwritten, a complete data record can still be maintained by restoring the data from the backup and then re-collecting the newest records from the datalogger.
3-3
Section 3. Installation, Operation and Backup Procedures
3.2.2.1 Performing a Backup
RTDAQ provides a simple way to back up the network map, the RTDAQ data cache, and the initialization files for the main application. The network map will restore all settings and data collection pointers for the dataloggers and other devices in the network. The data cache is the binary database which contains the collected data from the datalogger. Initialization files store settings such as window size and position, configuration of the data display, etc.
NOTE
The *.INI files backed up in the RTDAQ backup procedure are those found in the C:\Campbellsci\RTDAQ\sys\inifiles folder only. Other *.INI files such as those for Short Cut, CardConvert, Split and the CRBasic Editor are not a part of the backup.
From RTDAQ’s menu, choose Network | Backup/Restore Network, and then press Backup.
The backup file is named RTDAQ.bkp and is stored in the C:\CampbellSci\RTDAQ directory (if you installed RTDAQ using the default directory structure). You can, however, provide a different file name if desired.
3.2.2.2 Restoring the Network from a Backup File
To restore a network from a backup file, choose Network | Backup/Restore Network. Select the *.bkp file that contains the network configuration you want to restore, and press Restore. Note that this process DOES NOT append to the existing network — the existing network will be overwritten when the restore is performed.

3.2.3 Loss of Computer Power

3-4
The RTDAQ communications server writes to several files in the \SYS directory during normal operations. The most critical files are the data cache table files and the network configuration files. The data cache files contain all of the data that has been collected from the dataloggers by the RTDAQ server. These files are kept open (or active) as long as data is being stored to the file.
The configuration files contain information about each device in the datalogger network, including device settings, and other parameters. These files are written to frequently to make sure that they reflect the current state and configuration of each device. The configuration files are only opened as needed.
If computer system power is lost while the RTDAQ server is writing data to the active files, the files can become corrupted, making the files inaccessible to the server. While loss of power won’t always cause a file problem, having files backed up as described above will allow you to recover more effectively if a problem occurs. If a file does get corrupted, all of the server’s working files need to be restored from a backup file to maintain synchronization with the server state.

Section 4. The RTDAQ Main Screen

This section provides an overview of RTDAQ, including a detailed description of the communications tabs, pull-down menus, and toolbar. An overview of RTDAQ’s troubleshooting tools is also provided.

4.1 Overview

4.1.1 Program Startup and Main Screen Functionality

To start RTDAQ go to the Start menu of the computer and select the RTDAQ icon under Start | Programs | Campbell Scientific | RTDAQ. You can also use the shortcut on the desktop if you elected to create one during the installation process.
Setting up and configuring RTDAQ to communicate with dataloggers is done with the EZSetup Wizard. This Wizard appears automatically the first time you run RTDAQ. To add additional dataloggers, click the Add Datalogger
button editing of existing dataloggers and their communications settings is also done
through this Wizard, through use of the Edit Datalogger button
RTDAQ offers an integrated main screen, with three tabs for basic communications functions (Clock/Program, Monitor Data, and Collect Data), and buttons from which to launch auxiliary applications to work with data files or create datalogger programs.
on the main toolbar to bring up the EZSetup Wizard again. The
.
4-1
Section 4. The RTDAQ Main Screen
The RTDAQ main screen consists of a Title Bar, Menu Bar, Toolbar, Datalogger Network Map, Clock/Program tab, Monitor Data tab, Collect Data tab, and Status Bar as shown here:
4-2
The Title Bar shows the RTDAQ application name and version, as well as the datalogger station name and model name currently highlighted for selection or connection. The Menu Bar, Toolbar, Clock/Program tab, Monitor Data tab, and Collect Data tab are described in more detail later in this chapter.
The Network Map shows which loggers have been configured for connection within the system. You can connect to a datalogger by double-clicking on its icon, or by selecting it and pressing the Connect button on the Toolbar. RTDAQ connects to only one datalogger at any one time. The Status Bar is used to show the current connection status (and connection time if connected) for the selected datalogger.
RTDAQ provides additional tools for working with your dataloggers and data.
RTMC support is provided for viewing live data in a customized display. Split, View Pro, and CardConvert are used to examine and process data files. Short Cut and the CR5000/CR9000X Program Generator (ProgGen) can be
used to generate datalogger programs, and the CRBasic Editor is provided for more advanced datalogger program editing. DevConfig is used to configure settings in dataloggers and other peripheral devices. These tools are accessed
Section 4. The RTDAQ Main Screen
via the buttons on the main screen or the pull-down menu selections under the Tools menu. More information about these tools is provided later in this manual.

4.1.2 Datalogger Connectivity, Help and Program Exit

RTDAQ supports the major CRBasic dataloggers, including the CR800, CR850, CR1000, CR3000, CR5000, and CR9000X.
RTDAQ supports one medium of communications for any given datalogger. These media include direct connect via serial communications (or RS-232) via local serial cable, short haul modems, other “transparent” links, telephone, TAPI, TCP/IP, VHF/UHF radios, RF400-series spread spectrum radios, and multidrop interfaces (MD9 and MD485).
RTDAQ does not support parallel port communications, RF95T modems, or multiple media (such as phone-to-RF). RTDAQ is designed to use PakBus dataloggers and other PakBus devices in their default configurations; they are not supported as PakBus routers.
In order to be easy to use, RTDAQ relies on user-attended communications. It does not provide for automated scheduled data collection or automated clock checks. It does not support remote connections from other PCs.
Help for each application is available from the Help menu item, or by moving the focus to a control (by clicking on or tabbing to a control) and pressing F1.
To exit RTDAQ, either click the [X] in the upper right hand corner of the main screen, or select Exit under the File menu.

4.2 EZSetup Wizard

Dataloggers are added to the network with the EZSetup Wizard. This Wizard is also used to edit the settings for a datalogger after it’s been added. The EZSetup Wizard is automatically displayed when RTDAQ is run for the first time.

4.2.1 Add Datalogger

When RTDAQ is not connected to a datalogger, you may add a datalogger to
your network map by selecting the Add Datalogger button Network | Add Datalogger from the menu. The EZ Setup Wizard will appear allowing you to select and configure your new datalogger.
or by choosing
4-3
Section 4. The RTDAQ Main Screen
Previous and Next buttons are provided for easy movement through the Wizard. Progress is shown by the blue arrow next to each step displayed on the left of the screen. Help is available from the Help button as well as the text displayed on the right side of the screen.

4.2.2 Communication Setup

In the Communication Setup step you select the datalogger type and give it a name that will also become the default file name for data files collected from that datalogger. You may set up connections for the following loggers: CR9000X, CR5000, CR1000, CR3000, and the CR800 Series (which includes both the CR800 and CR850). The next step allows you to choose from the communications media that are available for the datalogger. RTDAQ will display the serial ports (COM ports) known to your Windows operating system. RTDAQ fills in as many communications settings as possible and in many cases you can use the default settings. It provides fields for user-entered communications settings such as phone numbers and RF radio addresses. Help for entering these settings is provided on the right side of each screen, by clicking the F1 key, or by pressing the Help button for each wizard screen. You may also want to consult the manual corresponding to the particular communications hardware you are configuring.

4.2.3 Datalogger Settings

The Datalogger Settings step is provided for fine tuning the connection to the datalogger. The baud rate offered is typically the maximum baud rate supported by that datalogger and communications medium; lower rates may be required for cell phones or noisy telephone links. Enter a Security Code only if the datalogger is configured – via the keyboard/display or settings in the datalogger program – to use it.
4-4
Section 4. The RTDAQ Main Screen
4.2.3.1 Max Time Online
Note that the default Max Time On-Line setting for most communications links is zero (“0 d 00 h 00 m”), which means that RTDAQ will never hang up until you click Disconnect. For telephone links, the default Max Time On-Line setting is 10 minutes in order to reduce the possibility of inadvertent and expensive long distance or cellular telephone charges. There are, however, other links that can result in expensive connection charges, such as digital cellular links using TCP/IP that charge by the byte. Leaving the datalogger connected also uses battery power, so if the datalogger power supply is not recharged from a reliable source, it may discharge its battery below safe levels. Be sure, therefore, that you do not leave the datalogger connected beyond the time necessary to do the tasks you need to do.

4.2.4 Summary, Communications Test, and Clock Set

The Setup Summary step provides a list of the settings entered. You can use the Previous button to go back and change settings as necessary.
The Communications Test step allows you to test the communications link before going any further. If the datalogger is not installed, you can skip this and the next two steps.
If communication succeeds, you can move to the Datalogger Clock step where you can check or set the datalogger’s clock to match the PC’s system time. If the datalogger is in a different time zone, you can enter an offset in hour and minutes.

4.2.5 Send Program

The Send Program step allows you to send a program to the datalogger. This may be a program you created with Short Cut, ProgGen, the CRBasic Editor or a program supplied by someone else. Dataloggers will display the program name if one is running and will provide table definitions that contain data labels. If you don’t have a program for the datalogger you can skip this step and send a program later from the Clock/Program tab.
If you connected to the datalogger during the EZSetup Wizard, when you leave the Wizard it will ask if you wish to stay connected.

4.2.6 Editing and Deleting Dataloggers

Once you’ve added a datalogger, you may disconnect and use the other datalogger configuration buttons on the Toolbar to delete that datalogger, edit its settings, or add another datalogger to the Network Map.
4-5
Section 4. The RTDAQ Main Screen

4.3 Clock/Program Tab

Selection of the Clock/Program tab brings up the Clock/Program screen. RTDAQ displays this tab by default when first executed.

4.3.1 Basic Operation

In this screen you can see brief details about the currently selected datalogger, including its name in the Network Map, its station name, its connection information, and its response time settings. When connected, you can also view the current time as given by the datalogger, as well as the time given by the PC’s clock. You can set the clock on the datalogger to be synchronized with the PC clock. You can also view the name of the current program running on the datalogger. You can send a program or operating system to the datalogger. You can also retrieve the currently running program to your PC.
4-6

4.4 Monitor Data Tab

Once you’ve added and connected to a datalogger, you can monitor the values stored by the datalogger in real-time. Choose the Monitor Data tab to display the Monitor Data screen.
Section 4. The RTDAQ Main Screen

4.4.1 Field Monitor

This screen contains the Field Monitor, which displays values from datalogger tables, including stored tables and the public table. Press the Add button to bring up a screen for selecting data table fields to be monitored in this screen.
After the Start button has been pressed, RTDAQ will display the last record stored to that table and will automatically update these records as they are stored in the datalogger’s memory. Note that RTDAQ does not automatically store this data to a data file on the PC. If you want a permanent record of the data, you must collect it manually from the Collect Data tab.
You may find that your labels or the number of digits displayed are too long to fit in the space provided. Using the mouse, you may put your cursor over the border between the columns for the labels and values and drag it left or right to make it easier to read. The column width is not preserved when RTDAQ is closed and restarted. The table name, variable name and data value also will be displayed momentarily as a popup hint if you hover your cursor over a value for a few seconds.

4.4.2 Editing Variable Values

In some cases, you may wish to edit public variables. For example, you may choose to change sensor offsets or control variables affecting datalogger program execution. To change public variable values, double-click on the
4-7
Section 4. The RTDAQ Main Screen
number itself until it turns yellow, then use the PC keyboard to enter a new value. Alternately, you can right-click the value, select View/Modify Value, and edit the value in the resulting dialog box.

4.4.3 Specialized Real-time Monitor Screens

The Monitor Data screen is also used to access the specialized real-time data monitor screens. For more information about the Monitor Data screen, see Chapter 7 “Monitoring Data in Real-time”.

4.5 Collect Data Tab

To retrieve a copy of the data from the datalogger and store it permanently into a file located on your PC, select the Collect Data tab.
4-8
The Collect Data screen allows for manual data collection. The mode for the data collection is specified, as well as whether the collected data should be stored in a new output file or appended to an existing one. The format of the output file is also selected.
To collect a range of data from a specified timeframe, you can use the Starting Date/Time and Ending Date/Time options. Choices for including timestamps and record numbers in the stored data are also included. A choice of tables to be collected for output is given. Tables can be selected individually or as a group.
The station name identifier can be chosen to be included in the header of the data file if desired. Names and paths for the output files can be selected as desired. Finally, the collection is initiated using the Start Collection button. For more information about this screen refer to the associated online help topic.

4.6 Pull-down Menus

Access to almost all of the buttons and tabs on RTDAQ’s screens is also available via pull-down menus. Many of these functions are described in detail in other sections of this manual.
The File menu is used to save and retrieve global setting configurations and close the RTDAQ program. The View menu allows selection of languages other than English. The Datalogger menu is used for datalogger control functions, connections, and wizards. The Network menu is used for adding, editing and deleting loggers, and performing backups of the network map. The Tools menu is used for accessing supplementary programs such as the ones shown on the Toolbar. The Help menu is used for accessing the RTDAQ online help system.

4.6.1 File Menu

4.6.1.1 Saving and Loading Configurations
For information on how to use these functions, refer to the “Saving and Loading Global Configuration Files” section of Chapter 7 “Monitoring Data in Real-Time”.
Section 4. The RTDAQ Main Screen
4.6.1.2 Exit
The Exit item is used to close all real-time windows, disconnect from the connected datalogger, and close RTDAQ.

4.6.2 View Menu

RTDAQ can display the user interface component text (for buttons, dialog boxes, and other user interface elements) in a language other than English if a separate language package has been installed. If a language package is installed on your machine, the View menu will have a Languages entry and you will see the installed language as an item in the submenu. When a new language is chosen, RTDAQ will immediately reflect that change. Opened clients will not reflect the change until they are closed and reopened.
Applications that support alternate languages are Short Cut, CRBasic Editor, View Pro, CardConvert, PakBus Graph, LogTool, and the Device Configuration Utility.
NOTE
Available language packages are provided by Campbell Scientific's international representatives or on the CSI web site. They are not included in the standard RTDAQ installation.
4-9
Section 4. The RTDAQ Main Screen

4.6.3 Datalogger Menu

4.6.3.1 Connect/Disconnect
This option provides the same function as the Connect/Disconnect button on the main toolbar (see Section 4.7).
4.6.3.2 Update Table Definitions
When a CRBasic datalogger is configured for the first time or when a new program is sent, RTDAQ queries the datalogger for its table definitions. Whenever a new program is loaded into the datalogger, the table definitions will automatically be sent to RTDAQ. When using the real-time screens to view data, RTDAQ requires the latest table definitions in order to work properly. To avoid unnecessary data throughput on a datalogger, this information is not sent to RTDAQ with every configuration change, but only when deemed necessary, such as when a program changes.
If you find the table definitions in RTDAQ to be mismatched with the datalogger program, you can update those definitions manually. To update the table definitions for a datalogger manually, connect to that datalogger and select Update Table Definitions from the Datalogger menu.
4.6.3.3 Status Table
CRBasic dataloggers include a default data table called the Status Table, which displays key values about the condition of the datalogger. The Datalogger | Status Table menu item opens a window to display that information. Records from the datalogger’s status table are generated on demand. Each datalogger has its own list of status fields, but they typically include such information as the hardware operating system version, the name of running program, battery voltage, various error counters including watch dog and low battery conditions, and an estimate of how many days it will take for data tables to begin overwriting their oldest records. Detailed information on the status table for each datalogger can be found in the operator’s manual for that particular datalogger.
4-10
Section 4. The RTDAQ Main Screen
The Status Table display screen is shown below:
4.6.3.3.1 Summary Tab
This window has three tabs: Summary, Table Fill Times, and Status Table.
The Summary tab provides an overview of important status information from the datalogger, including information about the datalogger model and its firmware, current program details including error information (if any), battery voltage levels, and card memory (if one is present). Press the Refresh button to prompt RTDAQ to query the datalogger and update the values, the Save button to save the information being displayed to a file, or the Print button to print the information being displayed.
4-11
Section 4. The RTDAQ Main Screen
4.6.3.3.2 Table Fill Times
The Table Fill Times tab lists the tables in the datalogger, along with the maximum number of records the table can hold, the estimated amount of time that it will take the table to fill, and the estimated date and time that the table will fill based on the time the datalogger program was downloaded and the table size. This fill information helps the user determine the collection schedule that should be performed on the datalogger. Data should be collected no less frequently than a user can afford to lose it. A data table can be reset from this window by pressing the Reset Tables button.
Press Refresh to prompt RTDAQ to query and update the values.
NOTE
4.6.3.3.3 Status Table Tab
Resetting a table will erase the data in the datalogger and in the data cache.
The Status Table tab lists all of the status table fields in the datalogger along with their values. By default, all of the fields in the status table are displayed. To select only certain status data to be viewed, press the Select Fields button. This will display a list of the status fields available in the datalogger. Select one or more of the fields and then press OK. The current values will be displayed in the table. If you select a cell within the status table and right click, a short cut menu will be displayed. From this menu you can Select Fields or View/Modify a value (if it is a writable value).
Press the Refresh button to prompt RTDAQ to query the datalogger and update the values, the Save button to save the information being displayed to a file, or the Print button to print the information being displayed.
4.6.3.4 File Control
The dataloggers used in RTDAQ have a built in file system much like a computer hard disk. Multiple files can be stored in the datalogger's memory or on a PC card, including data files, calibration files, and datalogger programs. The dataloggers retain files in memory unless they are specifically deleted or removed as part of a program change operation.
4-12
The File Control window is used to manage all the files on the dataloggers. The Datalogger | File Control menu item opens File Control.
Section 4. The RTDAQ Main Screen
4.6.3.4.1 Datalogger Devices
Each datalogger will have a device designated as the CPU drive. If an add-in card is installed on the datalogger, you will also see the CRD storage device. The File Control window displays a list of files stored on each of its devices such as the CPU, PC card, or user-specified drive. The window on the left lists all of the data storage devices available for the selected datalogger (CPU, CRD, or USR). Selecting a device shows a list in the right pane of the screen displaying the files stored on that device.
NOTE
The USR drive is a user-created drive in the CR800, CR1000, and CR3000 dataloggers. It can be set up by assigning a value to the datalogger's UsrDriveSize setting in the status table. This drive must be set to at least 8192 bytes, in 512 byte increments. If the value entered is not a multiple of 512 bytes, the size will be rounded up. The size may also be rounded up to the account for a certain amount of overhead that is required for the drive to operate.
4.6.3.4.2 Run Options
The Run Options for a program file indicate whether it is set to Run Now, Run On Start-up, or both (Run Always). The currently executing program is
indicated by the Run Now or Run Always attribute. The file size is also displayed for each file, as well as the last time the file was modified and whether or not the file is Read Only or Read/Write. Note that the Size and Modified date are not available for the CR9000X and CR5000 dataloggers.
4-13
Section 4. The RTDAQ Main Screen
4.6.3.4.3 Working with Files and Directories
There are several options for working with the files and directories on the datalogger.
Send is used to transfer files from the computer to the datalogger. Clicking the Send button brings up a standard file selection dialog box. A new file can be
chosen and sent to the highlighted device. Datalogger programs, data files, and other ASCII files can be sent to the datalogger.
If you select the Set Run Options on Send check box in the File Control screen, you will have the opportunity to set the Run On Power-up and/or Run Now options as the file is being transferred from the PC’s file system to the selected device (see the Run Options section below).
Format is used to format the selected device. Just like formatting a disk on a computer, all of the files on the device are deleted and the device is initialized.
Refresh will update the list of files for the selected device.
Retrieve will get the selected file from the datalogger and store it on the
computer. A Save As dialog box comes up allowing you to specify the directory and file name for the saved file.
Run Options brings up a dialog box that is used to control what program will be run in the datalogger. Highlight a file, and then select the Run Options button.
Run Now will stop the program currently running on the datalogger and then load and run the selected program. During this process, all of the existing data tables in datalogger memory are deleted. If data is also being stored to a card, select an option button to determine whether or not the data tables created by the program and stored on the card are to be erased or retained.
4-14
To use the Erase all card data files option when sending a program to a CR9000X or CR5000 datalogger, you must send the program to the datalogger first without starting it, and then select the Run Options on the program from the File Control screen. You can then start the program and select the Erase option or the Do Not Erase option. With the CR1000 and CR3000
Section 4. The RTDAQ Main Screen
dataloggers this setting can be selected when the program is sent to the datalogger.
Run On Power-up sets the file to run when the datalogger is powered down and powered back up.
A file set to Run Now and Run On Power-up will be shown as Run Always in the File Control window.
Delete - Highlight a file and press the Delete button to remove the file from the datalogger's memory. A running program may not be deleted.
Stop Program halts execution of the currently running datalogger program.
For all dataloggers but the CR800, CR1000, and CR3000, note that all data tables will be deleted when the program is stopped. For a CR800, CR1000, or CR3000 select the option to stop the program and retain the data files, or to stop the program and erase all data files.
If a CR800, CR1000, or CR3000 program has been stopped, use the Run Options to restart it. Once again, you will be able to choose whether to retain or erase the data files. You can also choose a new program file to run.
4.6.3.4.4 Right-Click Menu Options
When a file name is selected, pressing the right mouse button displays a menu with the Retrieve File, Delete File, Rename File, Run Options, and Stop Program options.
4.6.3.5 Calibration Wizard
This item can be used to calibrate measurements being made by the currently connected datalogger. The program in the datalogger must be written with the proper instructions to enable these calibrations.
For complete information on how to activate and use the Calibration Wizard, see Section 9 “Calibration and Zeroing”.
4-15
Section 4. The RTDAQ Main Screen
4.6.3.6 Terminal Emulator
Terminal Emulator emulates a terminal connected to a datalogger or communications device. Terminal Emulator comes up showing a blank screen. Clicking on Select Device shows a list of devices known to RTDAQ.
4-16
Selecting a device and baud rate, and then clicking Open Terminal causes RTDAQ to attempt to connect with that device. If the device is a datalogger, RTDAQ will call the datalogger over whatever communications link has been established and will attempt to get a prompt from that datalogger. If the device is a root device, such as a serial or COM port, RTDAQ simply opens that port at the specified baud rate.
Terminal Emulator has several uses. If you open a COM port, you can use it to set up devices that present their own menus, such as RF400 radios or NL100s. See the manuals for those devices to obtain information on how to navigate the menus and what settings to choose.
Another potential use is to communicate with smart devices attached to the datalogger. Some dataloggers allow a “pass-through” mode whereby you can communicate through them to an attached SDI-12 sensor to set its address or other parameters. See the manuals for the datalogger and sensor for the relevant commands.
Troubleshooting communications devices is another use for Terminal Emulator. When calling for support on these devices, an applications engineer
may ask you to use this method to manually dial through phone or RF modems, for example.
You can close a connection to start another one by clicking the Close
Terminal button. You can close the Terminal Emulator itself by clicking the [X] button in the upper right corner of the screen.

4.6.4 Network Menu

4.6.4.1 Add/Delete/Edit/Rename Datalogger
The Add Datalogger, Delete Datalogger, and Edit Datalogger Setup options perform the same functions as the buttons on the main toolbar. The Rename Datalogger item can be used to change the name of a datalogger.
4.6.4.2 Backup/Restore Network
This function can be used to save a copy of the network map to a file, and then to restore the network if necessary. The settings for all the devices in the network will be saved.
Section 4. The RTDAQ Main Screen
A default is given for the directory and file name to be used for the backup or restore. This can be changed by typing over the default directory and/or file name or selecting the button to the right of the field containing the file name and browsing to the desired directory and file name.
To backup the current network map, select the file name to which the backup will be stored, and then press the Backup button. The network map will be saved to the chosen file, and a message will appear indicating that the network has been backed up.
To regenerate the network map from a backup file, select the name of the backup file to restore from the dialog box, and then press the Restore button. Note that this backup will replace the existing network (it does not add to the existing network).
The backup/restore option will be disabled if you are currently connected to a datalogger. You must disconnect from the datalogger before performing a backup or restoring the network.
4.6.4.3 Computer’s Global PakBus Address
RTDAQ communicates with the CR1000, CR3000 and CR800 series dataloggers using the PakBus protocol. All nodes and routers, including dataloggers and the computer itself in a PakBus network must have a unique PakBus address less than 4095 (and typically less than 4000). Setting up a PakBus network that communicates between the nodes can be a complex task, so RTDAQ avoids complexity by setting up each PakBus datalogger within its own PakBus subnetwork. RTDAQ uses a PakBus “Port” with a unique PakBus address to receive communications from PakBus devices. Setting this global address will cause each new PakBus datalogger added to the Network Map to connect to RTDAQ using the specified PakBus address.
4-17
Section 4. The RTDAQ Main Screen
The CR800/850, CR1000 and CR3000 dataloggers keep track of the PakBus addresses of other devices that communicate with them, including PCs. If more than one PC is communicating with a single PakBus datalogger, it may be helpful to assign each PC its own PakBus address. PakBus addresses greater than 3999 are reserved for PCs or routers. Address 4095 is reserved for broadcast messages. Keep in mind that, although PakBus devices keep their own routing tables, they will communicate with any other PakBus device that has an address >3999. Therefore, you may want to use different PakBus addresses for each PC communicating with your PakBus dataloggers. RTDAQ uses address 4090 by default, LoggerNet uses 4094, PC400 uses 4093, PC200(W) uses 4092, and 4091 is used by CSI’s PDA software. This menu item provides the ability to change that computer level address.

4.6.5 Tools Menu

4.6.5.1 Auxiliary Applications
Use the items on the Tools menu to launch the auxiliary programs, including the RTMC applications, View Pro, Split, CardConvert, Short Cut, CRBasic Editor, and the CR5000/CR9000X Program Generator (ProgGen). Some users prefer using the keyboard instead of the mouse. The Alt-T keystroke is provided to facilitate keyboard access. These applications are described in more detail later in this manual as described below:
RTMC Development, RTMC Pro Development, RTMC Run-time: See Section 8: Real-Time Monitoring and Control Software
ViewPro: See Section 6: ViewPro
Split: See Section 10.3: Split
CardConvert: See Section 10.1: CardConvert
ShortCut: See Section 5.2: Short Cut
CRBasic Editor: See Section 5.1: CRBasic Editor
ProgGen: See Section 5.3: Program Creation with the RTDAQ Program
Generator
4-18
Device Configuration Utility: See Section 10.2: Device Configuration Utility
4.6.5.2 Options
Section 4. The RTDAQ Main Screen
The following two options can be set to control the general operation of RTDAQ:
Automatically Check Datalogger Status - This option allows you to determine when the datalogger status table is automatically checked. The options include After Connection, After Program Send, and/or On Interval.
The status values checked include the following: PakBus Address, WatchDog Errors, Skipped Scans, Skipped Slow Scans, Skipped Records, Variable Out of Bounds, Program Errors, Battery Voltage, Lithium Battery, Number of times voltage has dropped below 12V, Number of times voltage has dropped below 5V, Stack Errors, and Calibration Errors. Note that not all status values are applicable to all dataloggers. Only those status values applicable to the current datalogger will be checked.
If a problem is found during a datalogger status check, the status table will pop up along with a warning indicating the problem that has been identified.
Show Hints - The Show Hints option is used to turn on/off the tool tips that appear when your mouse hovers over a control (button or field). When a check mark appears beside the menu item, the tool tips will be displayed. When the check mark does not appear beside the menu item, no tool tips will be displayed. This menu item is a toggle; select it to change its state.
4.6.5.3 LogTool
Sooner or later every communications link will experience some problems. Sometimes these problems resolve themselves, such as when phone lines are busy at first, but become available as other users complete their tasks.
When the resolution of communications problems is not straightforward, the LogTool application can allow detailed analysis of communications activity. LogTool is accessed from the Tools | LogTool menu item.
4-19
Section 4. The RTDAQ Main Screen
On the left side of the LogTool window is a display of all devices set up in RTDAQ. You can choose to show all messages or filter them to show only certain devices or dataloggers. RTDAQ can also store these messages to log files on the PC’s hard drive and will eventually overwrite these files to keep them from growing forever. You can control whether these logs are used, as well as the number and size of each log file type with the Options | Log File Settings menu and dialog.
RTDAQ’s communications engine creates four different types of message logs. Transaction messages are the highest level, and show every action undertaken by RTDAQ. For example, if you’re monitoring a datalogger every second, RTDAQ will show clock check messages each second. Many of the messages displayed on this log are understandable and may provide some insight to the processes going on behind the scenes when you monitor or collect data.
The other three logs are more technical in nature, but can be very useful to Campbell Scientific support engineers. Communications messages show when devices are activated, the settings passed to those devices, and their responses. This log may include status, warning, and fault messages. The Object State messages record the state of software objects behind the scenes in RTDAQ. The most detailed log is the Low Level Log. A separate log is stored for each root level device (each COM port, IP port or TAPI port). These logs record every byte sent or received through that port. Interpreting all of these logs requires knowledge of both Campbell Scientific protocols as well as other, lower level protocols, and requires a detailed understanding of what is
4-20
supposed to be happening. Most users will only need to access these logs when requested to do so by Campbell Scientific support personnel.
For more information about the content of these logs see Section 10.
4.6.5.4 PakBus Graph
PakBus Graph is a utility that graphically depicts the connections in a PakBus datalogger network. It provides a look at RTDAQ's PakBus routing table. In addition, the utility can be used to change the settings of a PakBus device.
The window for PakBus graph is divided into three sections: the list of PakBus devices, a graphical depiction of the PakBus network, and the log messages for PakBus communications. The list of devices and the log can be toggled off by clearing the Show List View and Show Log options, respectively.
Software servers are identified in PakBus Graph by the color green. Other devices remain colorless unless they have been selected with the mouse cursor. When selected, they are colored cyan.
The default PakBus address for RTDAQ is 4090. Other PakBus devices will be shown by name and address, if known.
Section 4. The RTDAQ Main Screen
4.6.5.4.1 Selecting the PakBus Network to View
When PakBus Graph is opened, it is set to view the first PakBus network on the computer on which the datalogger support software is running. Each PakBus datalogger in RTDAQ is set up in its own PakBus network. If more than one PakBus network is set up on the computer, the different networks can be viewed individually by selecting a port name from the PakBus Network drop-down list.
4-21
Section 4. The RTDAQ Main Screen
4.6.5.4.2 Dynamic and Static Links
There are two types of links to PakBus dataloggers that the server recognizes: static links and dynamic links. Static links (depicted using red lines) are the communication links to dataloggers that have been set up in the software, but which have not been confirmed by communicating with the datalogger(s). You will see these dataloggers listed in the software's network map. Dynamic links (black lines) are communication links to dataloggers that have been confirmed.
4.6.5.4.3 Viewing/Changing Settings in a PakBus Datalogger
If you right-click a device in PakBus graph, you will be presented with a context menu. From this menu, select Edit Settings to display a list of the PakBus settings for the datalogger. Some of these settings are read-only, but other settings can be changed. Click within the cell for a setting, enter a new value, and then press Enter to make a change. If the change is accepted, the cell will appear green. If the change was denied (which likely means the setting is read-only), the cell will appear red.
4.6.5.4.4 Right-Click Functionality
There are several options available from the context menu that is displayed when you right-click a device (not all devices will have all settings):
Edit Settings - This option shows the PakBus settings of a device (see above).
Ping Node - This option will send a packet to the selected device to determine
if it is reachable in the PakBus network. The results of the ping will be displayed in the Log Messages. Each ping message will include the size of the packet sent, and the time of response from the pinged device. The last message recorded will include summary information from the ping.
Verify Routing Table – This option will request the routing table from a PakBus device.
Reset Node - This option will reset the routing table in a PakBus device.
Change PakBus Address (server only) - By default, the PakBus address of
the software server is 4090 (RTDAQ). This option lets you change this default.
Search for Neighbors (server only) - When this option is selected, the software server will broadcast a Hello Request every 5 seconds to search for PakBus neighbors with which it can communicate. During this time, the PakBus port is kept on-line.
Broadcast Reset (server only) - This option will reset the routing table in the selected PakBus device, as well as any neighbors of the selected device that are acting as routers.
4-22
Unlock Position – This option will unlock a device that has been locked into position in PakBus Graph by dragging it to a new position on the screen. All devices can be unlocked by selecting View | Unlock All Positions from the menu.
4.6.5.4.5 Discovering Probable Routes between Devices
You can view the probable route that communication will take between two PakBus devices by sequentially clicking on the two devices in Pakbus Graph. The probable communication route will be highlighted in cyan. If the Show Hop Metrics check box is selected, the graph will include the time, in milliseconds, that communication takes between the two devices. The results are also displayed in the Log Messages portion of the window.

4.7 The RTDAQ Toolbar

The Toolbar gives quick access to commonly used functions. Many of the more frequently-used functions of RTDAQ can be activated from the toolbar in addition to the pull-down menus (as described earlier in this chapter). The following chart explains the functionality of the toolbar:
Section 4. The RTDAQ Main Screen
Connect/Disconnect. Toggles and displays the connection state. The Connect button indicates that no datalogger is currently connected. Press this button to connect to the currently highlighted datalogger. The Disconnect button indicates that you are connected to the highlighted datalogger. Press this button to disconnect.
Add Datalogger. Opens the EZSetup Wizard to add a new datalogger to the network map. (RTDAQ must be in a disconnected state for this button to be enabled.)
Delete Datalogger. Deletes the selected datalogger from the network map. (RTDAQ must be in a disconnected state for this button to be enabled.)
Edit Datalogger Setup. Opens the EZSetup Wizard to edit the settings for the selected datalogger. (RTDAQ must be in a disconnected state for this button to be enabled.)
Datalogger Status. Opens the datalogger status screen. (RTDAQ must be in a connected state for this button to be enabled.)
File Control. Opens the file control screen. (RTDAQ must be in a connected state for this button to be enabled.)
4-23
Section 4. The RTDAQ Main Screen
RTMC Development. Opens RTMC Development for the setup or editing of RTMC projects.
RTMC Run-time. Opens RTMC Run-time for the execution of RTMC projects. (RTDAQ must be in a connected state for this button to be enabled.)
View Pro. Opens View Pro for viewing collected data files.
Split. Opens Split for splitting collected data files based on
timestamp or other criteria.
Card Convert. Opens Card Convert to convert binary data, including data obtained from a removable card.
Short Cut. Opens Short Cut for the generation of CRBasic programs.
CRBasic Editor. Opens the CRBasic Editor for manually creating or editing CRBasic programs.
CR5000/CR9000X Program Generator. Opens ProgGen for the generation of CR5000 or CR9000X CRBasic programs.
Device Configuration Utility. Opens DevConfig to configure settings in dataloggers and other devices.
4-24

Section 5. Program Creation and Editing

The CRBasic Editor is a programming tool which can be used with the CR1000, CR3000, CR800, CR850, CR5000, and CR9000X dataloggers. It is intended for use by experienced datalogger programmers who need more flexibility and control over the datalogger operation than what can be achieved using program generators such as SCWIN or the CR5000/CR9000X Program Generator (ProgGen). This programming language is similar in syntax, program flow, and logic to the Structured BASIC programming language.
SCWIN and the CR5000/CR9000X Program Generator are also discussed in this chapter.

5.1 CRBasic Editor

5.1.1 Overview

NOTE
Although RTDAQ does not support the CR200 Series or CR9000 dataloggers, the CRBasic application included with RTDAQ is the same one included for use with LoggerNet and other Campbell Scientific support software. Because of this, the documentation included here contains references to these dataloggers. For most RTDAQ implementations, these references can be ignored.
As shown below, the CRBasic Editor's main window is divided into three parts: the Program Entry Window, the Instruction Panel, and the Message area. The Instruction Panel on the right side is a list that comprises the instructions for a particular datalogger in the CRBasic language. Instructions can be selected from this list or entered directly into the Program Entry Window on the left. The Message area at the bottom becomes visible after a program is compiled and shows results of the compile and any errors detected.
5-1
Section 5. Program Creation and Editing

5.1.2 Inserting Instructions

An instruction can be easily inserted into the program by highlighting it in the Instruction Panel list and pressing the Insert button or by double-clicking the instruction name. If an instruction has one or more parameters, an instruction dialog box will be displayed to facilitate editing the parameters. Complete the information in the parameter fields and press Insert to paste the instruction into the program. (You may disable this instruction dialog box by clearing the option in the View | Instruction Panel Preferences | Show Instruction Dialog check box.)
You can filter the list of instructions available in the Instruction Panel by clicking the drop-down arrow to the right of the text box above the list. This will allow you to display only instructions of a specific type such as Measurement or Program Structure/Control. This provides a smaller list to select from and makes it easier to find the instruction you want. Switch back to All to see all of the instructions available. You can create custom instruction filter lists as described later in this section.
5.1.2.1 Parameter Dialog Box
The Parameter dialog box will appear when an instruction is added that has one or more parameters or when the cursor is placed on an existing instruction and the right mouse button is pressed. This dialog box contains a field for each of the parameters in the instruction. Edit these fields as necessary and then press the Insert button to paste the instruction into the program.
5-2
Section 5. Program Creation and Editing
Below is an example of the Parameter dialog box for the differential voltage instruction (VoltDiff).
The Prev (Previous) and Next buttons can be used to move to the next (or previous) instruction with the parameter entry box opened.
Short Cuts for Editing the Parameters
Right-clicking or pressing F2 on a parameter that uses a variable as an input type will display a list of variables that have been defined in the program. A sample list is shown below.
The variable list is sorted by variable type and then alphabetically by name. In the list above, the first green A denotes that the variable AIRCOOL is set up as an Alias.
Constants are listed with a blue C, Dimensioned variables are listed with a red D, and Public variables are listed with a black P.
At any time you can press F10 to bring up the list of variables, regardless of the input type for the selected parameter. Also, defined variables can be selected from the Variables drop-down list box at the upper right of the Parameter dialog box.
5-3
Section 5. Program Creation and Editing
Pressing F9 at any time will also bring up a list of variables. However, when a variable is chosen from the list brought up by F9, it will simply be inserted at the cursor without overwriting anything.
Right-clicking or pressing F2 on a parameter that has a finite number of valid entries will bring up a list of those available options.
Right-clicking or pressing F2 on a parameter that does not fall within the two categories above will bring up help for that parameter.
Pressing F1 with any parameter selected will bring up help for that parameter along with a list of possible options where appropriate.
Changing Default Parameters Values for an Instruction
Each instruction offers default values for each parameter. For instance, in the Parameter box above, the default for the Range is mV5000. If you wanted to edit this so that each time you inserted the VoltDiff instruction the Range value defaulted to mV1000, you would highlight the instruction in the Instruction Panel, select Instruction | Edit Instruction Defaults from the menu, and make the change in the resulting dialog box.
5.1.2.2 Right-Click Functionality
The result of a right-click action varies, depending upon your cursor location.
Right-click an instruction name to show the Parameter dialog box to edit the instruction parameters.
Right-click a parameter that uses a variable as an input type to bring up a list of variables that have been defined in the program as described in the previous section.
Right-click a parameter that has a finite number of valid entries to bring up a list of those available options. You can change the option by clicking the desired option.
Right-click another type of parameter to bring up help for that parameter.
Right-click a block of text that is highlighted to bring up a short cut menu with the following options:
Comment/Uncomment Block: Only one of these options will be
available, depending upon the status of the highlighted text. If the text has been marked as a comment, you can choose to uncomment it. If the text is not commented, you can chose to make it into a comment. Commented text has a single quote ( ' ) at the beginning of the line. Comments are ignored by the datalogger's compiler.
5-4
Decrease/Increase Indent: You can increase or decrease the indention of
the selected text. The spacing is increased or decreased by one.
Cut/Copy/Paste/Delete: Standard editing functions can be accessed
through this menu.

5.1.3 Toolbar

Section 5. Program Creation and Editing
Save as .CRB File: Saves highlighted text to a file with a *.CRB
extension. This file is referred to as a “library file”. The file can then be reused by inserting it into another CRBasic program.
Insert File: Inserts a library file into the current program overwriting the
highlighted text.
The toolbar of the CRBasic Editor provides easy access to frequently used operations.
New – Creates a new program window to start writing a new program. If you have defined a default template, the new program will start with the defined template instructions.
Open – Brings up a File Open dialog to select a program file to open. File extension filters are provided to list only files of a certain type such as .cr5 files for CR5000 programs. Data files (*.dat) can also be opened.
Save – Saves any changes to the currently opened program. If this is a new program and has not been saved yet, a Save As dialog will prompt you for the file name and location to save the file. A table definition file (*.tdf) of the same name as the saved program will also be created. Refer to the online documentation for more information about using table definition files.
Compile, Save, and Send – Saves any changes to the currently opened program, checks it for errors with the pre-compiler, and sends the file to the datalogger via LoggerNet, PC400, or RTDAQ. LoggerNet, PC400, or RTDAQ must be running for this function to work properly.
Print – Prints the currently opened program.
5-5
Section 5. Program Creation and Editing
Print Preview – Opens a Print Preview screen that will show what the program will look like when printed. You can check and set the margins and printer options.
Undo – Each time the Undo button is clicked it will step back through the last changes made to the program.
Redo – Cancels the undo and steps forward restoring the changes.
Cut – Removes the selected part of the program and puts it on the
clipboard to be pasted elsewhere.
Copy – Places a copy of the selected part of the program on the clipboard to be pasted elsewhere.
Paste – Inserts a copy of the contents of the clipboard into the program at the cursor location.
Find – Brings up a Find dialog to specify a text string to search for in the program. Click the Find Next button or press F3 to go to successive occurrences of the text.
Replace – Brings up a Find and Replace dialog that allows you to specify a text string to search for and a text string to replace it with. You can replace all occurrences of the text or check them one at a time to make sure they should be replaced.
Find Next – Finds the next occurrence of the text string specified in the Find dialog.
Compile – Starts the compiler to check the current program for errors and consistency. Compile results and errors will be displayed in the message area at the bottom of the screen.
Save and Compile – Saves and then compiles the opened file.
Previous Error – Moves the cursor to the part of the program where
the previous error was identified.
Next Error – Moves the cursor to the part of the program where the next error was identified.
Instruction Panel – Controls whether the Instruction Panel is displayed. Hiding the Instruction Panel allows more room in the window to view the program.
Toggle Bookmark – Adds a bookmark to the line where the cursor resides. If a bookmark already exists, it will remove the bookmark.
Previous Bookmark – Moves backward to the previous bookmark in the program.
Next Bookmark – Moves down to the next bookmark in the program.
5-6
5.1.3.1 Compile
Section 5. Program Creation and Editing
Browse Bookmarks – Displays a list of all bookmarks in the program. When a bookmark is selected, the cursor moves to that line in the program.
Clear Bookmarks – Erases all bookmarks from the program.
GoTo – Moves the cursor to a particular section of the program.
Choose the section type from the list box that appears.
User-Defined Functions and Subroutines – Provides a list box containing all of the user-defined functions and subroutines. Functions are identified with a purple F. Subroutines are marked with a black S. Clicking on a name in the list box moves the cursor to the start of that function or subroutine.
Compile is a function provided by the CRBasic Editor to help the programmer catch problems with the datalogger program. Compile is available from the toolbar and the Compile menu.
When the Compile function is used, the CRBasic Editor checks the program for syntax errors and other inconsistencies. The results of the check will be displayed in a message window at the bottom of the main window. If an error can be traced to a specific line in the program, the line number will be listed before the error. You can double-click an error preceded by a line number and that line will be highlighted in the program editing window. To move the highlight to the next error in the program, press the Next Error button or choose Next Error from the Compile menu. To move the highlight to the previous error in the program, press the Previous Error button or choose Previous Error from the Compile menu.
NOTE
It is important that the compilers used for checking programs match the OS version loaded in the datalogger, otherwise errors may be returned when the program is sent. When a CR200 program is being edited, the Pick CR200 Compiler menu item is available. This item opens a dialog box from which a compiler can be selected for the CR200 datalogger.
The error window can be closed by selecting the Close Message Window menu item from the View menu, or by clicking the X in the upper right corner of the message window.
For the CR1000, CR3000, CR800 series, CR5000 and CR9000X dataloggers, the Compile function only verifies the integrity of the program. Actual compilation of the program takes place in the datalogger. When using the CR200 datalogger, however, this function creates a binary image of the program to be loaded to the datalogger at a later time. This function is not available for the CR9000 datalogger.
5-7
Section 5. Program Creation and Editing
5.1.3.2 Compile, Save, and Send
The CRBasic Editor allows you to send a program to a datalogger that has already been defined on the network map in LoggerNet, PC400, or RTDAQ. This only works if LoggerNet, PC400, or RTDAQ is running at the time you attempt to send the program.
This function first checks the program for errors using the pre-compiler, then saves the program (using the current name, or by prompting the user for a name if the program is new). After the compile and save, this function sends the program to a user-specified datalogger. To do this, use the Compile, Save and Send item on the File menu or Compile menu, or you can press the corresponding button on the toolbar.
NOTE
When a file is sent to the datalogger using Compile, Save, and Send and the software is not actively connected to the datalogger, the software connects to the datalogger, sends the file, retrieves table definitions, and then disconnects. There will be little indication in the software that a connection was established.
When this function is chosen a dialog box is displayed. Below is the dialog box for a CR1000 datalogger:
5-8
Section 5. Program Creation and Editing
The Select the destination list shows all dataloggers configured within LoggerNet, PC400, or RTDAQ that may receive a program matching the extension of the current CRBasic program to be sent. Assume, for example, that you have three CR1000s and some other dataloggers in your LoggerNet, PC400, or RTDAQ network map. When you send a *.CR1 program, this screen will show only the three CR1000 dataloggers. Any other dataloggers will be excluded from the list in this case, even when they are defined in the network map, because those dataloggers are not associated with *.CR1 programs. A program with the extension of .DLD will be associated with all CRBasic-programmed datalogger types.
Select the datalogger to send the file to, and then select the Run Options.
Run Now
The Run Now run options are different for the different datalogger types.
CR1000/CR3000/CR800 Datalogger Run Now Options
When Run Now is checked, the file will be sent with the Run Now attribute set. With this attribute, the program is compiled and run in the datalogger. You may choose to preserve existing data tables on the datalogger's CPU if there has been no change to the data tables (Preserve data if no table changed) or to delete data tables on the CPU that have the same name as tables declared in the new program (Delete associated data tables).
CAUTION
Neither of these options affects existing data files on a card if one is being used. If a data table exists on the card that has the same name as one being output with the new program, the message will be returned "Data on Card is from a different program or corrupted". Data will not be written to the card until the existing table is deleted. Data tables on the card that have different names than those declared in the new program will be maintained and will not affect card data storage when the new program is running.
When using the Preserve data if no table changed option, existing data and data table structures are retained unless one of the following occurs:
Data table name(s) change
Data interval or offset change
Number of fields per record change
Number of bytes per field change
Number of records per table (table size) change
Field type, size, name, or position change
To summarize, any change in data table structure will delete all tables on the datalogger's CPU, regardless of whether or not the Preserve Data option was chosen. If the Preserve Data option was chosen but the datalogger was unable to retain the existing data, the following message will appear in the Compile Results: Warning: Internal Data Storage Memory was re-initialized.
5-9
Section 5. Program Creation and Editing
CR9000(X)/CR5000 Datalogger Run Now Options
The Run Now options and behavior for the CR9000(X) and CR5000 dataloggers are different from the CR1000, CR3000, and CR800 dataloggers. Below is a dialog box for a CR9000X datalogger.
When Run Now is checked, the file will be sent with the Run Now attribute set. With this attribute, the program is compiled and run in the datalogger. All data tables on the CPU are erased. You have the option of whether or not to erase data files stored on a card.
Run On Power-up
The file will be sent with the Run On Power-up attribute set. The program will be run if the datalogger loses power and then powers back up.
Run Always
Run Now and Run On Power-up can both be selected. This sets the program's file attribute in the datalogger as Run Always. The program will be compiled and run immediately and it will also be the program that runs if the datalogger is powered down and powered back up.
CR200 Datalogger Run Options
The CR200 does not have an on-board compiler. A compiled binary (*.bin) file is sent to the datalogger. Run options are not applicable to this datalogger and are therefore disabled.
Compress File
5-10
If the Compress File check box is selected, a renamed version of the CRBasic program which has all unnecessary spaces, indentation, and comments removed in order to minimize the file size will be sent to the datalogger instead of the original program.
Section 5. Program Creation and Editing
Sending the Program
To send the file and perform the associated functions you have selected in the screen, press the Send button. If LoggerNet, PC400, or RTDAQ is not running, an error message will appear indicating that there is no communications server currently running. If LoggerNet, PC400, or RTDAQ is running and the program compiles properly on the hardware, you will receive a message indicating that the program is now running on the datalogger. If something goes wrong when sending the program, a message will appear indicating the error conditions. This may be a hardware-level compile error or another failure as reported to the software by the datalogger’s program load and run process.
Press Cancel if you do not wish to send the program to the datalogger.
NOTE
When sending a program with the Compile, Save, and Send feature to a CR9000X datalogger while you are connected to the datalogger, you may get a disconnect message or similar notification This is unique to the CR9000X datalogger and does not indicate any problem with the sending of the program. You can simply reconnect to the datalogger and continue your work.
5.1.3.3 Conditional Compile and Save
The Conditional Compile and Save option is used to generate a new CRBasic program from code that uses conditional compile syntax (#If/Else/ElseIf statements) or constant customization. (See conditional compilation in the CRBasic Editor’s online help for more information on conditional compile syntax. See Section 5.1.3.9.2 for more information on constant customization.)
When a program is compiled that uses conditional syntax, any conditional compilation statements that do not evaluate as true are removed from the program and the program is compiled. When a program is compiled that uses constant customization, the constant values selected in the Tools | Customize Constants menu item are used when compiling the new program. In either instance, you are prompted to save the file under a user-specified name or the file will be saved under the name of the original program with _CC# appended. The # is a number that increments to create a unique filename. For instance, if the program name is myprogram.cr1, the first time it is compiled the default name will be myprogram_CC1.cr1. If myprogram_CC1.cr1 exists, the program will be named myprogram_CC2.cr1.
5.1.3.4 Templates
The use of templates can be a powerful way to quickly create a set of similar datalogger programs. All or part of a program can be saved so that it can be used when creating new programs. These files are called templates. The
Template menu provides access to create and use templates.
Save as Template - Saves the comments and instructions in the active file as a
template. To save part of a program as a template, copy the selected part to a new program file and then Save as Template.
5-11
Section 5. Program Creation and Editing
Save as Default Template - Saves the comments and instructions in the active file as a template that will be used each time File | New is selected for that type of datalogger.
Delete - When selected, a list of all dataloggers is displayed. Select a datalogger to open a dialog box containing a list of saved templates. A template can then be highlighted and deleted from disk.
(Datalogger Types) - When a datalogger type is selected, a list of all templates is displayed.
NOTE
Template files are associated with a specific datalogger type. For example, templates for a CR5000 cannot be used for CR9000X programming and vice versa. Each datalogger has its own set of instructions that may be different than the other.
5.1.3.5 Program Navigation using BookMarks and GoTo
Bookmarks are lines of code in the program that the user marks, which can be quickly navigated to using the Next, Previous, and Browse Bookmark functions. Buttons for the bookmark function are available on the toolbar or in the GoTo | Bookmarks menu. Selecting the Toggle Bookmark option will add a bookmark to a line. Selecting it a second time will remove the bookmark. When a line is bookmarked, the entire line will be highlighted with a color (the color can be changed using the View | Editor Preferences menu item). You can then navigate from bookmark to bookmark by selecting Previous or Next. All bookmarks can be removed from the program by selecting Clear Bookmarks. Bookmarks are persistent when you close a program (i.e., they are saved and will exist the next time the program is opened).
All programs have certain common instructions, such as the declaration of variables, data table definitions, the BeginProg/EndProg statements and Scan/NextScan. The Goto function is used to move the cursor to the next occurrence of a common instruction in the program (GoTo | Navigation or choose the GoTo button from the toolbar). In addition, you can move to a particular line number in the program by selecting GoTo | Go To Line.
5-12
5.1.3.6 CRBasic Editor File Menu
Many of the functions available from the CRBasic Editor Toolbar are found in this menu. They have been discussed previously. Other options include:
Open as Read-Only - Opens a copy of a program file in read-only view. In this mode, the file cannot be edited. However, you can copy text from a read­only file into another file. Read-only allows the same program to be opened twice – once in regular view and once in read-only view. This allows the user to examine multiple areas of a very large program at the same time.
Save and Encrypt - Encrypts the active file. Encrypted files can be compiled in the datalogger but cannot be read by a user. (Refer to FileEncrypt in the CRBasic Editor’s online help for dataloggers that support file encryption.)
5.1.3.7 CRBasic Editor Edit Menu
This menu item allows you to edit and manipulate the text currently being displayed in the Editor. Standard text editing functions such as Cut, Copy, Paste, Delete, Select All, Undo and Redo are found in this menu.
5.1.3.7.1 Other Options
Section 5. Program Creation and Editing
Create Compressed File
comments and line spacing in the program are removed from the file. Removing comments and spaces can significantly reduce the file size in larger programs.
Rebuild Indentation – Reworks the indentation of loops, If/Then/Else
statements and other logic nesting, and removes blank lines based on the Vertical Spacing rules (Options | Editor Preferences, Vertical Spacing tab).
Save As CRB
file is referred to as a library file. The file can then be reused by inserting it into another CRBasic program.
Insert File
location of the cursor.
Saves highlighted text to a file with a *.CRB extension. This
Inserts a library file (*.CRB) into the current program at the
5.1.3.8 CRBasic Editor View Menu
This menu item allows you to specify the files used in the CRBasic Editor and customize its look and syntax highlighting.
5.1.3.8.1 Editor Preferences
This option sets up the appearance options for the text instructions and the behavior of pop-up hints.
Creates a new file with a _str extension. All user
The Editor tab allows the user to toggle on or off the pop-up hints for parameters in instructions, set the amount of time the cursor must hover over the instruction before the pop-up hint appears, and the background color of the pop-up hint. This is also used to choose whether CRBasic automatic instruction indenting indents using tabs or spaces, and set the number of spaces if that option is chosen. Other options relating to the use of the tab key, file compression, capitalization and name checking are also available. Press the Help button for more information.
5-13
Section 5. Program Creation and Editing
The Vertical Spacing tab is used to set up the rules for the CRBasic Editor's Rebuild Indentation function (Edit | Rebuild Indentation). You can control
whether blank lines are inserted before or after certain instructions, and how the CRBasic Editor will process multiple blank lines in the program. If Do Not Insert or Remove Any Blank Lines is selected, all other fields on this tab will be disabled. If either of the other two line options is chosen, the remaining fields will be available for the user to customize as desired.
5-14
Section 5. Program Creation and Editing
The Syntax Highlighting tab sets up the appearance of different text elements in the program using different font styles and colors. You can customize the appearance of the text by giving normal text, keywords, comments, operators, numbers, strings, and parentheses each a different font style and color to make the program easier to read and edit. Text colors and styles can be disabled by clearing the Enable Syntax Highlighting check box.
Note that if special formatting (font style, color) is assigned to Matched Parentheses, when your cursor is on an opening or closing parenthesis it will be highlighted with the formatting, and the "other half" of that parenthesis will also be highlighted. When your cursor moves off the parenthesis, the formatting will return to normal text.
5.1.3.8.2 Instruction Panel Preferences
This option determines whether or not the instruction dialog box will be displayed when the user inserts an instruction.
5.1.3.8.3 Other Options
Font - Displays a font selection dialog to select the font typeface and size for the text in the CRBasic Editor. Font style and color are set under Editor
Preferences.
5-15
Section 5. Program Creation and Editing
Background Color - Displays a color selection dialog to set the color of the CRBasic program window.
Wrap Text When Printing - When this option is selected, long lines that extend past the right margin will be wrapped to the next line. This option affects printing, as well as the Print Preview mode. A check mark will appear next to the option in the menu when it is selected.
Display Last Window Used - When this option is enabled, the program that was active in the CRBasic Editor when it was last closed will be visible when the Editor is reopened. If this option is disabled, no program will be loaded when the Editor is opened. A check mark will appear next to the option in the menu when it is selected.
Close Message Window – After you have pre-compiled your program with the Compile | Compile menu item, or using the toolbar, a message window opens up at the bottom of the CRBasic Editor main screen. This option will close down that message window.
View Instruction Panel – Select this option to View or Hide the instruction panel which displays a list of available instructions which can be used in your datalogger program based on the pre-defined instruction filter selected with the drop-down selection box.
5.1.3.9 CRBasic Editor Tools Menu
This menu item allows you to use special tools associated with the operation of the editor.
5.1.3.9.1 Edit Instruction Categories
Edit Instruction Categories allows the user to create one or more custom list of instructions. If a category of instructions is selected from the Instructions Panel, the entire list of instructions in the Editor will be filtered to show only those instructions in the selected category. (Note: The default categories cannot be edited or deleted.)
To create a new list, first select the Add New Category button and provide a name for the user-created category. Next, ensure the category name is selected and click the Edit Category button to bring up the Select Instructions dialog (shown below). Instructions that should be included in the new list are indicated by a check in the box to the left of the instruction name. This feature allows the user to display a filtered instruction list containing only those instructions most often used. Press OK to save the list.
5-16
5.1.3.9.2 Constant Customization
Section 5. Program Creation and Editing
The Constant Customization feature allows you to define values for one or more constants in a program prior to performing a conditional compile (Compile | Conditional Compile and Save menu item). The constants can be set up with an edit box, a spin box field for selecting/entering a value, or with a list box. A step increase/decrease can be defined for the spin box, as well as maximum and minimum values.
To set up Constant Customization, place the cursor on a blank line within the CRBasic Editor and choose Tools | Set Up Constant Customization Section. This will insert two comments into the program:
'Start of Constants Customization Section
'End of Constants Customization Section
Within these two comments, define the constants. Following each constant, use the keywords noted below formatted as a comment, to set up edit boxes, spin boxes, or list boxes for the constant values. The fields are edit boxes by default. If a maximum/minimum are defined for a constant, the field will be a spin box. If a discrete list is defined for the constant, the field will be a list box.
Constant Name=(value) Sets a default value for a constant
Min=(value) Sets a minimum value for a spin box control
Max=(value) Sets a maximum value for a spin box control
Inc=(value) The number of steps for a value each time the up
or down control on the spin box is selected
Value=(value) Defines a pick list value
5-17
Section 5. Program Creation and Editing
The Constant Customization syntax may be best understood by looking at an example. Consider the following program code:
'Start of Constants Customization Section
Const SInterval=10
'Min=5
'Max=60
'Inc=5
Const SUnits = sec
'value=sec
'value=min
Const Reps=1
Const Number=0
'Min=-100
'Max=100
Const TableName="OneSec"
'value="OneMin"
'value="OneHour"
'value="OneDay"
'End of Constants Customization Section
This code will create the following constant customization dialog box:
5-18
The constant SInterval is defined with a default value of 10, a maximum of 60 and a minimum of 5, with a step of 5 each time the up or down control is selected.
The constant SUnits has a list box with sec and min; sec is the default.
The constant Reps is defined with a default value of 1. It is an edit box, into which any value can be entered.
The constant Number is defined with a default value of 0, a minimum of -100 and a maximum of 100. The value will increase by 1 each time the up or down control is selected.
The constant TableName is defined with a list box of "OneSec", "OneMin", "OneHour", and "OneDay"; the default value is "OneSec".
Before compiling the program, open the Customize Constants dialog box, select the constant values you want to compile into the program, and then perform the Conditional Compile and Save.
5.1.3.9.3 Other Options
Section 5. Program Creation and Editing
Associate Files – This option is used to set up file associations within the Windows operating system, so that if a program file is double-clicked while in Windows Explorer, that file with be opened in the CRBasic Editor.
Check one or more boxes for file extension(s) you want to associate and press the Associate Files button.
Show Keyboard Shortcuts – This option displays a list of the functions of the CRBasic Editor which are accessible via the keyboard. The list can be copied to the clipboard for printing or other uses.
Show Labels – This option displays details about the output tables and the items they store as they are defined in the current CRBasic program. The list can be copied to the clipboard for printing or other uses.
Set DLD Extension – This option selects which datalogger’s pre-compiler will be used when performing a pre-compile check on a DLD program which uses conditional compile statements. A CRBasic program must be named with the DLD extension for this item to be active.
5.1.3.10 Available Help Information
Pressing the Help button of the Parameter dialog box will bring up a detailed help topic for the instruction being edited. Pressing F1 when your cursor is within a parameter field will bring up help only on that parameter. Some fields also have text in the Comments column, which provides a short description of the option that has been selected for the parameter.
5-19
Section 5. Program Creation and Editing

5.1.4 CRBasic Programming

CRBasic is a programming language that has some similarities to a structured BASIC. There are special instructions for making measurements and for creating tables of output data. The results of all measurements are assigned variables (given names). Mathematical operations are written out much as they would be algebraically. This section provides a summary of a program, its syntax, structure, and sequence. Refer to the datalogger users manual or the on-line help for detailed information on program instructions.
5.1.4.1 Programming Sequence
The structure of a datalogger program requires that variables, data tables, and subroutines be declared before they can be used. The best way to do this is to put all the variable declarations and output table definitions at the beginning, followed by the subroutines, and then the program. Below is the typical layout of a program. Note that the online help has example code for each instruction to demonstrate the use of the instruction in a program.
Declarations
Declare constants
Declare Public variables
Dimension variables
Define Aliases
Define data tables
Process/store trigger
Table size
Other on-line storage
devices
Processing of Data
Define Subroutines
Make a list of what to measure and calculate.
Within this list, include the fixed constants used,
Indicate the values that the user is able to view
while the program is running,
the number of each measurement that will be
made,
and specific names for any of the
measurements.
Describe, in detail, tables of data that will be
saved from the experiment.
Set when the data should be stored. Are they
stored when some condition is met? Are data stored on a fixed interval? Are they stored on a fixed interval only while some condition is met?
Set the size of the table in RAM.
Should the data also be sent to the external
storage?
What data are to be output (current value,
average, maximum, minimum, etc.).
If there is a process or series of calculations
that needs to be repeated several times in the program, it can be packaged in a subroutine and called when needed rather than repeating all the code each time.
5-20
Program
Set scan interval
Measurements
Processing
Call Data Table(s)
Initiate controls
NextScan
End Program
5.1.4.2 Program Declarations
Variables must be declared before they can be used in the program. Variables declared as Public can be viewed in display software. Variables declared using Dim cannot be viewed. Variables assigned to a fixed value are used as constants.
Section 5. Program Creation and Editing
The program section defines the action of
datalogging.
The scan sets the interval for a series of
measurements.
Enter the measurements to make.
Enter any additional processing with the
measurements.
The Data Table must be called to process
output data.
Check measurements and Initiate controls if
necessary.
Loop back (and wait if necessary) for the next
scan.
For example, in a CRBasic program there may be multiple temperature (or other) sensors that are wired to sequential channels. Rather than insert multiple instructions and several variables, a variable array with one name and many elements may be used. A thermocouple temperature might be called TCTemp. With an array of 20 elements the names of the individual temperatures are TCTemp(1), TCTemp(2), TCTemp(3), ... TCTemp(20). The array notation allows compact code to perform operations on all the variables. For example, to convert ten temperatures in a variable array from C to F:
For I=1 to 10 TCTemp(I)=TCTemp(I)*1.8+32 Next I
Aliases can also be created that will allow an element of an array or another data result to be referred to by a different name. To continue the example above, TCTemp(3) could be renamed using the following syntax:
Alias TCTemp(3) = AirTemp
In the display software, the more descriptive alias, AirTemp, would be used for the cell name.
5.1.4.3 Mathematical Expressions
Mathematical expressions can be entered algebraically into program code to perform processing on measurements, to be used for logical evaluation, or to be used in place of some parameters.
5-21
Section 5. Program Creation and Editing
As an example of Measurement Processing, to convert a thermocouple measurement from degrees Celsius to degrees Fahrenheit, you could use the following expression:
TCTempF=TCTemp(1)*1.8+32
Logical Evaluation expressions could be used to determine the flow of a program:
If TCTemp(1) > 100 Then
Call Subroutine1
Else
'enter code for main program
End If
Many parameters will allow the entry of expressions. In the following example, the DataTable will be triggered, and therefore data stored, if TCTemp(1)>100.
DataTable(TempTable, TCTemp(1)>100, 5000)
5.1.4.4 Measurement and Output Processing Instructions
Measurement instructions are procedures that set up the measurement hardware to make a measurement and place the results in a variable or a variable array. Output processing instructions are procedures that store the results of measurements or calculated values. Output processing includes averaging, saving maximum or minimum, standard deviation, FFT, etc.
The instructions for making measurements and outputting data are not found in a standard basic language. The instructions Campbell Scientific has created for these operations are in the form of procedures. The procedure has a keyword name and a series of parameters that contain the information needed to complete the procedure. For example, the instruction for measuring the temperature of the CR5000 input panel is:
PanelTemp (Dest, Integ)
PanelTemp is the keyword name of the instruction. The two parameters associated with PanelTemp are: Destination, the name of the variable in which to put the temperature; and Integration, the length of time to integrate the measurement. To place the panel temperature in the variable RefTemp (using a 250 microsecond measurement integration time) the code is:
PanelTemp(RefTemp, 250)
5-22
5.1.4.5 Line Continuation
Line continuation allows an instruction or logical line to span one or more physical lines. This allows you to break up long lines of code into more readable “chunks”. Line continuation is indicated by one white space character that immediately precedes a single underscore character as the last character of a line of text. Following is an example of line continuation:
Public Temp, RH, WindSp, WindDir, _ BatteryV, IntRH, IntTemp, RainTot, _ RainInt, Solar
5.1.4.6 Inserting Comments Into Program
It is often useful to provide comments in your datalogger program so that when you review the program at a later date, you will know what each section of code does. Comments can be inserted into the program by preceding the text with a single quote. When the program is compiled, the datalogger compiler will ignore any text that is preceded by a single quote. A comment can be placed at the beginning of a line or it can be placed after program code. If Syntax Highlighting is enabled (Options | Editor Preferences | Syntax Highlighting), commented text will appear formatted differently than other lines of code.
'CR5000
'The following program is used to measure '4 thermocouples
'VARIABLE DECLARATION
Dim TCTemp(4) 'Dimension TC measurement variable Alias TCTemp(1)=EngineCoolantT 'Rename variables Alias TCTemp(2)=BrakeFluidT Alias TCTemp(3)=ManifoldT Alias TCTemp(4)=CabinT
In the sample code above, the datalogger compiler will ignore the commented text.
Section 5. Program Creation and Editing
5-23
Section 5. Program Creation and Editing
5.1.4.7 Example Program
The following program will serve as a programming example in this section to illustrate the concepts and program structure. This is a program for a CR5000 datalogger. Note that other dataloggers may have slightly different parameters for some instructions.
Const RevDiff=1 Const Del=0 Const Integ=250 Const Mult=1 Const Offset=0
Public RefTemp Public TC(6) Units RefTemp=degC Units TC=DegC
DataTable (Temp,1,2000)
DataInterval (0,100,mSec,10) Average (1,RefTemp,FP2,0) Average (6,TC(),FP2,0)
EndTable
BeginProg
Scan (10,mSec,3,0) PanelTemp (RefTemp, 250) TCDiff (TC(),6,mV20C ,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset) CallTable Temp NextScan
EndProg
Declare constants
Declare public variables , dimension array, and declare units.
Define Data Table
Call Data Table
Declarations
Measure
Scan loop
5.1.4.8 Data Tables
Data storage follows a fixed structure in the datalogger in order to optimize the time and space required. Data are stored in tables such as:
TOA5 StnName Temp TIMESTAMP RECORD RefTemp_Avg TC_Avg(1) TC_Avg(2) TC_Avg(3) TC_Avg(4) TC_Avg(5) TC_Avg(6) TS RN degC DegC degC degC degC degC degC Avg Avg Avg Avg Avg Avg Avg 1995-02-16 15:15:04.61 278822 31.08 24.23 25.12 26.8 24.14 24.47 23.76 1995-02-16 15:15:04.62 278823 31.07 24.23 25.13 26.82 24.15 24.45 23.8 1995-02-16 15:15:04.63 278824 31.07 24.2 25.09 26.8 24.11 24.45 23.75 1995-02-16 15:15:04.64 278825 31.07 24.21 25.1 26.77 24.13 24.39 23.76
The user's program determines the values that are output and their sequence. The datalogger automatically assigns names to each field in the data table. In the above table, TIMESTAMP, RECORD, RefTemp_Avg, and TC_Avg(1) are fieldnames. The fieldnames are a combination of the variable name (or alias if one exists) and a three letter mnemonic for the processing instruction that outputs the data. Alternatively, the FieldNames instruction can be used to override the default names.
5-24
Section 5. Program Creation and Editing
The data table header may also have a row that lists units for the output values. The units must be declared for the datalogger to fill this row out (e.g., Units RefTemp = degC). The units are strictly for the user's documentation; the datalogger makes no checks on their accuracy.
The above table is the result of the data table description in the example program:
DataTable (Temp,1,2000) DataInterval(0,10,msec,10) Average(1,RefTemp,fp2,0) Average(6,TC(1),fp2,0) EndTable
All data table descriptions begin with DataTable and end with EndTable. Within the description are instructions that tell what to output and the conditions under which output occurs.
DataTable(Name, Trigger, Size) DataTable (Temp,1,2000)
The DataTable instruction has three parameters: a user specified name for the table, a trigger condition, and the size to make the table in RAM. The trigger condition may be a variable, expression, or constant. The trigger is true if it is not equal to 0. Data are output if the trigger is true and there are no other conditions to be met. No output occurs if the trigger is false (=0). The size is the number of records to store in the table. You can specify a fixed number, or enter –1 to have the datalogger auto allocate the number of records. The example creates a table name Temp, outputs any time other conditions are met, and retains 2000 records in RAM.
NOTE
DataInterval(TintoInt, Interval, Units, Lapses) DataInterval(0,10,msec,10)
DataInterval is an instruction that modifies the conditions under which data are stored. The four parameters are the time into the interval, the interval on which data are stored, the units for time, and the number of lapses or gaps in the interval to track. The example outputs at 0 time into (on) the interval relative to real time, the interval is 10 milliseconds, and the table will keep track of 10 lapses. The DataInterval instruction reduces the memory required for the data table because the time of each record can be calculated from the interval and the time of the most recent record stored. The DataInterval instruction for the CR200 does not have lapses.
Event driven tables should have a fixed size rather than allowing them to be allocated automatically. Event driven tables that are automatically allocated are assumed to have one record stored per second in calculating the length. Since the datalogger tries to make the tables fill up at the same time, these event driven tables will take up most of the memory leaving very little for the other, longer interval, automatically allocated data tables.
5-25
Section 5. Program Creation and Editing
The output processing instructions included in a data table declaration determine the values output in the table. The table must be called by the program using the CallTable (Tablename) instruction in order for the output processing to take. That is, each time a new measurement is made, the data table is called. When the table is called, the output processing instructions within the table process the current inputs. If the trigger conditions for the data table are true, the processed values are output to the data table. In the example below, several averages are output.
Average(Reps, Source, DataType, DisableVar) Average(1,RefTemp,fp2,0) Average(6,TC(1),fp2,0)
Average is an output processing instruction that will output the average of a variable over the output interval. The parameters are repetitions (the number of elements in an array to calculate averages for), the Source variable or array to average, the data format to store the result in (Table 5.1-1), and a disable variable that allows excluding readings from the average if conditions are not met. A reading will not be included in the average if the disable variable is not equal to 0; the example has 0 entered for the disable variable so all readings are included in the average.
TABLE 5.1-1. Formats for Output Data
Code Data Format Size Range Resolution
FP2 Campbell Scientific floating point 2 bytes
IEEE4 IEEE four byte floating point 4 bytes 1.8 E -38 to 1.7 E 38 24 bits (about 7 digits)
LONG 4 byte Signed Integer 4 bytes -2,147,483,648 to
±7999
+2,147,483,647
13 bits (about 4 digits)
1 bit (1)
5.1.4.9 The Scan -- Measurement Timing and Processing
Once the measurements and calculations have been listed and the output tables defined, the program itself may be relatively short. The executable program begins with BeginProg and ends with EndProg. The measurements, processing, and calls to output tables bracketed by the Scan and NextScan instructions determine the sequence and timing of the datalogging.
BeginProg Scan(1,MSEC,3,0) PanelTemp(RefTemp, 250) TCDiff(TC(),6,mV50,4,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset) CallTable Temp NextScan EndProg
5-26
The Scan instruction determines how frequently the measurements within the scan are made:
Scan(Interval, Units, BufferOption, Count) Scan(1,MSEC,3,0)
The Scan instruction has four parameters (the CR200 datalogger’s Scan instruction has only two). The Interval is the time between scans. Units are the time units for the interval. The BufferSize is the size (in the number of scans) of a buffer in RAM that holds the raw results of measurements. Using a buffer allows the processing in the scan to at times lag behind the measurements without affecting the measurement timing (see the scan instruction in the CR5000 help for more details). Count is the number of scans to make before proceeding to the instruction following NextScan. A count of 0 means to continue looping forever (or until ExitScan). In the example the scan is 1 millisecond, three scans are buffered, and the measurements and output continue indefinitely.
5.1.4.10 Numerical Entries
In addition to entering regular base 10 numbers there are 3 additional ways to represent numbers in a program: scientific notation, binary, and hexadecimal (Table 5.1-2).
Section 5. Program Creation and Editing
TABLE 5.1-2. Formats for Entering Numbers in CRBasic
Format Example Value
Standard 6.832 6.832
Scientific notation 5.67E-8 5.67X10-8
Binary: &B1101 13
Hexadecimal &HFF 255
The binary format makes it easy to visualize operations where the ones and zeros translate into specific commands. For example, a block of ports can be set with a number, the binary form of which represents the status of the ports (1= high, 0=low). To set ports 1, 3, 4, and 6 high and 2, 5, 7, and 8 low; the number is &B00101101. The least significant bit is on the right and represents port 1. This is much easier to visualize than entering 72, the decimal equivalent.
5.1.4.11 Logical Expression Evaluation
5.1.4.11.1 What is True?
Several different words are used to describe a condition or the result of a test. The expression, X>5, is either true or false. However, when describing the state of a port or flag, on or off or high or low is more intuitive. In CRBasic there are a number of conditional tests or instruction parameters, the result of which may be described with one of the words in Table 5.1-3. The datalogger evaluates the test or parameter as a number; 0 is false, not equal to 0 is true.
5-27
Section 5. Program Creation and Editing
Predefined Constant True (-1) False (0)
Synonym High Low
Synonym On Off
Synonym Yes No
Synonym Trigger Do Not Trigger
TABLE 5.1-3. Synonyms for True and False
Number
0
Digital port 5 Volts 0 Volts
5.1.4.11.2 Expression Evaluation
Conditional tests require the datalogger to evaluate an expression and take one path if the expression is true and another if the expression is false. For example:
If X>=5 then Y=0
will set the variable Y to 0 if X is greater than or equal to 5.
The datalogger will also evaluate multiple expressions linked with and or or. For example:
If X>=5 and Z=2 then Y=0
will set Y=0 only if both X>=5 and Z=2 are true.
If X>=5 or Z=2 then Y=0
will set Y=0 if either X>=5 or Z=2 is true (see And and Or in the help). A condition can include multiple and and or links.
5.1.4.11.3 Numeric Results of Expression Evaluation
The datalogger’s expression evaluator evaluates an expression and returns a number. A conditional statement uses the number to decide which way to branch. The conditional statement is false if the number is 0 and true if the number is not 0. For example:
If 6 then Y=0,
is always true, Y will be set to 0 any time the conditional statement is executed.
If 0 then Y=0
is always false, Y will never be set to 0 by this conditional statement.
0
5-28
The expression evaluator evaluates the expression, X>=5, and returns -1, if the expression is true, and 0, if the expression is false.
W=(X>Y)
will set W equal to -1 if X>Y or will set W equal to 0 if X<=Y.
The datalogger uses -1 rather than some other non-zero number because the and and or operators are the same for logical statements and binary bitwise comparisons. The number -1 is expressed in binary with all bits equal to 1, the number 0 has all bits equal to 0. When -1 is anded with any other number the result is the other number, ensuring that if the other number is non-zero (true), the result will be non-zero.
5.1.4.12 Flags
Any variable can be used as a flag as far as logical tests in CRBasic are concerned. If the value of the variable is non-zero the flag is high. If the value of the variable is 0 the flag is low. LoggerNet, PC400, or RTDAQ looks for the variable array with the name Flag when the option to display flag status is selected from the Connect Screen. If a Flag array is found, as many elements of that array which can fit will be displayed in the Port and Flags dialog box.
5.1.4.13 Parameter Types
Instruction parameters allow different types of inputs. These types are listed below and specifically identified in the description of the parameter in the following sections or in CRBasic help.
Constant Variable Variable or Array Constant, Variable, or Expression Constant, Variable, Array, or Expression Name Name or list of Names Variable, or Expression Variable, Array, or Expression
Section 5. Program Creation and Editing
Table 5.1-4 lists the maximum length and allowed characters for the names for Variables, Arrays, Constants, etc.
Name for
Variable or Array 39 (17 )
Constant 39 (16)
Alias 39 (17 )
Data Table Name 20 (8)
Field name 39 (16)
Values in parentheses refer to the CR5000, CR9000 and CR9000X dataloggers.
5.1.4.13.1 Expressions in Parameters
Many parameters allow the entry of expressions. If an expression is a comparison, it will return -1 if the comparison is true and 0 if it is false. An example of the use of this is in the DataTable instruction where the trigger condition can be entered as an expression. Suppose the variable TC(1) is a thermocouple temperature:
TABLE 5.1-4. Rules for Names
Maximum Length (number of characters)
Allowed characters
Letters A-Z, upper or lower case, underscore “_”, and numbers 0-12. The name must start with a letter. CRBasic is not case sensitive.
5-29
Section 5. Program Creation and Editing
DataTable(Name, TrigVar, Size)
DataTable(Temp, TC(1)>100, 5000)
Entering the trigger as the expression, TC(1)>100, will cause the trigger to be true and data to be stored whenever the temperature TC(1) is greater than 100.
5.1.4.13.2 Arrays of Multipliers and Offsets for Sensor Calibration
If variable arrays are used for the multiplier and offset parameters in measurements that use repetitions, the instruction will automatically step through the multiplier and offset arrays as it steps through the channels. This allows a single measurement instruction to measure a series of individually calibrated sensors, applying the correct calibration to each sensor. If the multiplier and offset are not arrays, the same multiplier and offset are used for each repetition.
VoltSE(Dest,Reps,Range,SEChan,Delay, Integ,Mult,Offset)
'Calibration factors:
Mult(1)=0.123 : Offset(1)= 0.23 Mult(2)=0.115 : Offset(2)= 0.234 Mult(3)=0.114 : Offset(3)= 0.224 VoltSE(Pressure(),3,mV1000,6,1,1,100,Mult(),Offset()
Note that one exception to this is when the Multiplier or Offset points to an index into the array, then the instruction will not advance to the next Multiplier or Offset but use the same for each repetition. For instance in the above example, if Mult(2) and Offset(2) were used, the instruction would use 0.115 and 0.234 for the Multiplier and Offset, respectively, for each repetition. To force the instruction to advance through the Multiplier and Offset arrays while still specifying an index into the array, use the syntax Mult(2)() and Offset(2)().
5.1.4.14 Program Access to Data Tables
Data stored in a table can be accessed from within the program. The format used is:
Tablename.Fieldname(fieldname index,records back)
Where Tablename is the name of the table in which the desired value is stored. Fieldname is the name of the field in the table. The fieldname is always an array even if it consists of only one variable; the fieldname index must always be specified. Records back is the number of records back in the data table from the current time (1 is the most recent record stored, 2 is the record stored prior to the most recent). For example, the expression:
Tdiff=Temp.TC_Avg(1,1)–Temp.TC_Avg(1,101)
could be used in the example program to calculate the change in the 10 ms average temperature of the first thermocouple between the most recent average and the one that occurred a second (100 x 10 ms) earlier.
5-30
In addition to accessing the data actually output in a table, there are some pseudo fields related to the data table that can be retrieved:
Section 5. Program Creation and Editing
Tablename.record(1,n) = the record number of the record output n records ago.
Tablename.output(1,1) = 1 if data were output to the table the last time the
table was called, = 0 if data were not output.
Tablename.timestamp(m,n) = element m of the timestamp output n records ago where:
timestamp(1,n) = microseconds since 1990 timestamp(2,n) = microseconds into the current year timestamp(3,n) = microseconds into the current month timestamp(4,n) = microseconds into the current day timestamp(5,n) = microseconds into the current hour timestamp(6,n) = microseconds into the current minute timestamp(7,n) = microseconds into the current second
Tablename.eventend(1,1) is only valid for a data table using the DataEvent instruction, Tablename.eventend(1,1) = 1 if the last record of an event occurred the last time the table was called, = 0 if the data table did not store a record or if it is in the middle of an event.
TableName.EventCount = the number of data storage events that have occurred in an event driven DataTable.
NOTE

5.2 Short Cut

NOTE

5.2.1 Overview

TableName.Tablefull = 1 to indicate a fill and stop table is full or a ring-mode table has begun overwriting its oldest data, = 0 if the data table is not full/begun overwriting oldest data.
TableName.TableSize = the size allocation, in number of records, of the selected DataTable.
The values of Tablename.output(1,1) and Tablename.eventend (1,1) are only updated when the tables are called.
Although RTDAQ does not support the older “mixed-array” group of Campbell Scientific dataloggers (such as the CR10X, CR23X, and CR510), the Short Cut application included with RTDAQ is the same one included for use with LoggerNet and other Campbell Scientific support software. Because of this, the documentation included here contains references to mixed-array dataloggers. For most RTDAQ implementations these references can be ignored.
The Short Cut program generator creates programs for Campbell Scientific dataloggers in five easy-to-follow steps. Using a wizard-like interface, you create a new or open an existing program, select the datalogger and specify how often to make measurements, choose which sensors you wish to measure, select intervals or trigger conditions on which to store data and what processing to perform on the raw measurements for final storage, and finally
5-31
Section 5. Program Creation and Editing
generate the program. Short Cut also generates a wiring diagram for connecting your sensors to the datalogger.
Short Cut was designed to help the beginning datalogger programmer create datalogger programs quickly and easily. Short Cut effectively insulates the user from having to know the nuances of datalogger programming and the Edlog versus CRBasic programming languages. It supports the most commonly sold sensors from Campbell Scientific, as well as generic measurements (such as differential voltage, bridge, and pulse), commonly used calculation and control functions (such as heat index calculation, alarm conditions, and simple controls), and multiplexer analog channel expansion devices.
Short Cut cannot be used to edit existing Edlog, CRBasic, or Short Cut for DOS programs. Program editing and more complex datalogger programming functions should be accomplished using our Edlog or CRBasic Editor programming tools.
Short Cut was designed with extensive built-in help. Help can be accessed at any time by pressing the F1 key. There are also Help buttons on most screens. You can also open the Help by selecting Short Cut Help from Short Cut's Help menu. Help for each sensor can be accessed by searching the Help Index or pressing the Help button from the sensor form.
After generating the program, you can send it to the datalogger from the Results tab of Short Cut’s Finish screen or from LoggerNet’s Connect Screen or from PC400, PC200W, or RTDAQ’s Clock/Program tab.

5.2.2 Creating a Program Using Short Cut

On opening, Short Cut presents a wizard that walks you through the steps of creating a datalogger program.
5-32
Section 5. Program Creation and Editing
5.2.2.1 Step 1 – Create a New File or Open Existing File
To begin creating a new program, press the New Program button. To open an existing program, press the Open Program button and select a file from the resulting browser window.
5.2.2.2 Step 2 – Select Datalogger and Specify Scan Interval
Click the arrow next to Datalogger Model to display a list of Campbell Scientific dataloggers. Select the datalogger type.
Set the Scan Interval, or period for each measurement cycle.
When choosing a scan interval, remember that faster scan intervals will use more power. For most applications, a 10 to 60 second scan interval is sufficient. If faster scan intervals are required for your application, make sure there is sufficient time for the execution of all instructions in the program (refer to the section in the datalogger manual on Execution Intervals for additional information).
5-33
Section 5. Program Creation and Editing
If you are creating a program for a CR9000X, the CR9000X Configuration box will also appear on this screen.
NOTE
From this box, you indicate which CR9000X modules are inserted into which CR9000X slots. To add a module, select the module by clicking on it in the Available CR9000X Modules list, select the Slot by clicking on the slot number, then press the arrow key.
To remove a module, select the slot containing it and then press the Remove Module button.
Whenever you are working with a CR9000X program, this dialog box can be brought up by choosing Datalogger from the Progress panel. However, the Remove Module button is only available when a new program is being created. Once the Next button on the screen has been pressed, modules can be added but they cannot be removed.
The next dialog box that is displayed is used to select the type of integration to apply to the measurements in the program. Integration can be used to filter out AC signals that might affect the accuracy of your measurements (such as noise from fluorescent lighting or a generator). Typically 60 Hz rejection is used for North America and 50 Hz rejection is used for countries following European standards. Fast (250 µs) integration should be used when you need an execution speed that cannot be accomplished using one of the other options.
5-34
Section 5. Program Creation and Editing
This dialog box will be displayed the very first time you create a program for a specific datalogger type; it will not be displayed thereafter. With each subsequent program you create, the integration you chose when the datalogger was initialized in Short Cut will be used. However, you can change the integration from the Program menu. If you make this change, the setting will remain in effect for all programs for that datalogger type (whether they are new programs or edited programs) until it is changed again.
The last dialog box displayed is the Sensor Support dialog box. (This dialog box will not be displayed when creating a CR9000X program.) This is used to select which group of sensor files will be displayed when creating a program: Campbell Scientific, Inc. (CSI, USA) or Campbell Scientific, Ltd. (CSL, UK). The standard set of Short Cut sensor files was created by CSI; however, CSL has created some additional files that are customized for their client base. When one option is selected, the sensor files developed specifically for the other are filtered out.
NOTE
This setting is similar to the Integration setting in that the dialog box will be displayed only the first time you create a program for a specific datalogger type, and the setting will apply to all programs created or edited for that datalogger, unless it is changed via the Program menu. Note that programs containing sensor files that are filtered from the list of Available Sensors will still load and work correctly in Short Cut.
The Integration and the Sensor Support settings are persistent settings for each datalogger model. The first time you create a program for a particular datalogger model, you will be presented with these two dialog boxes. The state of these settings is saved between Short Cut sessions. Any subsequent new or edited programs that are generated after a setting has been changed will reflect the change as well.
Each time you create the first program for a datalogger model you will be presented with these dialog boxes (e.g., the first time you create a CR10X program, you must initialize these settings; the first time you create a CR1000 program, you must initialize these settings).
The settings can be changed at any time and the datalogger program will be regenerated to use the new setting when you click the Finish button on the Home screen.
5-35
Section 5. Program Creation and Editing
After making your selections, note that the title bar shows the datalogger type and scan interval.
Once you have saved the file, the filename will replace “untitled.scw”.
5.2.2.3 Step 3 – Choose Sensors to Monitor
In step 3, you tell Short Cut which sensors you’ll be measuring. Short Cut organizes sensors into application groups:
Some major groups have subgroups. Double-clicking the Meteorological group folder shows several subgroups of meteorological sensors. Double-click a subgroup to show the available sensors. Refer to the documentation for your sensors for the name of the sensors you have. If your sensor is not shown, you may be able to measure it with a generic measurement. Contact your Campbell Scientific application engineer for more assistance, if needed.
You “add” sensors to your program by double-clicking them or selecting them and clicking the arrow in the middle of the screen. Most sensors will require you to at least review the default settings for that measurement, including the measurement name, units, etc. An example of choosing the CS105 Barometric Pressure Sensor is below.
5-36
Measurement name
Measurement units
Notes specific to this sensor
Section 5. Program Creation and Editing
Note that this sensor not only offers a custom name field and units, but also allows you to correct for sea level, a common practice in measuring atmospheric pressure. In the middle of the screen, look over the notes (or refer to the Help for this sensor), for this sensor may require other sensors or have limitations. When you choose OK, Short Cut adds the necessary instructions with appropriate multipliers and offsets.
In some cases, multiple sensors of the same type can be added at one time. These sensors will have a How many sensors? parameter as the first parameter on the form as shown below. The maximum number of sensors that can be added will be indicated. The maximum will vary, depending upon the sensor and the number of other sensors already configured in the program. If the sensor form includes calibration and/or conversion parameters (e.g., multiplier, offset, gage factor), there will be a Set button next to these parameters. Pressing this button will allow you to set unique values for each sensor.
5-37
Section 5. Program Creation and Editing
5-38
Section 5. Program Creation and Editing
Click on the Wiring tab of a sensor’s parameter form to show the wiring for the sensor (or the first sensor in a sensor group).
NOTE
NOTE
Each wire’s caption/color is shown on the left side of the wire. The location where the wire will be connected to the device is shown on the right side (under the device). You can change a caption/color by clicking on the caption/color label. A wiring location can also be changed by clicking on the wiring location.
Changes to the wiring location for a sensor group can only be made when the group is first added. To make changes to a wiring location at a later time, you will need to change the number of sensors to one, press OK, reopen the parameter form, make the desired wiring location changes, and then change the number of sensors back to the desired number.
Not all sensors support changes to the wire caption/color and wiring location. When hovering over a wire caption/color or wiring location, the mouse cursor will change to indicate that the property can be changed. Changes are generally supported for generic sensors and other sensors that do not use special wiring connections.
At any time, you may choose a measurement label on the right side of the Sensors screen and edit it or remove it.
5-39
Section 5. Program Creation and Editing
In addition to actual sensors, Short Cut provides functionality to perform various calculations and effect some simple control:
Some of these calculations may require additional sensors, or sensor measurements stored in particular units. See the help for each calculation to determine the necessary inputs. Note that there is also a User Entered calculation available in the Calculations folder. With it you can enter your own custom calculation.
In the example below, a new measurement, AirTF, is being created by performing calculations on an existing measurement, AirTC:
5-40
Refer to the online help for complete information on creating User Calculation.
Loading...