04-24-2017 04:31 AM
Dear Bob_Schor,
Thank you for your reply.
As from your suggestion, i have implemented a while loop and case selector. But still the same problem. It checks for values again and again but incoming values are stopped (Generation of M1 and M2 is stopped as i press 'Standard test'). It is really embarrassing that i am asking these stupid questions and not getting exact point what you want to say.
Waiting for your kind reply.
Regards,
Khan
04-24-2017 06:20 AM
While loops do not belong inside of state machines. Your problem is you are using stale data that will never change in your loop. So that inner loop will never stop. Get rid of that loop and more the shift registers out to the outer loop. If you have not achieved your desired values, then you have your state machine repeat the Standard Test state.
04-24-2017 07:28 AM
Start LabVIEW. Click on New Project. Find Simple State Machine. You'll get this:
As you see, it comes with Documentation that should explain All You Ever Wanted To Ask About A Simple State Machine. See the While Loop? See the Case Structure inside it, with an Enum (having the initial State) wired to a Shift Register (that holds the Current/Next State) that goes to the Case (State) Selector?
Build this for yourself. Study it. Play with it until you understand it. Now incorporate it into your Program.
Bob Schor
04-24-2017 03:47 PM
@Bob_Schor wrote:
...
Build this for yourself. Study it. Play with it until you understand it. Now incorporate it into your Program.
Bob Schor
Then look here.
Ben