02-17-2022 08:58 AM
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
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.
02-18-2022 02:26 AM
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.
02-18-2022 07:24 AM
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.
02-21-2022 02:01 AM
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.
Try to modify your VI to fit your application and post your VI when new questions arise.
02-21-2022 03:14 AM
PS EDIT: If you want to test it with the .txt I've created to emulate yours.