Description
Original instructions
Function description
The function block represents a differentiator element with an output OUT delayed by the lag time constant LAG.
The function block contains the following operating mode:
NOTE: This function block performs an internal initialization in the first program cycle after a warm start or cold start (e.g. application download or power cycle) of the PLC program.
Due to this, you have to make sure that the function block is invoked in the first program cycle. In case of inkoving the function block in a later program cycle, the internal initialization will not be performed and the ouput may deliver a wrong value.
WARNING
UNEXPECTED OUTPUT BEHAVIOUR
Make sure that the function block is always invoked in the first program cycle.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EN and ENO can be configured as additional parameters.
Formula
The transfer function for OUT is:
The formula of calculation is:
Meaning of the sizes
Variable
Description
Value of the input IN from the current cycle
Value of input IN from the previous cycle
Value of the output OUT from the previous cycle
dt
is the time differential between the current cycle and the previous cycle
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL LEAD_Instance (IN:=InputVariable, 
    GAIN:=DifferentiationGain,  LAG:=TimeDelayConstant,  
    TR_I:=InitializationInput, TR_S:=InitializationType, 
    OUT=>OutputDerivativeUnit)
Representation in ST
Representation:
LEAD_Instance (IN:=InputVariable, 
    GAIN:=DifferentiationGain,  LAG:=TimeDelayConstant,  
    TR_I:=InitializationInput, TR_S:=InitializationType, 
    OUT=>OutputDerivativeUnit) ;
Parameter description
Description of input parameters:
Parameter
Data type
Description
IN
Input value
GAIN
REAL
Gain of the differentiation
LAG
Delayed time constants
TR_I
REAL
Initialization input
TR_S
Initialization type
"1" = Operating mode Tracking
"0" = Automatic operating mode
Description of output parameters:
Parameter
Data type
Description
OUT
REAL
Output derivative unit with smoothing
Runtime error
For a list of all block error codes and values, see Conditioning.