LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed/While Loop VI Execution Priority - General Questions and Help

Hi All,

 

I've written a top-level PC VI for an "accelerometer tester." Basically it consists of three major structures: One Timed Loop that fires every 25 msec and collects all of the data from an FPGA FIFO. This is my only time critical strucure. Additionally, I have a While Loop (with a 100 msec wait) that sends configuration parameters to my FPGA, and while loop that holds an event structure with several events. Unfortunately, I am unable to post the VI, but hopefully I've been descriptive enough.

 

The issue that I am running into is that one of my events in the third loop is to stop reading the FIFO (for that channel) and parse all of the data that has been acquired, and the execution of this parse VI being (relatively) long, nevers finishes executing. My working assumption is that it gets interrupted by that Timed Loop and never finishes parsing the data that has already been collected. I have multiple channels that are all independent of one another, so it is important that the Timed Loop keeps running even if the "Parse Channel 1" event has gone off.

 

Basically, I want to understand how Labview handles situations like this. Will a VI continue operation where it left off if it is interrupted? Is there a better architecture to handle a situation like this? I've read a bit about producer/consumer, but I'm still not understanding it or if it is even applicable in this situation. In a perfect world, my "Parse" VI would start when the event occurs, pause when the Timed Loop fires, and then go back to executing. Is this even possible.

 

Sorry if this is too general/long of a question, but I think it would go a long way to me understanding how Labview executes structures.

 

Thanks for any and all help!

 

- Scott

0 Kudos
Message 1 of 3
(2,508 Views)

What hardware are you running this all on? I understand you can't post code, but can you post even a high-level hand-drawn block diagram showing how things fit together?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(2,491 Views)

Without seeing some code it's going to be very difficult to address your specific situation. LabVIEW handles parallel code at different priorities the way you would expect - if a higher priority loop needs to run, the code that's currently running is suspended, and then resumes when the processor is available. There are a lot of things you can do in LabVIEW to affect the relative priority of different loops.

 

Why are you using a timed loop to read from the FIFO? Do you have a long timeout value for the DMA FIFO Read? That can quickly consume a lot of processor time (at least on RT; I haven't tested if this applies to a VI running on Windows).

0 Kudos
Message 3 of 3
(2,477 Views)