IMDHMIControls LibraryShop main store

Troubleshooting

Why all four IO-Link encoder values drop to zero

PLC programming Published 8 min read By IMDHMI controls team

Short answer

When all four encoder values on one IO-Link master drop to zero together, recover on their own and leave the CPU diagnostic buffer clean, stop swapping encoders and cables. Simultaneous zeros mark a shared path: master supply, cycle configuration, PROFINET segment, program logic or electrical interference. Trend the raw values, the channel diagnostics and the process events on one time base; the first layer that turns to zero is where the fault lives.

On this page
  1. What the symptom already rules out
  2. Trend the raw values and the diagnostics on one time base
  3. What the chain reports, and when
  4. How short a disturbance stays unlogged: worked example
  5. Test the cycle time and the interference timing
  6. The decision for each trace result
  7. Questions asked

All four IO-Link encoder values that fall to zero together, recover on their own and leave the CPU diagnostic buffer clean do not point at a single encoder, cable or port. They point at the path the four channels share: the master supply, the cycle configuration, the PROFINET segment, the program handling of the values, or interference timed with load switching. Trend the four raw inputs, the channel diagnostics and the process events on one time base, and treat the first layer that turns to zero as the fault layer. Then change one thing — the IO-Link cycle time in S7-PCT is the documented knob on this master — and repeat the trace before and after. The worked example below sizes how long a disturbance can stay unlogged, and the closing table gives the decision for each trace outcome.

What the symptom already rules out #

The reference case: a CPU 1515F-2 PN engineered in TIA Portal reads four TR Electronic CMS582M-0018 multiturn encoders through a CM 4x IO-Link 4x M12 master, order number 6ES7 147-5JD00-0BA0, at the end of a PROFINET line of nine modules. The values that drop are the direct PLC reads, the tools stand still during an event, and the readings return without any action.

The completed checks — master replaced, cables changed, wiring and supply verified — clear the steady faults from the list. What remains is shared and transient:

  • The master and its supply. A dip on the module feed disturbs all four ports at once and recovers when the feed does.
  • The cycle configuration. A marginal cycle leaves no room to repeat a corrupted frame before the port gives up on it.
  • The PROFINET segment. Last position on a nine-module line is a fact to record, not a proven cause; a real segment drop substitutes zeros and logs entries, which this clean buffer rules out.
  • The program. A copied or conditioned tag can reach zero while the raw input stays valid.
  • Electrical disturbances. Contactor and drive switching puts bursts on the cabinet wiring at moments worth time-stamping.

The machine raising no alarm is not evidence that the data stayed valid, and the height adjustment still working proves only that the jog path does not depend on the readout. When communication genuinely breaks, the CPU logs it — a PLC-5 watchdog fault that drops remote I/O is what a broken remote I/O path looks like in a buffer, and this buffer shows nothing of the kind.

Trend the raw values and the diagnostics on one time base #

Capture all of it in one trace with one clock:

  • the four raw position values, read straight from the process image, not from copies the program made;
  • each port channel diagnostic on the master;
  • the master module-level diagnostics;
  • the process bits that switch the big loads: motor starters, contactors, drive enables;
  • the downstream tags the program and the display use, next to the raw inputs.

Run the machine until an event lands, then export the CPU diagnostic buffer immediately, because the buffer keeps the most recent entries and a recurring fault can push an early event out before anyone reads it.

Read the trace in this order:

  1. Do all four values reach zero on the same scan? A simultaneous transition marks the shared path; zeros staggered port by port mark individual channel hardware.
  2. Do the port diagnostics toggle during the event? Quiet diagnostics with zeroed values mean the disturbance stayed under the master reporting threshold; toggling diagnostics mean the ports truly broke, and the affected cable and connector become the work.
  3. Do the raw inputs stay valid while a downstream tag goes to zero? Then the network is innocent and the program is the fault layer — data valid in one layer and zero in another is a known pattern, as with an S7-1200 watch table that reads zeros from a PROFINET gateway.
  4. Does the zero window line up with a motor start? If it does, the interference path is live and the cycle-and-installation test below applies.

What the chain reports, and when #

Two documented behaviors shape the diagnosis. The master protocol behavior first: an IO-Link master reports a port break to the CPU only after the second repeat attempt has failed, so a disturbance that corrupts fewer consecutive frames than that leaves values in the process image without any diagnostic entry. PROFINET behavior second: when a device stops responding on the network, the controller normally substitutes zeros for that device data and logs the failure — an event absent from this buffer. Together they place the zero below PROFINET: the CPU receives valid cyclic data that simply carries zeros, so the corruption or the reset happens at the master, on its IO-Link ports, in its supply or in the program — exactly the layers the trend separates.

The self-recovery carries weight too. A failed master or a crushed cable does not return four channels to normal service repeatedly and without intervention; a transient disturbance does. With the master and the cables already replaced without effect, the leading explanation is a shared transient — a supply dip that resets the ports, or burst interference shorter than the reporting threshold — and the trace confirms or kills it in one pass.

How short a disturbance stays unlogged: worked example #

Siemens documents a minimum cycle time of 2 ms, dynamic with the user data length, for the ET 200SP CM 4xIO-Link ST, order number 6ES7137-6BD00-0BA0. The ET 200MP master in this case, 6ES7 147-5JD00-0BA0, publishes its own minimum in its data sheet; the arithmetic below uses the documented 2 ms as the example input.

The master logs a break only after the second repeat attempt fails, so three consecutive cycles must fail before anything is reported: 3 × 2 ms = 6 ms. A disturbance that scrambles up to about 6 ms of frames can therefore zero the cyclic data and leave no diagnostic entry anywhere. An encoder position value is several bytes and the cycle grows with user data length, so treat 6 ms as a floor: at a 4 ms cycle the same three failed frames span 12 ms.

Sampling has to beat that window. A trace with a 2 ms sampling interval turns a 6 ms burst into about three consecutive zero samples (6 ÷ 2 = 3), enough to time-stamp the event against the motor-start bits. At a 10 ms sampling interval the same burst can fall between samples and look like a one-scan glitch, so set the trace to the fastest interval the CPU allows and let the arithmetic set expectations: several consecutive zero samples mean a real burst, not a single bad read.

Test the cycle time and the interference timing #

S7-PCT exposes the IO-Link cycle time as a settable parameter for this master, which makes it the one knob worth a controlled test:

  1. Note the cycle time the master uses for each port, from the project device configuration.
  2. Capture the before-trace across conditions that reproduce the event, motor starts included.
  3. In S7-PCT, open the port parameters and set the cycle time to the next slower value the device configuration allows; change one step, not to the slowest, so the experiment stays readable.
  4. Rerun the same conditions for a fixed observation window — several shifts or a set number of machine cycles — and capture the after-trace the same way.
  5. Keep the change only if the zeros stay absent across repeated runs, the port diagnostics stay quiet, and the position updates remain fast enough for the height adjustment. If the zeros return on their old timing, revert: the margin was not the fault.

If the trace ties the events to motor starts instead, the work moves to the installation: separate the IO-Link and encoder cabling from the motor power runs, bond the shields at the cabinet entry, and give the master supply a feed that does not share a route with a switching load. Each change is judged by the same before-and-after trace, not by whether the symptom happened to pause.

One safety note belongs here: de-energize, lock off and verify absence of voltage before opening conduits or re-terminating shield connections — the trend work itself happens with the panel closed.

The decision for each trace result #

What the trace shows Where the zero enters Decision
All four values zero on the same scan, aligned with motor starts, port diagnostics quiet Burst interference on the shared installation Separate signal from power cabling, bond shields at the cabinet entry, rerun the trace, keep the fix when repeated runs stay clean
All four zero together, no load correlation, readings return after a similar pause each time The master supply, dipping and resetting the ports Record the master supply through the starts, move it to a clean feed and let the retrend decide
Raw inputs valid, a copied or displayed tag goes to zero The program data handling Fix the copy or condition, and alarm on the implausible value
Zeros staggered port by port One channel cable, connector or port Work that port alone; the other three channels are witnesses, not suspects
The diagnostic buffer gains entries at the event A real break upstream of the master Follow the buffer entries to the segment; the clean-buffer reasoning no longer applies

If the program turns out to be the layer, fix the copy and add a SCADA communication alarm for link loss so the next genuine break alarms the operator instead of passing silently. Across every row the method holds: the first layer that turns to zero is the fault layer, and in this signature — four channels, clean buffer, self-recovery, replacements already done — the shared transient leads the list, with the one-time-base trace and the S7-PCT cycle test settling it in a single visit.

Questions asked

Why does the position return correct after sitting at zero?

The zero marks a receive problem, not lost position. A multiturn encoder keeps its count through power loss and re-sends the true position as soon as its port re-registers, so the reading comes back correct instead of offset. That recovery pattern also argues against a failed encoder: a dead measuring element does not restore four channels at once and return the exact height, while a transient disturbance on the shared path does exactly that.

How do I tell a supply dip from burst interference on the trace?

Watch two markers. A supply dip resets the ports and recovers after a similar pause each time, and it can show up in the master module-level diagnostics; move the master feed to a clean supply and retrend. Burst interference zeroes the values in short windows that line up with motor starts while the port diagnostics stay quiet; separate the signal cabling from the motor power runs and bond the shields at the cabinet entry. The same before-and-after trace judges both fixes.

How many clean runs prove the cycle change worked?

Set the acceptance window from the event history. If the values zeroed a few times per shift, run the machine for several shifts under the same load profile and call the change proven only with zero occurrences, quiet port diagnostics and position updates still fast enough for the height adjustment. If the events return on their old timing, revert the cycle setting, because the margin was not the fault, and follow the trace to supply, interference or logic.

What should the logic do with the value while the fault is still open?

Guard it in logic. Compare each new reading with the previous one and reject a step the axis cannot physically make, for example a jump from 30,000 counts to 0 between two consecutive scans on an axis that cannot travel that far between scans; hold the last valid value and raise an alarm. Keep trending the raw input so the guard never hides the fault, and treat this as a data-quality guard, not a machine safety function.

Keep reading

  • Troubleshooting

    Fix the S7-300 event 16#38CB startup rack failure

    Event 16#38CB is an OB86 rack-failure diagnostic recorded when a configured PROFINET station answers wrongly at startup. In this failure the four G120 drives connect and BF clears, but the CPU still holds a station diagnostic, so SF stays on until the drive identity is corrected. Read the buffer, verify each drive one at a time, add OB86 logic, and never suppress the event with SFC39 or SFC40.

    PLC programming

  • Troubleshooting

    PLC-5/80E loses scan list on remote I/O after power cycle

    Auto-negotiate selected on Ethernet Channel 2 of a Series F Revision A PLC-5 clears the chassis scan list on the remote I/O scanner channels whenever the processor power cycles. Disable auto-negotiate and hard-set 100 Mbps full duplex, or flash Revision A.1 or newer; Auto-Config only rebuilds the list after each event.

    PLC programming

  • How-to

    What an S7-1200 upload recovers and what the IO devices need

    The documented upload of an S7-1200 recovers the CPU program and the controller-stored PROFINET configuration, including device names, IP addresses and module arrangements. It recovers nothing stored in the ten third-party IO devices: install each vendor's GSDML description separately and back up each device's own settings with its vendor tool, then verify byte counts and addresses online before building on the project.

    PLC programming

Map a 32-byte IO-Link PROFINET item to a PLCnext array