Example
DEF STRING[20] STRG = "Axis .
stopped"
STRG[6] = "X"
MSG(STRG)
STRG[6] = 0
MSG(STRG)
1.10.1
Type conversion to STRING
Function
This enables use of variables of different types in a message (MSG).
Performed implicitly with use of the operator << for data types INT, REAL, CHAR, and BOOL
(see "Concatenation of strings").
An INT value is converted to normal readable format. REAL values convert with up to
10 decimal places.
Programming
Syntax
STRING_ERG = AXSTRING (AXIS)
Semantics:
AXSTRING (AXIS) returns the specified axis identifier as a string.
Parameters
Variables of type AXIS can be converted to STRING by the AXSTRING function.
FRAME variables cannot be converted.
Example:
MSG("Position:"<<$AA_IM[X])
Example
DEF STRING[32] STRING_ERG
STRING_ERG = AXSTRING(X)
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
;Returns the message "Axis X stopped"
;Returns the message "Axis"
Result type: STRING
;Now: STRING_ERG == "X"
Flexible NC programming
1.10 String operations
1-27