Download Series 90-70 Programmable Controller Reference Manual

Transcript
2
Section 2: User Reference Data
User References
The PLC data used in an application program is stored as either discrete or register references.
Table 2-2. Register References
Type
Description
%R
Use the prefix %R to assign system register references which will store program data such as the
results of calculations.
%AI
The prefix %AI represents an analog input register. This prefix is followed by the register
address of the reference (for example, %AI0015). An analog input register holds the value of one
analog input or other non-discrete value.
%AQ
The prefix %AQ represents an analog output register. This prefix is followed by the register
address of the reference (for example, %AQ0056). An analog output register holds the value of
one analog output or other non-discrete value.
%P*
Use the prefix %P to assign program register references which will store program data from the
_MAIN block. This data can be accessed from all program blocks. The size of the %P data block
is based on the highest %P reference in all blocks. (For more information, refer to the Appendix
D, “Memory Allocation.”) The %P references are not normally accessible from external hosts.
%L*
Use the prefix %L to assign local register references which will store program data unique to a
block. The size of the %L data block is based on the highest %L reference in the associated
block. (For more information, refer to Appendix D, “Memory Allocation.”) The %L references
are accessible only from within the local block.
* These reference types are scoped at a program level and are therefore only visible to LD programs.
Note
All register references are retained across a power cycle to the CPU.
Indirect References
You can use indirect referencing for all register references (%R, %AI, %AQ, %P, and %L) to
identify a location in memory that contains the offset in the same memory type of the data to be
used. Indirect references are entered in the same way as direct references, except that the @
character is used in place of the % character. For example, if %R00101 contains the value 1000,
then @R00101 would instruct the PLC to use the data location of %R01000.
Indirect references can be useful when you want to perform the same operation to many registers.
Use of indirect references can also be used to avoid repetitious ladder logic within the application
program. It can be used in loop situations where each register is incremented by a constant or by a
value specified until a maximum is reached.
GFK-0265J
Chapter 2 System Operation
2-11