Motion synchronous actions
10.3 Main run variables for synchronized actions
Job planning
560 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
10.3.2 Implicit type conversion
Function
During value assignments and parameter transfers, variables of different data types are
assigned or transferred.
The implicit type conversion triggers an internal type conversion of values.
Possible type conversions
To REAL INT BOOL CHAR STRING AXIS FRAME
from
REAL yes yes* yes
1
) – – – –
INT yes yes yes
1
) – – – –
BOOL yes yes yes – – – –
Explanations
* At type conversion from REAL to INT, fractional values that are >=0.5 are rounded
up, others are rounded down (cf. ROUND function).
An alarm is output if values are exceeded.
1)
Value <> 0 is equivalent to TRUE; value == 0 is equivalent to FALSE
Results
Type conversion from REAL or INTEGER to BOOL
Result BOOL = TRUE if the REAL or INTEGER value does not equal zero
Result BOOL = FALSE if the REAL or INTEGER value equals zero
Type conversion from BOOL to REAL or INTEGER
Result REAL TRUE if the BOOL value = TRUE (1)
Result INTEGER = TRUE if the BOOL value = TRUE (1)
Type conversion from BOOL to REAL or INTEGER
Result REAL FALSE) if the BOOL value = FALSE (0)
Result INTEGER = FALSE if the BOOL value = FALSE (0)