beautypg.com

Movingaverage, Parameters – Yaskawa MotionWorks IEC Toolboxes User Manual

Page 548

background image

Yaskawa Toolbox: Function Blocks

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

535


MovingAverage

This function block will provide the MovingAverage of a series of samples. The NewValue can either be streamed
continuously or updated only when the Trigger value goes high.

Parameters

*

Parameter

Data
Type

Description

VAR_INPUT

Default

B

Enable

BOOL

The function will continue to execute while
enable is held high.

FALSE

V

NewValue

LREAL

The new value to be added to the total

LREAL#0.0

V

SampleSize

UINT

The total number of values to total

UINT#0

V

Trigger

BOOL

To indicate when a NewValue should be added
to the total

FALSE

V

Stream

BOOL

To indicate if the NewValues should be added
to the total every scan.

FALSE

VAR_OUTPUT

B

Valid

BOOL

Indicates that the outputs of the function are valid.

V

MovingAverage

LREAL

The moving average of all the samples.

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.