I am writing a machine control program. I am using an interrupt port as the input method to start the machine cycle using a pushbutton. Another interrupt port acts as an ‘E-Stop’ (no this is not safety critical). The pushbutton fires the first interrupt, which runs a method that acts as the machine cycle control (activates some pneumatic cylinders).
Is it possible to interrupt the machine cycle method with the safety interrupt? Can I stop midway through the method and shut the pneumatic outputs off if the safety interrupt is tripped? Sort of exit the method midway and terminate what was happening there? I don’t want to have to poll the safety input after every instruction in the machine control method. Sorry, I am not phrasing this in the most clear manner.