Chapter 5
Arithmetic instructions
MOD
Parameter
EN
IN
Base
MOD
ENO
86
MOD yields the module of an integer value.
Arguments
Parameter
Data Type
Type
Input
BOOL
Input
DINT
Input
DINT
Output
DINT
Output
BOOL
MOD function language examples
Function block diagram
Ladder diagram
Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
Description
Function enable.
When EN = TRUE, execute the module computation.
When EN = FALSE, there is no computation.
Any signed integer value.
Must be greater than zero.
Module calculation (input MOD base) / returns -1 if Base <= 0.
Enable out.