FB_BA_Motor2St
Function block for controlling a simple two-stage motor.
The input bEn is used for general enabling of the motor.
The input udiOpMode is used to set the operating mode of the motor:
- 0 = Automatic
- 1 = Manual off
- 2 = Manual stage 1
- 3 = Manual stage 2
In automatic mode (udiOpMode= 0) the desired stage can be set via the inputs bAutoSt1 (stage 1) and bAutoSt2 (stage 2.
The collection of all possible malfunctions of a motor is connected to bDst.
VAR_INPUT
bEn : BOOL;
bAutoSt1 : BOOL;
bAutoSt2 : BOOL;
bDst : BOOL;
udiOpMode : UDINT;
bEn: Enable motor.
bAutoSt1: Request of the actuator at stage 1 in automatic mode (udiOpMode= 0).
bAutoSt2: Request of the actuator at stage 2 in automatic mode (udiOpMode= 0).
bDst: Input for collecting the possible motor malfunctions.
udiOpMode: Select the operating mode (0 = Automatic, 1 = Manual off, 2 = Manual stage 1, 3 = Manual stage 2).
VAR_OUTPUT
bQ1 : BOOL;
bQ2 : BOOL;
bQ1: Control output stage 1.
bQ2: Control output stage 2.
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.7 | Tc3_BA from v1.1.6.0 |