Hello guys. My project in the PS performs the production of parts contained in Table, but when you finish parts from Table, the EventController continues running. How do I stop executing when having made all the parts of my Table?
If in the Mu selection, 'sequence' is selected, then plant simulation stops automatically once the producesd Mus are processed. If you have any other scanario, you can try using the code as shown
The execution point of this line depends on your model.
Thanks, but my pieces are produced by Workers. If I trigger 'EventController.Stop' when my production is over, the workers will still be in their jobs. Must stop the EventController when it's over production and workers have already gone to WorkerPool.
You can use resworking of singleproc to account this. Example Code is as shown.
is do if ?.statnumin=2 then ?.exitlocked := true; waituntil (A.resworking=false and B.resworking=false) prio 1; eventController.stop; end; end;