Siemens Simatic S7 Series System Manual page 71

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Entering an asterisk (*) in front of an operand for an instruction specifies that the operand is
a pointer. As shown in the following figure, entering *AC1 means that AC1 stores a pointer to
the word-length value being referenced by the Move Word (MOVW) instruction. In this
example, the values stored in both VB200 and VB201 are moved to accumulator AC0.
Figure 4-7
As shown in the following figure, you can change the value of a pointer. Since pointers are
32-bit values, use double-word instructions to modify pointer values. Simple mathematical
operations, such as adding or incrementing, can be used to modify pointer values.
Figure 4-8
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
MOVD &VB200, AC1
Creates the pointer by moving the address of VB200 (initial byte of VW200) to AC1
MOVW *AC1, AC0
Moves the word value referenced by the pointer in AC1
Creating and using a pointer
MOVD &VB200, AC1
Creates the pointer by moving the address of VB200 (initial byte of VW200) to AC1
MOVW *AC1, AC0
Moves the word value referenced by the pointer in AC1
+D +2, AC1
Adds 2 to the accumulator to point to the next word location
MOVW *AC1, AC0
Moves the word value referenced by the pointer in AC1
Modifying a pointer
PLC concepts
4.2 Accessing data
71

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents