Siemens SINUMERIK Commissioning Manual page 450

Sinumerik 840di sl/840d sl/840dbase software and hmi advanced
Hide thumbs Also See for SINUMERIK:
Table of Contents

Advertisement

Programming
2.7 Functions
2.7.27
STRING functions
Overview
The following functions enable strings to be processed:
● Determine length of string
● Find a character in a string
● Extract substring from left
● Extract substring from right
● Extract substring from mid-string
● Replace substring
LEN function: Length of a string
Syntax:
Description:
Parameters:
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HALLO"
VAR02=LEN(VAR01)
END_LOAD
INSTR function: Search for character in string
Syntax:
Description:
Parameters:
2-100
(string | varname)
LEN
Determines the number of characters in a string
string
Every valid string expression. NULL is output if
string is blank.
varname
Any valid declared variable name
Only one of the two parameters is allowed.
;
(Start, String1, String2 [,Direction])
INSTR
Searches for characters
Start
Starting position for searching from string1 into
string2. Enter 0 to start searching at the
beginning of string2.
String1
Character that is being searched for.
Result = 5
Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
Expanding the user interface

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents