Flexible NC programming
1.9 String operations
1.9.1
Type conversion to STRING (AXSTRING)
Function
Using the function "type conversion to STRING" variables of different types can 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 78]")..
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_ERG> = << <any_type>
<STRING_ERG> = AXSTRING(<axis identifier>)
Significance
<STRING_ERG>:
<any_type>:
AXSTRING:
<axis identifier>:
Note
FRAME variables cannot be converted.
Examples
Example 1:
MSG("Position:"<<$AA_IM[X])
Example 2: AXSTRING
Program code
DEF STRING[32] STRING_ERG
STRING_ERG=AXSTRING(X)
76
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
Comments
; STRING_ERG == "X"
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning