Re: Multi-time triggered systems

Originally Posted by
Greg McKaskle
I've yet to develop my roadmap of exactly when to use the realtime fifos instead of locals
The Real-Time FIFO should be used when you have a deterministic loop communicating with non-deterministic loops. The access to the Real-Time FIFO is atomic (which makes it deterministic), and there are no worries about synchronization or caching of values like you would with a local variable (you wouldn't want to be reading the value at the same time someone else was modifying it - to prevent this you'd need synchronization, which is definitely NOT deterministic).

Originally Posted by
Greg McKaskle
or timed loops instead of regular ones
Timed loops should be used when you want a guaranteed deterministic scheduled or periodic "firing" of the loop. Realize that when you use a timed loop, the timed loop runs in a TIME_CRITICAL thread priority context, which definitely starves background threads in the system (like networking, et. al.). If your timed loop takes up the entire time, or frequently runs late, then you also end up with starvation of background threads. To prevent starvation when using timed loops, you want to make sure the period of the loop is ample enough to provide time for other threads to run in the "down-time" between when the loop iteration ends and the next iteration of the loop is scheduled.
-Danny
Last edited by Danny Diaz (NI); 10-01-2008 at 12:52 PM.
Danny Diaz
National Instruments
LabVIEW Real-Time Core