LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

slide fill option

Hello,

 

I'd like to know how do I controll the slide to be filled but not Immediately.

I mean that it would take the slide few seconds to be filled to it's value and that it will be continuously and slowly .

 

thanks and regards

Shay

0 Kudos
Message 1 of 7
(4,162 Views)

Put your code into a For Loop and add a Wait function.  For every iteration of the For Loop, it will "fill the slide" a bit more.

http://www.medicollector.com
0 Kudos
Message 2 of 7
(4,155 Views)

Shay,

 

Did you mean that you want to move the slider, say by clicking at a new setting and then have the fill slowly change from the old value to the new one?

 

To do that you can use two sliders on top of each other.  The top one is the control.  Its fill area is colored transparent.  The bottom one is an indicator and its slider is colored transparent.  When the control is changed the difference between the old value and the new value is used to slowly change the indicator.

 

Note that if the control slider is dragged (as opposed to clicking at the new value), many events are generated and the response is excruciatingly slow.

 

Lynn

 

Attachment in LV 2010

Message 3 of 7
(4,144 Views)

Hi again,

 

Thanks for your replay.

I'll try to explain myself better.

I have a slide which represent a process thats takes time.

The slide's input is random and represent the process duration.

Let's say the process take 5 sec - the slide will be filled slowly and will reach it's value after 5 sec. if the proess takes 2 sec it will take the slider 2 sec to be filled.

the viewer should consider the slide as "timer" for the process.

 

thanks again

Shay

0 Kudos
Message 4 of 7
(4,135 Views)

Hi Josborne

 

Did you mean that I should put only the slide and it's input into a for loop?

What should I do with the rest of the program? The slide will get it's input and will fill the slide step by? How do I know how much iteration do I need?

Let's say I'll put it in a 10 iterations for loop with 0.5 sec of wait time? Won't it just cause the slide to stay "empty" for 5 sec and then filled at once?

 

thanks

Shay

0 Kudos
Message 5 of 7
(4,131 Views)

This would be in it's simplest form. The loop would be parallel to the rest of your code.

The slider range is 0 to 100 (default) or 0% to 100% of the wait time.

 

The needs of YOUR program may require you to integrate this into the loop of your other code.

Slider Wait Time.png 

Omar
0 Kudos
Message 6 of 7
(4,119 Views)

You could also program it with a For Loop that takes into account the maximum value of your slider, so that you can have a little more control on the feel of the timer

 

slide timer.png

National Instruments
Applications Engineer
0 Kudos
Message 7 of 7
(4,092 Views)