MC_FunctionGeneratorFD_BkPlcMc (from V3.0.31)

MC_FunctionGeneratorFD_BkPlcMc (from V3.0.31) 1:

The function block calculates the signals of a function generator.

MC_FunctionGeneratorFD_BkPlcMc (from V3.0.31) 2: Inputs/outputs

VAR_INOUT
    stTimeBase:     ST_FunctionGeneratorTB_BkPlcMc;
    stFunctionDef:  ST_FunctionGeneratorFD_BkPlcMc;
END_VAR

Name

Type

Description

stTimeBase

ST_FunctionGeneratorTB_BkPlcMc

stTimeBase: A structure with the parameters of the time base of this function generator.

stFunctionDef

ST_FunctionGeneratorFD_BkPlcMc

stFunctionDef: A structure with the definitions of the output signals of a function generator.

MC_FunctionGeneratorFD_BkPlcMc (from V3.0.31) 3: Outputs

VAR_OUTPUT
    Sinus:          LREAL;
    Cosinus:        LREAL;
    Rectangle:      LREAL;
    SawTooth:       LREAL;
END_VAR

Name

Type

Description

Sine

LREAL

The output signals of the function generator.

Cosine

LREAL

Rectangle

LREAL

SawTooth

LREAL

Behavior of the function block

The output signals are determined from stTimeBase.CurrentRatio and the parameters in stFunctionDef.

The time base in stTimeBase should be updated with an MC_FunctionGeneratorTB_BkPlcMc() function block.

To change the operating frequency, an MC_FunctionGeneratorSetFrq_BkPlcMc() function block should be used.