LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a progress bar with a timer

Solved!
Go to solution

Hi,

 

Im relatively a new user with labview 7 installed. I am trying to make a progress bar which fluctuates with a timer. I want to make a progress bar fill up gradually for 2 seconds, stay full for 3 seconds and then the progress bar to gradually empty for 4 seconds. I don't really know which time and dialog function I should use, and also what type of execution control will be required.

 

Any help will be appreciated,

 

Thanks

0 Kudos
Message 1 of 21
(7,487 Views)
Solution
Accepted by topic author nikky1989

Hi,

 

I don't know if I understand you right.

Do you mean something like this?

Process bar.PNG

Use any "fill slide" in the control panel, and set the maximum value to 40.

0 Kudos
Message 2 of 21
(7,480 Views)

Could you please explain what your code is actually doing. What is a process bar( i have never seen that before in labview)? What do you mean by fill slide?

 

If you could explain what i should be doing with a Pseudo code then i may be able to implement it.

 

Thanks for your quick response

0 Kudos
Message 3 of 21
(7,473 Views)

Hi,

 

If you open the control panel and go to Modern > Numeric, there are a lot of slide looks like this , wheather vertical or horizontalCapture.PNG

 

The process bar on the previous picture is just a control like this, and I changed its name.

 

What I did is as below:

1. set the maximum value of the slide to 40;

2. add the slide value by 2 every 100ms for 20 loops, which gives you 20*100ms = 2s.

3. wait for 3s.

4. minus the slide value by 1 every 100ms for 40 loops, which give you 40*100ms = 4s.

 

0 Kudos
Message 4 of 21
(7,465 Views)

@nikky1989 wrote:

. What is a process bar( i have never seen that before in labview)? What do you mean by fill slide?

 


He actually meant to say "progress" bar.

0 Kudos
Message 5 of 21
(7,461 Views)

OK, sorry.

 

But I meant the same stuff, didn't I?

0 Kudos
Message 6 of 21
(7,458 Views)

Hi,

another solution without the need of local variables.

 

Mike

0 Kudos
Message 7 of 21
(7,446 Views)

Ohh i see! yeahh!! a silly question but how did you get the orange wires? i tried to create it with a horizontal progress bar, but it does not "empty" the tank.

0 Kudos
Message 8 of 21
(7,442 Views)

Orange wires are a floating point datatype.  Usually double precision, but could also be single, extended, or complex.  Blue wires are integer datatypes.

 

If you are having problems with your VI, post it so we can what you are doing and tell how to correct it.

0 Kudos
Message 9 of 21
(7,423 Views)

 Zch0820

 

I have tried to implement the method that Zch0820 used. It seems that the tank is filling up and holding but it does not empty again. I have used the exact same method, i think.. i have attached the image of my vi.

0 Kudos
Message 10 of 21
(7,399 Views)