LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about triggering value-update event on slide

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.

 

Untitled.png

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. Untitled.png

But mouse up event has a disadvantage. It won't trigger if we are dragging the slider outside the main bar. Any idea?

 

0 Kudos
Message 1 of 2
(2,820 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,797 Views)