LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying File contents to a Graph

Solved!
Go to solution

Hello

I am currently saving data from a labview application into a text file. It contains multiple columns and rows. the 1st column is time and date data in the format the client prefers, subsequent columns displays temperature data. I would like to be able to display this data on a graph with the 1st column(time and date) being on the x Axis and then subsequent columns showing the temperature data.

The temperature data is straight forward to handle but I am struggling to get the correct format on the time date column for the X axis. 

I understand maybe a solution is to initially save the date.time in different format, but i would prefer to work with the file contents as it is now.

Many thanks in advance.
I have attached a sample file

 

0 Kudos
Message 1 of 4
(807 Views)
Solution
Accepted by topic author LeeBowers1

Hi Lee,

 


@LeeBowers1 wrote:

I am currently saving data from a labview application into a text file. It contains multiple columns and rows. the 1st column is time and date data in the format the client prefers,

 

The temperature data is straight forward to handle but I am struggling to get the correct format on the time date column for the X axis. 


Try ScanFromString with %<%d/%m/%Y %H:%M>T to scan the timestamp...

(I guess it is day first, month 2nd because of the "Winter" mode - and the 24h mode. 🙂)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(802 Views)
Solution
Accepted by topic author LeeBowers1

Hello

Yes, scan from string - works a treat 🙂 Once I worked out format for input, in my case ending up being %<%d/%m/%Y %H:%M>T

I have attached my interim solution, ready to build into my applicaiton

Thank you

0 Kudos
Message 3 of 4
(767 Views)
Solution
Accepted by topic author LeeBowers1

@GerdW wrote:

Hi Lee,

 


@LeeBowers1 wrote:

I am currently saving data from a labview application into a text file. It contains multiple columns and rows. the 1st column is time and date data in the format the client prefers,

 

The temperature data is straight forward to handle but I am struggling to get the correct format on the time date column for the X axis. 


Try ScanFromString with %<%d/%m/%Y %H:%M>T to scan the timestamp...

(I guess it is day first, month 2nd because of the "Winter" mode - and the 24h mode. 🙂)


Thusly

000.png

The display is m/d/Y but that does not change the DATA of output 1 (Timestamps are stored internally as UTC)  Its that "%<>T" that clues LabVIEW to use an Absolute Time container


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(757 Views)