DL205 User Manual, 4th Edition, Rev. B
5–87
Chapter 5: Standard RLL Instructions - Logical
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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.
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).
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
SP75 On when a real number instruction is executed and a non-real number encountered.
X1
000 0
40D0 0000
40E0
DirectSOFT
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
Operand Data Type DL250-1 Range DL260 Range
A
aaa aaa
V-memory V
All. See
memory map
All. See
memory map
Pointer P
All V-memory.
See memory map
All V-memory.
See memory map
Constant R
-3.402823E+038 to
+ 3.402823E+038
-3.402823E+038 to
+ 3.402823E+038
DS Used
HPP N/A