Extended instructions
8.2 String and character
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
309
Table 8- 56 Data types for the parameters
L IN Int Length of the substring to be created:
• LEFT uses the left-most characters number of characters in the
string
• RIGHT uses the right-most number of characters in the string
• MID uses the number of characters starting at position P within
the string
P IN Int MID only: Position of first substring character to be copied
P= 1, for the initial character position of the IN string
Table 8- 57 ENO status
0
• L or P is less than or equal to 0
• P is greater than maximum length of IN
• Current length of IN exceeds maximum length of IN, or current length
of OUT exceeds maximum length of OUT
• Maximum length of IN or OUT does not fit within allocated memory
• Maximum length of IN or OUT is 0 or 255
Current length is set to 0
Substring length (L) to be copied is larger than maximum length of OUT
string.
Characters are copied until the
maximum length of OUT is
MID only: L or P is less than or equal to 0
Current length is set to 0
MID only: P is greater than maximum length of IN
Current length of IN1 exceeds maximum length of IN1, or current length of
IN2 exceeds maximum length of IN2 (invalid string)
Current length is set to 0
Maximum length of IN1, IN2 or OUT does not fit within allocated memory
Maximum length of IN1, IN2 or OUT is 0 or 255 (illegal length)