https://instrumentationtools.com/plc-emergency-stop-example-program/
PLC Emergency Stop Example Program