09-16-2009 02:27 PM
i'm working with labview 8.6 for about 1 week and i need some help with reading txt-files.
the textfiles i have to read have 2 - 11 columns.
the first column shows the time and the others show different channels from which i measured voltages.
so, there is no problem with reading the voltage-columns, and put it onto the y-axe in the vi's graph but i can't get the time-column on the x-axe.
i took the basic "read from text file.vi" and modified it a bit according to my needs.
hope you can help me, getting the time column on the x-axe. (maybe with a xy-graph???)
the vi and txt-file i have to read are attached...
Solved! Go to Solution.
09-16-2009 02:50 PM
You can right click on the grapg axis and select 'formatting'. In the pop-uo select absolute or relitive time, add the 'container' and then select what you want to display.
09-16-2009 03:11 PM
Changing the formatting does nothing. There is nothing in the data that can be used. The x axis would just default to a t0=0 and dt =1.
You could create a waveform data type and use the first time value as t0 and the sample rate as dt.
09-16-2009 03:15 PM
Here's an example. The formatting of the x axis to relative time will now do something.
09-16-2009 03:18 PM - edited 09-16-2009 03:21 PM
jack47 wrote:You can right click on the grapg axis and select 'formatting'. In the pop-uo select absolute or relitive time, add the 'container' and then select what you want to display.
i allready tried this option but it brings an incorrect result.
maybe you mentioned that with this option, every value in the graph gets a time of 1 second.
for example, the fourth value is at 01:00:03 (red line).
but in the txt-file the voltagevalues have a space of 4 seconds inbetween. so the third value should have a time of 12 seconds (cause first value starts at 0)
but thx for first reply!
09-16-2009 03:31 PM
Hello,
Here is what I would do. I created a second selection table for the x-axis and got it to format correctly for you. Now you can plot any channel against any other channel - time included. For this purpose though, I assumed that your x-axis selection would be time.
John Niezgoski
Signal.X Technologies
Certified Developer
09-17-2009 02:11 AM
01-20-2010 10:27 AM
01-20-2010 11:41 AM