03-23-2007 06:21 AM
03-23-2007 07:24 AM
03-23-2007 07:33 AM
Hi Paul,
the problem is, that I have three seperate While-Loops running in parallel all with a Sequenz with quite a lot of cases. I would like to halt the hole program easily. If I understand your suggestion correctly, I would have to put a state maschine or a while-loop in every single case of the hole sequenz - and that would be a lot of work...
Therefore I am looking for something to controll the pause-button programatically...
Regards,
Frank
03-23-2007 07:39 AM
03-23-2007 07:51 AM
Ideally, none of the buttons on the toolbar should be used during normal program execution. Their intended use is for development/debuggin and troubleshooting. This is why there is no way to control anyting on the toolbar (with the exception of font settings) from the block diagram.
Pauls suggestion of re-writing your applicaiton into a state machine and having a "Pause State" in your application is really the only way to go. Since you've used Sequence structures, it's going to be difficult to add this functionality into your current application. There might be something you can do using Notifiers and/or Queues to send messages to certain points in your application to implement a pause feature. But without seeing your code, it's difficult to say how easy this would be.
Ed
03-24-2007 02:28 PM
Each loop can still be in parallel and you can use a queued message passing state machine. Now you can have 3 loosly coupled state machines, each of which will check a queue in a central state, each thread can send a message to anyother thread using the queue. This is an architecture which I use in almost all of my applications, it is very flexable. Very good for allowing multiple threads to run in parallel but still tightly controls the over all flow of execution.
Paul