From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass waveform chart in a loop in a sub vi to calling vi

It has been awhile since I made my last application.  It has escaped me how to run a VI with a loop in it as a sub VI and still pass the waveform chart up to the calling VI.  I am trying to use the Bridge Continuous example as a sub VI and pass that waveform chart up to the calling VI that selects which load cells to monitor.  But when i run the calling VI it stops at the sub VI with a green arrow.

0 Kudos
Message 1 of 3
(2,527 Views)

Your acquisition needs to run in parallel with your main loop.  You should also use a queue or notifier to send that parallel process commands (like to stop).  I would use a User Event to send the data from your aquisition to your main loop's event structure.  You can then update the chart inside of the event structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,524 Views)
Of course the main stops. That's basic dataflow. You can make the subVI visible. That will display the chart and the stop button for the loop. You can change the subVI so it doesn't have a loop. Place the loop in the main. You can pass a reference of a chart in the main to the subVI. This would require you to pass a stop to the subVI and this would have to be in a separate loop in your main.
0 Kudos
Message 3 of 3
(2,519 Views)