LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from text file: time to number

Ok short question. I've been using labview for logging data to a text file. I made it comma separated and looks like this:

absolute time, relative time (since start exp), channel 1 data, channel 2 data.

Well, I can sucessfully read from textfile and I'd like the user to be able to view data on a graph.

Problem is, the 2 columns with the time are not correctly changed to numbers, this might have to do with how I saved them:

I used format date/time string to save time, and used ":"  between hours and seconds.

So my question: How do I solve this? Can I convert this string to a correct time and date for graphing, or how should I change logging so it

can be converted to a number.

0 Kudos
Message 1 of 3
(2,564 Views)

If they are not correctly being converted to numbers/timestamps, please show how you are doing it. Also, it would be nice to see how you are trying to display the data. Is it a normal graph or XY Graph? If it's a normal graph, are you use the offset and multiplier properties to set the x axis?

 

Just attach an example of the text file and your VI to read it.

Message 2 of 3
(2,552 Views)

I believe it depends on the time format you're using.

 

This is my example:

Time conversion.png

 

Time conversion front panel.jpg

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
Message 3 of 3
(2,541 Views)