Siemens sinumerik 840d Programming Manual page 48

Hide thumbs Also See for sinumerik 840d:
Table of Contents

Advertisement

Flexible NC Programming
1
1.10 String operations
840D
840D
NCU 571
NCU 572
NCU 573
Conversion from STRING
The NUMBER function converts from STRING to REAL.
If ISNUMBER returns the value FALSE, an alarm is
output when NUMBER is CALLED with the same
parameter.
A string can be converted to data type AXIS with the
AXNAME function. An alarm is output if the string
cannot be assigned to any configured axis identifier.
Syntax
BOOL_ERG = ISNUMBER (STRING)
REAL_ERG = NUMBER (STRING)
STRING_ERG = AXSTRING (AXIS)
AXIS_ERG = AXNAME (STRING)
Semantics:
ISNUMBER (STRING) returns TRUE if the string
represents a semantically valid REAL number. It is
thus possible to check whether the string can be
converted to a valid number.
NUMBER (STRING) returns the value represented
by the string as a REAL value.
AXSTRING (AXIS) supplies the specified axis
identifier as a string.
AXNAME (STRING) converts the specified string
into an axis identifier.
Examples
DEF BOOL BOOL_ERG
DEF REAL REAL_ERG
DEF AXIS AXIS_ERG
DEF STRING[32] STRING_ERG
BOOL_ERG = ISNUMBER ("1234.9876Ex-7")
BOOL_ERG = ISNUMBER ("1234XYZ")
REAL_ERG = NUMBER ("1234.9876Ex-7")
STRING_ERG = AXSTRING(X)
AXIS_ERG = AXNAME("X")
1-48
FM-NC
810D
840Di
Result type: BOOL
Result type: REAL
Result type: STRING
Result type: AXIS
;now: BOOL_ERG == TRUE
;now: BOOL_ERG == FALSE
;now: REAL_ERG == 1234.9876Ex-7
;now: STRING_ERG == "X"
;now: AXIS_ERG == X
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA) − 04.00 Edition
04.00
1
 Siemens AG 2000. All rights reserved

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik fm-ncSinumerik 840diSinumerik 810d

Table of Contents