From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading timestamp from column in txt-file

Solved!
Go to solution

hi labview pros

 

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...

Download All
0 Kudos
Message 1 of 9
(4,791 Views)

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.

 

xy formating.PNG

0 Kudos
Message 2 of 9
(4,783 Views)

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.

Message 3 of 9
(4,768 Views)
Solution
Accepted by fr33k

Here's an example. The formatting of the x axis to relative time will now do something.

Message 4 of 9
(4,764 Views)

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.

 

xy formating.PNG


 

lv01.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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!

Message Edited by fr33k on 09-16-2009 03:21 PM
0 Kudos
Message 5 of 9
(4,757 Views)

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

Message 6 of 9
(4,748 Views)
thx for all your replies!

@dennis knutson: thx for the example-vi. i combined it with my vi and it worked fine. thats exactly what i was looking for!

@johnski: thx also for your solution, i think it also would work but it's a bit going to far for my needs. good work anyway. maybe i can use it in a next vi.


0 Kudos
Message 7 of 9
(4,719 Views)
Can you guys save it under 8.5 version. I would like to see it too. That could really help in my project. Thanks!
0 Kudos
Message 8 of 9
(4,455 Views)
0 Kudos
Message 9 of 9
(4,426 Views)