Siemens SINUMERIK 828D Commissioning Manual page 1082

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Programming commands
6.3 Functions
● Remove spaces (from left or from the right)
● Insert values or strings with formatting identifiers
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:
Example
DEF VAR01
DEF VAR02
LOAD
152
(string | varname)
LEN
Determines the number of characters in a string
string
Every valid string expression. NULL is output if string is
empty.
varname
Any valid declared variable name
Only one of the two parameters is allowed.
; Result = 5
(Start, String1, String2 [,Direction])
INSTR
Searches for characters
Start
Starting position for searching for string1 in string2. En‐
ter 0 to start searching at the beginning of string2.
String1
Character that is being searched for.
String2
Character string in which the search is being made.
Direction (optional)
Direction in which the search is being made.
0: From left to right (default setting)
1: From right to left
0 is returned if string1 does not occur in string2.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents