EasyManua.ls Logo

Automationdirect.com DL06 - Page 291

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-130
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
100000000
s accumulator
10’s complement value
In the following example when X1 is on, the value in V2000 and V2001 is loaded into the
accumulator. The 10’s complement is taken for the 8 digit accumulator using the Ten’s
Complement instruction. The value in the accumulator is copied to V2010 and V2011 using
the Out Double instruction.
BCDCPL
3
D
Handheld ProgrammerKeystrokes
DirectSOFT3
2
LDD
V2000
X1
Load thevalue in V2000 and
V2001 into theaccumulator
BCDCPL
Takesa10’scomplementof
thevalue in theaccumulato
r
OUTD
V2010
Copy thevalue in the
accumulatortoV2010 and
V2011
Acc.
V2000
0087
0000 008 7
V2001
0000
V2010
Acc.
9913
9999 991 3
V201
1
9999
STR
$
1
B
ENT
SHFT
ANDST
L
3
D
3
D
2
C
0
A
0
A
0
A
ENT
SHFT ENT
OUT
GX
SHF
T
2
C
0
A
1
B
0
A
ENT
1
B
2
C
3
D
2
C
C V
P
ANDST
L
DS Used
HPP Used
DirectSOFT
Ten’s Complement (BCDCPL)
The Ten’s Complement instruction takes the 10’s complement
(BCD) of the 8 digit accumulator. The result resides in the
accumulator. The calculation for this instruction is: