10-08-2008 06:41 PM
This is probably the most basic problem a person could come across, yet somehow I am having a lot of trouble.
I have decently large tab delimited text files (only 2 columns, cant get more simple than that).
If I use the 'Read LabVIEW Measurement File' I run into the following problem:
I can read the file fine, and set the first column to time (which it is) and the second to the other data.
When I go to graph the data on a waveform graph, it offsets my time to 0.
For example, if the time of the file (in relative time) goes from 3000 sec to 10000 sec,
it will graph the data correctly, but say the time is 0 sec to 7000 sec.
I can bypass this time offset by reading the file manually
using the 'read from spreadsheet file' function. However,
I cannot seem to figure out how to graph the first column as x and the second column as y.
Any help would be appreciated. I don't really care which of the two functions I use, I just need one to work.
Thanks,
Cory
Solved! Go to Solution.
10-08-2008 06:57 PM
OK here's what I have so far.
I use a 'read from spreadsheet file' function.
I then use 'array subset' to separate the left column from the right (by indexing column 0, then 1)
I even created an array indicator on the front panel to verify I was getting the correct data, and I am.
So I have and array of times, and an array of data.
Now what?
10-08-2008 08:05 PM
Send your data to an X-Y graph. The X data array is your time data, and the Y data array being your actual data.
A waveform graph is different. It assumes that you have an array of data that is uniformly spaced on the X axis or time axis. (Is that the case with your data?) If your data is uniformly spaced, you would need to use a Build Waveform function to send in your Y data array along with a t0 for the initial time point of your first data point and a dT for the time between data points. Then send the Waveform to the Waveform graph.
Or you could send the Y data array to the waveform graph or waveform chart and use property nodes to set the x scale offset and multiplier
10-08-2008 09:23 PM
No I guess a waveform graph won't work because the time isn't evenly spaced.
Aha, I figured out the problem i was having with the xy graph. Even though I had arrays of 1 column,
for some reason they were displayed as 1 column of data then a bunch of blank columns, dont ask me why
I just did a bunch of unneccesary stuff to make it go back to only 1 column, then bundled the 2 arrays and passed the bundle to an xy graph.
Everything works fine now, thanks for your help Ravens Fan. You get a Kudos 😉