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

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

<REAL_RES>:
ISNUMBER:
<BOOL_RES>:
AXNAME:
<AXIS_RES>:
Example
Program code
DEF BOOL BOOL_RES
DEF REAL REAL_RES
DEF AXIS AXIS_RES
REAL_RES == 1234.9876Ex-7
BOOL_RES=ISNUMBER("1234XYZ")
REAL_RES=NUMBER("1234.9876Ex-7")
AXIS_RES=AXNAME("X")
3.1.4.3
Concatenation of strings (<<)
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>
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Variable for the result of the type conversion with NUMBER
Type:
REAL
The ISNUMBER command checks whether the <string> can be converted into a
valid number.
Variable for the result of the interrogation with ISNUMBER
Type:
BOOL
Value:
TRUE
FALSE
The AXNAME command converts the specified <string> into an axis identifier.
Note:
If the <string> cannot be assigned a configured axis identifier, an alarm is initi‐
ated.
Variable for the result of the type conversion with AXNAME
Type:
AXIS
3.1 Flexible NC programming
ISNUMBER supplies the value TRUE, if the <string>
represents a valid REAL number in compliance with
the language rules.
If ISNUMBER supplies the value FALSE, when call‐
ing NUMBER with the same <string>, an alarm is
initiated.
Comment
; BOOL_RES == TRUE
; BOOL_RES == FALSE
; REAL_RES == 1234.9876Ex-7
; AXIS_RES == X
Work preparation
449

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents