DIV / DIV_S - Division

 

This arithmetic function divides the dividend connected to IN1 by the operand connected to IN2 and outputs the quotient.

NOTE:

Division by zero is not allowed and results in an error. As a result, the Safety Logic Controller enters the Stop state.

NOTE:

As the output value must be of an Integer data type, a possible rest of the division is deleted.

NOTE:

An overflow results in an error. As a result, the Safety Logic Controller enters the Stop state. Arithmetic example resulting in a DIV/DIV_S 16-bit-overflow: -32768 / -1 = 32768

DIV

Parameter

Data types

Description

IN1

ANY_NUM

Dividend

IN2

ANY_NUM

Divisor

OUT

ANY_NUM

Arithmetic quotient: IN1 : IN2

DIV_S

Parameter

Data types

Description

IN1

ANY_SAFENUM

Dividend

IN2

ANY_SAFENUM

Divisor

OUT

ANY_SAFENUM

Arithmetic quotient: IN1 : IN2