Standard
RLL
Instructions
5--40
Standard RLL Instructions
Accumulator / Stack Load and Output Data Instructions
DL105 PLC User Manual, 3rd Edition
Accumulator / Stack Load and Output Data Instructions
The accumulator in the DL105 internal CPUs is a 32 bit register which is used as a
temporary storage location for data that is being copied or manipulated in some
manor. For example, you have to use the accumulator to perform math operations
such as add, subtract, multiply, etc. Since there are 32 bits, you can use up to an
8-digit BCD number. The accumulator is reset to 0 at the end of every CPU scan.
The Load and Out instructions and their variations are used to copy data from a
V-memory location to the accumulator, or, to copy data from the accumulator to
V--memory. The following example copies data from V-memory location V2000 to
V-memory location V2010.
V2000
LD
V2000
X1
Copy data from V2000 to the
lower 16 bits of the accumu-
lator
Copy data from the lower 16 bits
of the accumulator to V2010
OUT
V2010
V2010
Acc.
8 9 3 5
8 9 3 5
0 0 0 0
8 9 3 5
Unused accumulator bits
are set to zero
Since the accumulator is 32 bits and V memory locations are 16 bits the Load Double
and Out Double (or variations thereof) use two consecutive V-memory locations or 8
digit BCD constants to copy data either to the accumulator from a V-memory
address or from a V-memory address to the accumulator. For example if you wanted
to copy data from V2000 and V2001 to V2010 and V2011 the most efficient way to
perform this function would be as follows:
LDD
V2000
Copy data from V2000 and
V2001 to the accumulator
Copy data from the accumulator to
V2010 and V2011
OUTD
V2010
V2010
Acc.
V2000
5 0 2 6
5 0 2 6
6 7 3 9
5 0 2 6
X1
V2001
6 7 3 9
V2011
6 7 3 9
Instructions that manipulate data also use the accumulator. The result of the
manipulated data resides in the accumulator. The data that was being manipulated
is cleared from the accumulator. The following example loads the constant value
4935 into the accumulator, shifts the data right 4 bits, and outputs the result to
V2010.
Using the
Accumulator
Copying Data to
the Accumulator
Changing the
Accumulator Data
Содержание 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...