Extended instructions
9.2 String and character
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
379
GetInstancePath (Query composite global name of the block instance)
Table 9- 73 GetInstancePath instruction
size:=_dint_in_);
You use the GetInstancePath instruction to
read the composed global name of the block
instance within a function block. The com-
posed global name of the block instance is the
path of the complete call hierarchy when the
program calls multiple instances.
The following table shows the parameters of the GetInstancePath instruction:
SIZE Input DINT I, Q, M, D, L or con-
stant
Limits the number of characters output at the
OUT parameter.
• SIZE > 0: GetInstancePath returns the first
SIZE characters of the name.
• SIZE = 0: GeInstancePath returns the
entire name.
•
SIZE < 0: GetInstancePath returns the last
SIZE characters of the name.
OUT Output WSTRING I, Q, M, D, L Read global name of the block instance.
If the global name of the block instance is
longer than the maximum length of WSTRING
(254 characters), GetInstancePath truncates
You can find additional information on valid data types under "Data types (Page 125)".