LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Panel freeze after moving over graph

Solved!
Go to solution

Hi all,

 

I have a VI with a graph and various controls. The user sets up the parameters and sees the results on the graph using an event loop, and then presses start. Once start is pressed, the block diagram exits the event loop and performs actions connected to hardware.

 

I have found out that if after pressing start the user moves his mouse over the graph, the front panel freezes. If I remove from the event loop the "mouse move" event, it does not. This freeze happens after user pressed start and after the event loop was exited, so it should not affect anything at all. The block diagram continues running and the VI exits normally, but for the duration the user cannot press anything on the front panel.

 

I have attached a simplified version of our code. There is an event loop with mouse move and start, and after that it exits the event loop and waits for 30 seconds. If you don't move your mouse over the graph during these 30 seconds, you will be able to press on the tabs in the tab control. If you do, the front panel freezes and you can't press on these tabs any longer.

 

The workaround I am using now is to make the graph invisible after pressing start, but this is extremely inelegant. Removing the mouse move event is not an option. Does anyone have any ideas why this happens and how to solve it?

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 1 of 11
(4,108 Views)
Solution
Accepted by topic author dsavir

Your VI is password protected so I have no idea what your code is actually doing. If you are using an event structure, I suspect that your "mouse move" event has the following checked. If it does, then uncheck it to see if that helps!

 

even tstruct.png

Message 2 of 11
(4,096 Views)

Hi,

 

Sorry! Please find attached the file without a password.

 

The checkbox is indeed checked, but the event loop is not active once "start" is pressed (the while loop ends). Doesn't that mean that it should not matter?

 

Thanks,

Danielle

 

 

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 3 of 11
(4,081 Views)

I'm not sure what all this is doing, but I think the appearance of your code freezing is due to the 30 second delay you have to the right of your loop. Why is that there? If you wait thirty seconds after pressing start does the program exit?

0 Kudos
Message 4 of 11
(4,079 Views)

for static events the event is registered when the VI starts to run and remains registered.

 

So LV is doing what you told it to do "lock FP when the mouse moves over it".

 

YOu have two options;

 

Either un-check the "lock FP..." or use DynamicEvent registration so you can Unregister the mouse move event when you do not want it to be active.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 11
(4,077 Views)

Hi,

 

Zenthoef - it's wating for 30 seconds so that you can see that it freezes if you move over the graph. The original code is communicating with hardware. It does not freeze because of the wait, but only after moving the mouse over the graph.

 

Ben, thanks for the explanation! Unfortunately, I tried unchecking the "lock front panel" and it made the situation worse - now the front panel is frozen almost all the time (even before pressing start). I'll give dynamic event registration a shot.

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 6 of 11
(4,070 Views)

Which event did you uncheck the "lock front panel" for that mad ethe problem worse?

0 Kudos
Message 7 of 11
(4,068 Views)

Hi,

 

I unchecked on Intesity Graph: mouse move.

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 8 of 11
(4,063 Views)

Danielle - 

 

Something else is probably wrong. I unchecked the "lock front panel" boolean like I suggested in my first post. On start up I could select all of the tab controls, and everything else seemed fine. Then, I pressed "start", moused over the intesnity graph, and the front panel was not locked. Did you change something else from the code your posted besides unchecking the "lock front panel" boolean for the mouse move event?

0 Kudos
Message 9 of 11
(4,060 Views)

zenthoef - 

 

You are right, when disabling the graph-visible I enabled some other code that caused the problem. your solution worked great!

 

Thank you both very much!

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 10 of 11
(4,045 Views)