How do I control an electric motor from a PLC with digital and analog outputs: wiring and setup
Use PLC digital outputs for run, direction and reset, and an analog output for speed reference. Covers sinking vs sourcing, 0-10 V vs 4-20 mA scaling, and safety wiring.
Updated 2026-11-28
The short answer
A PLC controls a motor drive by sending digital signals for commands such as run, reverse, reset and preset speeds, and an analog signal for the speed reference, usually 0-10 V or 4-20 mA. The drive, not the PLC, switches the motor power and handles ramps and protection. Match the PLC output type to the drive input (sinking or sourcing, voltage level and current), and hardwire the emergency stop so it does not depend on software alone.
Digital outputs: run, direction and reset
- Most drive digital inputs are 24 V DC and optically isolated. A PLC transistor output or a relay contact closes the input to a common terminal.
- Sinking (NPN) and sourcing (PNP) are not interchangeable. Check how the drive's COM or 24 V terminal is wired and set the drive input logic to match the PLC module.
- Use separate signals for forward and reverse. Interlock them in the PLC program so both are never active together, and keep the drive's own reverse-inhibit parameter enabled if it has one.
- Use a reset pulse of at least about 100 ms to clear a fault, and only after the cause is removed and the run command is off.
Analog speed reference and scaling
- 0-10 V: the signal is linear from 0 V (0 percent) to 10 V (100 percent of maximum frequency).
- 4-20 mA: 4 mA is 0 percent and 20 mA is 100 percent. Percent = (I - 4) / 16.
- Worked example: maximum frequency 60 Hz, PLC outputs 14.8 mA. Percent = (14.8 - 4) / 16 = 67.5 percent. Output frequency = 0.675 x 60 = 40.5 Hz.
- The 4 mA live zero is useful: a broken wire reads below 4 mA, so the PLC can raise a fault instead of running at an unknown speed.
- Set the drive's minimum frequency so that a zero reference does not leave the motor creeping at a low speed when it should stop.
Wiring and signal quality
- Run analog reference wires as a twisted, shielded pair, separate from motor power cables, to avoid noise coupling into the speed signal.
- Ground the shield at one end only, usually at the drive, unless the drive manual says otherwise.
- Feed back status to the PLC: drive ready, running, fault, and, if the drive offers it, an analog output for actual frequency or motor current.
Safety and common mistakes
- Hardwire the emergency stop to the drive's safe-stop input or to a contactor that removes power. A PLC output alone is not a safety function.
- Do not use a PLC relay output to switch the motor directly, and do not use it for rapid cycling. Relay contacts have a limited electrical life; let the drive do the switching.
- Wrong sinking or sourcing wiring, which gives no response or a constant run.
- Speed reference at zero while the run command is on, which causes the motor to hold at minimum speed. Check the drive's stop behaviour when the reference is lost.
- Ground loops from grounding the analog common at both the PLC and the drive. Use one reference ground.
Synchronous speed, slip and VFD speed
nₛ = 120·f / p · s = (nₛ − n) / nₛ
V/f control keeps slip in rpm roughly constant at the same torque, so speed = 120·f/p − rated slip. At light load the motor runs closer to synchronous speed. Above base frequency torque falls (field weakening).
Sourcing a motor or production equipment from China? We can find and contact the right factories for you in Chinese. Ask on WhatsApp →