LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to Graph Tab Delimited Data Starting at Row X

Newbie here..
 
Need to graph 8 channels of data starting at Row 24 (see attached).  Column 1 is my X-axis and the following columns are my various Y's. 
 
1. How do I begin graphing starting in row 24?
2. How do I seperate the various channels as different plots in the same graph?
 
I found samples that read based on character offset.  I need line offset.
 
Please help.
0 Kudos
Message 1 of 6
(2,742 Views)
This example is a little klutzy but it should get you started.Smiley Wink
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 2 of 6
(2,733 Views)

Thanks.

I can not detatch this file though.  Can I get you to E-mail it to me?

stephen.harris@ZF-lenksysteme.com

Thanks,

Steve

0 Kudos
Message 3 of 6
(2,720 Views)
NIQuist's idea is a pretty good solution. I can post a picture at least of what the code is doing that was posted. The idea there was to read all the data from your file and then just discard the first 23 rows of it. If we're dealing with ascii text data, I don't see a lot of options too much better than this.

Binary files are much more efficient about providing for random access. Random access is where you want to jump very quickly to a specific entry in a file. This is easily done since all the entries in a binary file have the same storage format in the file. For instance, all the numeric values in a 2D double array take up exactly 8 bytes. This makes it easy to calculate an appropriate offset to read at. With text files, it varies because of the presence or lack or positive or negative signs, decimal places, digits of precision recorded, etc.

The only other option is to search for the \r\n at the end of each line until you reach the 23rd find. Then start reading. Here's the screenshot of the earlier code:

Message Edited by Jarrod S. on 06-30-2006 12:43 PM

Jarrod S.
National Instruments
0 Kudos
Message 4 of 6
(2,708 Views)
Oh yeah, I have to mention. Beware putting your email address anywhere on the forum! You're asking for spam. At least disguise the address somehow from automated programs that search for these things! Just trying to help... 🙂
Jarrod S.
National Instruments
0 Kudos
Message 5 of 6
(2,698 Views)
I emailed Steeve with the code but good point on the spam warning.  I also realized that I should have incremented (+1) the iteration terminal in the loop to keep the timebase in the first column from being plotted (Plot 1: the straight line ) and also should have looped for 8 iterations, not 7, to plot all the data.  How come no one noticed these glaring errors! Smiley Tongue
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 6
(2,694 Views)