Finn's LabVIEW Goldmine:
Measurement lowpass filter
It is a filter function (implemented as a sub-VI)
that implements a time-constant filter based on the Backward method of
Inputs to the function:
Input is the input signal that is to
be filtered (smoothed).
Tf [s] is the filter time-constant.
(The filter bandwidth is 1/(2*pi*Tf) [Hz].)
Ts [s] is the time-step, i.e. the time
between subsequent executions of the the filter. Ts must be set equal
to the cycle time of the While loop, or Timed loop, in which the filter
is used. (If the filter is used in a Simulation loop, Ts must be set
equal to the time-step of the Simulation loop.)
Init/reset can be used in the
following alternative ways (the first of these can be used in most
- By connecting a First
Call? function to the Init/reset input, the initial filter
output becomes equal to the present (raw) filter input, thereby
avoiding an unfavourable initial bump in the filter output.
connecting a boolean
control to the the Init/reset input, the present
filter output becomes equal to the present (raw) filter input when
the state of the boolean control is locially true.
Output from the function:
to include the filter in your block-diagram?
Save the subVI LabVIEW file to any folder (do
not open it directly in LabVIEW).
Add the subVI to the block-diagram of your VI
via Functions Palette / Select a VI etc. Then connect its
inputs and its output to the proper signals (wires) in the
block-diagram. (It is not necessary to copy the block-diagram code of
the subVI explicitly into your program.)
[Finn 's LabVIEW Page]
Updated 25. October 2015 by
Finn Haugen (email@example.com)