LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to built waveform chart from CSV data

Solved!
Go to solution

Hi,

I got the comparison waveform for two methods as follows.

 

ZN.png

 

 

As we right click on waveform chart and export data to Excel, and then Choose  the CSV format.

a CSV file is generated.

 

I want that, same CSV file can be used to display the waveform chart as it is (for further analysis).

 

I am using the following Code but not getting results.

 

New Bitmap Image.png

Please suggest the modifications, CSV Data file and VI is attached, for reference.

Regards

MMS79

Regards
mms79
Download All
0 Kudos
Message 1 of 12
(5,328 Views)

You may need to transpose the 2D Array to get it into the format you need.


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 2 of 12
(5,322 Views)

Every other column is "time", so you need to exclude that (and use the information for x0 and dx of the x axis).

Also, since you get all data at once, a graph would be more approriate than a chart.

 

Otherwise, the data is read just fine. What is the language setting of your computer (e.g. is the decimal seperator a period or comma?)?

 

It seems strange that the csv file only contains integers. What is the datatype of the original chart?

0 Kudos
Message 3 of 12
(5,320 Views)

@crossrulz wrote:

You may need to transpose the 2D Array to get it into the format you need.


His chart was set to transpose (right-click) and the data displays OK here as is, it simply also includes all the x-ramps.

0 Kudos
Message 4 of 12
(5,316 Views)

In general, saving as CSV is not a good option, because it often interferes with language settings. A much better option in excel is to save as text, which will give you a tab delimited table that can be read with the default delimiters of "read from spreasheet file".

0 Kudos
Message 5 of 12
(5,308 Views)

Thanks for the reply, altenbach.

 

Language setting.png

New for a labview. Actual data is 1 to 5 volt, which is converted in (water level)% in Labview (For water level controlSetup).

Tried by saving in text. but got the same result as before.

Regards
mms79
0 Kudos
Message 6 of 12
(5,297 Views)

MMS79 wrote:

Tried by saving in text. but got the same result as before.


And what result is that? Does the array contain any data?

 

As I said, I can read and display the file using your code unchanged without problem. There must be something special in your environment!

0 Kudos
Message 7 of 12
(5,293 Views)

@altenbach wrote:

As I said, I can read and display the file using your code unchanged without problem. There must be something special in your environment!


Here's what I get using your code unchanged (except rearranging the FP and selecting the csv file you had attached earlier.

 

(Of course the first row is numeric garbage (headers) and will show as all zeroes)

 

0 Kudos
Message 8 of 12
(5,289 Views)

The data in array is perfect, where as in waveform it seems to be different or not getting configured properly.

How can i make the waveform similar from which i got the data itself.

I have to show the waveform, whenever required using Excel, CSV or text file any suitable format.

Regards
mms79
0 Kudos
Message 9 of 12
(5,278 Views)

@MMS79 wrote:

How can i make the waveform similar from which i got the data itself.


Define "similar". To have it look cosmetically similar, customize the graph (background color, etc.)

 

As I said use a graph, not a chart. Drop the first row and all even columns (they contain X).

(You could read the first row as strings and populate the graph legend if desired.)

0 Kudos
Message 10 of 12
(5,268 Views)