Programming
2.7 Functions
Expanding the user interface
2-100
Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
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:
LEN
(string | varname)
Description:
Determines the number of characters in a string
Parameters:
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.
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HALLO"
VAR02=LEN(VAR01)
;
Result = 5
END_LOAD
INSTR function: Search for character in string
Syntax:
INSTR
(Start, String1, String2 [,Direction])
Description:
Searches for characters
Parameters:
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.
Summary of Contents for SINUMERIK
Page 6: ...Preface Base software and HMI Advanced 6 Commissioning Manual 03 2009 6FC5397 0DP10 3BA0 ...
Page 96: ......
Page 562: ...Index Expanding the user interface Index 4 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 ...
Page 566: ...Table of contents Online Help HE1 4 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 ...
Page 598: ...Online Help HE1 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 36 ...