136
Technical support / Re:INTRDEF
« on: November 06, 2017, 10:46:26 AM »
Lorne,
The use of interrupts can be tricky.
If your goal is to respond quickly to some external event by changing an OUTPUT, the response time is dominated by the ladder logic scan rate. The OUTPUT will not change until the end of the scan. In thus sort of scenario, it often makes more sense to just handle the input with ladder logic.
If you have an external INPUT that wiggles at a rate greater than you can handle with ladder logic, and you need to count each wiggle, I’d suggest that you look at using the specialized high speed counter system.
In any case, I strongly urge you to build a test system to throughly exercise and test your PLC firmware. For most of my clients, I use a second PLC to model their system. I typically model analog signals, Modbus devices, pulsatile inputs and many other things.
You can model high speed digital pulses using the stepper motor or PWM SYSTEM. This is what I use.
If your system's response to these interrupt inputs is critical and the failure to respond could result in Catastrophe, please test the snot out of your code. Make certain that your code can handle input rates significantly higher then the actual system can generate.
Best regards,
Gary D*ckinson
The use of interrupts can be tricky.
If your goal is to respond quickly to some external event by changing an OUTPUT, the response time is dominated by the ladder logic scan rate. The OUTPUT will not change until the end of the scan. In thus sort of scenario, it often makes more sense to just handle the input with ladder logic.
If you have an external INPUT that wiggles at a rate greater than you can handle with ladder logic, and you need to count each wiggle, I’d suggest that you look at using the specialized high speed counter system.
In any case, I strongly urge you to build a test system to throughly exercise and test your PLC firmware. For most of my clients, I use a second PLC to model their system. I typically model analog signals, Modbus devices, pulsatile inputs and many other things.
You can model high speed digital pulses using the stepper motor or PWM SYSTEM. This is what I use.
If your system's response to these interrupt inputs is critical and the failure to respond could result in Catastrophe, please test the snot out of your code. Make certain that your code can handle input rates significantly higher then the actual system can generate.
Best regards,
Gary D*ckinson