Standard
RLL
Instructions
5--42
Standard RLL Instructions
Accumulator / Stack Load and Output Data Instructions
DL105 PLC User Manual, 3rd Edition
The accumulator stack is used for instructions that require more than one parameter
to execute a function or for user defined functionality. The accumulator stack is used
when more than one Load instruction is executed without the use of an Out
instruction. The first load instruction in the scan places a value into the accumulator.
Every Load instruction thereafter without the use of an Out instruction places a value
into the accumulator and the value that was in the accumulator is placed onto the
accumulator stack. The Out instruction nullifies the previous load instruction and
does not place the value that was in the accumulator onto the accumulator stack
when the next load instruction is executed. Every time a value is placed onto the
accumulator stack the other values in the stack are pushed down one location. The
accumulator is eight levels deep (eight 32 bit registers). If there is a value in the
eighth location when a new value is placed onto the stack, the value in the eighth
location is pushed off the stack and cannot be recovered.
Acc.
Load the value 3245 into the accumu-
lator
Load the value 5151 into the accumu-
lator, pushing the value 3245 onto the
stack
Load the value 6363 into the accumu-
lator, pushing the value 5151 to the 1st
stack location and the value 3245 to
the 2nd stack location
LD
K3245
X1
LD
K5151
LD
K6363
Constant
3 2 4 5
0 0 0 0
3 2 4 5
Acc.
X X X X
X X X X
Current Acc. value
Previous Acc. value
X X X X X X X X
Level 1
X X X X X X X X
Level 2
X X X X X X X X
Level 3
X X X X X X X X
Level 4
X X X X X X X X
Level 5
X X X X X X X X
Level 6
X X X X X X X X
Level 7
X X X X X X X X
Level 8
Accumulator Stack
0 0 0 0 3 2 4 5
Level 1
X X X X X X X X
Level 2
X X X X X X X X
Level 3
X X X X X X X X
Level 4
X X X X X X X X
Level 5
X X X X X X X X
Level 6
X X X X X X X X
Level 7
X X X X X X X X
Level 8
Accumulator Stack
Acc.
Constant
5 1 5 1
0 0 0 0
5 1 5 1
Acc.
0 0 0 0
3 2 4 5
Current Acc. value
Previous Acc. value
0 0 0 0 5 1 5 1
Level 1
0 0 0 0 3 2 4 5
Level 2
X X X X X X X X
Level 3
X X X X X X X X
Level 4
X X X X X X X X
Level 5
X X X X X X X X
Level 6
X X X X X X X X
Level 7
X X X X X X X X
Level 8
Accumulator Stack
Acc.
Constant
6 3 6 3
0 0 0 0
6 3 6 3
Acc.
0 0 0 0
5 1 5 1
Current Acc. value
Previous Acc. value
Bucket
Bucket
Bucket
The POP instruction rotates values upward through the stack into the accumulator.
When a POP is executed the value which was in the accumulator is cleared and the
value that was on top of the stack is in the accumulator. The values in the stack are
shifted up one position in the stack.
Using the
Accumulator Stack
Содержание DL105
Страница 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Страница 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Страница 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Страница 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Страница 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...
Страница 329: ...1F European Union Directives CE In This Appendix European Union EU Directives Basic EMC Installation Guidelines...