02-14-2010 07:23 PM
Replace the outer while loop with a for loop where the N is the number of pictures.
Remove the inner for loop. Now each button click will execute the event case. The event case will execute N times because of the outer For Loop.
02-15-2010 01:29 PM
That worked as in the loop went through the iterations on the click of the boolean, but, it didn't call the counter Vi each time, and the the case structures did not go true to stop the motor? any ideas?
02-15-2010 01:38 PM
The motor off VI only runs when the counter is greater than Angular increments x 8.1.
Are you saying you do want to run the code inside the event structure over and over again? In that case you will want a while loop inside the event case.
However, I would recommend that you also look at state machine architectures.
02-15-2010 01:47 PM - edited 02-15-2010 01:55 PM
02-16-2010 06:39 PM
02-16-2010 07:06 PM
Go to File >> New .... >> Frameworks >> Standard State Machine.
Search the forums for "state machine".
02-19-2010 07:17 PM
Alright went away and checked it out... it seems that the condition never goes true for the motor to turn off, hense it jst keeps rotating even when the different loops are called. It is iterating through the loops. The counter seems to be the problem, but i tried to insert a time delay to no avail...
Any help appreciated, as it is need for my Final Uni Project which is being demonstrated on Tuesday.....
Regards
Peter
02-20-2010 07:40 PM
I am looking to reset a counter output, for each iteration of a for loop. I am controlling the angular position of a stepper motor, by counting the pulses that the motor receives. it is for use with a panoramic camera. It should move once, stop when the counter value equals the inputed angle * 10. Is that is fine for the first loop, but when the second loop starts, the counter has continued to count up ,and then the motor wont rotate because the counter value is too high... it thinks it has reached the desired positon. so i need to be able to reset the counter output... Any Ideas
Thanks in advance
Peter