PLC Scan Time and Motion Control: Discrete vs Continuous Motion

The Motion That Jittered at High Speed

We used a PLC to control a fast pick-and-place axis. The PLC read a sensor, decided to move, and sent a command to the servo. At low speed, it worked. At high speed (the axis moved 300 mm in 0.3 s), the motion jittered — the axis didn’t move smoothly. The problem: the PLC’s scan time. The PLC reads inputs, runs the logic, and writes outputs every scan (about 10–20 ms). The servo’s position command was updated every 10 ms. At high speed, the axis moves 30 mm in 10 ms. The servo got a new command every 30 mm, not continuously. The axis stepped. The motion was jerky. We switched to a motion controller (or a servo drive with internal profile). The motion is generated inside the drive (smooth), and the PLC only sends “go to position X” (once). The jitter stopped. The mistake was expecting the PLC’s scan to provide continuous motion.

PLC scan time and motion control is about how fast the PLC updates. For smooth motion, the PLC shouldn’t be in the loop every cycle. This article covers the approach.

The PLC Scan Cycle

A PLC runs a scan cycle:

  1. Read inputs: The PLC reads all inputs (sensors, switches).
  2. Run logic: The PLC executes the program (the ladder logic or structured text).
  3. Write outputs: The PLC updates the outputs (valves, motor commands).

One scan takes about 5–20 ms (depending on the program size and PLC speed). The PLC can only update outputs once per scan. For a fast motion (a servo moving continuously), the PLC can’t update the position command fast enough.

Step 1: Discrete vs Motion Control

Discrete control (PLC scan): The PLC runs the sequence (step 1 → step 2 → step 3). It turns outputs on/off. For slow processes (a cylinder extends, waits, retracts). The scan time (10 ms) is fine (the process takes seconds).

Motion control (continuous): A servo moves smoothly (positioning, profiling). The motion is generated by the drive (or a motion controller), not the PLC scan. The PLC tells the drive “go to position X, at speed Y.” The drive handles the motion internally (smooth, continuous). The PLC doesn’t update every cycle.

The motion rule: The PLC runs the sequence (discrete). The drive (or motion controller) runs the motion (continuous). The PLC that jittered was sending position commands every scan (10 ms). Use a servo drive with an internal profile (the PLC sends “go to X” once). The drive handles the smooth motion.

Step 2: When the PLC Scan Is Fine

The PLC scan (10 ms) is fine for:

  • Discrete I/O: Sensors, valves, indicators. The scan reads them fast enough.
  • Slow motion: A cylinder (pneumatic, takes 0.5–2 s). The scan doesn’t matter.
  • Step-based sequence: Move → wait → move. The PLC steps through the sequence.

The PLC scan is NOT fine for:

  • Continuous servo motion: The axis moves at high speed. The motion must be smooth (generated by the drive).
  • Fast reaction: A sensor that must trigger in 1 ms (the PLC scan is 10 ms — too slow). Use a fast input (or a hardware interrupt).
  • Interpolation (coordinated motion): Two axes moving together (a gantry, a robot). Use a motion controller.

Step 3: Fast Inputs (Hardware Interrupt)

For a sensor that needs fast reaction (a part arriving, a stop signal), use a fast input (or a hardware interrupt). The PLC interrupts the scan to read the input (within 1 ms). The standard input (read once per scan) is too slow for fast events.

For a stop signal (a limit switch, article 87), wire it to a fast input (or directly to the drive’s hardware STO — safe torque off, article 64). Don’t rely on the PLC scan to stop the axis.

Step 4: Communication (Bus vs Analog)

How the PLC talks to the drive matters:

  • Analog command (0–10 V): The PLC sends a speed/position command via analog. The drive follows. Slow update (scan rate).
  • Pulse train: The PLC sends pulses (step/direction) to the drive. Faster than analog, but the PLC’s pulse generator is limited.
  • Fieldbus (EtherCAT, Profinet): The PLC sends position setpoints over a bus (1–4 ms update). Fast. Standard for modern servo systems.
  • Drive-internal profile: The PLC tells the drive “go to X” (once). The drive handles the motion. Best for smooth motion.
Method Update Rate Best For
PLC scan (discrete) 10–20 ms Slow sequences, discrete I/O
Analog command 10 ms Speed control (not precise position)
Fieldbus (EtherCAT) 1–4 ms Positioning, fast update
Drive-internal profile Internal (smooth) Smooth motion, high speed

A PLC Motion Checklist

  1. Is the motion discrete (steps) or continuous (smooth)?
  2. For continuous motion: use a drive-internal profile?
  3. Is the PLC scan fast enough? (For discrete?)
  4. Are fast inputs used? (For stop signals?)
  5. Is the stop wired to hardware STO? (Not PLC scan?)
  6. What communication bus? (EtherCAT, Profinet?)
  7. Is the scan time measured? (Program too big?)
  8. For coordinated motion (2 axes): motion controller?
  9. Is the motion smooth? (Test at high speed?)
  10. Is the PLC program optimized? (Too many instructions?)

The Bottom Line

PLC scan time and motion control separates sequence (PLC) from motion (drive). The axis that jittered was controlled by the PLC scan (10 ms updates). Use a drive-internal profile (the PLC sends “go to X” once). For stop signals, use hardware STO (not the PLC scan). For coordinated motion, use a motion controller. The axis that moves smoothly at high speed wasn’t the fastest PLC — it had the motion in the drive.