-

SUB / SUB_S

Type Function

Available as standard (non-safety-related) and safety-related type (*_S). For the safety-related type, the safety-related data types (SAFE*) are expected at the formal parameters.
Description Subtracts the operand connected to IN2 from the operand connected to IN1.

Note
This function is not extendable, no further inputs can be added.

Notes
  • When the subtraction result exceeds the permissible range of the output value, an overflow occurs.
  • Overloaded function. The function can operate on various input data types (see description of the function parameters for the supported data types).
  • The function provides implicit data type conversion at its input and output parameters according to the rules defined by the IEC 61131 standard.
Parameters Inputs

IN1

IN2

Output

Out
Error behavior Error behavior
Additional information EN/ENO behavior