EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 380

Siemens SIMATIC S7-1200
1614 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
Loading...
Extended instructions
9.2 String and character
S7-1200 Programmable controller
380 System Manual, V4.2, 09/2016, A5E02486680-AK
Example: Calling GetInstancePath to get the path of a multi-instance FB call
In the following example, the FB_Level_3 function block calls the GetInstancePath
instruction.
The FB_Level_3 function block stores its data in the calling FB_Level_2 function block.
The FB_Level_2 function block in turn stores its data in the calling FB_Level_1 function
block.
The FB_Level_1 function block in turn stores its data in its instance data block
IDB_LEVEL_1. Through the use of multi-instances, the instance data block of FB_Level_1
contains all data of the three function blocks.
The GetInstancePath instruction returns the following values for this example, depending on
the value of the SIZE parameter:
SIZE
GetInstancePath returns
Explanation
1 '...'
First character of WSTRING:'
Identifier that the name was truncated: ...
Last character of WSTRING:'
2 '"...'
First character of WSTRING:'
The first character of the name and identifier that the
name was truncated:"...
Last character of WSTRING:'
3 '"I...'
First character of WSTRING:'
The first two characters of the name and identifier that
the name was truncated:"... "I...
Last character of WSTRING:'

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals