Chapter 8 Logic Instructions
8.8.7 MODTURNS
FC
MODTURN finds the signed integral part for modulo division of two
floating-point variables or constants.
DVP15MC11T
Parameters
Meaning
Description Valid range
In1 Input value Input Input value
Depends on the data type of
the variable that the input
parameter is connected to.
In2 Modulo range Input Modulo range
Depends on the data type of
the variable that the input
parameter is connected to.
Out
modulo
Output Number of modulo rotations
Depends on the data type of
the variable that the output
parameter is connected to.
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
● ●
In2
● ●
Out
●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
MODTURN is used to carry out modulo division of two floating-point variables or constants and get
the signed integral component. The result is output to Out. The number of modulo rotations of an
axis can be calculated according to its set absolute position.
The input variable and input variable or the input variable and output variable are allowed to be of
different data types in this instruction.
8-69