LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display read logged data file to graph with timestamp of logged data file, and to save logged data to excel file

Hi all,

 

I have created a LabVIEW code that reads a logged data file from external software but i'm having a problem of displaying the file as a graph and save the file as Excel.

 

The sensor data are coming in from external software, external software saves the file as text file on notepad (.log ). I can read the file (.log) when the external software finished logging data.

 

I want to display .log file on a graph with the file timestamp. the file looks like this 

LaAb_0-1645109539282.png

I also want to save this file on Excel automatically through LabVIEW.

 

I have attached my code.

 

Any idea how I can achieve these?

 

Thank you in advance.

 

0 Kudos
Message 1 of 5
(1,165 Views)

Hi,

 

What is that you call the file timestamp :

- your interval time of 0.2s ?

- the time at which you are reading the file ?

- the timestamp from the file = last save timestamp ?

 

To do a graph there is several ways but for sure you will have to convert your string data.

One solution is to convert this string to a array and then to a graph.

 

To save in Excel you will need to use Report Generation Toolkit palette. There are severals examples available on the forum.

0 Kudos
Message 2 of 5
(1,128 Views)

Hi,

 

Thank you for getting back to me.

 

File timestamp referring to X-axis of the file attached above which is 0.2s of interval time.

 

Ok, I have looked it some but couldn't get it working. I'm new to LabVIEW so if you can attach some code I can refer to, that would be helpful.

 

Thank you.

0 Kudos
Message 3 of 5
(1,119 Views)

Hi,

 

I'm based on your VI to propose some indications.

It updates the graph each time.

The excel document is created after th loop has ended.

tryit.png

 

Try to modify your VI to fit your application and post your VI when new questions arise.

0 Kudos
Message 4 of 5
(1,099 Views)

PS EDIT: If you want to test it with the .txt I've created to emulate yours.

 

 

0 Kudos
Message 5 of 5
(1,092 Views)