LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to add abort (stop) button to progress bar

Solved!
Go to solution

I wanted to use a fancy progress bar in my application, so yesterday through some searching I found this VI Package Manager which I can DL and install addon VIs. In the program I found a cool progress bar. I got it to work good but decided I wanted to add a stop or abort button to the progress bar so that I could stop/end/close the progress bar VI and have a (bool) panel connection so that I could effectively end the test process running in my main VI. I am not sure why the event case (Cancel Button: value change) I added to the "main progress bar.vi" file is now generating an error with the Open VI Reference function in the "Launch Progress Bar.vi". If I remove the case that I made the function works again. 

 

I'm new to LabView and some of the code is a bit beyond my core 1 skills, so if anyone could help me figure out what I am doing wrong and how to accomplish my overall goal (adding the stop button) it would be much appreciated.

0 Kudos
Message 1 of 10
(3,471 Views)

Can you clean up your zip file and reattach?  It is filled with empty folders that are unrelated to LabVIEW or your project.  I can't find the VI in there.

0 Kudos
Message 2 of 10
(3,451 Views)

Boolean Buttons have a "mechanical action" that controls how they behave when you push them.  Buttons that are designed to "trigger an action" by generating a "Value Changed" event are generally set to "Latch when Released", which means that (a) the Event fires when you release the button, and (b) the button stays down ("latched") until it has been read.  For this reason, such Buttons ("Stop", "Cancel", "Start", "Abort") are usually placed inside their respective "Value Changed" Event so when they "fire" (because you released them), they reset to their default value.  Such Boolean Controls can not be programmatically set, not by a Value-changed Property, not by a Local Variable.  [If you try, you may notice that the input isn't "Boolean Green", but "something else Purple"].

 

Bob Schor

0 Kudos
Message 3 of 10
(3,447 Views)

I don't know how I can clean it up, when I view the .zip folder it looks as it should on my machine.image.png.

I attached the two vi in question if you find you need any others let me know.

Download All
0 Kudos
Message 4 of 10
(3,442 Views)

Bob, 

I think I understand how buttons work or at least in the way I am trying to use it. I don't think I have "programmatically set" the button. The button is in the case I am using it in.

 image.png

0 Kudos
Message 5 of 10
(3,433 Views)

The error (1031) you are receiving  is because you changed the connector pane so that the launch-VI cannot open the VI. just remove that abort button from te connector pane and it works.

Certified LabVIEW Architect
0 Kudos
Message 6 of 10
(3,430 Views)

I misunderstood, I appologize; however, I still get the same error even if I disconnect the button from the connector pane. 

0 Kudos
Message 7 of 10
(3,425 Views)
Solution
Accepted by TheWolfmansBrother

@TheWolfmansBrother wrote:

I don't know how I can clean it up, when I view the .zip folder it looks as it should on my machine.image.png.

I attached the two vi in question if you find you need any others let me know.


Very strange.  I clicked on your original link again to show you the crazy directory tree I got, but this time around, it looked okay and just like you show above.

 

To fix your error, open up Launch Progress Bar.vi.  Drag the icon from your actual Progress Bar.vi on to the VI reference in Launch Progress Bar, hIghlighted in red.  It will fix the connector panel there, and all will work.

 

Message 8 of 10
(3,422 Views)

@TheWolfmansBrother wrote:

I misunderstood, I appologize; however, I still get the same error even if I disconnect the button from the connector pane. 


What VI do you run and what error do you get?

Certified LabVIEW Architect
0 Kudos
Message 9 of 10
(3,413 Views)

Yeeeeeaaaa! Thank you.

0 Kudos
Message 10 of 10
(3,408 Views)