Flexible NC programming
1.9 String operations
Job planning
76 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
1.9.2 Type conversion from STRING (NUMBER, ISNUMBER, AXNAME)
Function
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_ERG>=NUMBER("<string>")
<BOOL_ERG>=ISNUMBER("<string>")
<AXIS_ERG>=AXNAME("<string>")
Significance
NUMBER: The NUMBER command returns the number represented by the <string>
as REAL value.
<string>: Type STRING variable to be converted
Variable for the result of the type conversion with
NUMBER <REAL_ERG>:
Type: REAL
ISNUMBER: The ISNUMBER command can be used to check whether the <string> can
be converted into a valid number.
Variable for the result of the interrogation with
ISNUMBER
Type: BOOL
TRUE
ISNUMBER supplies the value TRUE, if the
<string> represents a valid REAL number in
compliance with the language rules.
<BOOL_ERG>:
Value:
FALSE If
ISNUMBER supplies the value FALSE, when
calling
NUMBER with the same <string>, an alarm
is initiated.
AXNAME: The AXNAME command converts the specified <string> into an axis
identifier.
Note:
If the
<string> cannot be assigned a configured axis identifier, an alarm
is initiated.
Variable for the result of the type conversion with
AXNAME <AXIS_ERG>:
Type: AXIS