Siemens SINUMERIK 840D sl Programming Manual page 43

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

The chaining function is implemented via operator: <<. This operator has STRING as the
target type for all combinations of basic types CHAR, BOOL, INT, REAL, and STRING.
Any conversion that may be required is carried out according to existing rules.
Programming
Syntax
any type << any type
Semantics
The strings specified (possibly implicitly converted non-string types) are concatenated.
This operator can also be used as a "unary" operator with a single operand. This can be
used for explicit type conversion to STRING (not for FRAME and AXIS).
Types FRAME and AXIS cannot be used with this operator.
Syntax
<< any type
Semantics
The specified type is implicitly converted to STRING type.
This can be used to put together a message or a command out of text lists and insert
parameters into it (e.g. a module name):
MSG(STRG_TAB[LOAD_IDX]<<MODULE_NAME)
Caution
The intermediate results of string concatenation must not exceed the maximum string length.
Example: concatenation of strings
DEF INT IDX = 2
DEF REAL VALUE = 9.654
DEF STRING[20]STRG = "INDEX:2"
IF STRG == "Index:" <<IDX GOTOF NO_MSG
MSG ("Index:" <<IDX <<"/value:" <<VALUE)
NO_MSG:
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Flexible NC programming
Result type: STRING
Result type: STRING
;Display: "Index: 2/value: 9.654"
1.10 String operations
1-29

Advertisement

Table of Contents
loading

Table of Contents