Possible Type Conversions - Siemens Sinumerik 840D sl Programming Manual

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

Advertisement

Flexible NC programming

1.8 Possible type conversions

1.8
Possible type conversions
Function
Type conversion on assignment
The constant numeric value, the variable, or the expression assigned to a variable must be
compatible with the variable type. If this is this case, the type is automatically converted when
the value is assigned.
Possible type conversions
from
REAL
INT
BOOL
CHAR
STRING
AXIS
FRAME
Explanation
*
1)
2)
3)
4)
Note
If conversion produces a value greater than the target range, an error message is output.
If mixed types occur in an expression, type conversion is automatic. Type conversions are
also possible in synchronous actions, see Chapter "Motion-synchronous actions, implicit type
conversion".
74
to REAL
INT
yes
yes*
yes
yes
yes
yes
yes
yes
At type conversion from REAL to INT, fractional values that are >=0.5 are rounded up,
others are rounded down (cf. ROUND function).
Value <> 0 is equivalent to TRUE; value == 0 is equivalent to FALSE
If the value is in the permissible range
If only 1 character
String length 0 = >FALSE, otherwise TRUE
BOOL
CHAR
STRING
yes*
1
Yes
)
1
2)
Yes
)
Yes
yes
yes
yes
yes
yes
1)
Yes
4)
3)
yes
Yes
Yes
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
AXIS
FRAME
yes
yes
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents