Function - Calculation of modulo.

Inputs

Input

Data type

Description

IN

DINT/REAL/LREAL

Input value.

BASE

DINT/REAL/LREAL

Base of the modulo.

Outputs

Output

Data type

Description

Q

DINT/REAL/LREAL

Modulo: rest of the integer division (IN / BASE).

Remarks

In LD language, the input rung (EN) enables the operation, and the output rung keeps the state of the input rung.

The result of the function is -1 if the argument BASE is less than or equal to 0.

ST Language

Q := MOD (IN, BASE);

FBD Language

Fixed_Image

LD Language

The comparison is executed only if EN is TRUE.
ENO has the same value as EN.

Fixed_Image

Fixed_Image See also

MIN  MAX  LIMIT  ODD


Created with the Personal Edition of HelpNDoc: Maximize Your CHM Help File Capabilities with HelpNDoc