Compare Real Number (CMPR)
The Compare Real Number instruction
230
compares a real number value in the
240
accumulator with two consecutive V-memory
250-1
locations containing a real number. The
corresponding status flag will be turned on
260
indicating the result of the comparison. Both
numbers being compared are 32 bits long.
DS
Used
HPP
N/A
Operand Data Type
V-memory
Pointer
Constant
Discrete Bit Flags
SP60
SP61
SP62
SP71
SP75
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).
DirectSOFT
X1
SP62
Chapter 5: Standard RLL Instructions - Logical
A
V
P
R
On when the value in the accumulator is less than the instruction value.
On when the value in the accumulator is equal to the instruction value.
On when the value in the accumulator is greater than the instruction value.
On anytime the V-memory specified by a pointer (P) is not valid
On when a real number instruction is executed and a non-real number encountered.
Load the real number
LDR
representation for decimal 7
R7.0
into the accumulator
Compare the value with the
CMPR
real number representation
R6.0
for decimal 6
C1
OUT
DL205 User Manual, 4th Edition, Rev. B
CMPR
A aaa
DL250-1 Range
aaa
All. See
memory map
All V-memory.
See memory map
-3.402823E+038 to
+ 3.402823E+038
Description
Acc.
CMPR
DL260 Range
aaa
All. See
memory map
All V-memory.
See memory map
-3.402823E+038 to
+ 3.402823E+038
4
0
E
0
0
0
0
0
4
0
D
0
0
0
0
0
5–87
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?