DERIVATE

Function Block - Derivates a signal.

Inputs

RUN : BOOL    Run command: TRUE=derivate / FALSE=hold
XIN : REAL    Input signal
CYCLE : TIME  Sampling period (should not be less than the target cycle timing)

Outputs

XOUT : REAL   Output signal

Remarks

In LD language, the input rung is the RUN command. The output rung keeps the state of the input rung.

ST Language

(* MyDerv is a declared instance of DERIVATE function block *)
MyDerv (RUN, XIN, CYCLE);
XOUT := MyDerv.XOUT;

FBD Language

DerivateFbd.gif (1512 octets)

LD Language

(* ENO has the same state as RUN *)
DerivateLd.gif (1598 octets)

IL Language:

(* MyDerv is a declared instance of DERIVATE function block *)
Op1: CAL MyDerv (RUN, XIN, CYCLE)
     LD 
MyDerv.XOUT
     ST  XOUT

See also

AVERAGE   INTEGRAL   LIM_ALRM   HYSTER   STACKINT