PLC concepts
4.2 Accessing data
S7-200 SMART
88
System Manual, V2.3, 07/2017, A5E03822230-AF
Using an offset to access data
This example uses LD10 as a pointer to the address VB0. You then increment the pointer by
an offset stored in VD1004. LD10 then points to another address in V memory (VB0 +
offset). The value stored in the V memory address pointed to by LD10 is then copied to
VB1900. By changing the value in VD1004, you can access any V memory location.
Table 4- 20 Example: Using an offset to read the value of any V memory location
LAD
STL
Load the starting address of the V
memory to a pointer.
Add the offset value to the pointer.
Copy the value from the V memory
location (offset) to VB1900
Network 1
LD SM0.0
MOVD &VB0, LD10
+D VD1004, LD10
MOVB *LD10, VB1900