beautypg.com

Ov4. programming the cr23x, Ov4.1 programming sequence, Ov4.2 instruction format – Campbell Scientific CR23X Micrologger User Manual

Page 23

background image

CR23X MICROLOGGER OVERVIEW

OV-13

To communicate with any device, the CR23X
enters its Telecommunications Mode and
responds only to valid telecommunications
commands. Within the Telecommunications
Mode, there are 2 "states"; the
Telecommunications Command state and the
Remote Keyboard state. Communication is
established in the Telecommunications command
state. One of the commands is to enter the
Remote Keyboard state (Section 5).

The Remote Keyboard state allows the
keyboard of the computer/terminal to act like
the CR23X keypad. Various datalogger modes
may be entered, including the mode in which
programs may be keyed in to the CR23X from
the computer/terminal.

OV4. PROGRAMMING THE CR23X

A datalogger program is created on a computer
using EDLOG. A program can also be entered
directly into the datalogger using the keypad.
Section OV4.3 describes options for loading the
program into the CR23X.

OV4.1 PROGRAMMING SEQUENCE

In routine applications, the CR23X measures
sensor output signals, processes the
measurements over some time interval and
stores the processed results. A generalized
programming sequence is:

1. Enter the execution interval. In most cases,

the execution interval is determined by the
desired sensor scan rate.

2. Enter the Input/Output instructions required

to measure the sensors.

3. If processing in addition to that provided by

the Output Processing Instructions (step 5)
is required, enter the appropriate
Processing Instructions.

4. Enter the Program Control Instruction to

test the output condition and set the Output
Flag when the condition is met. For
example, use

Instruction 92 to output based on time.

Instruction 86 to output every execution
interval.

Instruction 88 or 89 to output based on a
comparison of values in input locations.

This instruction must precede the Output
Processing Instructions which store data in
Final Storage. Instructions are described in
Sections 9 through 12.

5. Enter the Output Processing Instructions to

store processed data in Final Storage. The
order in which data are stored is
determined by the order of the Output
Processing Instructions in the table.

6. Repeat steps 4 and 5 for additional outputs

on different intervals or conditions.

NOTE: The program must be executed for
output to occur. Therefore, the interval at
which the Output Flag is set must be evenly
divisible by the execution interval. For
example, with a 2 minute execution interval
and a 5 minute output interval, the output
flag will only be set on the even multiples of
the 5 minute intervals, not on the odd. Data
will be output every 10 minutes instead of
every 5 minutes.

Execution intervals and output intervals set with
Instruction 92 are synchronized with real time
starting at midnight.

OV4.2 INSTRUCTION FORMAT

Instructions are identified by an instruction
number. Each instruction has a number of
parameters that give the CR23X the information
it needs to execute the instruction.

The CR23X Prompt Sheet has the instruction
numbers in red, with the parameters briefly
listed in columns following the description.
Some parameters are footnoted with further
description under the "Instruction Option
Codes" heading. The CR23X also has on-line
help available when a “?” appears on the
display. Help is accessed by pressing

D

.

For example, Instruction 73 stores the
maximum value that occurred in an Input
Storage location over the output interval.

P73 Maximum
1: Reps
2: TimeOption
3: Loc

The instruction has three parameters (1)
REPetitionS, the number of sequential Input