Using Pointers For Indirect Addressing - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

PLC concepts
4.2 Accessing data
The following table provides an example of the fixed mapping convention (established by
STEP 7 Micro/WIN SMART and downloaded as part of the I/O configuration, in the system
block).
Table 4- 18
CPU mapping convention
CPU
Starting
I0.0
address
Q0.0
Note
The CPU models CPU CR20s, CPU CR30s, CPU CR40s, and CPU CR60s do not support
the use of expansion modules or signal boards.
4.2.6

Using pointers for indirect addressing

Indirect addressing uses a pointer to access data in memory. Pointers are double word
memory locations that contain the address of another memory location. You can only use
V memory locations, L memory locations, or accumulator registers (AC1, AC2, AC3) as
pointers. To create a pointer, you must use the Move Double Word instruction to move the
address of the indirectly addressed memory location to the pointer location. Pointers can
also be passed to a subroutine as a parameter.
An S7-200 SMART CPU allows pointers to access the following memory areas: I, Q, V, M, S,
AI, AQ, SM, T (current value only), and C (current value only). You cannot use indirect
addressing to access an individual bit or to access HC, L or accumulator memory areas.
To indirectly access the data in a memory address, you create a pointer to that location by
entering an ampersand character (&) and the first byte of the memory location to be
addressed. The input operand of the instruction must be preceded with an ampersand (&) to
signify that the address of a memory location, instead of its contents, is to be moved into the
location identified in the output operand of the instruction (the pointer).
84
Signal
Expansion
board
module 0
I7.0
I8.0
Q7.0
Q8.0
AI12
AI16
AQ12
AQ16
Expansion
Expansion
module 1
module 2
I12.0
I16.0
Q12.0
Q16.0
AI32
AI48
AQ32
AQ48
System Manual, V2.3, 07/2017, A5E03822230-AF
Expansion
Expansion
module 3
module 4
I20.0
I24.0
Q20.0
Q24.0
AI64
AI80
AQ64
AQ80
Expansion
module 5
I28.0
Q28.0
AI96
AQ96
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents