LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

microsecond counter

Hi, I currently doing a simple TCP assignment using Labview 7.0. As a client, i sent a message to server which will reply(echo back) the message. The problem i face is i could only measure the delay (round trip time) in ms(using the ms counter inside labview). Is there any way to measure the delay in terms of microseconds? Or can access the CPU clock to measure? Thanks..
0 Kudos
Message 1 of 11
(5,883 Views)
Hi,

On MS Windows, you can use this one.

Regards,

Wiebe.

"jackolim" wrote in message
news:506500000008000000F1C90000-1079395200000@exchange.ni.com...
> Hi, I currently doing a simple TCP assignment using Labview 7.0. As a
> client, i sent a message to server which will reply(echo back) the
> message. The problem i face is i could only measure the delay (round
> trip time) in ms(using the ms counter inside labview). Is there any
> way to measure the delay in terms of microseconds? Or can access the
> CPU clock to measure? Thanks..



[Attachment High Precision Timer.vi, see below]
Message 2 of 11
(5,884 Views)
Thanks very much. It indeed has solve my problem.
0 Kudos
Message 3 of 11
(5,883 Views)
what did you find out?
pls post in group.

"jackolim" wrote in message
news:50650000000500000059700100-1079395200000@exchange.ni.com...
> Thanks very much. It indeed has solve my problem.
0 Kudos
Message 4 of 11
(5,883 Views)
err.... how to post in group? yeah it indeed help me in getting time stamps more than what i required(nanosecond counter)
0 Kudos
Message 5 of 11
(5,883 Views)
Hi,

The exact speed depends on the PC. Most modern PC's will have a hardware
counter of 700 MHz or more. It is queriable with the
QueryPerformanceFrequency, used in the false case.

BTW. The "QueryPerformanceCounter" in the false case can be set to
reentrant, for just a bit of extra performance.

Regards,

Wiebe.

"jackolim" wrote in message
news:506500000005000000AF710100-1079395200000@exchange.ni.com...
> err.... how to post in group? yeah it indeed help me in getting time
> stamps more than what i required(nanosecond counter)
0 Kudos
Message 6 of 11
(5,883 Views)
Hi Wiebe,
Your VI is best one listed here on NI for Hi-Res counter, but you made a math error.  To create a 64-bit number from two 32-bit parts, you should multiple the high part by 2^32=4,294,967,296 not 4,294,967,295.  I had an old Sharp calculator that had a similar problem.
Regards, Jay
0 Kudos
Message 7 of 11
(5,540 Views)

Hi LV_J,

Could you please indicate the math error in the high precision timer VI?  Could you show me how to use it?  Many thanks.

Regards,

Edward

0 Kudos
Message 8 of 11
(5,428 Views)
Why you guys re continuing on a old thread... ?!Smiley Indifferent
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 9 of 11
(5,418 Views)

Hi Partha,

Thanks.  Do you have a better high precision timer for LV 8.20?

Edward

0 Kudos
Message 10 of 11
(5,415 Views)