PLC Motor Control: Start, Stop, Reverse, and Speed Control
Direct On-Line (DOL) Starting
Direct On-Line starting is the simplest method for starting electric motors. The PLC energizes a single main contactor, connecting the motor directly to full supply voltage. Starting current reaches 6 to 8 times rated current, with full torque available immediately. DOL is suitable for motors up to approximately 7.5 kW.
FUNCTION_BLOCK FB_MotorDOL
VAR_INPUT
bStart : BOOL; bStop : BOOL; bReset : BOOL;
bOverload : BOOL; bFeedback : BOOL;
END_VAR
VAR_OUTPUT
bContactor : BOOL; bRunning : BOOL; bFault : BOOL;
END_VAR
VAR
bCommand : BOOL; tonFB : TON;
END_VAR
IF bCommand AND NOT bOverload THEN bFault := TRUE; bCommand := FALSE; END_IF;
tonFB(IN := bCommand AND NOT bFeedback, PT := T#3s);
IF tonFB.Q THEN bFault := TRUE; bCommand := FALSE; END_IF;
IF bStart AND NOT bFault THEN bCommand := TRUE; END_IF;
IF bStop OR bFault THEN bCommand := FALSE; END_IF;
IF bReset AND NOT bCommand THEN bFault := FALSE; END_IF;
bContactor := bCommand;
bRunning := bCommand AND bFeedback;
END_FUNCTION_BLOCK
Reversing Circuit With Interlock
A reversing circuit uses two contactors to change motor direction by swapping two supply phases. Three protection levels prevent simultaneous engagement: electrical interlock (NC auxiliary contacts), PLC software interlock (mutual exclusion in code), and mechanical interlock (physical lever between contactors). Never rely on software alone for safety-critical interlocks.
FUNCTION_BLOCK FB_MotorReversing
VAR_INPUT
bForwardCmd : BOOL; bReverseCmd : BOOL;
bStop : BOOL; bOverload : BOOL;
END_VAR
VAR_OUTPUT
bForwardOut : BOOL; bReverseOut : BOOL; bFault : BOOL;
END_VAR
VAR
tonDelay : TON; bChanging : BOOL;
END_VAR
IF NOT bOverload AND (bForwardOut OR bReverseOut) THEN bFault := TRUE; END_IF;
IF bFault OR bStop THEN bForwardOut := FALSE; bReverseOut := FALSE; END_IF;
IF bForwardCmd AND NOT bReverseOut AND NOT bFault AND NOT bChanging THEN
bForwardOut := TRUE;
END_IF;
IF bReverseCmd AND NOT bForwardOut AND NOT bFault AND NOT bChanging THEN
bReverseOut := TRUE;
END_IF;
// Direction change requires brief stop
IF bForwardOut AND bReverseCmd THEN bForwardOut := FALSE; bChanging := TRUE; END_IF;
IF bReverseOut AND bForwardCmd THEN bReverseOut := FALSE; bChanging := TRUE; END_IF;
tonDelay(IN := bChanging, PT := T#500ms);
IF tonDelay.Q THEN bChanging := FALSE; END_IF;
END_FUNCTION_BLOCK
Star-Delta Starting
Star-Delta starting reduces starting current to one-third of DOL by initially connecting windings in star, then switching to delta after acceleration.
FUNCTION_BLOCK FB_MotorStarDelta
VAR_INPUT
bStart : BOOL; bStop : BOOL; bOverload : BOOL;
tStarTime : TIME := T#8s;
END_VAR
VAR_OUTPUT
bMainK : BOOL; bStarK : BOOL; bDeltaK : BOOL;
bRunning : BOOL; bFault : BOOL;
END_VAR
VAR
nState : INT := 0; tonStar : TON; tonTrans : TON;
END_VAR
IF bStop OR (NOT bOverload AND nState > 0) THEN
nState := 0; bFault := NOT bOverload;
END_IF;
CASE nState OF
0: bMainK := FALSE; bStarK := FALSE; bDeltaK := FALSE;
IF bStart AND NOT bFault THEN nState := 1; END_IF;
1: bMainK := TRUE; bStarK := TRUE; bDeltaK := FALSE;
tonStar(IN := TRUE, PT := tStarTime);
IF tonStar.Q THEN tonStar(IN := FALSE); nState := 2; END_IF;
2: bMainK := TRUE; bStarK := FALSE; bDeltaK := FALSE;
tonTrans(IN := TRUE, PT := T#80ms);
IF tonTrans.Q THEN tonTrans(IN := FALSE); nState := 3; END_IF;
3: bMainK := TRUE; bStarK := FALSE; bDeltaK := TRUE;
END_CASE;
bRunning := (nState = 3);
END_FUNCTION_BLOCK
Speed Control via Variable Frequency Drive (VFD)
A VFD controls motor speed by varying frequency and voltage. The PLC interface uses digital signals (run command, VFD running feedback, VFD fault) and analog signals (speed reference 0-10V from PLC, actual speed feedback to PLC). The 0-10V reference maps to 0-50 Hz for a standard motor:
nSpeedRefRaw := REAL_TO_INT((rDesiredSpeedHz / 50.0) * 27648.0);
IF nSpeedRefRaw < 0 THEN nSpeedRefRaw := 0; END_IF;
IF nSpeedRefRaw > 27648 THEN nSpeedRefRaw := 27648; END_IF;
Motor Protection: Overload and Thermal
Multiple protection layers prevent motor damage:
- Thermal overload relay: trips when current exceeds set value, opens NC contact for PLC
- Electronic overload in VFD: built-in thermal model based on current measurement
- PLC-based monitoring: current via analog input from current transformer
rMotorCurrent := ScaleLinear(nCurrentRaw, 0.0, 50.0, 0, 27648);
IF bMotorRunning THEN rRunHours := rRunHours + 0.001 / 3600.0; END_IF;
bCurrentWarning := rMotorCurrent > (rRatedCurrent * 1.1);
bMaintenanceDue := rRunHours >= 2000.0;
Running hours and current monitoring predict maintenance needs before failures occur.
Practical Example: Running a Conveyor Belt at Two Speeds
A packaging conveyor runs at slow (15 Hz) for loading and fast (40 Hz) for transfer:
VAR
bStartCmd : BOOL; bStopCmd : BOOL;
bSlowSpeed : BOOL; bFastSpeed : BOOL;
bVFDRun : BOOL; nSpeedRef : INT;
bVFDFault : BOOL; bFault : BOOL; rTargetHz : REAL;
END_VAR
IF bSlowSpeed THEN rTargetHz := 15.0;
ELSIF bFastSpeed THEN rTargetHz := 40.0;
ELSE rTargetHz := 0.0;
END_IF;
IF bStartCmd AND NOT bFault THEN bVFDRun := TRUE; END_IF;
IF bStopCmd OR bVFDFault THEN
bVFDRun := FALSE;
IF bVFDFault THEN bFault := TRUE; END_IF;
END_IF;
IF bVFDRun THEN
nSpeedRef := REAL_TO_INT((rTargetHz / 50.0) * 27648.0);
ELSE
nSpeedRef := 0;
END_IF;
The operator selects speed, the PLC outputs an analog voltage, and the VFD smoothly ramps the motor using its built-in acceleration and deceleration ramps.
Summary
Motor control ranges from simple DOL starting for small motors to VFD speed control for advanced applications. Reversing circuits require three levels of interlock. Star-Delta reduces inrush current through a timed transition. VFDs provide full speed control via analog references. Every motor circuit must include overload protection and feedback monitoring. The conveyor example shows how these elements combine in typical industrial use.