ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

button to increase slide

Please, how can I create a button to increase, and decrease a slide ? Thank you, Juscelino
0 Kudos
Message 1 of 9
(4,213 Views)
What do you mean by this request? I am not sure if you want buttons that will increase the value of the number displayed by the slideder or you want to make the minimum and maximum change.
Tim
GHSP
0 Kudos
Message 2 of 9
(4,204 Views)
You can use an Event Structure with a Local Variable.  I added the In Range and Coerce check to prevent going beyond the limits of the slide.

Example_VI.png
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 9
(4,180 Views)
Please,what is the name of this icon between unbundle by name and  the  slide ?
Thank you
Juscelino
0 Kudos
Message 4 of 9
(4,164 Views)
In Range and Coerce

That image is a Snippet.  You can drop it onto your Block Diagram if you're using LV2009.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 9
(4,162 Views)

could you help me?
My VI only increase but not decrease the slide.

two events are ?
where is the difference between the increment event and the event decrement ?

 

I am sending the vi.
Thank you
Juscelino.

0 Kudos
Message 6 of 9
(4,140 Views)

Hi Juscelino,

 

"two events are ?"

Don't know what you say here...

 

"What is the difference..."

The point is: both are same (more or less). When you want to decrease a value you should use a subtract instead of a add function... Just use proper debugging using the highlighting tool!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(4,136 Views)
solved. thank you very much.
Juscelino.
0 Kudos
Message 8 of 9
(4,133 Views)
I adjusted your code Try this. I have both increase and decrease in the same event. There is no reason to have both.
Tim
GHSP
0 Kudos
Message 9 of 9
(4,130 Views)