LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time waveform graph in while loop

How about posting what you've got at this point? It's not quite clear to me if you have variable time between acquisitions or not (you say "about 8 values every 15 seconds," as opposed to "8 values about every 15 seconds").

If you are primarily trying to plot multiple channels of variable-time data, then you might want to take a look at this thread and the example it refers to.

--John
0 Kudos
Message 11 of 16
(3,399 Views)
Johnner,
Sorry for the confusion. This seems to be the biggest problem with forums in general.

I have 8 channels plugged into my system, (say 5 thermocouples, 2 mass flow controllers and a gas monitor). We sample all 8 channels at one time. The time interval is usually 15 seconds. I created a while loop that would sample these channels and write all 8 values and the calculated elapsed time to a spreadsheet file.

What I need is a chart that shows this data as its being collected. I've thought of just reading the data out of the file and plotting it, but that seems redudndant and I'm not sure if I'l have file sharing issues.

I've attached a sample of what I've been trying. It's not complete by any means but is generally what I need.

Thanx
0 Kudos
Message 12 of 16
(3,392 Views)
Yes, text-based communication is inherently tough, since meaning is conveyed through more than just the words. But you just can't get your questions in front of a better audience than this one.

Thanks for attaching the code. Unfortunately, you make use of a number of subVIs that I don't have, including some that I could probably get by installing a driver (FieldPoint), and some that appear to be your own creations (make data string.vi and Seconds_to_Elapsed_Time_String.vi). Next time, when you're sharing code that uses subVIs of your own design, you can make sure to include them by choosing File >> Save with Options, and choosing "Development Distribution." That will make a library that includes the custom subVIs.

I could still open your main VI and see the general outline, and that's probably enough. The fact is that presenting a real-time chart of data with a variable sampling rate is difficult (mostly because it's potentially very memory-intensive), and I don't think there's a solution in the Express VI palette. In fact, I think it's best to refer back to my last post and suggest that you make friends with the the "XY Chart Buffer.vi" that ships with LabVIEW. (Help >> Find Examples, and search for xy)

This is a difficult example for several reasons, but it shows how to effectively manage variable-time chart data by using one instance of a reentrant subVI for each channel of data that you are plotting. What you would end up with if you expanded your VI to use this approach is 8 instances of the "XY Chart Buffer" subVI, with all 8 outputs built into an array that feeds into your XY Graph.

It may be time to reconsider whether you need to solve this problem right now, or whether a simple waveform chart with a fixed sampling period will give your operators a good enough sense of the shape of the data over the course of a day. You can always do what you suggest, and read the data into a graph from file if an operator wants to take a closer look with more exact timing information.

Some ideas,
John
0 Kudos
Message 13 of 16
(3,384 Views)
Johnner,

Thanx again. My apologies for not checking your link earlier. This may be what I was after. I don't actually have a 'variable' time on the x-axis. It will be a fixed rate (4/min), but I don't really want to hard code that in, because someone is libel to change it.

The XY buffer seems to do what the other chart I was using did. If you find the example "Data Logger to Spreadsheet File.vi" you'll see what I mean about its limited use. It works great if you always have the same data set. Not many options for the user to select one. It also stores time of day, not elapsed time. This is why it’s easy for it to create the chart. My next issue will eventually be, how can I let the user select which channels to record?

This should solve the problem for now.

Thanx for the help.
0 Kudos
Message 14 of 16
(3,380 Views)
hi ben,

Actually i'm having the same problem as yours...i also want to plot the continuous graph. I wanna plot a graph for a random numbers of 10 in each cycles and i need to run for 500 cycles. So, if i use the build XY graph, the graph will be compressed as the number of cycles increased. So, i think i wanna setup the x-axis so that only 2 cycles can be seen in a graph, then, it will run continuously for the next 2 cycles and so on...so, does ur problem solved? so, i need ur favour on how to overcome this problem...

Thanx,

nazreen
0 Kudos
Message 15 of 16
(3,267 Views)

Hello,

I want to a set of data coming from a DAQ with respect to elapsed time.As I have used a timed loop to take multiple readings the current graph shows me the data value w.r.t. the time step which I had mentioned in timed loop.But I want to present the data value w.r.t. the actual elapsed time.

 

Can someone help me out?

0 Kudos
Message 16 of 16
(1,881 Views)