08-27-2014 06:36 AM
GerdW wrote:
So you need to check your stop condition in all states and in all loops embedded in those states to allow an emergency exit…
Or, as was already said, check the stop button outside of the case structure. You can use a sequence structure to make sure the stop button is read after the state case has ran. Then just use an OR to stop your loop (Stop Button OR State Stop Condition Met).
08-27-2014 08:35 AM
@GerdW wrote:
Hi syrpimp,
something like this:
Depending on conditions I choose the next state. Replace those conditions with your STOP button…
I am sorry, but I don't understand what those T ON boxes are?
08-27-2014 08:37 AM - edited 08-27-2014 08:38 AM
08-27-2014 09:46 AM
@GerdW wrote:
Hi nyc,
TON/TOFF are functions used in PLC programming. I created them for some state machines of mine.
The point of the image is to show how to change state in a state machine depending on conditions…
To be honest, I have a hard time understanding that small graphic.
08-27-2014 06:55 PM
Thnaks GerdW, Al izz Well ....:manhappy:
08-27-2014 08:24 PM
You would be well advised to decouple your user interface from your stae machine by using a Producer Consumer (Events) design pattern.
Then take a trip to Gramma's house and redefine your states.
08-27-2014 08:41 PM
Great Help... Thank you very much Jeff.. I found this info from NI and yeah you are right I will now shift my code to Producer/Consumer.
Thanks also to GerdW