LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I keep a Window resize from holding the CPU and temporaily interrupting the Labview application?

I am performing a data aquisition in one VI at 10000 Samples per second, then averaging 100 samples every 10 msec.  This runs in a loop and I monitor the time of the loop.  Another VI pulls the single point result of each 10 msec average and plots it to a graph.

 

If another window on the Windows XP operating system is re-sized the LabVIEW VI performing the Acquisition suspends until the resizing is complete and I can watch the loop time go from 10 msec to whatever time the other window is being manipulated (100, 200 300 msec...).  The resulting graphical display will then show the next averaged plot point (this is a point to point drawing) without any of the 'real' analog activity that occurred during these +10 msec interruptions (the dataq VI pulls more than 100 samples to perform the averaging).

 

Does anyone know how I can prevent the resizing from taking such a high priority on the CPU?  For various reasons I do not want to change my data acquisition scheme.

0 Kudos
Message 1 of 4
(2,821 Views)

Hi there

 

if you want to pass data without loss you should use a method that allows buffering of data, e.g. queues. Take a look at the LV documentation (there are several solutions, but a named queue is the easiest way to go for such sort of applications).

 

Then take a look at the documentaion of the property VI.FrontPanel.DeferPanelUpdates, maybe this will also help.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 4
(2,818 Views)

chrisger  says: "if you want to pass data without loss you should use a method that allows buffering of data, e.g. queues. Take a look at the LV documentation (there are several solutions, but a named queue is the easiest way to go for such sort of applications)."

 

Actually, one VI is running as the executable and the other is called dynamically.  The Dynamic VI uses a queuing vi common to both to access the data.  This part works well, it is the interrupt of the main vi perfoming the data aquisition that is the problem. 

 

Because I am not using the full buffer of data, but only whatever portion is acquired and then averaged, the graphing vi essentially gets two (software timed) points and draws between them. 

 

I realize software timing is bad, but I am kinda stuck with this scheme.  So, I want to minimize the interruption when a non-related window is re-sized.

0 Kudos
Message 3 of 4
(2,806 Views)

I think that this is really a windows thing that you will not be able to do much about. Have you tried setting the priority level of the main vi. This might help. Not really what else you could do.

 

If everything is so time critical why are you using a windows machine.




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 4
(2,800 Views)