LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting multiple runs on one graph

Hello all,

 

I am trying to write a program where data is recorded for a length of time determined by the user, and each run is plotted on the same graph. The problem I am having, is I can either reset and lose the previous run, or, it pauses then the same run jumps back to zero. I am unable to plot multiple runs onto the graph. I have tried to use an array and shift registers, but it still had the same errors.

 

Thanks!

 

Edit: added capture of attempted fix that did not work.

Download All
0 Kudos
Message 1 of 6
(2,465 Views)

(Posting by phone, cannot see vi)

 

Do all "runs" have the same number of points and timing? Are the points spaced equally in x?

 

As a first step, try to eliminate that bewildering collection of datatype (express, waveform, array, clusters, etc.).

0 Kudos
Message 2 of 6
(2,449 Views)

No, the X is not going to be consistent, the length of run is determined by factors outside of the users control. And the data type is a result of opening the front panel on the express graph, it is currently the only way I can get my data to express at all. (it is coming into the loop from a parallel loop as dynamic data)

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

Egad -- I've tried to steer students learning LabVIEW away from the Dreaded DAQ Assistant (DDA) and its Evil Twin, the Dynamic Data Wire, and now I see a Producer/Consumer Design based on the Dynamic Wire!  Triple ouch!  Do yourself a favor -- read Learn 10 Functions in DAQmx and Ban the DDA (that's not the real title -- it really says "... and Solve 80 Percent of your Data Acquisition Applications").  Also learn about Waveforms, much "friendlier" the Dynamic Data Wires.  With DAQmx, you can even get the data as 1D or 2D Arrays of Dbls ...

 

The idea of Producer/Consumer with Data Acquisition is to do the Acquisition in the Producer and pass all of the data to the Consumer -- no processing, no displaying, nothing but Acquisition (and control) in the Producer.

 

If the sampling interval varies, or if time "restarts", you cannot (easily) use a Chart.  Usually DAQ implies a fixed sampling interval, so a Graph or Chart is easy (you don't need to plot X with a Graph from evenly-sampled data, you can just set the X properties to reflect time or sample #.  And if you want plots that "restart" from t=0 and have varying lengths, a Graph is definitely the way to go (a Chart would be a mess!).

 

Bob Schor

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

I understand that it is not the most ideal data type, however working with other data types did not fix the issue per say, also it is ultimately being converted to an array.  The program is setup to use either a waveform or XY graph (I have been experimenting with both), the charts are there so I can see what my signal is doing at the point. The issue is that I am having problems splitting the "runs" into separate plots, I am either loosing all my data, with the chart wiping everything, or It jumps back to 0 (when the time resets) as one continuous run.  I would prefer if my data acquisition is actively running at all times.

0 Kudos
Message 5 of 6
(2,416 Views)

Well you are going to have to do it "the hard way" that means ditching all the Express VI's and Dynamic Data wires.

Then you will need even build your X/Y chart by hand and keep your own chart history in shift registers.

Here is an example of an X/Y chart that plots two lines {load loop} for three different runs {Line Loop}

XYchartCapture.PNG

Each Line Loop run through the Load Loop is a different color on the chart.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 6
(2,408 Views)