Quote:
Originally Posted by Ether
A team has code which uses 100ms and 20ms periodic tasks, and they are running low on throughput margin (i.e. CPU usage is too high). They think that they can reduce CPU usage by using interrupts instead of periodic tasks. What say you?
|
I used interrupts in the first year that the cRio was used, and didn't have any problems. YMMV though…
I would probably recommend restructuring the code so that everything can run in a single thread. In an FRC context, my opinion is that typically threads cause more trouble than they're worth.
Quote:
|
A team has subsystems that need to respond to sensor data changes within 1ms. Should they: a) use Interrupt Service Routines to control these subsystems, or b) carefully investigate other approaches (such as a hardware limit switch directly connect to a motor controller for example).
|
First, I would ask if they *really* need 1ms response time. If possible, I would try to reframe the problem so that the response time isn't required.
I like Alan's suggestion to use a counter, that sounds like a real winner.
As a sidenote, when possible, I connect my limit switches to Jaguars.