12-17-2013 03:04 PM
I am having trouble with one of my programs. I am trying to program an instrument that came with an example program that is a repeating iterative cycle. There are three steps in it (0,1,2). The way I understand it is step 0 executes, and when finished, it moves on to step 1. If step 1 is unsuccessful, step 1 will repeat until it is successful. Once successful, it will move on to step 2. When step 2 completes it goes back to step 0 and repeats. All this just for taking 1 measurement each cycle. I want this program to only take a single measurement, then stop. I do not want it to repeat itself. At first I thought this would be really simple, however I have been playing with the program for hours and have not figured out how to make the program work without repeating the cycle. I was hoping someone could look at the example program and help me out with this. The program is in the attached files
Solved! Go to Solution.
12-17-2013 03:11 PM
Place a boolean TRUE constant in case 2. wire it to the termination condition of the while loop. (to also retain the stop button, use an OR function to connect both to the loop termination)
12-17-2013 03:29 PM
Ah, simple yet brilliant! Thanks a lot! I don't know why I couldn't think of any way to do that. I was trying to come up with overly complicated solutions.