Automationdirect.com DirectLOGIC DL205 Series User Manual page 326

Table of Contents

Advertisement

Add Formatted (ADDF)
Add Formatted is a 32-bit instruction that adds the BCD value
230
in the accumulator with the BCD value (Aaaa) which is a range
240
of discrete bits. The specified range (Kbbb) can be 1 to 32
250-1
consecutive bits. The result resides in the accumulator.
260
DS
Used
HPP Used
Inputs
Outputs
Control Relays
Stage Bits
Timer Bits
Counter Bits
Special Relays
Global I/O
Constant
Discrete Bit Flags
SP63
SP66
SP67
SP70
SP75
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
loaded into the accumulator using the Load Formatted instruction. The value formed by
discrete locations C0–C3 is added to the value in the accumulator using the Add Formatted
instruction. The value in the lower four bits of the accumulator is copied to Y10–Y13 using
the Out Formatted instruction.
DirectSOFT
X6
Handheld Programmer Keystrokes
$
STR
L
SHFT
ANDST
A
SHFT
0
GX
SHFT
OUT
Operand Data Type
A
X
Y
C
S
T
CT
SP
GX/GY
K
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16-bit addition instruction results in a carry.
On when the 32-bit addition instruction results in a carry.
On anytime the value in the accumulator is negative.
On when a BCD instruction is executed and a NON-BCD number was encountered.
Load the BCD value represented
LDF
X0
by discrete locations X0–X3
K4
into the accumulator
Add the BCD value in the
ADDF
C0
accumulator with the value
K4
represented by discrete
location C0–C3
Copy the lower 4 bits of the
OUTF
Y10
accumulator to discrete
K4
locations Y10–Y13
G
ENT
6
D
F
A
3
5
0
D
D
F
NEXT
3
3
5
F
B
A
5
1
0
Chapter 5: Standard RLL Instructions - Math
DL260 Range
aaa
0-1777
0-1777
0-3777
0-1777
0-377
0-377
0-777
0-3777
-
Description
X3
ON
The unused accumulator
bits are set to zero
0
0
0
0
0
0
+
Acc.
0
0
0
1
0
0
Y13
OFF
E
ENT
4
A
E
NEXT
NEXT
NEXT
0
E
ENT
4
DL205 User Manual, 4th Edition, Rev. B
A aaa
ADDF
K bbb
bbb
-
-
-
-
-
-
-
-
1-32
X2
X1
X0
OFF
OFF
OFF
(Accumulator)
0
8
C3
C2
C1
3
(C0-C3)
OFF
OFF
ON
0
1
Y12
Y11
Y10
OFF
OFF
ON
ENT
4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
C0
ON
B
C
D
5–109

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?

Table of Contents

Save PDF