DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-85
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the LDR instruction loads the real number
representation for 7 decimal into the accumulator. The CMPR instruction compares the
accumulator contents with the real representation for decimal 6. Since 7 > 6, the corresponding
discrete status flag is turned on (special relay SP62), turning on control relay C1.
X1
0
0 0
0
4
0 D 0
0
0
0
0
4
0
E 0
DirectSOFT32
SP62
LDR
R7.0
CMPR
R6.0
C1
OUT
CMPR
Acc.
Load the real number
representation for decimal 7
into the accumulator
Compare the value with the
real number representation
for decimal 6
CMPR
A aaa
Operand Data Type
DL06 Range
A
aaa
V-memory
V
See memory map
Pointer
P
See memory map
Constant R
-3. 038 to + -3. 038
Discrete Bit Flags
Description
SP60
On when the value in the accumulator is less than the instruction value.
SP61
On when the value in the accumulator is equal to the instruction value.
SP62
On when the value in the accumulator is greater than the instruction value.
SP71
On anytime the V-memory specified by a pointer (P) is not valid
DS
Used
HPP Used
Direct
SOFT
Compare Real Number (CMPR)
The Compare Real Number instruction compares a real number
value in the accumulator with two consecutive V-memory
locations containing a real number. The corresponding status
flag will be turned on, indicating the result of the comparison.
Both numbers being compared are 32 bits long.