LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

processor time

hi i have while loop to implement dsp algorithm, how can i find the processing time for one loop. regards
0 Kudos
Message 1 of 9
(2,680 Views)
Finnd the Vi to get the loop time
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 2 of 9
(2,679 Views)

That's a bit too simplistic. One needs to take into account that you want to take the start time before anything else executes, and the end time after everything in the loop has executed. You also need to eliminate the loop delay. This is one of those (few) cases where a sequence frame is actually useful. Here's a simple implementation:

 

As to the question: You will only be able to get an average, and this may vary with time if you're not running on a real-time OS. Are you running this on a real-time OS? 

Message Edited by smercurio_fc on 05-14-2009 11:00 PM
0 Kudos
Message 3 of 9
(2,670 Views)

thanks for replay

i dont have real time os i use window xp,but this will give me time for only one loop or for the hall no. of time for loop excution if it run continuasly.

0 Kudos
Message 4 of 9
(2,662 Views)

You should not use the Run Continuously button unless you're in a special debugging situation. Obviously the code was intended as a demonstration. You can easily modify it if you want to, for example, get a running average, or get the average for N number of runs (would use a for-loop in this case).

 

Your question was a bit vague, so the suggestion was limited. Smiley Wink

0 Kudos
Message 5 of 9
(2,657 Views)

ok

in the attached file,i want to know how much time it takes to aquir and send for only one loop.

 

0 Kudos
Message 6 of 9
(2,652 Views)

I m not clear, do u want to calculate the loop time for one iteration? then remove the while loop and place the code in the stack sequence so as smercurio_fc suggested. find the attached screen shot,in the front pannel the loop time indicator will be updated with the corresponding loop time for every iteration. for example u stopped the while loop in the tenth iteration then the average loop time will calculate the average of ten loop times and returns the average time of your loop

 

Message Edited by Baji on 05-15-2009 11:01 AM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 7 of 9
(2,632 Views)

Away from the topic..

never do file write in the loop which performs time strigent operation which will introduce jitter in the loop and average time will be a mess.  If you wish to build a deterministic loop pull out the write from the loop and follow the parallel loop architecture (jus search in the forum) to implement the file write. 

The solution provided in the previous post is apt for calculating the loop time.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 8 of 9
(2,626 Views)
THANK FOR ALL.I CAN COUNT THE TIME NOW.
0 Kudos
Message 9 of 9
(2,603 Views)