Type Conversion From String (Number, Isnumber, Axname) - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Examples
Example 1:
MSG("Position:"<<$AA_IM[X])
Example 2: AXSTRING
Program code
DEF STRING[32] STRING_ERG
STRING_ERG=AXSTRING(X)
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:
<string>:
<REAL_ERG>:
ISNUMBER:
Job Planning
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Comments
; STRING_ERG == "X"
The NUMBER command returns the number represented by the
<string> as REAL value.
Type STRING variable to be converted
Variable for the result of the type conversion with NUMBER
Type:
REAL
The ISNUMBER command can be used to check whether the <string>
can be converted into a valid number.
Flexible NC programming
1.9 String operations
81

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents