LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in reading back right txt file on waveform graph

Solved!
Go to solution

Hi all,

 

Well my main motive is to create a labVIEW code which will extract the txt data and blow all the results on waveform Graph but when I get 2d data in array all data is matching with txt file but not showing the correct data on waveform graph as on x-axis its has to be absolute time but it seems like it stuck in seconds as you can see in txt file, time is just number. Also, in y-axis we got pressure values which is in exponential but on graph it is showing weird values so can anyone tell me what to do. 

For the reference, please find attached txt file(test result) and VI

Download All
0 Kudos
Message 1 of 5
(183 Views)
Solution
Accepted by topic author zb

Waveform graphs assume uniformly spaced samples. If you wire an array to a waveform graph, you have to specify the spacing explicitly, otherwise it defaults to 1 second spacing.

 

The txt file contains a header. The actual data starts 33 rows in. So you have to ignore the first rows.

 

If you have exponential formatting, you need to tell that to Read Delimited Spreadsheet. Use %.;%e for locale-independent decimal separator.

 

You end up with something like this:

 

snip-read-delimited-spreadsheet.png

Message 2 of 5
(168 Views)

@zb wrote:

...s on x-axis its has to be absolute time


  • Your x-axis is relative time, because it starts at zero. (absolute time would be the time of day).
  • Your file is not very clean, because the delimiter is a comma (and some spaces) and the line ends in a comma..
  • Your times form a linear ramp, so a waveform graph is fine once you define x0, dx.

EDIT: actually your times are only approximately a linear ramp, so you need to use an XY graph if that small deviation from linear really matters)

Message 3 of 5
(157 Views)

@cordm wrote:

If you have exponential formatting, you need to tell that to Read Delimited Spreadsheet. 


Actually, %f (or %.;%f) will read the exponential format just fine.

 

(I have never seen exponent fields that are zero padded to three digits, but they get parsed correctly)

 

altenbach_0-1756223901918.png

 

altenbach_1-1756223921288.png

 

 

0 Kudos
Message 4 of 5
(141 Views)

Thank you. It is working fine now.

0 Kudos
Message 5 of 5
(87 Views)