LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution time continues to increase while vi is running

I started with a vi which reads data from a WII remote (wiimote).  The code works.  I want to convert the acceleration data to velocity and displacement by numerical integration.  Accurate conversion requires a measure of execution time.  The vi correctly returns 9-11 ms when it first starts, however the measured intervals continue to increase in lenght as the vi runs.  The measured interval goes from 10 ms to 80 ms after about 1 hour.  I used a tick counter to measure the loop execution time.  Any suggestions?
0 Kudos
Message 1 of 3
(2,494 Views)
I don't think we can really look for problems without also having all the missing subVIs. 🙂
Message 2 of 3
(2,468 Views)

Can you do some profiling to see which subVI could be the problem?

If you look at the task manager, how is the momery use over time?

 

Your timing systems seems flawed, because the execution of the first tick cound is poorly defined with respect to the rest of the code.

 

Some typical things to look out for.

 

  • growing arrays in shift registers
  • constantly opening references without ever closing them.
  • ...
Message 3 of 3
(2,465 Views)