Showing results for 
Search instead for 
Did you mean: 

Portal Crane collision control

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hello all. I have problem with collision control in portal cranes. I need some flexible method to avoid collision for 2 or 3 portals . If you have some experience with this could you give me some advice ? or send sample ? At the monet I am using standard Multi portal Crane form Plant Simulation Lib and standard control method . Cranes get task "Form" "To" using Queue File . In Queue File I add/delete task using method push and pop - when task is done. Portal Always doding task from top Queue File. 


Re: Portal Crane collision control

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Damian,


the user is responsible for avoiding collisions.


Usually each portal is controlled by a sequence of instructions, which is created by the user. An instruction can be executed when the previous one is finished. In the attached example such a sequence is started by the exit control of the SingleProcs SP1 and SP2, where the parts, which are to be transported, arrive.


Because sometimes the cranes have to interrupt their way your idea with the Queue of such instructions seems to be very good.


In the example the collision control is only used to detect collisions caused by wrong control of the portal.




Re: Portal Crane collision control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hello Damien,


there are a lot of strategies in reality. You have two problem areas: possible collisions with waiting cranes and possible collisions with cranes, which operate jobs.


To prevent collisions with waiting cranes you can analyse the path of the current job and move the waiting crane to a position behind the overlapping position, Normally you have to block this crane, until the current crane has finished his job in the overlapping area to prevent additional collisions.


Another way in reality is to declare one crane as the leading crane. The other cranes has to follow this crane, if a minimum dstance is reached. If the leading crane has leaved the overlapping area the followed cranes returm to their job/ waiting position.


A third method is to check all active jobs of all cranes for possible overlapping with the current job and wait until these jobs are finished.


Best regards







Steffen Bangsow
freelance simulation specialist  

Re: Portal Crane collision control


Hi all,


I want to write a method for collision control of my two portals. It must hold for loaded and unloaded cranes. I think it is fine when one of the two is the leading crane. The example TwoPortalsCollision of the ExampleModels isn't that clear to me.


Has anybody an example how to write this method?


Thanks in advance!


Re: Portal Crane collision control

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Damian,


to avoid waiting times all portals must be coordinated.


In the picture the left portal had loaded a part which must be transported to SP3. The left portal must wait because the right portal has the moving direction “left”.


The question is: How the left portal can reach the target SP3.

Either the right portal needs to go away or the left portal must wait until the part on SP2 is transported to SP4 by the right portal.


The attribute Portal.State can have the values “driving”, “waiting” and “idle”. The attribute Portal.MovingDirection can also be used to detect the current state of a portal. After a movement the Portal.State is automatically changed from “driving” to “waiting”.

Using a waituntil instruction you can coordinate the movements of the portals.


If you allow collisions I want to know:

How you want to continue after the upcoming collision in the picture?




Re: Portal Crane collision control


Hi Peter,


I would say that the unloaded crane has to follow the loaded crane till it drops its MU. Thereafter both cranes are going to their next job. When both cranes are full/empty, one of the cranes has to be the leading crane.


So when portal1 and portal2 are both loaded en portal2 is leading:

portal1 has to follow portal2 till it is empty

then portal2 has to follow portal1 till it is empty

when both empty they are going to their next jobs


When you have two singleproces calles 'source' and two singleprocs called 'target' and both portals can handle all sources and targets, sometimes collision will occur, but not always when the movingdirection for portal1 is left and right for portal2. You only want to influence the cranes when real collision will occur. So then it is not possible to use the waituntil instruction isn't it?


I was thinking about something like this in a detectCollision method:


if CollisionDetection = "false" and portal1.full and portal2.empty then

portal1:= "leading crane";

portal2.moveWithObject (portal1) until portal1.empty;

portal2.moveToObject (target);

waituntil portal2.state="waiting" prio 1;


elseif ....


Because moveWithObject is unknown another kind of command has to be implemented here..

So in the end I think I am looking for a way to let portal2 following portal1 till it dropped its MU?



Re: Portal Crane collision control

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello G_R,


the controlling method needs two Variable objects portal1 and portal2, which are initialized in an Init method:

local portalList : list;
portal1 :=;
portal2 :=;

Then you must determine the starting event. In most cases it is the end of the processing, which can be detected by the exit control of a SingleProc. A possible code of such a control can be:

waituntil Portal1.state= "idle" prio 1;
local motionOK: integer := Portal1.moveToObject( ? );-- ok?
waituntil Portal1.state= "waiting" prio 1;
?.cont.move( portal1.hook );
motionOK := Portal1.moveToObject( TargetObjekt );--collision ?
waituntil Portal1.state= "waiting" prio 1;
Portal1.moveToPosition(ParkSingleProc.xpos, ParkSingleProc.ypos);

The sequence of the activities of the crane Portal1 is:

1. Wait until the last task is finished

2. Goto load station

3. Load part

4. Goto target station

5. Unload part

6. Goto parking position


Note: motionOK = 0 means that no collision will occur.