Type Conversion To String (Axstring); Type Conversion From String (Number, Isnumber, Axname) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Work preparation
3.1 Flexible NC programming
3.1.4.1

Type conversion to STRING (AXSTRING)

The function "type conversion to STRING" allows variables of different types to be used as a
component of a message (MSG).
When using the << operator this is realized implicitly for data types INT, REAL, CHAR and
BOOL (see " Concatenation of strings (<<) (Page 449) ").
An INT value is converted to normal readable format. REAL values convert with up to 10
decimal places.
Type AXIS variables can be converted to STRING using the AXSTRING command.
Syntax
<STRING_RES> = << <any_type>
<STRING_RES> = AXSTRING(<axis identifier>)
Meaning
<STRING_RES>:
<any_type>:
AXSTRING:
<axis identifier>:
Note
FRAME variables cannot be converted.
3.1.4.2

Type conversion from STRING (NUMBER, ISNUMBER, AXNAME)

A conversion is made from STRING to REAL using the NUMBER command. The ability to be
converted can be checked using the ISNUMBER command.
A string is converted into the axis data type using the AXNAME command.
Syntax
<REAL_RES>=NUMBER("<string>")
<BOOL_RES>=ISNUMBER("<string>")
<AXIS_RES>=AXNAME("<string>")
Meaning
NUMBER:
<string>:
448
Variable for the result of the type conversion
Type:
STRING
Variable types INT, REAL, CHAR, STRING and BOOL
The AXSTRING command supplies the specified axis identifier as
string.
Variable for axis identifier
Type:
AXIS
The NUMBER command returns the number represented by the <string> as RE‐
AL value.
Type STRING variable to be converted
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents