EasyManuals Logo
Home>Siemens>Control Systems>SINUMERIK 804D sl

Siemens SINUMERIK 804D sl Function Manual

Siemens SINUMERIK 804D sl
2050 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1177 background imageLoading...
Page #1177 background image
Detailed description
2.14 Useful tips on programming with STEP 7
Power Line Basic PLC Program (P3)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
2-265
2.14.6 Determining offset addresses for data block structures
General
Another task, which occurs frequently, is symbolic determination of an offset address within
a structured DB, e.g., an ARRAY or STRUCTURE is stored somewhere within the DB. After
loading the address register symbolically with the start address, you might like to access the
individual elements of the ARRAY or STRUCTURE via an address register. One way of
loading the address register symbolically is to use an FC whose input parameter is a pointer.
The address of the ARRAY or STRUCTURE is then assigned symbolically to the input
parameter of this FC in the program. The program code in the FC now determines the offset
address from the input parameter, and passes the offset address in the address register
(AR1) to the calling function. Symbolic addressing is thus possible even with indirect access.
FUNCTION FC 99: VOID Comment
VAR_INPUT
Addr: POINTER; //Points to variable
END_VAR
BEGIN
NETWORK
TITLE =
L P##Addr;
LAR1 ; //Retrieve pointer from Addr
L D [AR1,P#2.0]; //Offset part of pointer of variable
LAR1 ;
END_FUNCTION

Table of Contents

Other manuals for Siemens SINUMERIK 804D sl

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK 804D sl and is the answer not in the manual?

Siemens SINUMERIK 804D sl Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK 804D sl
CategoryControl Systems
LanguageEnglish

Related product manuals