97BPLC concepts
4.4 Data types
S7-1200 Programmable controller
94
System Manual, 11/2011, A5E02486680-05
4.4.7.1
"Pointer" pointer data type
The data type Pointer points to a particular variable. It occupies 6 bytes (48 bits) in memory
and can include the following information:
●
DB number or 0 if the data is not stored in a DB
●
Storage area in the CPU
●
Variable address
0HPRU\DUHD
%\WH
%\WH
%\WH
%\WH
%\WH
%\WH
'%QXPEHURU
3RLQWHUIRUPDW
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E E\WHDGGUHVV
[ ELWDGGUHVV
%LW
%LW
[
[
[
Depending on the instruction, you can declare the following three types of pointers:
●
Area-internal pointer: contains data on the address of a variable
●
Area-crossing pointer: contains data on the memory area and the address of a variable
●
DB-pointer: contains a data block number and the address of a variable
Table 4- 26 Pointer types:
Type
Format
Example entry
Area-internal pointer
P#Byte.Bit
P#20.0
Area-crossing pointer
P#Memory_area_Byte.Bit
P#M20.0
DB-pointer
P#Data_block.Data_element
P#DB10.DBX20.0
You can enter a parameter of type Pointer without the prefix (P #). Your entry will be
automatically converted to the pointer format.
Table 4- 27 Memory area encoding in the Pointer data:
Hexadecimal code
Data type
Description
b#16#81
I
Input memory area
b#16#82
Q
Output memory area
b#16#83
M
Marker memory area
b#16#84
DBX
Data block
b#16#85
DIX
Instance data block
b#16#86
L
Local data
b#16#87
V
Previous local data