LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Stamp in millisecond?

I need Time Stamp data in the Build Table VI to be in ms(millisecond) precision. Right now I get values in second precison only. can I format the cell of the table in any way to display milliseconds?
0 Kudos
Message 1 of 4
(4,055 Views)
Right click on the Build Table Express VI and select Open Front Panel. this converts the express VI to a regular VI. Open this VI and double click the subVI in there. In the subVI, there is a case statement with a Format Date/Time String. The format string is %c which means use locale-specific date/time. You can change the format to anything you want. The help for Format Date/Time String explains all of the options. You could also change the windows settings without modifying the LabVIEW program but then you would have to modify every pc that the VI will run on.
Message 2 of 4
(4,043 Views)
You may also ask why you need this kind of resolution.  Be aware that Windows systems (and probably Mac and Linux as well) are multi-tasking and have many active processes when can interrupt yours at any time.  What this means is that something you thought should be occurring at neat 20ms intervals will do so for a few iterations, then suddenly give you a 500ms interval because an e-mail arrived.  If you need millisecond accuracy on a non-RT system, you should ensure it happens in hardware and get the timestamps from hardware as well.

On the other hand, if you just need to know when things happened, the millisecond resolution will work quite well.  There was a weird bug in LV8 (?) used on Pentium 4 (?) processors where the timestamps were always rounded to even millisecond multiples.  I cannot remember the details, but you can probably find them by searching in this forum.  There was a long thread on the subject.
0 Kudos
Message 3 of 4
(4,024 Views)
Thanks a million!!! It worked!!!

"You could also change the windows settings without modifying the LabVIEW program but then you would have to modify every pc that the VI will run on."

I did not need to do that as I was getting the timestamps from the hardware.
0 Kudos
Message 4 of 4
(3,972 Views)