IMDHMIControls LibraryShop main store

Troubleshooting

Why EtherCAT terminals fail cyclic WKC error on LRD below OP

Industrial networks Published 7 min read By IMDHMI controls team

Short answer

A detected slave that stays below OP while the master logs a cyclic command WKC error on LRD has a process data mapping mismatch, not a wiring fault. On the EL3702 the preset selection exposes Ch2 without Ch1, so the input read never collects the expected working counter. Tick the sample value check box for each channel on the Process data tab, apply, and restart the EtherCAT master.

On this page
  1. Why a clean slave diagnosis still fails the counter
  2. Where each master message points
  3. Why the EL3702 preset selection trips the counter
  4. Counting the working counter for an LRD read of one EL3702
  5. Correct the selection step by step
  6. Set the EL3102 through startup parameters
  7. What still holds a terminal below OP after the fix
  8. Confirm the repair
  9. Questions asked

Both terminals are detected, the other I/O on the bus reaches OP, and the slave diagnostics page shows nothing, yet the master logs cyclic command WKC error on LRD and holds the EL3102 and EL3702 below OP. That combination is a process data mapping mismatch, not a wiring or addressing fault. On the EL3702 the preset selection in ctrlX I/O Engineering exposes the Ch2 sample value but not Ch1, so the master's expected working counter for the input read never matches what comes back. Tick the sample value check box for each channel on the Process data tab, apply the configuration, and restart the EtherCAT master.

Why a clean slave diagnosis still fails the counter #

Every EtherCAT datagram comes back with a working counter. A slave adds to it only when the datagram actually lands on an area it serves: a logical read that succeeds adds one count per serving slave, and a read that fails, or a slave the datagram never addresses, adds nothing. The master computes the count it expects from its own configuration, so cyclic command WKC error on LRD says exactly one thing: the cyclic read of the input image collected a count other than the one the master's mapping demands.

Detection proves less than it looks. It shows that the broadcast and auto-increment datagrams passed through the slave and that its controller hardware answered, which happens at the link and INIT level. Reaching OP additionally requires the master's init commands for each state transition (mailbox and CoE writes, SyncManager and FMMU setup) and then a cyclic exchange that counts correctly; the transition sequence itself is covered in why an EtherCAT I/O slave fails the PREOP to SAFEOP transition.

The slave page stays clean because the slave is not faulted. It received a configuration that cannot produce the expected count; the master's configuration is what has to change.

Where each master message points #

The two messages name two different stages, and each has its own repair route.

Master message Stage What the count tells you Where the fix lives
slave init command working counter error State transition, init commands A startup write to this slave was not acknowledged as expected The Startup Parameters list, checked against the terminal manual
cyclic command WKC error on LRD Cyclic input datagram The logical read collected the wrong count The Process data selection and the I/O mapping it produces
Nothing on the slave diagnostics page Slave application The terminal is healthy; the master configuration is the suspect AL status and working counters in the master diagnosis

The configuration dialogs the terminal manufacturer built into its own engineering tool do not exist in ctrlX I/O Engineering. Two routes replace them: Startup Parameters writes object dictionary values during the state transitions and works for terminals that support CoE, such as the EL3102; the Process data check boxes decide which sample values the EL3702 maps, and the I/O mapping updates with the extra data. Start with the EL3702, because its lopsided preset is visible in the tool and matches the cyclic LRD error.

Why the EL3702 preset selection trips the counter #

The EL3702 is an oversampling terminal: it samples each channel at an integer multiple of the bus cycle frequency, the oversampling factor n, instead of once per cycle, and the sample entries in the mapping are what carry those extra samples. Which entries the master may read is decided entirely by the selection on Process data; the entries offered there come from the terminal's device description file.

For this terminal the preset is lopsided: the Ch2 sample value is present while Ch1 is missing. The master builds its input image and its expected working counter from that incomplete mapping, the returned count misses, and the terminal is held below OP. A terminal that offers no entries at all has a different fault, the one traced in EtherCAT analog inputs unknown without ESI device description files.

Work the two terminals separately so a remaining fault can be assigned to one of them: the EL3702 through the process data selection, the EL3102 through Startup Parameters, and any object write on either terminal only with the index and sub-index its own manual gives.

Counting the working counter for an LRD read of one EL3702 #

Inputs #

  • Datagram under test: one logical read (LRD) of the input image, addressing the EL3702 alone, the slave your cyclic command WKC error on LRD points at.
  • Increment rule: one count per addressed slave that successfully serves the read; zero when the read fails or the slave is not addressed, per the documented EtherCAT working counter behavior.
  • Terminal: an EL3702, a 2-channel analog input for ±10 V signals, per the terminal's product documentation.
  • Selection in effect: Ch2 sample value selected, Ch1 absent, the preset the engineering tool ships for this terminal.

Rule in words #

The master expects an increment from every slave its input image says must serve the datagram. A slave pays that increment only if the read lands on a mapped input area it actually serves, so a slave whose selection and image disagree pays nothing while the master still counts it.

Arithmetic #

  • Expected working counter = 1 addressed slave × 1 count per served read = 1
  • Returned working counter = 0, because the EL3702 does not serve the read as configured
  • Deviation = returned − expected = 0 − 1 = −1 count

Result #

The master logs cyclic command WKC error on LRD and holds the terminal below OP. Where other input slaves share the datagram, the returned count is short by exactly one per terminal that fails to serve the read, while the slaves already at OP pay their increments normally, which is why the rest of your bus stays up.

Decision #

Tick the sample value check boxes for both channels, apply, restart the master, and read the same counter again. A returned count equal to the expected count, with the terminal at OP, closes the case. A count still short after both channels are selected and the master restarted tells you the deficit is no longer in the PDO selection: move to the init-command checks under Startup Parameters.

Correct the selection step by step #

  1. Open the EL3702 in the device tree and go to the Process data tab.
  2. Compare the two channels: both must expose the same kind of entry. The preset shows Ch2 only.
  3. Tick the sample value check box for Ch1 and confirm Ch2 remains selected.
  4. Open I/O mapping. The ticked entries must now appear as additional variables; missing Ch1 variables mean the selection did not apply.
  5. Apply the configuration and restart the EtherCAT master, so the init commands and the expected working counter are recalculated from the new mapping. Put the machine in a safe state first: the restart drops the process image for every slave on the bus and drives the outputs to their fault values.
  6. Watch the terminal run through PREOP and SAFEOP to OP, and confirm neither master message returns.

Set the EL3102 through startup parameters #

The EL3102 supports CoE, so its settings travel as startup writes rather than check boxes.

  • Open the terminal's Startup Parameters tab and add only the objects its manual documents for the setting you want, with index, sub-index, data type and value exactly as the manual's object description gives them.
  • Remove every entry you cannot match to the manual. A malformed CoE write during a state transition comes back as an unexpected working counter or a mailbox abort, and that surfaces as slave init command working counter error.
  • Restart the master and watch the state progress through PREOP and SAFEOP to OP. Never copy a startup list between the two terminals: their object dictionaries differ.

What still holds a terminal below OP after the fix #

  • A stale expected count: a process data change without a master restart leaves the old expected working counter in force, and the error persists even with the mapping already correct.
  • Two faults at once: with both terminals affected, fix and test one at a time. Disable the other in the configuration, then re-enable it.
  • Sync mode: oversampling terminals offer operating modes that depend on distributed clocks. Take the selectable modes from the EL3702 manual and match the master's DC and cycle configuration to the mode you choose.
  • Diagnostics read in the wrong place: the master's AL status code and working counters are authoritative; a clean slave page clears nothing.
  • Working counter state as a signal: a terminal can add an input variable that shows the working counter state of the slave to its process image, active by default. Where it exists, watch it to see whether the slave itself registers the read landing.

Confirm the repair #

  • Both the EL3102 and the EL3702 show OP in the master diagnosis, next to the terminals that worked all along.
  • Neither slave init command working counter error nor cyclic command WKC error on LRD is logged after the restart.
  • Ch1 and Ch2 variables are both present in I/O mapping and update: apply a known voltage to each input in turn and watch each value follow.
  • The oversampled array changes every bus cycle while the input varies.

Questions asked

Does oversampling on the EL3702 work with this master once the terminal reaches OP?

Yes, provided you tick the sample array entry for each channel. Only the array carries the oversampled data; the single-value entry returns one sample per cycle. With the array selected, the mapping grows to hold every sample of every cycle, and the master reads that larger image like any other input area.

Why do the other slaves on the bus reach OP while these two terminals do not?

Each slave adds to the working counter only from its own mapping, so a wrong selection on one terminal leaves every other count untouched. The other slaves run their own init commands and serve their own reads, so they progress to OP normally. That behavior is also the evidence that cabling, frame forwarding and addressing are sound: the fault stays local to the terminals whose configuration is inconsistent.

The Process data tab shows no entries at all for my terminal. Is that the same fault?

No. The check boxes on that tab come from the terminal's device description file. A wrong preselection still shows entries, with the wrong ones selected; no entries at all means the description file is missing or the wrong one is loaded, which is a different fault with a different fix. Load the file the terminal manufacturer publishes for the exact terminal before changing any selection.

Can I fix the mapping by writing PDO objects through Startup Parameters instead?

No. The selection on the Process data tab is what the master uses to build its input image and its expected working counter. Hand-written PDO assignment objects change the slave without changing the master's image, which recreates the same mismatch from the other side. Use startup parameters only for settings the terminal manual documents, taken with the exact index, sub-index, data type and value it gives.

Keep reading

  • Troubleshooting

    Why a drive answers ping but the PLC cannot connect

    A drive that answers ping is telling you the IP path works, not that the protocol session does. ICMP echo and the PLC's EtherNet/IP or Modbus TCP connection are separate services with separate settings. Check the responder's identity and subnet, the imported device entry, protocol enable and ports, then cyclic data lengths, and fix the first one that fails.

    Industrial networks

  • Troubleshooting

    Why a Keyence scanner result shows only one byte in CODESYS

    One character arrives because the assembly generated from the scanner's EDS file reserves a single result element instead of the fixed 128-byte result block. Delete the Result Data entry and re-add it with Bit length = 8 and Count = 128, then bind a union of STRING(127) and ARRAY[0..127] OF BYTE to the regenerated start address to read the null-terminated result.

    Industrial networks

  • Troubleshooting

    Why an Ethernet/IP gateway process image needs an application copy

    The PiBridge puts the EtherNet/IP gateway into the RevPi process image as an independent module and never synchronizes it with the Modbus TCP master's words. Read the exact variable names configured in PiCtory, prove each direction with piTest, then run an application — Python with revpimodio2, raw access to /dev/piControl0, or Node-RED with byte-to-word conversion — that copies values between the two areas.

    Industrial networks