RUN : BOOL Enabling command
XIN : REAL Input signal
N : DINT Number
of samples stored for average calculation - Cannot exceed 128
XOUT : REAL Average of the stored samples (*)
(*) AVERAGEL has LREAL arguments.
The average is calculated according to the number of stored samples, which can be less than N when the block is enabled. By default the number of samples is 128.
The "N" input (or the number of samples) is taken into account only when the RUN input is FALSE.
The "RUN" needs to be reset after a change in the number of samples. You should cycle the RUN input when you first call this function, this will clear the default.
In FFLD language, the input rung is the RUN command. The output rung keeps the state of the input rung.
(* MyAve is a declared instance of AVERAGE function block *)
MyAve (RUN, XIN, N);
XOUT := MyAve.XOUT;
(* ENO has the same state as RUN *)
(* MyAve is a declared instance of AVERAGE function block *)
Op1: CAL MyAve (RUN, XIN, N)
FFLD MyAve.XOUT
ST XOUT
See also
INTEGRAL DERIVATE LIM_ALRM HYSTER STACKINT
|
Copyright © 2015 Kollmorgen™ |
|