EasyManua.ls Logo

AutomationDirect DL205 - Page 342

Default Icon
598 pages
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...
DL205 User Manual, 4th Edition, Rev. D
5-118
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Subtract Binary Top of Stack (SUBBS)
Subtract Binary Top of Stack is a 32-bit instruction that
subtracts the binary value in the first level of the accumulator
stack from the binary 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 locations are
moved up one level.
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 binary value in the first level of the
accumulator stack is subtracted from the binary value in the accumulator using the Subtract
Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
230
240
250-1
260
SUBBS
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero
SP64 On when the 16-bit subtraction instruction results in a borrow
SP65 On when the 32-bit subtraction instruction results in a borrow
SP70 On anytime the value in the accumulator is negative
LDD
V1400
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
and V1501
X XXX
XXXX
Level 1
X XXX
XXXX
Level 2
X XXX
XXXX
Level 3
X XXX
XXXX
Level 4
X XXX
XXXX
Level 5
X XXX
XXXX
Level 6
X XXX
XXXX
Level 7
X XXX
XXXX
Level 8
0 01A
205B
Level 1
X XXX
XXXX
Level 2
X XXX
XXXX
Level 3
X XXX
XXXX
Level 4
X XXX
XXXX
Level 5
X XXX
XXXX
Level 6
X XXX
XXXX
Level 7
X XXX
XXXX
Level 8
SUBBS
Subtract thebinaryvalue in
thefirst levelofthe
accumulatorstack from the
binaryvalue in the
accumulator
Acc.
V1400
205B
001A 205B
V1401
001A
Acc.
V1420
50C6
003A 50C6
V1421
003A
Accumulatorstack
after1st LDD
Accumulatorstack
after 2nd LDD
Acc.
0020 306B
0020 306B
Handheld Programmer Keystrokes
SHFT
ANDST
L
3
D
STR
$
SHFT
ISG
U
1
B
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
1
B
RST
S
3
D
RST
S
SHFT
V1501
V1500
DirectSOFT
DS Used
HPP Used

Table of Contents

Other manuals for AutomationDirect DL205

Related product manuals