Filters
Sampled Average Filter
Description

Sampled Average Filter

The function block provides the average of a set of stored values.

A new sample of the Input is added to a first-in, first-out buffer at each rising edge of the Sample input.

The number of samples in the buffer is defined by the Size parameter.

Reset causes all values in the buffer to be reset to zero.

Preset causes all values in the buffer to be set to the preset value.

Application Example - Registration

The output of the Registration function block is the actual encoder count error measured at each cycle of the machine. The cycle is marked by two selectable event inputs; high-speed digital inputs from photo-eyes, etc, and/or encoder z-markers. Typical examples are print registration, bag-sealers, and cut-to-length where the position of the printed pattern is indicated with a special photo-eye or registration camera.

Because the registration information is updated in discrete lumps, it can be useful to average a number of previous cycles.

In this servo haul-off application, the linear position is reset every cycle when the servo is stopped for the cut / seal. The sample is obtained at a particular position measured by a comparator on the output of a ENC Linear Position function block.

Availability
  • Available only in the dw2xx & dw2xx-v2 series products
  • Requires library: Process Control (option -05)
  • Firmware versions 0x2029 and later
savvy-SFD Graphic sampledAverageFilter
Graphic with Parameters sampledAverageFilter

Parameters

Input Input, Read-write, Analog (signed 16-bit integer)
-327.67 % to 327.67 %

The current value of Input is added to a first-in, first-out buffer at each rising edge of the Sample input.

The Output is the average of samples in the buffer. The number of samples is defined by the Size parameter.


Sample Input, Read-write, Boolean (signed 16-bit integer)

A new sample of the Input is added to a first-in, first-out buffer at each rising edge of the Sample input.
0 = Low
1 = High
Reset Input, Read-write, Boolean (signed 16-bit integer)

Reset causes all values in the buffer to be reset to zero.
0 = Inactive
1 = Reset
Output Output, Read-only, Analog (signed 16-bit integer)
-327.67 % to 327.67 %

The average of all samples in the buffer.
Size Internal Parameter, Read-write, Analog (signed 16-bit integer)
1 to 12

This is the sample size for the filter. A larger size provides more filtering and a slower response.
Preset Enable Input, Read-write, Boolean (signed 16-bit integer)

Preset causes all values in the buffer to be set to the preset value.
0 = Inactive
1 = Preset
Preset Value Input, Read-write, Analog (signed 16-bit integer)
-327.67 % to 327.67 %

Preset causes all values in the buffer to be set to the preset value.