FB_BA_Mot2st

FB_BA_Mot2st 1:

The template is used for the control of a two-step motor with fault signal, e.g. a fan.

It mainly consists of the function block StpCtrl and the base class FB_BA_ActuatorMO for the control of a multi-stage aggregate and the collection of all safety-relevant faults.

The BI objects DstStp01 and DstStp02 indicate faults in the respective steps.

The two templates MoniFdbStp01 and MoniFdbStp02 are used for feedback monitoring of steps 1 + 2, FdbStp01 and FdbStp02.

FB_BA_Mot2st 2:

The initialization of the template takes place within the method FB_Init.

Block diagram

FB_BA_Mot2st 3:

Syntax

FUNCTION_BLOCK FB_BA_Mot2st EXTENDS FB_BA_ActuatorMO
VAR_OUTPUT
  nPresentValue    : UDINT;
  bQ01             : BOOL;
  bQ02             : BOOL;
END_VAR
VAR_INPUT CONSTANT
  DstStp01         : FB_BA_BI_Raw;
  DstStp02         : FB_BA_BI_Raw;
  FdbStp01         : FB_BA_BI_Raw;
  FdbStp02         : FB_BA_BI_Raw;
  MoniFdbStp01     : FB_BA_FdbBinary;
  MoniFdbStp02     : FB_BA_FdbBinary;
  StpCtrl          : FB_BA_MotorStpCtrl;
END_VAR

FB_BA_Mot2st 4: Outputs

Name

Type

Description

nPresentValue

UDINT

Current control step of the motor.

bQ01

BOOL

Variable for controlling step 1 of the motor. This variable must be linked to a bus terminal.

bQ02

BOOL

Variable for controlling step 2 of the motor. This variable must be linked to a bus terminal.

FB_BA_Mot2st 5: Inputs CONSTANT

Name

Type

Description

DstStp01

FB_BA_BI_Raw

Binary input object is used to process the step 1 motor fault.

DstStp02

FB_BA_BI_Raw

Binary input object is used to process the step 2 motor fault.

FdbStp01

FB_BA_BI_Raw

Binary input object is used to process the feedback of step 1 of the motor.

FdbStp02

FB_BA_BI_Raw

Binary input object is used to process the feedback of step 2 of the motor.

MoniFdbStp01

FB_BA_FdbBinary

Template that monitors the feedback of step 1 of the motor.

MoniFdbStp02

FB_BA_FdbBinary

Template that monitors the feedback of step 2 of the motor.

StpCtrl

FB_BA_MotorStpCtrl

The function block StpCtrl receives the numerical switch value from the base class FB_BA_ActuatorMO and converts the switch value into individual control steps.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.2.1.0