Chapter 17 / 36

Motors and drives

Separate a run request from readiness, motion feedback and drive faults.

Motor interface separates a sequence run request, a device adapter and independent drive feedback, with a bounded wait for response
Three tags with three meanings. CmdRun asks for motion. Ready permits a request. Running reports the agreed feedback. None should be an alias for the others.

Imagine the run request is TRUE, the drive reports running, and the carton never arrives. That is possible: the belt may be slipping or the product may be jammed. The device response contract and the transfer completion contract supervise different things. Keep both. Otherwise the diagnosis will tell an operator “motor healthy” while silently forgetting the unfinished product.

“Run” is a request, not a measurement

A conveyor refuses to move. The HMI shows a green motor because its animation reads RunCommand. The operator reports that the PLC says it is running. The PLC has said nothing of the kind: it has asked the drive to run.

Separate four things from the start: requested behaviour, issued command, device status and physical evidence. A sequence requests transport. The motor module issues a command. The drive reports its operating state. A speed sensor or the observed movement of products supplies further evidence. Each answers a different question.

You do not always need every possible feedback signal, but you must name the evidence you actually have. A drive running bit may establish that its output stage is active without proving that a belt is intact. A contactor auxiliary contact can prove contactor position without proving shaft rotation.

Start with the complete operating story

For an illustrative carton conveyor, write this behaviour before mapping drive words:

  1. An automatic request may start transport only when the downstream transfer is available and the drive is ready for remote control.
  2. The speed request must remain within the approved process range.
  3. The conveyor must report running within its start allowance.
  4. A normal stop removes transport demand using the configured normal stopping behaviour.
  5. Loss of communication enters the equipment's documented fault response and prevents automatic restart when communication returns.

These are ordinary control requirements. Emergency stopping, hazardous motion prevention and other safety functions require their separately designed and validated implementation. An ST permission named SafeToRun does not create that implementation.

Decode the drive once

Fieldbus words, terminal inputs and parameter numbers belong in an adapter at the equipment boundary. Above that adapter, use readable signals:

Application signalQuestion answered
CommunicationHealthyIs the received status current and usable?
RemoteSelectedDoes the configured command source accept PLC control?
DriveReadyDoes the drive report readiness under its documented definition?
RunningDoes the drive report operation?
FaultActiveIs a drive fault present?
ActualSpeed_rpmWhat speed does the available measurement or estimate report?

Readiness and command-source behaviour vary by product. For example, the PowerFlex 520-series manual documents separate start-source and speed-reference selections. The PLC can send a valid network speed while a different selected source supplies the effective reference. Check the actual drive's source and stop configuration.

Do not copy a control-word constant from an unrelated drive and hope the familiar bits mean the same thing. Record word layout, units, scaling, startup defaults and communication-loss behaviour in the interface document.

Make arbitration visible

The automatic sequence, a maintenance screen and a local station may all request movement. They should not all write the physical command. One mode owner decides which request is eligible. The motor module then applies its ordinary permissions and fault state.

This ST excerpt illustrates command calculation after mode arbitration. It is not a complete drive implementation; the status adapter, fault latches and physical protection are outside it.

CanAcceptRun := CommunicationHealthy
    AND RemoteSelected
    AND DriveReady
    AND ProcessPermit
    AND NOT MotorFaultLatched;

RunCommand := SelectedRunRequest AND CanAcceptRun;
IF RunCommand THEN
    SpeedCommand_rpm := LIMIT(
        MinimumProcessSpeed_rpm,
        SelectedSpeed_rpm,
        MaximumProcessSpeed_rpm
    );
ELSE
    SpeedCommand_rpm := 0.0;
END_IF;

Silently clamping every rejected setting can confuse an operator. Keep the requested and accepted speeds separate and report when limiting occurs. For a recipe, it may be better to reject an out-of-range speed before starting than to produce a batch at a different speed without explanation.

Define transitions between local, manual and automatic modes. Returning to automatic should not revive a months-old HMI request. Clear or explicitly reauthorise requests according to the machine's restart policy.

A ramp changes time and distance

If a belt accelerates linearly from rest to 0.8 metres per second in two seconds, its acceleration is 0.4 metres per second squared. During that ramp it travels the average speed, 0.4 metres per second, multiplied by two seconds: 0.8 metres.

A sequence that assumes full speed immediately will misjudge product arrival. Likewise, a normal deceleration from 0.8 metres per second to rest in two seconds needs another 0.8 metres under the idealised model. Real stopping behaviour depends on load, drive limits, braking and mechanical conditions. These calculations help plan process timing; they do not establish a protective stopping distance.

Avoid double-ramping by accident. If the PLC gradually changes its reference while the drive independently ramps that reference, the resulting response can be much slower than either setting suggests. Decide where the primary ramp belongs and understand any additional limiting downstream.

Diagnose a failed start in order

First inspect the request: is transport actually wanted? Then inspect the accepted mode and permissions. Next inspect the issued command at the adapter. Finally inspect drive status and physical evidence. This order distinguishes a program that correctly refuses a start from a device that ignores a correct command.

Create different messages for different failures. “Not in remote control” calls for checking the selected control source. “Run feedback missing after three seconds” calls for investigating the command path, drive and equipment. “Downstream unavailable” may simply describe normal waiting. Combining them into “Motor fault” discards the information the PLC already has.

Fault reset needs its own contract. A reset request may clear the drive's diagnostic latch, but it must not automatically issue a new run request. Some faults recur immediately because the cause remains. Do not hammer a reset bit cyclically until the drive finally accepts it; that erases useful evidence and can mask an unresolved problem.

Try it

The PLC requests 900 rpm. The drive is healthy, communication is fresh, and RunCommand is true. Reported speed remains 600 rpm. A technician proposes multiplying the requested speed by 1.5. Give three plausible causes to check first, then design a short observation test.

Work through the answer

Check whether the drive's selected reference source is actually the network, whether the reference scaling agrees at both ends, and whether a configured limit or active process constraint caps speed. Also distinguish motor speed from gearbox output speed; comparing different shafts creates a false scaling diagnosis.

In an authorised operating condition, apply two approved references and record the transmitted raw value, the drive's effective reference, actual speed and any limit indications. A fixed ratio across both points suggests scaling or gearing. An unchanged effective reference suggests source selection. A correctly changing reference with capped actual speed points toward limiting or load. This evidence tells you where the correction belongs, without inserting an unexplained multiplier into production code.

Now make the decision yourself

Use the chapter’s model on a fresh question, then compare your reasoning with the worked decision.

How this becomes a program

Commanded, ready, running: which one is missing?

A drive reports Ready but no speed after a run request. The control must identify a failed start instead of displaying ‘running’ from the command alone.

PLCVFDRun requestDrive statusActual running

Your first artifact

Write a device contract: accepted command, observed response, deadline and fault action. Keep drive-level detail inside a device adapter.

Open the worked decision
StartWatch(IN := RunRequest AND NOT RunningFeedback,
           PT := StartLimit);
FailedToStart := StartWatch.Q;

Why this line belongs here

The timer supervises the mismatch between request and feedback. Whether RunningFeedback is a status bit, speed threshold or contactor auxiliary is a hardware decision that belongs in the interface definition.

Change the task

The drive loses its network link while the last received Running bit is TRUE. Specify the running indication and command response when data is stale.