LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read text file to generate graph

Hi,

 

 I have a text file delimited by commas. A sample of it is shown below.

1545.0000, -23.327
1545.0025, -23.331
1545.0050, -23.340
1545.0075, -23.349
1545.0100, -23.357
1545.0125, -23.368

 

How can I generate a 2D array with the set of values above?

 

Thanks!

0 Kudos
Message 1 of 6
(4,165 Views)
You can use the Read from Spreadsheet File VI. Be sure to use the ',' constant for the delimiter input.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 6
(4,153 Views)

What Adnan has said is right. Just to help you out, I creasted a CSV file and read it using the 'Read from Spreadsheet File VI'. I have pasted the block diagram of the VI to make it clear.  Make sure to use "," as the delimiter.

 

Hope this helps!!!

 

 

Cheers!

 

Usman 

Message 3 of 6
(4,138 Views)

Thanks Adnan and Mani!

 

Another question, how do I feed this to a zero phase filter and FIR filter to generate 3 waves (including original source from 2D array) in the same graph to compare for phase distortion?

 

0 Kudos
Message 4 of 6
(3,978 Views)

1. Input these data in to those filter function.

2. Use build waveform function to change filtered data to waveform.

3. Use build array to build array of waveform.

4. Input array of waveform to spectral measurement function.

Note: original data must be time domain, and don't duplicate the post.

0 Kudos
Message 5 of 6
(3,947 Views)

Sorry, my bad.

 

Is is possible for you to attach a picture of the layout integrating the 2D array from the textfile you have describe?

 

Thanks.

0 Kudos
Message 6 of 6
(3,918 Views)