Uploaded November 2026 | Updated November 2026, 1 day ago
PLC fail-safe stop logic that drops to Idle the instant the circuit opens, so a cut wire stops the conveyor exactly like a pressed stop button does.
⥠QUICK ANSWER
PLC fail safe stop logic works because the stop input is normally closed. X2 reads TRUE at rest, so pressing stop takes X2 false, NOT X2 becomes TRUE and the state machine drops to Idle immediately. That check is placed ahead of everything else in the program, which is what makes it unconditional. The important consequence is that a broken wire looks identical to a pressed button, so the conveyor stops either way. From Idle, the CASE statement runs the travel states: state one is forward, and when X4 goes TRUE the box has reached the right sensor and the state moves to two, reverse.
đ FULL STEP-BY-STEP + DOWNLOADS (project file, wiring diagrams, screenshots)
accautomation.ca/can-ai-program-a-plc-i-tested-it-live-in-the-acc-plc-simulator
đ WHAT YOU'LL LEARN
â Build a stop check that treats a cut wire and a pressed button as the same event
â Place the stop evaluation ahead of all other logic so nothing can override it
â Drop a state machine straight to Idle instead of unwinding through other states
â Use a CASE statement to hold forward and reverse as separate numbered states
â Trigger a direction change from the end of travel sensor rather than a timer
â Judge whether AI generated PLC code got the safety behavior right first try
â FREQUENTLY ASKED
Q: Why does a normally closed stop button make the circuit fail safe?
A: The input is TRUE while everything is healthy, so any loss of that signal stops the machine. A pressed button, a cut wire and a lost terminal all read the same.
Q: Why must the stop check run before the rest of the program?
A: Anything evaluated after it could set an output in the same scan and keep the motor energised. Running it first makes the stop unconditional.
Q: What moves the conveyor from forward to reverse?
A: X4, the right hand proximity sensor. When it goes TRUE the box has reached the end of travel and the CASE statement advances the state to reverse.
đ Full step-by-step, code and wiring diagrams: accautomation.ca/can-ai-program-a-plc-i-tested-it-live-in-the-acc-plc-simulator
đ MORE RESOURCES
âļ Series: accautomation.ca/series
âļ Free PLC Simulator: accautomation.ca/simulator
âļ 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 #StructuredText #IndustrialAutomation #PLCProgramming #ACCAutomation #MotorControl #PLCTutorial #LearnPLC #Shorts
Regards,
Garry
ACC Automation
accautomation.ca
PLC fail-safe stop logic that drops to Idle the instant the circuit opens, so a cut wire stops the conveyor exactly like a pressed stop button does.
⥠QUICK ANSWER
PLC fail safe stop logic works because the stop input is normally closed. X2 reads TRUE at rest, so pressing stop takes X2 false, NOT X2 becomes TRUE and the state machine drops to Idle immediately. That check is placed ahead of everything else in the program, which is what makes it unconditional. The important consequence is that a broken wire looks identical to a pressed button, so the conveyor stops either way. From Idle, the CASE statement runs the travel states: state one is forward, and when X4 goes TRUE the box has reached the right sensor and the state moves to two, reverse.
đ FULL STEP-BY-STEP + DOWNLOADS (project file, wiring diagrams, screenshots)
accautomation.ca/can-ai-program-a-plc-i-tested-it-live-in-the-acc-plc-simulator
đ WHAT YOU'LL LEARN
â Build a stop check that treats a cut wire and a pressed button as the same event
â Place the stop evaluation ahead of all other logic so nothing can override it
â Drop a state machine straight to Idle instead of unwinding through other states
â Use a CASE statement to hold forward and reverse as separate numbered states
â Trigger a direction change from the end of travel sensor rather than a timer
â Judge whether AI generated PLC code got the safety behavior right first try
â FREQUENTLY ASKED
Q: Why does a normally closed stop button make the circuit fail safe?
A: The input is TRUE while everything is healthy, so any loss of that signal stops the machine. A pressed button, a cut wire and a lost terminal all read the same.
Q: Why must the stop check run before the rest of the program?
A: Anything evaluated after it could set an output in the same scan and keep the motor energised. Running it first makes the stop unconditional.
Q: What moves the conveyor from forward to reverse?
A: X4, the right hand proximity sensor. When it goes TRUE the box has reached the end of travel and the CASE statement advances the state to reverse.
đ Full step-by-step, code and wiring diagrams: accautomation.ca/can-ai-program-a-plc-i-tested-it-live-in-the-acc-plc-simulator
đ MORE RESOURCES
âļ Series: accautomation.ca/series
âļ Free PLC Simulator: accautomation.ca/simulator
âļ 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 #StructuredText #IndustrialAutomation #PLCProgramming #ACCAutomation #MotorControl #PLCTutorial #LearnPLC #Shorts
Regards,
Garry
ACC Automation
accautomation.ca










