03-29-2015 01:54 PM
@sara14 wrote:
When I insert the value of N, even after that it accomplishes the loop and gives the out put, it starts the loop again from zero and runs it
You don't say if this is what you want or not. If you want to keep averaging over multiple iterations of the outer while loop, place another shift register there and only switch the case structure if the inner and outer iteration terminal are both zero.
03-29-2015 02:57 PM
Hi,
Thank you so much again altenbach,
I dont want to average over iterations of outer loop. I want avarage of the inner loop.
Can I put the N loop and division function (and its display output) all inside a case structure, so that, every time that I hit the switch of the case structure it accomplishes the whole operation for me?
I need to average unknown number of images every time that I hit the button.
Sorry if my questions are basic to you, its bcoz I am begginer and my background is not programming
Regards
03-29-2015 03:09 PM
@sara14 wrote:
...every time that I hit the switch of the case structure it accomplishes the whole operation for me?
What switch?
03-29-2015 04:47 PM
Hi altenbach,
by switch button I mean the of boolean for the new case structure
Thank you
Regards
03-31-2015 12:12 PM
Hi altenbach,
My program still has problem.
I want to capture "i" images, remove their red layer, convert to array, take average, and then convert the average to image.
I know that my vi is wrong, and the problem is the way that I take the average and my looping as well.
I want to write the program in such a way that as I hit the Boolean, it start taking "i" images (i is defined by the user), remove their red layer, convert them to array, average them , convert the average array to image and then I stop it by hitting the Boolean again.
I have a snippet of my vi and tried to put it here, but it doesn't allow me to post it here, I dont know how to do it.
Many thanks for your help
Regards
03-31-2015 12:27 PM - edited 03-31-2015 12:29 PM
03-31-2015 01:51 PM
"There is a "+1" primitive" bcoz I want to count the number of iteration and first one is N=0. right?
This average is wrong I am sure,but I dont know how to fix it.
"Why do you need to hit the button again to stop averaging if you also define the number of averages?" bocoz it dosent stop on its own when it averages "i" images.
"Why does the outer loop need to spin as fast as the computer allows if the case is FALSE?" I dont undrestand this. I read somwhere that I should connect it this way.
03-31-2015 02:08 PM
03-31-2015 02:38 PM
When I see such discussions evolving this way, I have always this link-set with useful guides and learning materials for beginners:
http://forums.ni.com/t5/LabVIEW/Idiom-for-initialising-a-sub-VI/m-p/3086564/highlight/true#M882347
If you jump into LabVIEW learning, you will see how much easier you will be able to solve programming tasks...
03-31-2015 02:48 PM
"Where did you read what, exactly??" when I put a shift register, I should connect the inlet/outlet tunnels for the false case.