ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph Tracing

Solved!
Go to solution

Hi all,

 

I had a program where I read out an ascii tab-delimited, two-colum file.  The first column contains X values.  The second column contains Y values. I would like to construct a program which traces out this XY plot and outputs the last value.  Everything is working like a charm except the graph is totally blank, and I can't understand why. Any help is appreciated.

 

Thanks in advance,

NSG

0 Kudos
Message 1 of 7
(4,782 Views)

You did not include a datafile.

How many points are there?

Maybe you want a plot that shows points instead of connecting lines? (a line needs at least two points to show!)

What should happen when you run out of points?

0 Kudos
Message 2 of 7
(4,776 Views)
  • Right-click on the Array Subset function, choose Help, and read the Help Message.
  • Don't use Express VIs, don't use Dynamic Wires
  • If you've got a 2-by-N array, you should be able to pull out X-Y pairs.  If you've got X-Y pairs, you should be able to figure out how to plot them.
  • Take the LabVIEW tutorials (upper right corner of the Forum home page) if you are just beginning.

Bob Schor

0 Kudos
Message 3 of 7
(4,772 Views)

Try something like this....

 

 

Some additional comments to your origianl code:

  • Don't convert the same string array to a DBL array with every iteration. This belongs outside the loop. (Well, the compiler will probably do the right thing by eliminating loop invariant code, but still...) 😉
  • Use the correct representations, i.e. don't mix blue and orange for the indices.
  • Don't maximise the front panel and diagram to the screeen. that's very annoying!
  • Don't use dynamic data and express VIs as has been mentioned.
0 Kudos
Message 4 of 7
(4,763 Views)

Oh cool I appreciate it.  I have attached the data.

 

With the plot I meant that I wanted the graph to trace it out but keep the trace, not just roll with a single point but hold onto the it as it goes through the entire voltammogram I have attached.

 

Thanks again.

0 Kudos
Message 5 of 7
(4,747 Views)
Solution
Accepted by Sidelingscroll

@Sidelingscroll wrote:

 

With the plot I meant that I wanted the graph to trace it out but keep the trace, not just roll with a single point but hold onto the it as it goes through the entire voltammogram I have attached.

 


Like this, maybe?

 

Download All
Message 6 of 7
(4,732 Views)

That's great.  Here's my final program and text input file (I had to multiply the values in the second column by 10^6 to get them to display correctly, but that's ok)

Download All
0 Kudos
Message 7 of 7
(4,697 Views)