LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone help me to reduce the subVi execute time

Hi, all

 

I have attached a  VI and its profile data excel file. 

 

The code for this VI is very simple, the experiment data length is 1,000,000, and the reference signal data length is 200, but it cost a lot time to execute, can anyone give me any advice how to reduce its execution?

 

 I understand in some ways, the execution time relate to how good my PC is, I am trying to figure out what kind of PC can collect 1,000,000/s first through a PCI-6251, and then save useful information after signal processing. So I want my code is very efficient.

 

thanks

 

Lyn

Download All
0 Kudos
Message 1 of 10
(3,398 Views)

You are looping through your for loop 999,800 times...that will take a while.

Message Edited by for(imstuck) on 04-07-2010 04:48 PM
0 Kudos
Message 2 of 10
(3,386 Views)
Yes, I know, my question is ---- anyone has better way to do it?
0 Kudos
Message 3 of 10
(3,376 Views)

If you're using LabVIEW 2009, you might gain some performance by setting your loop to a parallel loop.

 

See this youtube demo: http://www.youtube.com/watch?v=pSHJRotX7mY&feature=related

Message 4 of 10
(3,361 Views)
Philip's suggestion is a great suggestion. I tested your code with random data, and on my i7-860 it took around 860 msec. When I enable parallel execution it took around 200 msec.
0 Kudos
Message 5 of 10
(3,349 Views)

Thanks, everyone. Unfortunately, I don't have Labview 2009.

 

Checked website, it cost a lot money to purchase it.

 

Lyn

0 Kudos
Message 6 of 10
(3,332 Views)

Message Edited by Phillip Brooks on 04-08-2010 09:15 AM
0 Kudos
Message 7 of 10
(3,305 Views)

Lyn,

 

What you are doing looks a lot like convolution.  Can you get the results you need by using any of the various Convolution VIs?

 

Lynn 

0 Kudos
Message 8 of 10
(3,302 Views)

HI,

 

Converting to subroutine where possible was best for improve performance.

 

Cheers, Peter.

0 Kudos
Message 9 of 10
(3,291 Views)

Thanks, Lynn

 

it is sort of convolution, I have tried using convolution VI, it looks like works with a little extra code, but performance is much better.

 

Lyn

0 Kudos
Message 10 of 10
(3,265 Views)