Ratecalculator, Parameters – Yaskawa MotionWorks IEC Toolboxes User Manual
Page 567

Yaskawa Toolbox: Function Blocks
MotionWorks IEC61131-3 Toolboxes: 2013-09-13
554
RateCalculator
This function block determines the frequency and number of occurrences of an event, such as determining the
part output rate of a machine. RateCalculator counts the number of times an input 'Sensor' signal produces a
rising edge and determines the frequency of that signal with respect to a chosen time period. It can account for
real-time changes to the time period.
Parameters
*
Parameter
Data
Type
Description
VAR_INPUT
Default
B
Enable
BOOL
The function will continue to execute while
enable is held high.
FALSE
V
Sensor
BOOL
Periodic signal to be measured. Commonly a "part-complete"
sensor.
V
TimePeriod_ms
DINT
Sensor is measured with respect to this time window
(milliseconds) to determine the current real-time rate.
VAR_OUTPUT
B
Valid
BOOL
Indicates that the outputs of the function are valid.
B
Busy
BOOL
Set high upon the rising edge of the 'Execute' or 'Enable' input,
and reset if Done, CommandAborted, or Error is true.
B
Error
BOOL
Set high if error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
B
ErrorID
UINT
If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.
V
CounterValue
LREAL
Number of times 'Sensor' has measured a rising edge since the
function block has been enabled.
V
CurrentRate
LREAL
The current frequency of the 'Sensor' input with respect to the