EasyManua.ls Logo

Automationdirect.com DL06 - Page 273

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-112
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 will be loaded into the accumulator
using the Load instruction. The value in V1420 is loaded into the accumulator using the Load
instruction, pushing the value previously loaded in the accumulator onto the accumulator
stack. The BCD value in the first level of the accumulator stack is multiplied by the BCD
value in the accumulator using the Multiply Stack instruction. The value in the accumulator is
copied to V1500 and V1501 using the Out Double instruction.
MULS
StandardRLL
DirectSOFT32 Display
LD
V1400
X1 Load thevalue in V1400 into
theaccumulato
r
LD
V1420
Load thevalue in V1420 into
theaccumulato
r
OUTD
V1500
Copy thevalue in the
accumulatortoV1500
and V1501
XXXXXXXXLevel 1
XXXXXXXXLevel 2
XXXXXXXXLevel 3
XXXXXXXXLevel 4
XXXXXXXXLevel 5
XXXXXXXXLevel 6
XXXXXXXXLevel 7
XXXXXXXXLevel 8
00005000Level 1
XXXXXXXX
Level 2
XXXXXXXXLevel 3
XXXXXXXX
Level 4
XXXXXXXXLevel 5
XXXXXXXX
Level 6
XXXXXXXXLevel 7
XXXXXXXX
Level
8
MULS
Multiply thevalue in the
accumulator withthe value
in thefirst levelofthe
accumulatorstack
Acc.
V1400
5000
0000 5000
Acc.
V1420
0200
0000 0200
Accumulatorstack
after1st LDD
Accumulatorstack
after 2nd LDD
Acc.
0100 0000
0100 0000
V1500V1501
The unused accumulator
bits ar eset to zero
The unused accumulator
bits ar eset to zer
o
Handheld Programmer Keystrokes
SHFT
ANDST
L
3
D
STR
$
SHFT
ORST
M
ISG
U
ANDST
L
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
RST
S
ENT
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On any time the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
DS Used
HPP Used
DirectSOFT
Multiply Top of Stack (MULS)
Multiply Top of Stack is a 16-bit instruction that multiplies a
4-digit BCD value in the first level of the accumulator stack by
a 4-digit BCD value in the accumulator. 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.