Automationdirect.com DirectLOGIC DL205 Series User Manual page 310

Table of Contents

Advertisement

Subtract Real (SUBR)
The Subtract Real is a 32-bit instruction that subtracts a real
230
number, which is either two consecutive V-memory locations or
240
a 32-bit constant, from a real number in the accumulator. The
250-1
result is a 32-bit real number that resides in the accumulator.
Both numbers must be Real data type (IEEE floating point
260
format).
DS
Used
HPP
N/A
V-memory
Pointer
Constant
Discrete Bit Flags
SP63
SP70
SP71
SP72
SP73
SP74
SP75
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT
X1
Load the real number
22.0 into the accumulator.
Subtract the real number
15.0 from the accumulator
contents, which is in real
number format.
Copy the result in the
accumulator to V1400
and V1401.
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
format. You must use DirectSOFT for this feature.
Operand Data Type
A
R
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.
On anytime the V-memory specified by a pointer (P) is not valid.
On anytime the value in the accumulator is an invalid floating point number.
On when a signed addition or subtraction results in an incorrect sign bit.
On anytime a floating point math operation results in an underflow error.
On when a real number instruction is executed and a non-real number was encountered.
LDR
R22.0
SUBR
R15.0
8 4
OUTD
Acc.
0 1
V1400
Sign Bit
Implies 2 (exp 2)
Chapter 5: Standard RLL Instructions - Math
DL250-1 Range
aaa
V
All. (See page 3-55)
P All V-memory (See page 3-55) All V-memory (See page 3-56)
-3.402823E+038 to
+ 3.402823E+038
Description
4
1
B
2
2
4
1
B
(decimal)
_
_
1
5
4
1
7
7
Acc.
4
0
E
V1401
4
0
E
Real Value
2
1
8
4 2
1
8
4
2 1
8
4
2
0
0
0
0 0
0
1
1
1 0
0
0
0
Exponent (8 bits)
128 + 1 = 129
1.11 x 2 (exp 2) = 111. binary= 7 decimal
129 - - 127 = 2
DL205 User Manual, 4th Edition, Rev. B
SUBR
A aaa
DL260 Range
aaa
All. (See page 3-56)
-3.402823E+038 to
+ 3.402823E+038
0
0
0
0
0
0
0
0
0
0
(Accumulator)
0
0
0
0
0
(SUBR)
0
0
0
0
0
V1400
0
0
0
0
0
(Hex number)
1
8 4
2
1
8
4 2
1
8
4
2 1
0
0 0
0
0
0
0 0
0
0
0
0 0
Mantissa (23 bits)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
8
4
2
1
0
0
0
0
B
C
D
5–93

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF