LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time compute

How to compute the time taken to execute a program without using loop and shift register?

0 Kudos
Message 1 of 3
(2,380 Views)

Hi Jane,

 

use two time value functions, like HighResolutionRelativeSeconds. Place them before and after your other code (DATAFLOW-wise) and subtract their output…

 

What's the point about loops and shift registers?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,341 Views)

This is one of those rare times that Frame Sequences make sense.  Create three Frames.  In the first, put a High Resolution Timer.  In the second, place the code you want to time.  In the third, place a second High Resolution Timer.  Subtract the first Time from the second.  The Frames guarantee that the first Time is before any of your code runs, the second is after, so the time between is the time for your code.

 

Bob Schor

Message 3 of 3
(2,319 Views)