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>: Variable for the result of the type conversion
Type: STRING
<any_type>: Variable types INT, REAL, CHAR, STRING and BOOL
AXSTRING: The AXSTRING command supplies the specified axis identifier as
string.
<axis identifier>: Variable for axis identifier
Type: AXIS
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: The NUMBER command returns the number represented by the <string> as RE‐
AL value.
<string>: Type STRING variable to be converted
Work preparation
3.1 Flexible NC programming
NC programming
448 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0