06-23-2006 03:31 PM
06-26-2006 10:54 AM - edited 06-26-2006 10:54 AM
Message Edited by Ankita on 06-26-2006 10:55 AM
06-26-2006 11:50 AM
Ankita,
That's the exact problem that I was trying to address. Is there a way in which I can force the processor to address VIs at regular intervals such that even if something came up in the background which started eating up processing power, at the specific time intervals it would still run the VI.
Could I maybe use an event structure of some sort that was linked to an elapsed absolute time?
Thanks,
Jonathan
06-26-2006 11:51 AM
Oh and I meant to give you five stars but clicked on 4. Sorry!
🙂
06-26-2006 12:35 PM
In a word, No. Not with any kind of guarantee. Windows simply isn't meant to be a real-time operating system. There are things you can do that will make loop timing quite likely to be pretty regular under many normal circumstances. But you won't get loops that are guaranteed to be absolutely regular under all conceivable circumstances.
Since LV 7.1, the Timed Loop is meant to give you a way to designate repetitive code sections as having very high execution priority. If memory serves, it's a status between high priority and time critical priority. You can further make relative priority rankings between 2 or more timed loops, designating which is to get favored treatment while sharing CPU. I would suspect that using Timed Loops is your best available option under Windows.
Why exactly does it need to be regular? What kind of update rate is needed? Do you need to perform some automatic response in software when one of these safety interlocks changes state? Are you sure that the foreground display VI should have a higher priority than this interlock monitor? In many of my apps, the user display gets a lower than normal priority. The data it displays is either buffered (think 'queue') to prevent loss, or is simply a most-recent snapshot that allows loss.
-Kevin P.
06-26-2006 01:15 PM
06-26-2006 01:54 PM
Sorry, I can't offer much on Windows tricks. Once upon a time, the main starting point was found here, but that's been around a long time and there may be better options.
I suspect you'll be able to find a way to shutdown other applications. Restoring them again may be more difficult. If you ever poke around in the Windows Task Manager, there's also a big load of services and other processes that love to consume more memory than can be readily explained. Odds are, they occasionally steal some CPU too. I really don't know what your chances are for halting any of those services.
Hopefully others know more and can help better.
-Kevin P.
06-26-2006 02:14 PM
Alrighty... seems like a good time to start a new thread.