Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

DIV

Returns the quotient of two inputs.

IEC 61131-3

Section 2.5.1.5.3

Support

Supported

Signatures

#

Input (IN1)

Input (IN2)

Return Type

Support

1

SINT

SINT

SINT

Supported

2

INT

INT

INT

Supported

3

DINT

DINT

DINT

Supported

4

LINT

LINT

LINT

Supported

5

USINT

USINT

USINT

Supported

6

UINT

UINT

UINT

Supported

7

UDINT

UDINT

UDINT

Supported

8

ULINT

ULINT

ULINT

Supported

9

REAL

REAL

REAL

Supported

10

LREAL

LREAL

LREAL

Supported

Description

Returns IN1 divided by IN2. DIV(a, b) is the functional form of the / operator: a / b. Both forms are equivalent.

For integer types, division truncates toward zero. Division by zero causes a runtime fault.

Example

See Also

  • MUL — multiplication

  • MOD — modulo

  • SUB — subtraction