LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW user interface event structure "priority"

Do Pane events get processed first and then control events?

 

I have a VI that checks a value change of button that is latched and it also checks for the mouse down event on the Pane.  I noticed that the Pane event gets processed and then the value change of the button.  This is not too critical at this point for my project but was curious if this is on purpose.

 

Attached is a VI that does this.

 


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 1 of 6
(4,000 Views)

That seems logical since the control is contained in the pane.

 

Ben64

0 Kudos
Message 2 of 6
(3,997 Views)

Hi Terry,

 

I have a VI that checks a value change of button that is latched and it also checks for the mouse down event on the Pane.

Your button is set to "latch when released" (aka latch on mouse-up).

So it seems very clear to me that you first get the mouse-down event followed by your value change event, which is the same as a mouse-up event in this very case…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(3,991 Views)

@GerdW wrote:

Hi Terry,

 

I have a VI that checks a value change of button that is latched and it also checks for the mouse down event on the Pane.

Your button is set to "latch when released" (aka latch on mouse-up).

So it seems very clear to me that you first get the mouse-down event followed by your value change event, which is the same as a mouse-up event in this very case…


Good catch. I built a simple vi with a boolean mouse down event and pane mouse down event. The pane mouse down execute first when the boolean switch is pressed.

 

Ben64

0 Kudos
Message 4 of 6
(3,984 Views)

No matter what the mode of the boolean mechanical action, the mouse down pane always runs before the value change of the control.

 

See attached VI where I output the event type to an array so we can see what actually ran and in what order.

 

I am looking for deeper feedback on the order of how things run in LabVIEW behind the scenes.

 

 


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 5 of 6
(3,975 Views)

When debugging what event occures in what order, I usually find the Event Inspector Window helpful.  It basically tracks the queue that LabVIEW uses and shows the order that events are generated and handled.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvdialog/event_inspectorwindow/

https://decibel.ni.com/content/blogs/Sixclear/2013/11/04/vi-high-51-event-inspector-window-flushing-...

Message 6 of 6
(3,908 Views)