Quote:
Originally Posted by JBotAlan
Hey,
EDIT: For that matter, how do I regulate a feedback loop to run exactly every X milliseconds?
|
Be warned... When you say exactly, be sure that's what you need. If you use a timed loop to do everything, you will have lots of problems. It's not like there is a turbo button on the controller and making everything on the controller high priority will keep the CPU from being lazy. Consider the timed loop to be a timer interrupt service routine. Only put the things in it that NEED to be exact... and it had better be a small amount of code.
For the general case, a simple "Wait Until Next ms Multiple" VI will do the trick. It takes into account the time that the code in the loop takes to execute and should give you a consistent loop rate.
-Joe