02-01-2016 03:46 AM
Hi there,
I am creating a vi to use slide to control a range of values that is used to control the parameter of an hardware. My plan is to update the hardware once the value of the slide changed. I found that by using slide, the value change event is continuously triggered during dragging the tick.
In above code, I use an string indicator to represent an hardware update. I found that during dragging the slide, this even will be trigger before the slide is released. I don't want it to go that way. I want the value change event happens only when the value changed and only when the user's mouse up (that's release the slide). I ever try to use mouse up event instead.
But mouse up event has a disadvantage. It won't trigger if we are dragging the slider outside the main bar. Any idea?
02-01-2016 04:20 AM
Hi PKIM,
ideas:
- set range and a suitable increment for your slider. This will limit the amount of "value change" events drastically!
- store the last "good" value of your slide in a shift register. Update your string only when there is a "significant" change in value when compared with stored value…
- use a "mouse leave" event to avoid "mouse release outside control"…
- don't use a slider when you're worried about too many "value change" events…