I'm new to working with SimTalk and am having trouble correctly using the waituntil statement. I need the workers to pick up the part off the pallet on their respective unload station and carry it over to the pallet on their reload station. The problem I'm having is getting the workers to wait until a pallet arrives at Reload before dropping off their part. I've tried placing waituntil statements in many different Entrance and Exit Controls to see if any work, but have had no success. Am I incorrectly using the waituntil statement or is it just not in the right place? I'm practically learning this software on my own so it's probably something simple.
I've attached the file saved with the error message shown for clarity.
Solved! Go to Solution.
it is a good question. We need to synchronize the arrival of the container and the worker.
At first you have to prevent that the worker unloads the part when no container is on the station Reload:
Therefore we perform
var Worker: object := ?.cont
reload.entranceLocked := true
in the entrance control of the Workplace.
Now no container can enter the station Reload.
In order to catch the event of arrival of the container we use a sensor at the end of the line Line3 before Reload.
Here we must stop the container, wait for the worker with a part, load the part onto the container, sent the worker back and open the station Reload:
Reload.exitLocked := true
waituntil workplace1.occupied and workplace1.cont.occupied prio 1
var worker: object := workPlace1.cont
Reload.entranceLocked := false
Reload.exitLocked := false
The attached model is for Plant Simulation 12.2
the problem at ReadLoad2 is completely different problem. The worker should unload.
We must catch the event of a ready pallet a station Unload2. Therefore we use the exit control of Unload2.
I will not use the exit behavior Carry Part Away.
In the init method we initialize a variable Worker4Unload by the responsible worker:
Worker4Unload := WorkerPool1.cont
In the mentioned exit control we must stop the container.
Then we must wail until the worker is free.
Then the process can continue:
var part: object := @.cont
part.destination := Reload2