MOD

Modulo Division of one variable by another of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT and UDINT. The result of this function will be the remainder of the division. This result will be a whole number.

Example in IL:

LD 9
MOD 2
ST var1 (* Result is 1 *)

Example in ST:

var1 := 9 MOD 2;

Example in FBD:

MOD 1:

Similar Functions

LMOD