04-30-2007 07:45 PM
04-30-2007 07:53 PM
04-30-2007 07:56 PM
05-01-2007 01:20 AM - edited 05-01-2007 01:20 AM
Hello RVR,
i am not sure how much iterations your loop does, but it seems at each single iteration you wait 350ms...multiply that by 100 iterations... you are in it for 6 minutes!
except that, i think we would need to look at the subvis to see where problem could be.
Message Edited by Gabi1 on 05-01-2007 01:23 AM
05-01-2007 01:39 AM
Hi Gabi,
thanks for the reply.
Sorry that 350 is not actually there. I was testing something and forgot to remove it before I did the print screen.
So it runs like an old dog without the wait 350 ms.
Here I attach the code that is inside the orange vi where most of the computation is done.
I will appreciate whatever comments anyone has on this and on how I may recode to 'speed thing up' a bit.
Thank you.
Note that the vi's inside this orange sub vi are straight forward matrix computations - no loops inside.
05-01-2007 01:40 AM
@RVR wrote:
I guess my questions are: (i) is there problems with programming with 2 for loops like I have done? and (ii) does my programming with 2 for loops look efficient? or is there a better way to do this?
it would really help if you could attach some real code. It is difficult to tell much from a reduced image.
05-01-2007 01:49 AM
05-01-2007 02:47 AM
Hei RVR,
as Altenbach pointed already, without the actual vi, we cant see much. your orange subvi is filled with other ones...
that is too bad, because he has the touch for making things faster.
here what you can do if you want to spare us the full prog:
fill your input arrays, make values defaults, save as a new llb. we then get only this vi and subvis.
05-01-2007 03:24 AM - edited 05-01-2007 03:24 AM
@RVR wrote:
Note that the vi's inside this orange sub vi are straight forward matrix computations - no loops inside.
At last attach your code images at full size. These scaled down version are pretty unreadable. From what I can tell, you're running in circles, doing a lot of unecessary operations. for example, inside the orange subVI, you delete a constant row from the array, but since the input is the same during all iterations of the inner loop, you're just doing repetitive work. a lot of code can be pulled outside the loop.
Then you are jumping through all these flaming hoops in the orange vI, constantly converting between 1d and 2d arrays without really adding any extra data. Look at the code segment on the picture. You are creating a 1d array of size N at the autoindexing output tunnel, then you convert it to a 1xN 2d array which you subsequently reshape to a 1d array of size N, giving you back what you had in the first place. Why????
What is the purpose??
Message Edited by altenbach on 05-01-2007 01:25 AM
05-01-2007 07:47 PM