LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read and average n data from text file

Solved!
Go to solution

I acquire numeric data from the oscilloscope [reading a waveform] that is stored in one column in a text file.

 

I need to read in selectable amount of data points to average/plot them.

 

So basically I wanna have a text file with millions of data points but I wanna plot say only every 1000. data point. I have tried many things I found here on the forum but as I am new to LabView, none of them really worked.

 

Does anybody have a suggestion.

 

Thanks.

0 Kudos
Message 1 of 15
(5,094 Views)

Have you tried reading in the data using the "Read from Spreadsheet File" function (from the file I/O palette)?

 

Once you have the data in an array it should be pretty straightforward to use the plethora of array functions to accomplish what you need.

 

Dan

0 Kudos
Message 2 of 15
(5,074 Views)

Read in a thousand data points using the read file functions, average, then plot.  Repeat.

 

What things did you see and try, but did not work?

0 Kudos
Message 3 of 15
(5,073 Views)

Hi,

 

among others I have tried to build the VI below but somehow I cannot get to the desired solution because according to the indicators it always stops after the first loop.

 

Can you have a look please?

 

Thanks.

0 Kudos
Message 4 of 15
(5,052 Views)

hi krivan,

 If your data file is a simple text with only one column of data,you can use a simple read text file vi ,configured to read lines and count as 1000(everytime) and use some string to integer functions and calculate the average/mean.

 

 

Thannks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 5 of 15
(5,047 Views)

Hi,

 

I have changed the code I use read from spreadsheet but something is still wrong and cannot really figure out what...

0 Kudos
Message 6 of 15
(5,042 Views)

hi ,

 can you please attach your data file?

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 7 of 15
(5,037 Views)

hi,

 

the data file:

0 Kudos
Message 8 of 15
(5,031 Views)

Hi,

 sorry for the mistake..what i mean to attach the text file from which you are reading the values.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 9 of 15
(5,029 Views)
0 Kudos
Message 10 of 15
(5,028 Views)