Campbell Scientific CR7 Measurement and Control System User Manual

Page 124

Advertising
background image

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-6

Else Instruction is optional; when it is omitted, a
false comparison will result in execution
branching directly to the End Instruction.
Instruction 94 has no parameters.

*** 95 END ***

FUNCTION
Instruction 95 is used to indicate the end/return
of a subroutine (Instruction 85), the end of a
loop (Instruction 87), the end of an If Then/Else
sequence, or the end of the Case statement
(Instructions 88-93 when used with command
30). The End Instruction has no parameters.

*** 96 ACTIVATE SERIAL DATA OUTPUT ***

FUNCTION
Instruction 96 is used instead to activate the
Storage Module or serial port output. By using
Program Control Instructions to allow execution
of Instruction 96 only at certain times, the user
can control when the output is active.

When used to send data to the SM192 or
SM716 Storage Module, the CR7 can determine
whether or not the Storage Module is
connected. If the Storage Module is not
connected, the data will not be sent until it is
connected. Instruction 96 also allows for faster
data output via the serial port with the Binary
Option, which outputs FINAL STORAGE
FORMAT (2 bytes per low resolution data point)
instead of ASCII (10 bytes per data point,
Section 4.5). Appendix C describes FINAL
STORAGE FORMAT.

A single parameter is used to select whether the
instruction is to control the tape, Storage
Module, or the printer output, and if the printer is
selected, the format and baud rate. Instruction
96 must be entered separately for each output
device used.

Instruction 96 uses the same Printer pointer as
the *9 mode which can be used to get a residual
or partial dump of Final Storage (Section 4).

Do not use *4 to activate a device that is
activated by Instruction 96.

PAR.

DATA

NO.

TYPE

DESCRIPTION

01:

2

The left digit specifies the
Option and the right specifies
the baud rate for the printer.
The code for Storage Module
is 30.

Option

X = Baud Rate

0 --

300

1X -- PRINTER, ASCII

1 --

1200

2X -- PRINTER, Binary

2 --

9600

30 -- SM192 or SM716

3 -- 76,800

31 -- Send filemark to SM192/716

*** 98 SEND CHARACTER ***

Instruction 98 is used to send a character to the
printer. The single parameter sets the baud
rate and gives the decimal equivalent of the 7
bit character (sent as 8 bits, no parity). For
example, to send the ASCII character control R
at 9600 baud, 2018 would be entered for
Parameter 1. This instruction can be used to
send a control character to activate some
device. The specified character is sent at the
time Instruction 98 is executed; this will cause it
to precede any output arrays generated in the
same table, since the output data is sent to the
printer at the completion of the table.

PAR.

DATA

NO.

TYPE

DESCRIPTION

01:

4

Decimal Value of ASCII character:
yxxx xxx=ASCII value (1-127)

y=Baud rate code

0

300

baud

1

1200

baud

2

9600

baud

3

76,800

baud

Advertising