Concatenation Of Strings (<<) - Siemens Sinumerik 840D sl Programming Manual

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

Advertisement

Flexible NC programming
1.9 String operations
Example
Program code
DEF BOOL BOOL_ERG
DEF REAL REAL_ERG
DEF AXIS AXIS_ERG
BOOL_ERG=ISNUMBER("1234.9876Ex-7")
BOOL_ERG=ISNUMBER("1234XYZ")
REAL_ERG=NUMBER("1234.9876Ex-7")
AXIS_ERG=AXNAME("X")
1.9.3
Concatenation of strings (<<)
Function
The function "concatenation strings" allows a string to be configured from individual
components.
The concatenation is realized using the 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.
Syntax
<any_type> << <any_type>
Significance
<any_type>:
<< :
For example, such a message or a command can be configured from text lists and
parameters can be inserted (for example a block name):
MSG(STRG_TAB[LOAD_IDX]<<BAUSTEIN_NAME)
CAUTION
The intermediate results of string concatenation must not exceed the maximum string length.
Note
The FRAME and AXIS types cannot be used together with the operator "<<".
78
Variable, type CHAR, BOOL, INT, REAL or STRING
Operator to chain variables (<any_type>) to configure a character string
(type STRING).
This operator is also available alone as a so-called "unary" variant. This
can be used for explicit type converter to STRING (not for FRAME and
AXIS):
<< <any_type>
Comments
; BOOL_ERG == TRUE
; BOOL_ERG == FALSE
; REAL_ERG == 1234.9876Ex-7
; AXIS_ERG == X
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents