08/2005 Expanding the Operator Interface (BE1)
3 Syntax
© Siemens AG, 2005. All rights reserved
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
BE1/3-101
Example:
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=LEFT(VAR01,5) ;Result = "HELLO"
END_LOAD
Substring from right
Syntax:
RIGHT(string, length)
Parameter:
string Character string or variable with the string to be
processed
length Number of characters that are to be read out
Function:
RIGHT returns a string containing the specified number of characters starting from
the right-hand side of a string.
Example:
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=RIGHT(VAR01,4) ;Result = "WORLD"
END_LOAD
Substring from mid-string
Syntax:
MIDS(string, start [, length])
Parameter:
string Character string or variable with the string to be
processed
start Start from where characters are to be read in the string
length Number of characters that are to be read out (optional)
If length is not specified, then the string is transferred up to the
end.
Function:
MIDS returns a string containing the specified number of characters starting at the
specified position in the string.