02-13-2007 02:35 PM
02-13-2007 02:38 PM
02-13-2007 05:12 PM
The way your block diagram operates (from the partial look you gave us), the inner loop goes on and on until someone presses the Aquire button. Then the inner loop is done and the rest of the code after that loop executes. Don't know what happens next but after the outer loop iteration is done, it starts over and the inner loop runs over and over until the Aquire button is pressed again. All this is dependent on the Aquire button mechanical action set to a latch type. Latch means that the button will turn True when pressed, and then turn back to false when the code reads the button. If it is set to a switch type, the button will stay True the first time it is pressed, and the inner loop will only execute once on the next outer loop iteration.
If you want to trigger an Aquire when a user presses a button, use an event structure. The button press would trigger the event and the code in the event case would do the aquiring. Also, you should put delays in your loops (even 1mS) so the program does not hog the CPU.
02-14-2007 06:56 AM
02-14-2007 10:15 AM
02-14-2007 10:18 AM
02-14-2007 10:46 AM - edited 02-14-2007 10:46 AM
You don't need a flat sequence structure, just put the delay anywhere inside the loop. Only the timer value should be wired to it, nothing else.
Message Edited by tbob on 02-14-2007 09:46 AM
02-14-2007 10:48 AM
02-19-2007 07:19 AM - edited 02-19-2007 07:19 AM
(Oh, and please excuse the messy wires, i havent had time to clean it up yet :))
Message Edited by Exulus on 02-19-2007 07:21 AM
02-19-2007 11:28 AM