beautypg.com

Section 4. crbasic – native language programming, 1 introduction to writing cr9000x programs, 1 shortcut – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 129: 2 program generator

background image

Section 4. CRBasic – Native Language
Programming

The CR9000X is programmed in a 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 describes a
program, its syntax, structure, and sequence.

4.1 Introduction to Writing CR9000X Programs

Programs are created with either Short Cut, Program Generator, or the
CRBASIC Editor. Short Cut is available at no charge at

www.campbellsci.com

.

The Program Generator is a utility included with PC9000 and RTDaq. The
CRBASIC Editor is a utility included in PC400, PC9000, RTDaq, and
LoggerNet Datalogger Support Software Suites.

4.1.1 ShortCut

Short Cut is an easy-to-use, menu-driven utility included in PC200, PC400,
LoggerNet, and RTDaq software packages. It presents the user with lists of
predefined measurement, processing, and control algorithms from which to
choose. The user makes choices and Short Cut writes the CRBASIC code
required to perform the tasks. Short Cut creates a wiring diagram to simplify
connection of sensors and external devices.

For many complex applications, Short Cut can be a good place to start. When
as much information as possible is entered, Short Cut will create a program
template from which to work, already formatted with most of the proper
structure, measurement routines, and variables. The program can then be edited
further using the CRBASIC Program Editor.

4.1.2 Program Generator

The CR9000X Program Generator is an easy-to-use pick and click
programming tool included as a utility in RTDaq. It presents the user with lists
of predefined measurement, processing, and control algorithms from which to
choose and supports most commercially available sensors. It allows the user to
customise measurements, and provides multiple output formats including
Rainflow Histograms, FFTs, Standard Deviation etc. It can set-up automatic
field calibrations for sensors and set-up trigger conditions for data storage,
collecting both pre-trigger and post-trigger records. The Program Generator
creates the CRBasic code, an Output Data Information file, as well as a wiring
diagram that can be printed to take into the field. The Quickstart Tutorial,
works through a measurement example using the Program Generator.

For many complex applications, one of these Program Builders is a good place
to start. When as much information as possible is entered, either will create a
program template from which to work, already formatted with most of the

4-1