LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while Loop interrupts as long as an other VI is loading

I work with a LabVIEW Application where I have to load different VI's
during runtime. I call them over the Run-time-menu and Property Nodes
(FP.Open). If I open such a VI over the menu, my Application
interrupts while the called VI is loading by Windows (or LabVIEW).
To simplify my problem I made a VI with a while loop. The while loop
runs with a 100ms cycle (Wait) and diplays the loopcount (i) on the
Panel (Numeric Indicator I32). Now, if I load any other VI (manually,
doubleclick in the Windows Explorer), the while loop of the running VI
interrupts. If I load an other Application (for example Internet
Explorer or Word) it doesn't happen.
I tried to solve this problem with changing the priority and execution
syste
m in the VI preferences but there was no improvement.
So I guess the problem is LabVIEW it self or the task (thread)
management of LabVIEW.
Is there anybody who know this problem or may give me a solution?

Thanks
Roli
0 Kudos
Message 1 of 4
(2,878 Views)
Roli,

I tested this myself. What I found is that the front panel did not redraw while loading, probably because the User Interface was tied up with the Window that indicated load progress, but I can't be sure. However, what I found is that the loop still ran, and accumulated time. Instead of just displaying a count, I also displayed a delta time. Had the loop stopped running, the delta time would have jumped, while the loop count stayed the same.

Based on this information, you should rethink the problem you are having, and what you need to do to solve it. Remember, the code is still executing, it appears, but the front panel is not updated while loading a VI.

If you need front panel updates, then I would suggest loading in steps. Try just loadi
ng the VI into memory, and call the front panel later on. There are a number of solutions to this general problem, and probably a few for your specific problem.

Good luck
0 Kudos
Message 2 of 4
(2,878 Views)
This might not be practicle in every application, but is works.

Before entering the (time critical) loop, open references to every vi you
want to open during the loop. This takes time, but the time critical part is
not started jet. During the loop, open the frontpanel, and run the vi. Close
the reference afteer using it!

While opening the reference, the vi is loaded in memory.

Another method:

Make a case with all the vi's you want to open in the false case. Wire a
constant 'true' to the case. This way the vi's are loaded when you open the
main.

Different method, same principle, same effect!

Regards,

Wiebe.


"Roli" wrote in message
news:6f12c02.0111130634.156de2ee@posting.google.com...
> I work with a LabVIEW Application where I have to loa
d different VI's
> during runtime. I call them over the Run-time-menu and Property Nodes
> (FP.Open). If I open such a VI over the menu, my Application
> interrupts while the called VI is loading by Windows (or LabVIEW).
> To simplify my problem I made a VI with a while loop. The while loop
> runs with a 100ms cycle (Wait) and diplays the loopcount (i) on the
> Panel (Numeric Indicator I32). Now, if I load any other VI (manually,
> doubleclick in the Windows Explorer), the while loop of the running VI
> interrupts. If I load an other Application (for example Internet
> Explorer or Word) it doesn't happen.
> I tried to solve this problem with changing the priority and execution
> system in the VI preferences but there was no improvement.
> So I guess the problem is LabVIEW it self or the task (thread)
> management of LabVIEW.
> Is there anybody who know this problem or may give me a solution?
>
> Thanks
> Roli
0 Kudos
Message 3 of 4
(2,878 Views)
Hi Roli,

Is "FindFast" running on your machine? If so, shut it down and try your experiment again while trying to open IE or Word. This would make your experiment a apples to apples comparison rather than apples to oranges.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,878 Views)