When an industrial robot suddenly “stumbles” during high-speed operation, the entire PLC system often freezes instantly, like being struck by lightning, causing the entire production line to come to a halt. This is a nightmare for on-site engineers. Many beginners, when faced with this situation, immediately check if the encoder is broken or if the PLC program is written incorrectly. In reality, the truth behind this often lies in the subtle differences between the encoder signal and the PLC input processing architecture.
Let's understand the fundamentals: What exactly happens when a system loses steps?
Often, we perceive a system as “complex” because we only look at the surface. If you break down encoder lost steps, the basic principle is very simple: the encoder converts mechanical motion into a continuous pulse signal transmitted to the PLC through photoelectric or magnetic sensing. The PLC’s high-speed counter (HSC) is responsible for “counting” these pulses. “Lost steps” means that the machine rotates one revolution, and the number of pulses sent by the encoder does not match the number actually counted by the PLC.
Why is there a discrepancy? Aside from mechanical slippage, the vast majority of reasons come from “interference” and “insufficient resolution.” Imagine the encoder emitting extremely short square waves when rotating at high speed. If your cable shielding isn’t done properly, the electromagnetic interference (EMI) generated by the current when external motors start up could cause the PLC to misinterpret noise as a pulse, or miss a real pulse. At this point, the system’s logical position becomes “disconnected” from the actual physical position.
PLC brand architecture traps: Processing differences between Siemens and Rockwell
This is the concept I most often emphasize when guiding clients to solve projects using Siemens S7-1200 and Rockwell Studio 5000. Many engineers mistakenly believe that all PLCs have the same lost step handling capabilities, which is a big mistake.
Hardware architecture determines the upper limit
Siemens’ S7-1200 series has very powerful and highly integrated HSC (high-speed counter) modules that perform signal filtering at the hardware level. If you set the filter frequency too low in the program settings, the PLC will directly filter out high-frequency pulses as noise. This isn’t an encoder failure, but the PLC’s “overprotection.”
The impact of processor scan cycles
Conversely, if you rely on a general scan cycle to process pulse logic when performing high-speed positioning, that will definitely cause problems. In the Rockwell Studio 5000 environment, dedicated modules are usually used to handle servo loops for motion control. If the encoder directly enters a general DI point, the PLC’s scan cycle will definitely not keep up with the frequency of the physical signal. Understanding how your PLC “hardware interrupts” or “software reads” signals is the first step in diagnosing lost steps.
Practical solutions: From homing to signal optimization
For incremental encoders, power-off homing is a necessary step. But if lost steps occur during operation, we can’t just rely on shutting down the system. You need to design an “automatic recovery logic”:
- Add logical detection: Add a monitoring block to the program to calculate the correlation between the actual motor speed and the encoder feedback. If the difference is too large, trigger a software forced pause instead of letting the system crash.
- Cable craftsmanship: This may seem old-fashioned, but I’ve seen too many cases in factories where lost steps occurred because the signal and power cables “ran in the same conduit.” Be sure to use differential signals (RS422) and ensure that the shielding is single-point grounded.
- Homing mechanism design: Ensure that there is a reliable homing procedure after each system restart or severe lost step, using physical limit switches or Z-phase signals to correct the position. This is the cornerstone of system stability.
There’s no magic in automation, only respect for physical principles. Many complex errors, when broken down, are just those few circuit principles at play. The next time you encounter a PLC lost step, will you first check the shielding of the encoder cable, or jump directly into the PLC program logic to modify it? I recommend starting with the physical connection check. Often, the problem is much simpler than you think.