LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

seconds in Excel

hey all,
 
I am reading data from a thermo - couple into a chart. Maximum samples read = 4095. After reading the samples, I store it in an Excel Workbook using Easy Excel Table and the Property Node - History of Chart. THis stores my Y axis data in the excel workbook. However, I want to store the X axis data too in Excel ( which is in terms of seconds). Please someone tell me how to do that? 
 
Also, the process of acquiring data, printing it in chart and then in Excel occurs many times while the VI is running. And I have not used any function to close Excel. Everytime I want to store data, I open a new workbook (not even a new worksheet) and print using Excel Easy Table. As a result, Excel gets hung up at times. Please tell me wat to do to avoid this? . If I wish to close Excel, or build a new worksheet and not a new workbook, how to do in conjunction of the function Excel Easy TAble?
 
 
0 Kudos
Message 1 of 5
(1,564 Views)
Hi Khanjan,

do you have to use Excel when writing the data to file? Can't you use the much simpler "write to text" functions? Saving in csv is much easier (as you can easily append to existing files) and probably faster too...

Saving x-axis to would require only two values: start time and time between samples. But you can easily simulate the x-axis by calculating a x-value for each sample x=(# of sample)*delay+start Smiley Wink

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 2 of 5
(1,545 Views)
If you are going to use the excel date/time data, you need to be careful. It turns out that excel use days as it basis versus seconds in labview. In addition, the beginning date is different from the start date of labview. I beleive it is 1462 days has to be added to the value. This works for windows version of Excel. It turns out the Macintosh version uses a different start date.
0 Kudos
Message 3 of 5
(1,540 Views)
Hi Joseph,

this has been discussed here (well, less than a month ago a very similar problem...)
Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
Message 4 of 5
(1,534 Views)
Did not see that thread. Thanks.
0 Kudos
Message 5 of 5
(1,531 Views)