LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from file and display it on a XY graph? Time axis problem!

Hello to all,

Sorry for this redundant question. I really tried to follow all the recommendations in this forum about reading and display data on a XY Graph, but I am still having problems.

I am able to create an XY graph where X is time stamp and Y is numeric data, and run it in continuous mode. The problem comes afterwards, when triying to read the resulting file. I am not able to make the format of the time stamp compatible with the display graph.

I attach the file and the .vi that generates de data.

Thanks in advance,

Alejo.
0 Kudos
Message 1 of 6
(2,860 Views)
Here is the .vi
0 Kudos
Message 2 of 6
(2,856 Views)
Since your problem is retrieving the information I suggest you post the VI that does that part so we can all see the problem. But before you do that, try replacing your save VI with the write to spreadsheet file VI. It will allow you to save your numeric array straight into the file in an array form and retrieve it later with the Read Spreadsheet from file VI. Also, consider transposing your array. It will be more readable.

___________________
Try to take over the world!
0 Kudos
Message 3 of 6
(2,842 Views)
Thanks TST for your quick response and your help. Finally I got it. It seems that the problem was in the way I formatted the time to write it into the file.

Now I got a time row that labview understands, but not Excel. I should create another input using "format date/time" if I want to work with Excel, unless you have another suggestion.
Just if you have time, please take a look to this VI. The first sequence generates a random number (Y) over current time (X)and write this data on a file. On the second sequence, the file is readed and the data is displayed on a XY graph.

I am still wondering if this is still the proper way to do it.

Regards,

Alejo.
0 Kudos
Message 4 of 6
(2,836 Views)
Your way works so it's basically OK. I have made a few quick modifications to your VI. There are explanations on the diagram. It can, and needs to be, improved more, but I'll leave that to you. If you want to save the time string, you'll need to modify the Read/Write VIs to process string arrays. You can find instructions for how to do this on the diagram of the VIs. Just make sure to save your VIs under a different name.

___________________
Try to take over the world!
0 Kudos
Message 5 of 6
(2,829 Views)
Again, thanks tsr for your time and your help. I took good notes of your advices in the block diagram.
0 Kudos
Message 6 of 6
(2,819 Views)