SUB / SUB_S - Subtractor for ANY_NUM or ANY_SAFENUM
This arithmetic function subtracts IN2 from IN1. The function is available as standard function SUB and safety-related function SUB_S.
NOTE:
An overflow (i.e., 16-bit-overflow) results in an error. As a result, the Safety Logic Controller enters the Stop state.
SUB
Parameter |
Data types |
Description |
IN1 |
ANY_NUM |
Minuend |
IN2 |
ANY_NUM |
Subtrahend |
OUT |
ANY_NUM |
Difference |
SUB_S
Parameter |
Data types |
Description |
IN1 |
ANY_SAFENUM |
Minuend |
IN2 |
ANY_SAFENUM |
Subtrahend |
OUT |
ANY_SAFENUM |
Difference |
NOTE:
All parameters must have the same data type.