FB_BA_Motor2St

FB_BA_Motor2St 1:

The function block FB_BA_Motor2St is used to control 2-step motors.

The input bEn is used for enabling the function block.

The input nOpMode is used to set the operation mode of the motor:

In automatic mode (nOpMode = 0) the desired step can be set via the inputs bAutoSt1 (step 1) and bAutoSt2 (step 2).

The collection of all possible malfunctions of a motor is connected to bDst.

FB_BA_Motor2St 2: Inputs

VAR_INPUT
  bEn       : BOOL;
  bAutoSt1  : BOOL;
  bAutoSt2  : BOOL;
  bDst      : BOOL;
  nOpMode   : UDINT;
END_VAR

Name

Type

Description

bEn

BOOL

Enable motor

bAutoSt1

BOOL

Request of the actuator to step 1 in automatic mode (nOpMode = 0).

bAutoSt2

BOOL

Request of the actuator to step 2 in automatic mode (nOpMode = 0).

bDst

BOOL

Input for collecting the possible motor malfunctions.

nOpMode

UDINT

Selection of the operation mode (0 = Automatic, 1 = Manual off, 2 = Manual step 1, 3 = Manual step 2).

FB_BA_Motor2St 3: Outputs

VAR_OUTPUT
  bQ1  : BOOL;
  bQ2  : BOOL;
END_VAR

Name

Type

Description

bQ1

BOOL

Control output step 1

bQ2

BOOL

Control output step 2

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0