Comparison Codes - Campbell CR510 Operator's Manual

Datalogger
Hide thumbs Also See for CR510:
Table of Contents

Advertisement

current values (samples at the time of output) of
locations 2-10.
Loops can be nested. Indexed locations within
nested loops are indexed to the inner most loop
that they are within. The maximum nesting
level in the CR510 is 11 deep. This applies to If
Then/Else comparisons and Loops or any
combination thereof. An If Then/Else
comparison which uses the Else Instruction (94)
counts as being nested 2 deep.
PARAM.
DATA
NUMBER
TYPE
01:
4
02:
4
*** 88 IF X COMPARED TO Y ***
FUNCTION
This Instruction compares two input locations
and, if the result is true, executes the specified
Command. The comparison codes are given in
Table 12-3.
PARAM.
DATA
NUMBER
TYPE
01:
4
02:
2
03:
4
04:
2
TABLE 12-3. Comparison Codes
Parameter 1
1
2
3
4
*** 89 IF X COMPARED TO F ***
FUNCTION
This Instruction compares an input location to a
fixed value and, if the result is true, performs
the specified Command. The comparison codes
are given in Table 12-3.
DESCRIPTION
Delay
Iteration count
DESCRIPTION
Input location for X
Comparison code
(Table 12-5)
Input location for Y
Command (Table 12-2)
Function
IF X = Y
IF X Y
IF X
Y
IF X < Y
SECTION 12. PROGRAM CONTROL INSTRUCTIONS
PARAM.
DATA
NUMBER
TYPE
01:
4
02:
2
03:
FP
04:
2
*** 90 STEP LOOP INDEX ***
FUNCTION
When used within a Loop (Instruction 87),
Instruction 90 will increment the index counter
by a specified amount after the first time
through the loop, thus affecting all indexed input
location parameters in subsequent instructions.
For example, if 4 is specified, the index counter
will count up by 4 (0,4,8,12,...) inside the loop.
Instruction 90 does not affect the loop counter
which still counts by 1.
PARAM.
DATA
NUMBER
TYPE
01:
2
*** 91 IF FLAG / PORT / MODEM ***
FUNCTION
This Instruction checks the status of one of the
ten Flags, one of the two ports, or the serial I/O
port modem enable and conditionally performs
the specified Command. Ports can be indexed
(--) with the C key.
The first Parameter specifies the condition to check:
1X
Execute command if Flag X is high
2X
Execute command if Flag X is low
40
Execute command if modem is on
4P
Execute command if port P is high
50
Execute command if modem is off
5P
Execute command if port P is low
where P = 1 or 2
PARAM.
DATA
NUMBER
TYPE
01:
2
02:
2
DESCRIPTION
Input location for X
Comparison code
(Table 12-3)
Fixed value
Command (Table 12-2)
DESCRIPTION
Increment for the loop
index counter
DESCRIPTION
Flag or Port condition to
check
Command (Table 12-2)
12-3

Advertisement

Table of Contents
loading

Table of Contents