MOD / MODR / MODLR
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
LD Language
The comparison is executed only if EN is TRUE.
ENO has the same value as EN.
MOD / MODR / MODLR |
IEC 61131-3 Automation platform > Programming - Reference guide > Arithmetic operations > MOD / MODR / MODLR |
Created with the Personal Edition of HelpNDoc: Maximize Your CHM Help File Capabilities with HelpNDoc