LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display execution time

I tried replacing the tick counts but it just returns whole second values, no decimals.

 

... and how do I change the number of digits of precision? Robot Embarassed

0 Kudos
Message 21 of 25
(836 Views)

Tick counts returns an integer. The High Precision timer function returns a double (orange wire). So please double check if you used the correct function here (if the wire is still blue and you have no red "coercion dot", there is something wrong).

 

You can change the number of digits using the property dialog of the indicator.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 22 of 25
(833 Views)

Got it. So in both cases, the Tick Count and Hi Res, using Formatted Output is not ideal. This time, I just printed the result straight to a numerical indicator and it works fine in both cases, the Hi Res obviously being more accurate. The Formatted Output obviously doesn't do anything to integers, and I could the same applies to doubles.

 

Thanks so much for the help everyone!

0 Kudos
Message 23 of 25
(829 Views)

@TechnoSam wrote:

I tried replacing the tick counts but it just returns whole second values, no decimals.

 

... and how do I change the number of digits of precision? Robot Embarassed


Tick count returns the number of milliseconds past, you'll need to divide by 1000 to get the seconds.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 24 of 25
(826 Views)

Of course, since my VI runs on ms-tics, both the entering controls and the result-holding indicators are of integer type. change the controls and indicators to double by right-clicking on them and choosing "Representation" and then "DBL". This way you should be fine in the tictoc with the HiRes timer

 

0 Kudos
Message 25 of 25
(811 Views)