Flexible NC programming
1.10 String operations
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
1-27
Example
DEF STRING[20] STRG = "Axis .
stopped"
STRG[6] = "X" ;Returns the message "Axis X stopped"
MSG(STRG)
STRG[6] = 0
MSG(STRG) ;Returns the message "Axis"
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) Result type: STRING
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) ;Now: STRING_ERG == "X"