5-134
5.3 Standard Arithmetic Functions
5.3.5 Modulus operation
MOD(_E)
5.3.5 Modulus operation
MOD(_E)
Function
Operation processing
(1) Performs division ( ÷ ) on word (signed) or double word (signed) type data input to
and , and outputs the remainder of the operation result from in the same data type as
that of .
(Example) Word (signed) type data
(2) The values to be input to and are word (signed) or double word (signed) type data.
(Note that the value to be input to must be other than 0.)
MOD(_E)
_E: With EN/ENO
indicates any of the following
functions.
MOD MOD_E
Input argument, EN:
Executing condition (TRUE: Execution, FALSE: Stop) :Bit
s1:
Input :ANY_INT
s2:
Output argument, ENO:
Output status (TRUE: Normal, FALSE: Error) :Bit
d:
Output :ANY_INT
Universal
UD
High
Performance
MOD_E
(EN, s1, s2, d);ENO:=
Structured ladder
ST
MOD_E
EN ENO
s1 d
s2
s1
s2
s1
s2
d
s
s1(word (signed) type)
5
s2(word (signed) type)
2
No output
2
Word (signed) type
1
(Quotient)
(Remainder)
s1
s2
s2