LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Losing mouse focus when updating XY graph using call by reference

Hi,

I have a data acquisition program which reads a large number of variables (temperature, magnetic field, voltage 1, voltage 2 etc.).

I want to be able to create several different XY plots using any combination of them, while my data acquisition program is running. To this end I have a reentrant VI "graph panel.vi" with the graph on its front panel.

There is then an array of VI refnums (paired with the appropriate XY axis labels), which I can add to using open vi reference each time I want to create a new graph.

These are updated during the program cycle (by passing the entire 2*N array of values each time respectively) using "Call by reference node" once for each active graph.

The problem is that if the update happens when I am zooming or scrolling the graph, I lose mouse focus, which is rather annoying. Is there a way to avoid this?

Also, if the program is stopped, the open clone front panels can no longer be written to if I restart. This is not a big problem, but is it possible for the vi refnums to be persistent?

Cheers,

Alex
0 Kudos
Message 1 of 4
(2,837 Views)
I might be wrong, but I don't think there is.  I believe that when you update the window of one of the other graphs, it has to move focus to that window inorder to update.  You might be able to use the 'Bring to Front' property on the current window to regain focus (Or perhaps update it last), but not sure that would work.
Jon D
Certified LabVIEW Developer.
0 Kudos
Message 2 of 4
(2,812 Views)
Hmm. Is there not a way to defer the update until I have finished dragging the mouse?
0 Kudos
Message 3 of 4
(2,807 Views)
By catching a Mouse Down event or similar you might be able to track it well enough to stop updates (ie, on mouse down, stop updating until Mouse Up.)  Not something I've ever needed to do, so am not sure if that would work.
Jon D
Certified LabVIEW Developer.
0 Kudos
Message 4 of 4
(2,771 Views)