LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI running very slow!!

Solved!
Go to solution

There are many things you do every iteration which only needs to be done once, and thus should be placed outside the loop completely.

- The read file is already mentioned

- The initializations of the graphs.

(- simulation?)

- Calculation for simulation

- Why do you build 3 arrays in the top left loop when you only use 2?

- The loop subtraction thingy is the same as wiring both arrays to a subtract.

 

I have a strong feeling the file read comsumes teh biggest portion of the time, move that outside the loop to start with.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 11 of 18
(2,938 Views)

My latest VI is attached. Read/Write spreadsheet as well Build table VI has been replaced with shift registers. As you can see, the speed didn't improve at all.

 

 

Yamaeda, the array subtraction in loop is for a reason. You can notice that a Select condition has been wired to the 'N' terminal of for loop.

 

Awais

0 Kudos
Message 12 of 18
(2,933 Views)

Hello,

 

another thing is that you refreshx scale of yx graph each iteration that take a while

 

may be you could refresh 1 tiem out of 10 for example

 

or use defer option

 

another way could be to create a diplay loop with producer consumer design

 

Regards

 

Tinnitus

 

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
Message 13 of 18
(2,929 Views)
Solution
Accepted by topic author awais.h

Just for a test put this block outside  the loop you will see the loop running faster

 

Regards

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
Message 14 of 18
(2,922 Views)

I just tested moving the Graph property settings to outside the loop so it only initializes once, and the loop time changed from ~50 to 1 ! ms.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 15 of 18
(2,898 Views)

Btw, your select case -> loop with subtraction = Arrays wired to a subtraction. Try it. 😉

 

Your phase filtering is abit strange, you compare to (-)310 but the booleans are named >360 and similar. Though, i'm not quite sure what you're after in that calculation. You should be able to condense it through a case structure and/or Quotient/remainder calc though.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 16 of 18
(2,892 Views)

"Graph property settings  outside the loop so it only initializes once"

 

Yes, it was a suggestion only to highlight there is something to do with this block

 

now it stay to know how to manage it...

 

Regards

 

Tinnitus

 

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
Message 17 of 18
(2,885 Views)

Tinnitus,

 

Yes, I placed the graph property node outside the loop and my VI runs perfectly. I am getting 50 results in one second just like an ideal case.

Than you very much for pointing this out. 

 

Thank you everyone for great suggestions. 

 

Kudos for Everybody Smiley Happy

 

Awais

0 Kudos
Message 18 of 18
(2,844 Views)