LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

csv file reading and voltage and current plotting with respect to time samples XY plotting

Hallo,

         I've been struggling with reading  a comma separated value (csv) file from another instrument (attached). I need to plot this data for analysis. I have 5 column of data with numbers of rows, the first three row is the information of the measurement. I want to read 4th row as string and rest of the row as numbers. I want to plot 2nd column (i1)  with respect to TIMESTAMP; 4th column(u2) wrt TIMESTAMP. And finally plotting i1 (x-axis) vs.. u2 (y-axis) in labview. Could anyone help me.
In excel its so easy to plot  but I don't know how its done in labview.

Download All
0 Kudos
Message 1 of 5
(4,210 Views)

What have you tried? How much do you know about LabVIEW, have you ever done any LabVIEW programming?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 5
(4,198 Views)

Start by opening the file.  Then use the Read Text File function.  You can right-click on it and configure it to read lines.  First make it read 3 lines (this is your extra header data).  Then make it read a single line.  That will give you your channel names.  Then read the rest of the file (disable the read by line and wire a -1 into the number of bytes to read).  Then use the Spreadsheet String to Array function to give you your data.

 

I would recommend going through the LabVIEW tutorials if you are really new at this.

LabVIEW Basics
LabVIEW 101


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 3 of 5
(4,189 Views)

Hallo Cameron,

 Thanks for the quick response. I am just bigineer in Labview. I just tried to reading csv file using the readfromspread sheet file.vi  by using the excel file path. As I saw some examples in forum. But I am not able to read specific two columns and plotting them at same time.

 

regards

neezan

0 Kudos
Message 4 of 5
(4,188 Views)

neezan wrote: But I am not able to read specific two columns and plotting them at same time.

Index Array.  Only wire the colums index.


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 5 of 5
(4,177 Views)