SmoothSignal_REAL

Smooth REAL signals

This instructions uses a 1st order delay time tT1 to smooth the REAL input value at iIN.

Parameters

Input

rIn (REAL)

Input signal

tT1 (TIME)

Time constant of the 1st order low-pass filter

Input/output

dutMemory (SmoothSignal_REAL_DUT)

Instance-dependent data memory structure, which serves as the internal memory of the function. As with the instance name of a function block, it may be neither initialized nor written in the body!

Output

rOut (REAL)

Output signal

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		rIn: REAL:=0.0;
		Memory_DUT: SmoothSignal_REAL_DUT;
		rOut: REAL:=0.0;
END_VAR

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_F,SmoothSignal_REAL!,,13,1,24,6,,?DrIn?DtT1?DdutMemory?AdutMemory?ArOut);
B(B_VARIN,,rIn,11,2,13,4,);
B(B_VARIN,,t#2s,11,3,13,5,);
B(B_VARIN,,Memory_DUT,11,4,13,6,);
B(B_VAROUT,,rOut,24,2,26,4,);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

SmoothSignal_REAL(rIn := rIn,
          tT1 := t#2s,
          dutMemory := Memory_DUT,
          rOut => rOut);

Modified on: 2019-01-26Feedback on this pagePanasonic hotline