Parameters, Error description, Example 1 - structured text – Yaskawa MotionWorks IEC Toolboxes User Manual
Page 328

Math Toolbox
MotionWorks IEC61131-3 Toolboxes: 2013-09-13
315
REM
This function block returns the modulo division result of two LREAL inputs. It is useful for determining the
position within a MachineCycle.
Parameters
*
Parameter
Data
Type
Description
VAR_INPUT
Default
B
EN
BOOL
This function will continue to calculate the remainder
while EN his held high.
FALSE
V
Numerator
LREAL
The numerator for division, such as the free running
motor position, which may be outside a desired
range of values, such as 0 to 360.0
LREAL#0.0
V
Denominator
LREAL
The denominator for division, which is the desired
max value for the Numerator input, such as 360.0
LREAL#0.0
VAR_OUTPUT
B
ENO
BOOL
This output will be high if EN is high and thisfunction is able to
calculate the remainder with no errors.
V
REM
BOOL
This output contains the calculated remainder
Error Description
This is a function, not a function block and only provides one output. If ENO is not high when EN is high, this
function cannot calculate the remainder. Verify that the Denominator is not zero.
Example 1 - Structured Text
IF InternalMode=INT#1 THEN
(* These calculations are designed for a rotary knife, rotary placer, one way cam, etc. *)