EasyManua.ls Logo

Siemens S7-1200 - LEN (Determine the Length of a Character String) Instruction; CONCAT (Combine Character Strings) Instruction

Siemens S7-1200
1028 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
8.2 String and character
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
307
8.2.4.2
LEN (Determine the length of a character string) instruction
Table 8- 49 Length instruction
LAD / FBD
SCL
Description
out := LEN(in);
LEN (length) provides the current length of the string IN at output OUT. An
empty string has a length of zero.
Table 8- 50 Data types for the parameters
Parameter and type
Data type
Description
IN
IN
String
Input string
OUT
OUT
Int, DInt, Real, LReal
Number of valid characters of IN string
Table 8- 51 ENO status
ENO
Condition
OUT
1
No invalid string condition
Valid string length
0
Current length of IN exceeds maximum length of IN
Current length is set to 0
Maximum length of IN does not fit within allocated memory range
Maximum length of IN is 255 (illegal length)
8.2.4.3
CONCAT (Combine character strings) instruction
Table 8- 52 Concatenate strings instruction
LAD / FBD
SCL
Description
out := CONCAT(in1, in2);
CONCAT (concatenate strings) joins string parameters IN1 and
IN2 to form one string provided at OUT. After concatenation,
String IN1 is the left part and String IN2 is the right part of the
combined string.
Table 8- 53 Data types for the parameters
Parameter and type
Data type
Description
IN1
IN
String
Input string 1
IN2
IN
String
Input string 2
OUT
OUT
String
Combined string (string 1 + string 2)

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals