Handling Strings - Siemens SINUMERIK 840D sl Commissioning Manual

Commissioning cnc part 2 (hmi)
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Expanding the Operator Interface (BE1)
3 Syntax
3.6.11

Handling strings

Strings
Strings can be processed as part of the configuration. These allow text to be
displayed dynamically or different texts to be chained for the purpose of code
generation.
The following rules must be observed with regard to string variables:
Logic operations are processed from left to right.
Nested expressions are solved from the inside outwards.
No distinction is made between uppercase and lowercase type.
Strings can be deleted simply by assigning a blank string.
Strings can be attached after the equal sign using the operator "<<".
Quotation marks (") in the string are represented by two successive quotation mark
symbols.
Strings can be checked for equality in IF instructions.
Examples
Default settings for the following examples:
VAR1.VAL = "This is an"
VAR8.VAL = 4
VAR14.VAL = 15
VAR2.VAL = "error"
$85001 = "This is an"
$85002 = "alarm text"
Chaining of strings:
VAR12.VAL = VAR1 << " Error."
Deleting a variable:
VAR10.VAL = ""
Setting a variable with a text variable:
VAR11.VAL = VAR1.VAL
Data type matching:
VAR13.VAL ="This is the " << (VAR14 - VAR8) << "th error"
Treatment of numerical values:
VAR13.VAL = "Error " << VAR14.VAL << ": " << $T80001 <<
$T80002
IF VAR15 == "Error"
VAR16 = 18.1234
ENDIF
BE1/3-98
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
;Result: "This is an error"
;Result: Blank string
;Result: "This is an"
;Result: "This is the 11th error"
;Result:
;"Error 15: This is an alarm text"
;Strings in IF instruction
;Result: VAR16 equals 18.1234,
;if VAR15 equals "Error"
© Siemens AG, 2005. All rights reserved
08/2005

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 810dSinumerik 840diSinumerik 840d

Table of Contents