LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Help, very simple event button problem, not working.

Solved!
Go to solution

Hi Guys,

 

Very strange problem. Only when I "highlight execution" it works; otherwise, it is not working.

Just want to click the "next page" button, and goes to next page on the "tab" control.  What am I

doing wrong here?  I am using LabVIEW 9.0f3, under windows 7.

 

Thanks so much!

Weiyuan

------- LabVIEW 2009, So Easy, Even a Therapist Can Do It -------
0 Kudos
Message 1 of 4
(3,187 Views)

It works fine to me, but I'm using XP.

 

If this is not because of the OS, then the only though that comes to my mind is the time delay. Maybe somehow the cpu is totally taken by the program without the time delay and it does notget your UI event. Maybe this is why it works with the "highlight exe." turned on.

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
0 Kudos
Message 2 of 4
(3,186 Views)
Solution
Accepted by topic author Weiyuan

Why are you using the mouse down event?  I've got a feeling you've got basically a race condition between the user doing a MouseDown on the button and the execution of the event.  Because the event fires immediately, it will occur while the user still has the button pressed down and within the context of that tab page.  So the tab doesn't change and the button doesn't pop back up.

 

You should use a Value change event for the button, set the button's operation to Latch When Released, and move the terminal of the button inside the event case for the button's value change.  Then you can get rid of writing a false to the local variable and eliminate the flat sequence structure as well.

Message 3 of 4
(3,173 Views)
Thanks, I change it to "switch when released" and it works.
------- LabVIEW 2009, So Easy, Even a Therapist Can Do It -------
0 Kudos
Message 4 of 4
(3,168 Views)