PLC Playground guide cover: PLC one-shot edge detection

PLC One-Shot Not Working? The Missing False State Is Often the Clue

An edge detector responds to a transition it observes, not simply to a signal being true. If its input never returns false at the time the block executes, another rising edge cannot be detected. Start by examining the sampled sequence and the block's stored state.

R_TRIG-style sampled edge detection; check the exact library and instance behavior.

What is happening?

A typical R_TRIG function block compares the current Boolean input with remembered history and produces a pulse for a detected rising transition. Calling the same instance for unrelated signals or skipping calls can alter that history. Vendor-specific one-shot instructions may have additional initialization behavior.

Check these five things

  1. Write down the input values seen on consecutive executions. A physical button release is not proof that the program sampled a false state.

  2. Verify that each independent signal has its own appropriate edge-detector instance or storage as required by the platform.

  3. Check conditional execution. A block called only while the input is true may never observe the false state needed to rearm.

  4. Confirm the consumer runs when the pulse exists. A slower task or HMI can miss a one-execution pulse.

  5. Test startup with the input initially false and initially true, using the documented initialization behavior.

Worked example

In a simple sampled sequence of 0, 1, 1, 0, 1, a rising-edge detector should identify two transitions when called on every sample. If the calls occur only on the three true samples, the detector's view is different. The physical sequence and the executed sequence are not interchangeable.

Quick diagnostic reference

Symptom Check
Works once only Observed false state and retained history
Unexpected extra pulse Shared instance or competing writes
PLC pulse exists; HMI misses it Consumer update interval

The mistake to avoid

Stretching a pulse can help an ordinary data handshake, but it is not a substitute for a designed request/acknowledge protocol when events must not be lost.

How to verify the fix

Use a short simulated truth sequence and log both the detector input and output at the task rate. Confirm each intended edge is consumed exactly once.

Field-work boundary: These are educational diagnostic guides. Use the exact equipment manuals and approved site procedures. Electrical testing and machinery changes belong to qualified, authorized personnel; control hazardous energy and validate affected functions before release.

Technical reference

ABB Automation Builder: R_TRIG rising-edge detector. The examples and diagnostic tables above are original teaching material; they do not replace the product manual.

Continue troubleshooting

Previous Post Next Post