LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timed data read out

Solved!
Go to solution

Hi,

 

I have a text file filled up with data like this

 

...

 

-0.027762___0.020000
-0.031100___0.040000
-0.028828___0.060000
-0.031166___0.080000
-0.031016___0.100000
-0.030647___0.120000

 

-0.027762___0.020000

-0.031100___0.040000

-0.028828___0.060000

-0.031166___0.080000

...

 

I would like to line-by-line strip the unnecessary data away after the first number. I would like to display this updated set of data in a graph in a way that the X scale would show the relative time with 20 ms resolution. I thought of a solution similar to the attached picture but it is for charts. I need to display it in graphs as I want to include cursors as well later on.

 

Does somebody have an idea how to get rid of the unnecessary data efficiently and how to display the updated data in a relative timed X scale?

 

Thanks,

Krivan

0 Kudos
Message 1 of 7
(2,967 Views)

A graph has the same offset and multiplier properties. Or you can simply create a waveform datatype with the Build Waveform function (Waveform palette).

Message 2 of 7
(2,961 Views)

Hi,

 

like the attached VI shows I tried to "clean" the data file using the match pattern and then save the modified data into another text file. I tried furthermore to set up a graph to show the modified data with time information [step in every 20 ms].

 

It somehow doesn't work for me but don't see why. Can you please advise what I'm doing wrong.

 

Thanks,

Krivan

Download All
0 Kudos
Message 3 of 7
(2,950 Views)
Solution
Accepted by topic author krivan

Well, everything is wrong. Don't do a read with every iteration. Use the Read From Spreadsheet function once with the delimeter thats in the file. Wire up the property node correctly. Converting the floating point numbers to integers is very wrong unless you want to plot all zeroes.

 

The attached VI will display the entire file at once. If that's not what you want, it's a simple modification. Have you taken the basic LabVIEW tutorial?

 

No clue as to what your idea of 'cleaned' is.

Message 4 of 7
(2,940 Views)

Here is the modified version. Only the first line of the raw data file is read and written into the other file, the data isn't opened on the graph. Any ideas? 

Thanks.

0 Kudos
Message 5 of 7
(2,938 Views)

Hi, 

 

I'll have a look to your VI shortly, I haven't seen your post before I posted mine. The 'cleaned' was supposed to be the modified data where the not necessary information has been stripped away.

 

So if raw data is for example 0.4877459___0.20000 then the 'cleaned' is 0.4877459 because ___0.20000 has been removed from the string.

0 Kudos
Message 6 of 7
(2,933 Views)

Hi Dennis,

 

thanks for the advices and your help, that's exactly what required. 

0 Kudos
Message 7 of 7
(2,927 Views)