Use the "Tick Count" function to measure the total elapsed time per iteration of a process loop.
Measure and indicate the total processing time in milliseconds per iteration of a process loop
Especially useful to benchmark non-deterministic loops
Negligible CPU effort, i.e., a noninvasive measurement
Easy to code:
“Tick Count” reports the value of a millisecond counter on each call
Use a feedback node to remember the value of the previous call
Subtract the previous value from the current value to measure the elapsed time
Keep in mind
The “Tick Count (ms)” function has a minimum resolution of 1 millisecond
The reference time is officially unspecified, therefore, the value itself returned by “Tick Count” should be interpreted with caution; however, experiments with the Academic RIO Device suggest that the timer resets to zero when the product powers up
The timer is based on a 32-bit unsigned integer which wraps back to zero after reaching the value 2^32 minus 1, therefore, the measurement is erroneous once every 2^32 milliseconds or about every 50 days of continuous operation
LabVIEW block diagram elements
Locate these elements with "Quick Drop" (press Ctrl+Space and start typing the name); click on an icon to see more sample code that uses that element:
Connect your Academic RIO Device to your PC using USBLAN, Ethernet, or Wi-Fi. NOTE: Not all Academic RIO Devices have Ethernet and Wi-Fi connectivity options.