LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to get tick count timer of output in nano-seconds or microseconds

The tick count timer available in Labview gives output in milliseconds. Is it possible to get same type of function which could provide time in nano seconds or microseconds.
0 Kudos
Message 1 of 10
(8,336 Views)
Use the windows (if you use windows) API QueryPerformanceCounter. The accuracy is hardware dependant, but on modern computers it should be faster then 40MHz. You can query the frequency with QueryPerformancyFrequency. Both API's are in Kernel32.dll


Regards,


Wiebe.



"Anderomeda" <x@no.email> wrote in message news:1139202648493-320567@exchange.ni.com...
The tick count timer available in Labview gives output in milliseconds. Is it possible to get same type of function which could provide time in nano seconds or microseconds.
Message 2 of 10
(8,323 Views)
I have the same problem but I don't understand the answer. What is this API and how do you use it with Labview?
0 Kudos
Message 3 of 10
(8,100 Views)
Nobody knows?
0 Kudos
Message 4 of 10
(8,081 Views)
The Windows API is a set of DLL functions and you can acces it via the call library function node. I made a VI which calls the right functions for you.
Greets, Dave
Greets, Dave
0 Kudos
Message 5 of 10
(8,061 Views)
Thanks but I can't open it I use Labview 7.0 and this VI seems to be made for version 8.2. Could you just give me a way to open it please?
0 Kudos
Message 6 of 10
(8,058 Views)
Here are some LV7.0 VIs that can be used to query for the processor tick count.  Resolution is your processor tick interval.  They will not work on non-Intel compatible machines or on processors which do not support the tick count attribute (e.g. the original pentium).  They are Windows only.  Note that even though they give you high resolution, the accuracy is very suspect.  Windows is a multi-tasking OS, so background processes have a nasty way of messing up any sort of timing on this level.  With Windows, the best accuracy you can hope for is on the order of milliseconds.
0 Kudos
Message 7 of 10
(8,041 Views)
If anybody can convert that VI to 7.1, I can do it for 7.0.
- Partha ( CLD until Oct 2027 🙂 )
Message 8 of 10
(7,806 Views)

Marc,

I opened it in LV 8.5 eval & built it in 7.1 & ran, but it crashed LV.

I think the parameter has a data type U64, mainly meant for 64-bit processors. It is available from LV 8.0 & upwards only.

That might crash LV I think...

So, it may not be doable in LV 7.x.

- Partha ( CLD until Oct 2027 🙂 )
Message 9 of 10
(7,801 Views)

Marc,

You can see the below thread for an earlier version in 7.1.

http://forums.ni.com/ni/board/message?board.id=170&message.id=197442&view=by_date_ascending&page=1

- Partha ( CLD until Oct 2027 🙂 )
Message 10 of 10
(7,798 Views)