LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse click in slider control triggers two instances of event queue frame

If I change the value in the numerical control slider's digital display window, only one instance of the
event queue frame tied to the slider is executed. But a single mouse click in the slider control to position the wiper causes two instances of the frame to execute, both using the same, new value. Any ideas? Thanks.
0 Kudos
Message 1 of 10
(4,187 Views)
I do not see that behavior in LabVIEW 7.1 or 6.1. Which version are you using?

Are you using the Value Change event? Could you attach the VI in question that has the odd behavior?

Dan Press
Certified LabVIEW Architect
PrimeTest Corporation
0 Kudos
Message 2 of 10
(4,174 Views)
I didn't see that problem either.
Message 3 of 10
(4,171 Views)
Photon Dan and JoeLabVIEW --

Thanks for the responses. At your suggestion, I made a simple event queue loop with sliders like the one that prompted my request for help. And, like you, there was no spurious second instance of the event. My original program is written to effect serial comms with a DUT and GPIB comms with an array of test equipment. A slider value change by clicking in the slider proper launches two identical sets of serial and GPIB writes. But a discrete numerical entry in the digital display tied to the slider launches only one.

The test program that I wrote to confirm your observations was not run on the same PC as the one exhibiting the aberrant behavior. Maybe there is a windows or mouse hardware or mouse mechanical action or antivirus or other background TSR issue. I will try my test program on that PC as soon as I can. Then I will add a new slider to see if it does the same thing as the originals. There are three in the GUI. I made the first, then copied it, so if the first was somehow corrupted, the others would be, as well. (The code would need a few mods for you to try to run it without the GPIB card and the externally connected equipment, and the excised code may prove to be part of the trouble.)

Thanks again for your generous responses. I will post a resolution if I find one.
0 Kudos
Message 4 of 10
(4,149 Views)
Hello again from the original poster!

The 2-times execution behavior is tied to my changing the allowed data range from inf to minimum 0 and maximum 35, with increment of 0.1. As soon as I make this change, any click in the slider bar itself will launch two instances of the event queue frame (both using the same, new value). I can still enter a numeric value in the slider's digital indicator, and only a single instance of the frame will be launched. I may be configuring the control illegally, but there is no error message. It is essential to limit the numerical values available to the end user. I haven't found a work-around. If someone at LabVIEW or anywhere else has anything to contribute, feel free.

Thanks.
0 Kudos
Message 5 of 10
(4,136 Views)
Hi Walter!

I see exactly what you are talking about. This is unexpected behavior and needs to be addressed by R&D, but this is due to the coercion taking place when you change the value (coercion for min and max values and for increment). Notice that if you hold down the mouse button, events will be continually generated. This is due to the value changing to wherever you clicked and then again when it is coerced (and then repeat if you are holding down the mouse button). One way to get around this would be to "ignore" (instead of coercing) the increment value and to make the min and max values the outermost values of the slider.

Hopefully this helps!
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 6 of 10
(4,113 Views)
To Justin H of NI --

That works! Thanks very much! [Choir sings, bells ring, sun emerges from clouds, Penelope Cruz drops by unannounced....]
0 Kudos
Message 7 of 10
(4,105 Views)
Travis! I meant Travis H ....
0 Kudos
Message 8 of 10
(4,103 Views)

@walterwalker wrote:
Penelope Cruz drops by unannounced....]



Glad to read that you got a solution..



Wow...

I wish P. Cruz would drop by everytime I fixed a bug.. 😉
She'd never leave..

😄

Thinking to myself...

"... now would THAT be a problem??? ..."

😄

Message Edited by JoeLabView on 04-21-2005 12:36 PM

0 Kudos
Message 9 of 10
(4,074 Views)
"This is unexpected behavior and needs to be addressed by R&D,"

This may be correct behaviour...

What if you wanted to display a big flashing sign that says "Do not exceed limits!"?

Two events may be correct.

Hmmmmmm

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 10
(4,063 Views)