EasyManua.ls Logo

Automationdirect.com DL06 - Page 271

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-110
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.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in V1420 and V1421 is loaded
into the accumulator using the Load Double instruction, pushing the value previously loaded
in the accumulator onto the accumulator stack. The value in the first level of the accumulator
stack is added with the value in the accumulator using the Add Stack instruction. The value in
the accumulator is copied to V1500 and V1501 using the Out Double instruction.
ADDS
DirectSOFT32 Display
LDD
V140
0
X1 Load thevalue in V1400 and
V1401 into theaccumulator
LDD
V1420
Load thevalue in V1420 and
V1421 into theaccumulator
OUTD
V1500
Copy thevalue in the
accumulatortoV1500
andV1501
XXXX
XXXX
Level1
XXXX
XXXX
Level2
XXXX
XXXX
Level3
XXXX
XXXX
Level4
XXXX
XXXX
Level5
XXXX
XXXX
Level6
XXXX
XXXX
Level7
XXXX
XXXX
Level8
0039
5026
Level1
XXXX
XXXX
Level2
XXXX
XXXX
Level3
XXXX
XXXX
Level4
XXXX
XXXX
Level5
XXXX
XXXX
Level6
XXXX
XXXX
Level7
XXXX
XXXX
Level 8
ADDS
Addthe valueinthe
accumulatorwiththe value
in thefirstlevelofthe
accumulatorsta ck
Acc.
V1400
502 6
003 9 5026
V1401
003 9
Acc.
V1420
205 6
001 7 2056
V1421
001 7
Accumulatorstack
after1stLDD
Accumulatorstack
after2nd LDD
Acc.
005 6 7082
005 6 7082
Handheld Programmer Keystrokes
SHFT
ANDST
L
3
D
STR
$
SHFT
3
D
3
D
OUT
GX
SHFT
3
D
1
B
5
F
0
A
0
A
ENT
1
B
ENT
1
B
4
E
0
A
0
A
ENT
ENT
SHFT
ANDST
L
3
D
1
B
4
E
2
C
0
A
ENT
3
D
RST
S
3
D
0
A
V1501
V1500
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP66 On when the 16-bit addition instruction results in a carry.
SP67 On when the 32 bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative.
SP73 On when a signed addition or subtraction results in an incorrect sign bit.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
DS Used
HPP Used
DirectSOFT
Add Top of Stack (ADDS)
Add Top of Stack is a 32-bit instruction that adds the BCD value
in the accumulator with the BCD value in the first level of the
accumulator stack. The result resides in the accumulator. The
value in the first level of the accumulator stack is removed and all
stack values are moved up one level.