09-16-2015 05:13 AM
i need to set continuous slide values from 0 to4 and need to jump to 7 and from that to 9 in range of 10 values of single slider.
please get me out on this issue.
09-16-2015 07:54 AM
Use an Event Structure and Value Change Event.
Either that or you could make an XControl.
09-16-2015 11:56 AM
i have tried that already . i can able to move from 0 to 4 and taken a jump to 7. But, while jumping the pointer is shaking some what and stabilised later.
i need smooth transition of jumps from 4 to 7 value
09-16-2015 12:00 PM
That's probably because sliders generate value change events every slight movement.
Perhaps you can do something with a Mouse Up and Mouse Leave event for that control so that it only does the checking and forcing to a new value when you finally leave the control.
09-16-2015 01:23 PM - edited 09-16-2015 01:32 PM
You're going to want to skip the mouse across the gap, I assume. Otherwise it's going to bounce around while it tries to move the slider back to where the mouse remains.
I was curious how to do this, so I made this for you:
I hard-coded the horizontal mouse location (with respect to the pane) for 4 and 7. You could use the properties of the slider (bounds, scale range, etc) to figure out the pixel locations that you would use if you were to resize or move the slider or change the values away from 4 or 7.
This might not be exactly the functionality you were asking about, but it gives you a hell of a good start.
You'll have to download the VI (maybe?) instead of the snippet in order to make the hard-coded values work.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-17-2015 06:10 AM
can you make vi into 2013 version so that i can check
09-17-2015 08:51 AM
with mouse up and mouse leave options in addition to value change event, i am losing the option of old value which is available in value change event.
i need to compare slider value with previous value. so that i can jump to upper or lower based on old value. and also needs smooth jump.
09-17-2015 09:19 AM
Store the value that is in the control on the mouse down event in a shift register.
09-17-2015 10:36 AM
Here it is in 2013
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-17-2015 10:39 AM
@mubin wrote:
with mouse up and mouse leave options in addition to value change event, i am losing the option of old value which is available in value change event.
i need to compare slider value with previous value. so that i can jump to upper or lower based on old value. and also needs smooth jump.
I only use the value change event to check if the value has gone between 4 and 7, then I move the mouse if necessary. This eliminates any need for the other events.
Looking back at my code now, you should move the VI that pulls the current mouse position to inside the case structure.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'