12-20-2012 02:07 PM
Hey guys, I'm trying to get my VI to zero out/clear the shift register values once I reach a certain goal without having to restart my VI. I have it to where after so many (defined) cycles have been ran, my data button go to default (off). I want to be able to press this data button again to aquire more data if needed...but my problem is that the shift register is holding the previous count! If I can get my shift register to clear to 0, I think I can proceed to the next phase of my program. Yes, it's for vanitys sake, but nonetheless, wanted.
Solved! Go to Solution.
12-20-2012 02:17 PM
You could use a state machine. You could have two states: Idle, and Running maybe ? I've attached an example.
You could reset your counter when condition is met (To transition state) without stopping the program.Hope this helps.
12-20-2012 02:26 PM
Hey Srid, could you please give a 2011 version of your example? I'm not able to open it for some reason.
12-20-2012 02:29 PM
Here you go. 11.0
12-20-2012 02:53 PM
I know this may sound like a dumb question but, how do you get the case selectors such as run and idle to not be red?
12-20-2012 02:58 PM
I don't see it red ? Did you modify the VI ?
So you could add more states if you want by right clicking the enum. In the case statement, on one of the case selectors if you right click, there should be an option to add a case for every value.
12-20-2012 03:00 PM
I'm lost, the example makes sense but I'm just not sure how to implement it into my VI. arg!
12-20-2012 03:45 PM
The simple answer to your original question is to make the false state of the case structure wire a zero to the shift register. However as suggested, the better way is to use a state machine.
12-20-2012 04:14 PM
I see it now...works! thanks gentlemen!