LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I accurately benchmark my LabVIEW Real-Time (RT) applications?

I have created an application in LabVIEW RT and wish to benchmark the control loop cycle time. Furthermore, I must know how much jitter is present in the loop with nanosecond resolution. Unfortunately, LabVIEW's timing functions (e.g. Tick Count) have millisecond resolution, which is insufficient for my timing needs. Is there a VI or utility with better-than-millisecond timing resolution?
0 Kudos
Message 1 of 4
(5,217 Views)
The NI Developer Zone's Resource Library has a special VI that calls an assembly intruction, RDTSC, which reads the time stamp counter register on Pentium class processors. Using this VI, we can very accurately measure control loop cycle time and software jitter of VIs running on the real-time PXI targets, including the PXI-8156B and PXI-8170.

http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&ED6B3E3D80C1390C862568EB0073B5ED&cat=98EEA3AF25CFCA42862568CD0066090E

There is no equivalent utility for the PXI-7030 and PCI-7030 real-time boards yet. However, if you have a 7030 E-Series board, you can use one of the general purpose counters to perform event counting. Simply call Counter Get Attribute to obtain the current count between loop cycles. If the 20 MHz
internal timebase is used as the counter's source, your timing measurement will have a resolution of 50 nanoseconds (1/20 MHz).
0 Kudos
Message 2 of 4
(5,217 Views)
Does this method work on the PXI-8176 controller? This link is broken as well...anyone know where it was moved to?
0 Kudos
Message 3 of 4
(5,217 Views)
I found it by going to the KnowledgeBase and searching for "RDTSC". Try this link.

If you have LabVIEW RT 7.0, it's called NI Get Timestamp Counter and is available in an example and a VI template.
0 Kudos
Message 4 of 4
(5,216 Views)