08/2005
Quotation marks within a string:
VAR2="Hello, this is a "" Test"
System or user-variable strings dependent on variable content:
VAR2.Var = "$R[" << VAR8 << "]"
String functions
The string functions described below are available from HMI Advanced software
release 6.3 onwards.
The following string functions are available:
•
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
String length
Syntax:
LEN(string | varname)
Parameter:
string
varname
Function:
Determine the number of characters in a string.
Note:
Only one of the two parameters is allowed.
Example:
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO"
VAR02=LEN(VAR01)
END_LOAD
© Siemens AG, 2005. All rights reserved
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
Every valid string expression. NULL is output if string is empty
Any valid declared variable name
Expanding the Operator Interface (BE1)
;Result: Hello, this is a " Test
;Result: $R[4]
;Result = 5
3 Syntax
BE1/3-99