Siemens SINUMERIK 840DE sl Commissioning Manual page 1168

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Programming commands
6.3 Functions
6.3.36
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
● Compare strings
● Insert a string in another string
● Remove a string from a string
● 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:
182
(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
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents