LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wavefrom graph time from .csv

Solved!
Go to solution

Hello everyone 🙂

 

I use "read from spreadsheet file" to read a two column .csv file in a waveform graph.

 

Time is defined in the first column and the Data is defined in the second column.

 

The problem occurs in the x-axis of the graph (Time-axis). It doesn't match with the numbers from the .csv as shown on the picture below, but the Y-axis has correct values.

 

The VI is uploadet

 

 

Untitled.png

 

 

 

 

Best regards

Oesen
0 Kudos
Message 1 of 10
(3,699 Views)

Can you attach your data file?

0 Kudos
Message 2 of 10
(3,695 Views)

I can't attach .csv files here in NI forum.

 

It says:

 

 

 

Best regards

Oesen
0 Kudos
Message 3 of 10
(3,691 Views)

I don't think your x-axis is formatted for relative time. If you look at your data, the 14th row is the one you have highlighted in the graph which corresponds to the x-axis value.

 

And from the error message it sounds like you didn't save your excel file as csv but simply renamed the extension.

0 Kudos
Message 4 of 10
(3,686 Views)

@Oesen wrote:

I can't attach .csv files here in NI forum.


You can put anything you want in a zip file before attaching.

 

What is the actual dt value you obtain by subtracing?

0 Kudos
Message 5 of 10
(3,678 Views)

Right !.. I have uplodet it now 🙂

Best regards

Oesen
0 Kudos
Message 6 of 10
(3,674 Views)

Hi BillMe

 

It is formated now, and it doensn't make anything difference

 

Untitled.png

Best regards

Oesen
0 Kudos
Message 7 of 10
(3,671 Views)
Solution
Accepted by topic author Oesen

Works fine here once I configure it to use a comma as decimal delimiter (using format=" %,;%.3f " on read from spreadsheet file).

 

You seem to use a foreign version so that should not be necessary, depending on the language setting of your computer but it seems to be the problem.

 

As a first step, you should display the entire 2D array in an array indicator to ensure that your number don't get truncated somehow. If they get truncated, dt will be set as zero and thus ignored and taken as 1.

 

 

Message 8 of 10
(3,669 Views)

Thanks for the help altenbach !. It works now 🙂

Best regards

Oesen
0 Kudos
Message 9 of 10
(3,663 Views)

No wonder I couldn't make any sense out of the csv file format.

0 Kudos
Message 10 of 10
(3,658 Views)