LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating progress text from multiple SubVIs

Hi, I am experimenting with a product test program, and I would like to have a single string on the front panel of my main test VI, that shows the current progress of the overall test. What is the best way for a series of subVIs to update a single front panel control with a progress string, as they finish their individual tests? Is this commonly done?

 

Additionally if I wanted a progress bar as well or instead, is there a way to update it from a variety of VIs? Thanks for any advice.

0 Kudos
Message 1 of 6
(2,455 Views)

What kind of progress bar are you talking? You mean the order in which sub vis finish executing? You can use a property node of a front panel object and pass the references to the sub vi to update the value from the sub vi. You have to give little more details, either a snapshot of the vi or the vi.



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
0 Kudos
Message 2 of 6
(2,452 Views)

Thanks for the reply. The application is not written yet, but it would have "Test 1" VI wired to "Test 2" VI wired to "Test 3" VI etc., so that during Test1, the progress 'string control' on the front panel would show "Performing Test 1..." and when Test2 VI starts, that would change to "Performing Test 2..." and so on. I would like each subVI to update the same control on the main panel.

 

Same idea for a progress bar, it would just advance a 10th of the way for each of the 10 tests.

0 Kudos
Message 3 of 6
(2,444 Views)

pick your flavor....

Example_VI_BD.png

0 Kudos
Message 4 of 6
(2,441 Views)

The best way would be to use a queue. Follow the steps

 

  • create a queue and have the reference in a global variable
  • Create a seperate loop in the main vi and place a string indicator
  • Dequeue in the seperate loop you created and wire the string output to the indicator and wire the error terminal of the loop to the terminate loop and timeout as -1 or leave it unwired
  • Enqueue the status string from different sub vi into the queue using the global variable you created

You are done. This would be simple and also parallely you can write the data to a file so you can maintain a history log.

 

Progress bar.. Its tough unless you know the execution time or how many time you execute and everything.

 

Good luck

-----

The best solution is the one you find it by yourself
Message 5 of 6
(2,420 Views)

Another solution that should work is a sub-vi panel which only holds information fields and doesn't do anything. Inputs would ofcourse be the string controls of similar.

 

From all processes, you can run this vi updating it's fields and if it's a shown subpanel it should update the information.

 

Sort of a GUI-vi.

 

(I did some tests a long time ago with a similar idea to have easily changable GUI look and feel) 

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(2,414 Views)