LAR1 or 2 |
Top Previous Next |
With this operation you can load the address register1 or 2. It can be used with as well as without operand. If it is used with operand this one will have to be a pointer. If it is used without operand the content of accu 1 will be loaded into the corresponding address register. Of course in this case a valid pointer has to be loaded into accu 1 before.
Remark: TrySim allows more LAR1/2 operands than STEP®7. This can lead to the fact that a program that functions in TrySim cannot be exported to STEP®7. In such cases try to load the pointer into accu 1 first and use LAR1/2 without operand then.
Example Do not write: LAR1 P##Any1 // #Any1 is declared as In - ANY But: L P##Any1 // Load the pointer to #Any1 in Accu1 LAR1 // Load this pointer into AR1
!! Warning with usage of the address register !!
See also:
STEP®7 is a registered trademark of the Siemens AG.
|