キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Can you fake a real-time VI?

Hey everyone,
 
I am wondering, is there a way to make a background VI, which is running the entire time that labview is running, process as-if it were being run on LV real-time without upping the priority? 
 
Basically I am trying to figure out how to properly program a VI which monitors safety interlocks on a high power laser system at VERY regular intervals.  I know that getting the real time pci card would be the best bet, but this VI is part of a redundant interlock system in which a second interlock system is completely analog... therefore if this one fails nobody gets hurt.  BUT... i don't want this one to fail.
 
I don't want to have to up the priority of this background VI because the foreground VIs that will be displaying the current laser parameters, location, camera images, etc., will need as much juice as they can get to stay near real time.
 
For reference;
the background VIs will be monitoring a PCI-6503 daq card, as well as handling a bunch of globals
the foreground VIs will be retrieving images from 2 CCDs, retrieving position info (2 signed ints), and sending out position info
              -----The rate at which the position info is handled needs to be... basically... FAST AS HELL!!!!
🙂
 
Thanks,
 
Jonathan
0 件の賞賛
メッセージ1/8
3,765件の閲覧回数
Hi,
 
You are basically talking about running two VIs in parallel and ensuring that one of these (background VI) does something at VERY regular intervals. I my opinion, there is no problem running any number of VIs in parallel BUT since this is a software dependent operation if the OS or even LabVIEW decided to take more processor for some other task, your background VI may not run as regularly as you want it to.  
 
Hope this helps,
Ankita

Message Edited by Ankita on 06-26-2006 10:55 AM

メッセージ2/8
3,741件の閲覧回数

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

0 件の賞賛
メッセージ3/8
3,731件の閲覧回数

Oh and I meant to give you five stars but clicked on 4.  Sorry!

🙂

0 件の賞賛
メッセージ4/8
3,728件の閲覧回数

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.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
メッセージ5/8
3,722件の閲覧回数
Kevin,
 
Thanks for the reply. 
 
I think maybe the key, as you said, will be to reduce the priority of the front panel...   Also, is it possible to start the labview in a 'locked' full screen mode?  I mean like this... VI runs when opened, as it opens it stretches to full screen... then while it's in full screen mode it shuts down windows explorer et al. so pretty much only labview is running.  By 'locked' I mean so that the only way to leave full screen labview is to end the program, at which point windows would restart the explorer et al.
 
thanks,
 
jonathan
 
 
0 件の賞賛
メッセージ6/8
3,716件の閲覧回数

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.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 件の賞賛
メッセージ7/8
3,706件の閲覧回数

Alrighty... seems like a good time to start a new thread.

 

0 件の賞賛
メッセージ8/8
3,699件の閲覧回数