|AutomationDirect Live Chat|
Learn how to configure and deconfigure Interrupts on the fly while your PLC is running and some other important things you need to know when using interrupts.
In the first three videos on Interrupt Service Routines - or ISRs - we set everything up using the dashboard because it is so quick and easy. The cool thing about the Do-more is you can configure interrupts in your ladder code so you can configure interrupts anytime you want. You do that with the INTCONFIG instruction. Look you can do all the same stuff we did via the Dashboard right here. Set up event interrupts; timer interrupts and registers matching interrupts. Exactly what we did before, but now you can setup and change interrupts whenever you want while the PLC is running. And you can inhibit any individual interrupt programmatically by simply toggling the ISR’s inhibit bit. If you want to get rid of an interrupt event – or de-configure it, just use the De-configure instruction and tell it which event you want to de-configure. Easy. You can also suspend and resume all interrupts. Suppose you have a super critical process that simply can’t be interrupted. Well, you just put a Suspend at the start of the process and a Resume at the end and interrupts will be suspended during that time. This is also great for when you need to check the status of something and you don’t want anything to be changing while you are doing it. Here are some loose ends not covered in the other ISR videos and a few things that are worth repeating. If you right click on an ISR you can change its name, and decide if you want the ISRs data structure to be retentive or not. That is, should the latency, execution time al l that stuff stick around after a power cycle of the PLC. You can also password protect the code block … but be careful. If you do this and you forget the password, the only way to recover is to reset the PLC back to factory default which means you will loose everything stored in the PLC. Also, this ISR ID is assigned by the system so you don’t have to worry about it – but it is a remember that a Do-more BRX PLC allows up to 32 ISRs so the largest you will ever see this number is 31. Remember that the immediate output instructions are intended for use in interrupt service routines. You can use them in regular programs and tasks, but it is not a good idea because they take time away from the scan and make debugging your Ladder code more difficult since they don’t follow the normal flow of a ladder program where the inputs are read at the start of a scan, the ladder logic is executed, and then the outputs are updated at the end of the scan. And finally, PLEASE remember to keep your interrupt service routine as short as possible. Why? Because it interrupts the scan. And if it is too long, it can interfere with the normal flow of your process. Well, that should be more than enough to get you up and running with Interrupts. Hopefully you can see that the Do-more BRX PLC allows you to quickly setup simple interrupts from a single input, all the way up to complicated interrupt triggers based on multiple inputs, dedicated hardware timers and even high speed input counters – all of which means once again, the BRX PLC can pretty much cover whatever your project demands. If you have any questions about the BRX PLC please contact AutomationDirect’s free award winning support team during regular business hours. They’ll be happy to help. And don’t forget the forums. There are lots of folks there that love to share their years of experience. Just don’t post any questions directed at AutomationDirect’s support team there – they don’t monitor the forums on a regular basis. Spend Less. Do more. With AutomationDirect.