LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Know "How much time I run my VI"

Hallo,

I want to measure for wich time I run my labview application?

In other word, when I run my application, I want to measure for how long time it runs.

Also,

I have other problem:

When I use the DAQ system to enter an analog signal from outside, I choose the sample rate to be 1000 and thus my system slow down specialy that the program will wait 1 second each time to give the another acquisiton. How to solve this problem.

Thanks,
0 Kudos
Message 1 of 7
(2,756 Views)
Hi

You can measure the execution time by reading the current time before and after execution. Subtract start-time from end-time end you get the result in mili-seconds.

Just have a look at the picture.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 7
(2,747 Views)
Can you include some of your code so that we can analyze the structure? When you say "thus my system slow down" do you mean you LabVIEW program, your whole system, what? Doing 1000 samples/sec is usually not a major strain on modern machines.

P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 7
(2,735 Views)
As Beckto gave the example for your first question (or you can implement something similar or along that line using the other time tools).

As for the 1000 samples taking 1 sec each, that may be quite normal as well. It means that each sample gets taken at 1 ms interval. I can't remember the exact number that an iteration takes, but what you could do is take a time stamp of your loop for a single loop or better yet, 10 loops (divide by 10). That way you'll know the sampling rate and the time per loop iteration. You may notice that it would be close to 1 ms.

I'd be curious abiout it, so please post the result 😄

JLV
Message 4 of 7
(2,725 Views)
You can use Tools>>Advanced>>Profile to get timing and memory statistics of your vi and its subvi's while they execute to find what is causing the bottleneck in your system. This solution requires no programming but I am not sure if it is available in base labview systems (if you have the base package?).System slow responsiveness in DAQ systems often be alleviated through multithreading.

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 7
(2,723 Views)
Base includes profiling.

I strongly suggest you take a few minutes to read the profiling online help before attempting to profile. Select the Help button on the Profile window and read everything you can find, including the information linked from that help. You can wait until you are confused and frustrated, then read help, but read it you will. 🙂

Roy
0 Kudos
Message 6 of 7
(2,692 Views)
Reading???

Now why didn't I think of that??

😄
0 Kudos
Message 7 of 7
(2,674 Views)