Everything You Need to Know About One-Shot Instructions @ACCautomation
Everything You Need to Know About One-Shot Instructions  @ACCautomation
Uploaded November 2026 | Updated November 2026, 1 day ago
Learn why one PLC button press counts 40 times, and fix it with the rising and falling edge contacts. Build a one shot and test every case in a free simulator.

โšก QUICK ANSWER
Press a button once, hold it four seconds, and an increment instruction adds 40 rather than 1. Nothing is broken. A PLC reads its inputs, solves every rung top to bottom, writes its outputs, and then does it all again, and this simulator does that ten times a second. For the whole four seconds the rung is true, so the increment runs on all forty scans. The fix is a contact that passes power for exactly one scan: a rising edge contact, drawn with a P inside it, conducts only on the scan where its bit goes from off to on. A falling edge contact, drawn with an N, does the same when the bit goes from on to off. The part most people get wrong is which one to use. On a normally closed stop button the input is on until you press it, so the press is a falling edge and a rising edge contact would count the release instead. Counters already have edge detection built in, which is why they never needed this. Math, move and toggle logic do not.

๐Ÿ“– FULL STEP-BY-STEP + DOWNLOADS (example program, Structured Text file, screenshots)
accautomation.ca/rising-edge-one-shot-ladder-logic-p-n-contacts

โฑ๏ธ TIMESTAMPS
0:00 Rising Edge and One-Shot in Ladder Logic
0:41 One Press, 40 Counts, and Why the Scan Does It
1:21 The Rising Edge (P) Contact
1:41 The Falling Edge (N) Contact
2:00 Why Counters Never Needed This
2:21 Defining the Task, the IO and the Sequence
3:34 The Nine Rungs: Wrong Way and Right Way
3:57 Push On, Push Off from One Button
4:22 Counting a Normally Closed Stop Button
4:43 Structured Text: R_TRIG and F_TRIG
5:06 Testing Every Case on the Simulator
7:02 Four Common One-Shot Mistakes

๐Ÿ“š WHAT YOU'LL LEARN
โœ… Work out why a plain contact feeding an increment counts once per scan, by following what the PLC scan actually does while a button is held
โœ… Use a rising edge (P) contact to pass power for exactly one scan when a bit turns on, and a falling edge (N) contact for when it turns off
โœ… Pick the right edge for a normally closed button, where the input is on until pressed, so the press is the falling edge and not the rising one
โœ… Turn one Start button into push on push off motor control, by driving a toggle rung from a one scan pulse instead of the button itself
โœ… Write the same logic in Structured Text with the IEC R_TRIG and F_TRIG function blocks, which replace the edge contacts ladder does not have

โ“ FREQUENTLY ASKED
Q: Why does my PLC counter or math instruction trigger multiple times on one button press?
A: Because the rung stays true for as long as the button is held, and the instruction runs on every scan it is true. A four second press at a ten per second scan rate is forty executions. An edge contact limits it to the single scan where the input changed.

Q: What is the difference between a P contact and an N contact?
A: A P contact is the rising edge: it passes power for one scan when its bit goes from off to on. An N contact is the falling edge: one scan when the bit goes from on to off. Use P for a press on a normally open button, N for a release, or for a press on a normally closed one.

Q: Why does my rising edge contact not work on my Stop button?
A: Because a Stop button is normally closed, so its input sits on and goes off when pressed. That makes the press a falling edge. A rising edge contact there fires when you let go of the button, not when you push it.

Q: Do I need a one-shot with a counter instruction?
A: No. Counter instructions have edge detection built in and count once per false to true change of the rung. Math, move and toggle logic have no such thing and will run on every scan, which is where the one-shot is needed.
๐Ÿ‘‰ Full step-by-step with the example program: accautomation.ca/rising-edge-one-shot-ladder-logic-p-n-contacts

๐Ÿ”— MORE RESOURCES
โ–ถ Run it yourself, free in the browser: accautomation.ca/simulator
โ–ถ Why counters never needed a one-shot: youtu.be/OYDyXmTduXU
โ–ถ Example ladder logic file: accautomation.ca/simulator/acc-example-one-shot.json
โ–ถ Structured Text file: accautomation.ca/simulator/acc-example-one-shot.st
โ–ถ PLC Beginners Guide: accautomation.ca/programming/plc-beginners-guide
โ–ถ Free eBooks: accautomation.ca (subscribe for download)

๐Ÿ›’ RECOMMENDED HARDWARE
โ–ถ Shop: automationdirect.com
โ–ถ Parts Guide: accautomation.ca/purchase-find-parts

๐Ÿ’ฌ Questions? Drop a comment below.

๐Ÿ”” New tutorials every Monday โ€” Subscribe and hit the bell!

#PLC #LadderLogic #IndustrialAutomation #PLCProgramming #ACCAutomation #PLCTutorial #LearnPLC #StructuredText #PLCSimulator

Regards,
Garry
ACC Automation
accautomation.ca
Everything You Need to Know About One-Shot InstructionsThe Easiest Way to Practice PLC Programming #learning #plc #engineeringSee How 5-Step PLC Controls This Entire Conveyor! #automation #coding #shortsMarriage runs like a good PID loop ๐Ÿ˜‚The Input Failure! ๐Ÿ˜‚The Real Time Reality! ๐Ÿ˜‚Motor Runtime Alarm: TMR Timer in a Start Stop Circuit!Expanding your PLC system with ease! #automation #plc #engineeringStop using AI like a magic button #programming #coding #aiAdvanced PLC Features: Shift Registers  Control Zones!Why you should NEVER trust AI with PLC code #Automation #EngineerLifeThe Secret to Efficient PLC Code: Function Blocks
ACC Automation: PLC & Industrial Control Learning |

Everything You Need to Know About One-Shot Instructions

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER