LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting slider value property triggers two new events!

Highlighted
Since upgrading to LabVIEW 8.0 (including 8.0.1), I'm noticing what appears to be a bug with slider controls.  If a program changes a slider control value (via a local variable or property node) in response to a slider value change event, two additional slider value change events are triggered.  This behavior is as if I had set a pair of Value (Signaling) properties.  Oddly enough, the two erroneous events are not generated if the user initiates the event by changing the "text ring" on a slider control having text labels turned on instead of manipulating the slider thumb.
 
Note that this problem is different from the slider control event issues in earlier versions of LabVIEW where moving a slider could generate an event for every intermediate value the slider passed through.
 
See the attached file for a demonstration of the issue.  I have not found an acceptable work-around yet.  Let me know if you know of one or if NI developers will be addressing this issue.
 
Larry
0 Kudos
Message 1 of 3
(720 Views)

I just wanted to let you know that I have reported this behavior to engineering (CAR# 3VEGOSQQ) for further investigation. A possible workaround, while not the most elegant, is to use a shift register as a flag for ignoring certain events. When you use a local variable, you could write a 2 to the shift register, and then for each subsequent event, ignore the usual event code and decrement the shift register until the shift register reaches 0 again.

Thanks for the superb example VI and the feedback!

Kind Regards,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(703 Views)

Thanks for the follow-up and the suggestion.

Because I only had to reject the last 3-way switch option under specific conditions in my application, the workaround I implemented was to change the Data Range Maximum property from a value of 2 to a value of 1 and to set the DisabledItems[] property = [2] when conditions called for this option to be disallowed.  Your suggested workaround would be a good solution if the middle option had to be disallowed in certain situations.

Thanks!

Larry

0 Kudos
Message 3 of 3
(693 Views)