EasyManua.ls Logo

Automationdirect.com DL06 - Page 252

Automationdirect.com DL06
533 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-91
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.
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
SUBR
A aaa
ndar
dRLL
structions
LDR
R22.0
X1
Load thereal number 22.0
into theaccumulator.
SUBR
R15.
0
Subtract thereal number
15.0fromthe accululator
contents, whichisinreal
number format.
0 0000000000000000 100000011100000
8 421842184218421
8 421842184218421
Acc.
40 E 0 0000
V1400V1401
Real Va lue
Copy theresultinthe accumulator
to V1400 and V1401
.
OUTD
V1400
Implies2(exp 2)
129 -- 127 =2
(Hex number)
Mantissa (23bits)Sign Bit
41B00000
000041B0
(SUBR)
(Accumulator)
4170 0 000+
000040E0
Acc.
22
(decimal)
--15
7
1.11 x2(exp 2) = 111.binary= 7 decimal128 +1=129
DirectSOFT32
Exponent (8 bits)
Operand Data Type DL06 Range
A
aaa
V-memory V See memory map
Pointer P See memory map
Constant R -3.402823E + 38 to+-3.402823E + 38
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72 On anytime the value in the accumulator is an invalid floating point number.
SP73 On when a signed addition or subtraction results in a incorrect sign bit.
SP74 On anytime a floating point math operation results in an underflow error.
DS Used
HPP
N/A
DirectSOFT
Subtract Real (SUBR)
The Subtract Real is a 32-bit instruction that subtracts a real
number, which is either two consecutive V-memory locations or
a 32-bit constant, from a real number in the accumulator. The
result is a 32-bit real number that resides in the accumulator.
Both numbers must be Real data type (IEEE floating point
format).