LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loopy LabVIEW QMH issue

Solved!
Go to solution

So this is a bit of a long explanation so bear with me. Attached images for reference.

I am writing a small program for reading TDMS data and displaying on a large graph.

Decided to go with QMH because it's what I know(ish).

I have a path that user defines on the UI to input the path to the tdms file, then I have them press the run button. That fires off a second loop which I have inside of another VI. As seen below the MHL on the main block diagram (TDMSreadermainvi.png).

In that vi I have the open and read tdms. Then this is where the issue begins.

If I run it as shown in the images, the graph does not load until I exit the program.

So I placed a true constant to end the loop once the data was read and displayed, works great as long as you don't want to use that TDMS reader loop again. Which I do with the export function (eventually) or read in another file without having to close the whole program and start over.

So my thought was even if I stopped the tdms reader loop which essentially ends and closes the sub vi, wouldn't hitting the run or export button again restart the sub vi because it's being called inside the MHL?

 

Download All
0 Kudos
Message 1 of 5
(2,796 Views)

You have a (possibly complex) problem that involves multiple VIs and multiple "states".  I was going to write "I did not even bother looking at your pictures of your VIs", but decided that would be too rude, so I discarded that reply, looked at your pictures, and can now say that in order to spend my time trying to look at and understand what you are trying to do in order to help you, you need to attach your entire LabVIEW Project (or at least all the parts that involve the QMH) in order for me to have any realistic expectation of providing some useful help without a huge investment of my time (for which you are getting at much below the "going rate").

 

Bob Schor

0 Kudos
Message 2 of 5
(2,789 Views)

Thanks for taking the time to reply and I can understand your request. Attached is the entire project with some sample data included.

Thanks again.

0 Kudos
Message 3 of 5
(2,781 Views)
Solution
Accepted by topic author russ_comer

As @BobSchor would say think data flow!

 

I have not examined your project in detail, but here is a reason the graph is never updated.

 

You have a loop that reads the TDMS file, until that loop finishes, no data is coming out of that subVI. It does matter that that you have an indicator in that subVI. Only when the loop is finished does the data leave the loop, and thus your graph is updated.

 

A couple options:

  1. You need to make another loop and send messages to that loop to update your plot.
  2. You can open the front panel of your TDMS Read subVI and display the plot there. Maybe do this in a subpanel.
  3. Have you tried the TDMS File Viewer in the TDMS palette? It is a built-in way to open and display TDMS files.

mcduff

0 Kudos
Message 4 of 5
(2,764 Views)

I want to eventually add more functionality to this down the road depending on what is wanted/needed. So I will look into creating another loop to handle updating the plot. Now that you mention doing that it makes a ton of sense.

Thanks!

0 Kudos
Message 5 of 5
(2,721 Views)