LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read two column from csv to waveform

Hi

 

I would read 1st two column from CSV (column1 as Xaxis and Coulmn2 as Y axis) and plot it to waveform graph.

 

Thanks in advance

0 Kudos
Message 1 of 10
(6,243 Views)

Try this:

two columns to graph.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 2 of 10
(6,233 Views)

Not sure you can with a waveform graph - you can with an XY chart though.

 

import from csv.JPG

0 Kudos
Message 3 of 10
(6,231 Views)

Hi Thanks,

 

I would like to build waveform with the values, attached the Vi.

 

With XY graph I am getting the right X-Axis value( 2nd graph) but with build waveform the X-axis is not right(1st graph).

 

Any suggestions.

 

Thanks

0 Kudos
Message 4 of 10
(6,222 Views)

Forgot to attach vi

0 Kudos
Message 5 of 10
(6,215 Views)

How is it not right?  Do you have sample data you can give us to help?


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 6 of 10
(6,203 Views)

Smiler123 solution is correct, I am trying to do in Build waveform rather than XY graph.

 

I attached the file as Xls instead of CSV, its not letting me do it.

0 Kudos
Message 7 of 10
(6,195 Views)

First of all, you need more resolution on your time in the CSV.  Secondly, your time is not starting at 0.  In fact, it's negative.  To get your dt, you should subtract your second element from the first.  This will give you the sample rate.  But again, you need more resolution on your time.


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
Message 8 of 10
(6,190 Views)

Why would this vi work well with focus-3.xls but not focus-4.xls even though they are of the same format?

Download All
0 Kudos
Message 9 of 10
(5,727 Views)

They are NOT the same format.  You can see the difference if you open up the files using Notepad.

 

Focus 3 is a CSV file.  You should not give it a XLS extension because it is not an Excel file.  Call it .txt or .csv.  Technically it is not a CSV file which stands for comma separated values because the values are separated by tabs, not commas.  So you really should just call it .txt.

 

Focust 4 is an actual Excel file, so having an XLS extension is correct.  But XLS is a proprietary binary file format.  Read Spreadsheet File only reads formatted text files so it does not work on an XLS file.

Message 10 of 10
(5,724 Views)