FB_PT2

PT2 element for smoothing of input values.

FB_PT2 1:

This function block is active continuously. The output fOut always follows the input value fIn multiplied by Kp.

FB_PT2 2:

This PT2 element consists of a series of two PT1 elements; the time constants T1 and T2 can have different values. The step response (see above) shows a significantly more attenuated subsequent behavior compared to the PT1 element (dashed) right from the start.

With a continuously changing input fIn, fOut behaves as follows (fIn= 0..33000, Kp= 1, T1,T2= 5 s):

FB_PT2 3:

In comparison, the dotted line shows the behavior of a PT1 element with fIn= 0..33000, Kp= 1, T1= 5 s.

FB_PT2 4:

Since this function block is a time-discrete model of a PT2 element, it only works correctly if the damping time is significantly longer than the set cycle time. To be on the safe side, if damping times are entered that are less than twice the set cycle time they are internally set to zero. As already mentioned, the PT2 element consists of two PT1 elements connected in series. If one of the two damping times is set to zero, the PT2 element is reduced to a PT1 element. If both damping times are set to zero, the output value directly follows the input value multiplied by Kp.

VAR_INPUT

fIn           : LREAL;
fKp           : LREAL := 1;
tT1           : TIME := t#10s;
tT2           : TIME := t#10s;
tCycletime    : TIME := t#10ms;
bSetActual    : BOOL;

fIn: Input Value.

fKp: Amplifying-factor, preset value: 1.

tT1: Damping-time 1, preset value: 10s.

tT2: Damping-time 2, preset value: 10s.

tCycleTime: PLC-cycle-time, preset value: 10ms.

bSetActual: Sets the output fOut directly to the input-value fIn.

VAR_OUTPUT

fOut      : LREAL;

fOut: Output-Value.