Extended instructions
9.2 String and character
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
383
Example: Reading a block name
The following example shows how to read out a block name.
1. Create two tags in a global data block for storing the data.
2. Define the parameters of the instruction as follows:
The Level1_gbn block executes the GetBlockName instruction. GetBlockName reads out the
name of the Level1_gbn block and outputs the name as a character string at output
parameter RET_VAL(outputBlockName). Because the SIZE parameter is 0 (limitSIZE), the
length of the character string is unlimited.