LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data time saving

Hi buddies!
 
I have to do a program which permits me to get some datas from multimeter measurement. This program contains a delay time for the acquisition datas which are written both in a spreadsheet file and in a table in the front panel.
My problem? In my table and in the created excel file, i don't get the data acquisition time but just the datas (that's not so bad). In the excel file i have the Universel time linked with my computer and in my table there is a date which is
 
"12/31/1903"
 
so : ??????
 
First, I'd like to change that and just have both a real date (not 31/12/1903 but for instance a date i can change to the current date) and the acquisition time of my program (in milliseconds) ie from the moment i decided to run it till end of acquisition i have decided either by stopping manually the programm or by the number of acquisitions. And if it were possible, having that both in my excel file and in my tablewould be perfect.
 
Thank you in advance, and i hope i have been well understood lol!
 
Daron
 
0 Kudos
Message 1 of 5
(3,277 Views)
Hello,
 
It sounds like you're trying to timestamp your data, and you'd like millisecond times as well as date/time information.  You can use the current value of the millisecond timer to get millisecond timing for your data (and you can use the string numeric conversion functions to get the string representation), and the "get date/time string" function to get the current date.  With the ability to generate the information you wish to write to a spreadsheet file, the problem boils down to creating an appropriate spreadsheet string.  If you're having trouble formatting your data to be written to the excel file, check out my post in the following thread for more information:
 
 
I hope this is what you were looking for!
 
Best Regards,
 
JLS
 
Best,
JLS
Sixclear
0 Kudos
Message 2 of 5
(3,259 Views)
Hi JLS,
 
Thanks for your help I succeded in writing my datas in excel, but know i have just a problem concerning the data acquisition time which is acquired.
First, i can just have information of elapsed time in seconds but i would like it to be in milliseconds too.
Second, there is a delay between the moment i click to run the program and the effective measurements (about 1second).
Third, i have also seen that there is a delay too when i want to change the delay time whereas the program runs...
 
 
Do you have something which can help me for that?
 
Thank you
 
Daron
 
please, find eclosed the new program i have done and the excel file i got, this  in order to see better what i mean...
Download All
0 Kudos
Message 3 of 5
(3,235 Views)

Daron,

1. Check out the help file for the formatt \ Date time string (Press control + H). This will show you all of the options for this vi including how to get milliseconds for your time stamp.

2. i'm guessing that the delay you're seeing from when you click run to when you start taking measurements is the result of your instrument initializing. Or it may be the result of the "Wait until next millisecond multiple" you have in your loop.

3. The reason for the delay when you change your delay time is that you have a wait in your looping structure. The loop has to complete its execution before the control value is read again. As a result, you have a delay in the responsiveness of your controls of your front panel.

Let us know if you have other questions!

Chris C

 

0 Kudos
Message 4 of 5
(3,218 Views)

Hi Chris C.

 

Thanks a lot for your answer.

2. Concerning the delay when i start, you were right, i have seen in the hlep panel, and actually, either i get good measurements in almost the real time (that is what i have for the moment) and the acquisition is good in the loop time or if the "wait until next millisecond multiple" is being removed, all the datas i get are done very quicly in comparison with the delay i have put which is wrong with the real acquisition time required... Thus I might have no other solution that letting like that :s

3. I was sure it was that concerning the loop problem, but I just wanted to know if it were possible to reduce this time... So, it might not be possible... 😞

Thank you very much

Daron

0 Kudos
Message 5 of 5
(3,210 Views)