Cancel
Showing results for 
Search instead for 
Did you mean: 

PickAndPlace Control

Legend
Legend

Hello everyone, 

 

I have a simple question about how to control a PickAndPlace moves. 

My challenge , as shown on the picture, is to pick 2 larges entities (or 4 small entities) from a line and place them on a container. 

I don't know how to tell the robot to do not make any move untill he has 2 big entities or 4 small entities waiting on the line. When 2 (or 4) are  waiting on the line then he can start moving from the container position to the line and then pick 2 LARGE (or 4 SMALL) at once and finally place them on the container ... and so one !  

 

Thank you very much.
BR.
OC

Image1.png

8 REPLIES

Re: PickAndPlace Control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
can you make a small model and post it?
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: PickAndPlace Control

Legend
Legend

Thank you Steffen ! 
In the attachement you can find a simple model about what I was talking about. 

Re: PickAndPlace Control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

"I don't know how to tell the robot to do not make any move untill he has 2 big entities or 4 small entities waiting on the line."

 

you can use an empty exit control in line2, so nothing happens if the first part arrives

 

You can use an observer method for nummu in line2 to set the capacity of the PickAndPlace and move the first part:

param attribute: string, oldValue: any

--only react on increasing
if self.~.numMu > oldValue then
	if self.~.cont.name = "P" and self.~.numMu = 4 then
		self.~.entranceLocked:=true
		--call P&P
		PickAndPlace.capacity:=4
		self.~.cont.move
	elseif self.~.cont.name = "G" and self.~.numMu = 2 then
		--call P&P
		self.~.entranceLocked:=true
		PickAndPlace.capacity:=2
		self.~.cont.move	
	
	end
	
end

in the entrance control of the PickAndPlace you load all remaining parts and unlock the entrance:

 

 

while line2.occupied loop
		line2.cont.transfer(?)
end
line2.entranceLocked:=false

in the exit control of the PickAndPlace you move all parts to the container and the container to the next line segment

 

 

--unload to container
waituntil line1.occupied 
while pickAndPlace.occupied loop
	pickAndPlace.cont.move(line1.cont)
end
line1.cont.move(line3)

in the example you find a mix of old and new syntax

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: PickAndPlace Control

Legend
Legend

Thank you very much for your help ! 

I have a small note. 

When we have a look on the Oberserver Method, you should not move an Entity before the PickAndPlace is back. 

 

Normally we should have smtg like this. 

 

--only react on increasing
if self.~.numMu > oldValue then
	if self.~.cont.name = "P" and self.~.numMu = 4 then
		self.~.entranceLocked:=true
		WAITUNTILL THE ROBOT IS BACK 
		PickAndPlace.capacity:=4 
		self.~.cont.move
	elseif self.~.cont.name = "G" and self.~.numMu = 2 then
		--call P&P
		self.~.entranceLocked:=true
WAITUNTILL THE ROBOT IS BACK PickAndPlace.capacity:=2 self.~.cont.move end end

 Because of two reasons : 

1) You should modify the capacity when the robot is empty ( we can't change the capacity from 4 to 2 while the robot is carrying 4 entities) 
2) We can't move the row of entities while the robot is moving. We should wait until he finished the current job. 

 

For example, on the model you attached when we change the Interval of the source from 0:30 to 0:00 and 

the time factore (in the pickandplace) from 1 to 10. The model stop working because the two reasons I said before ! 


How can we translate "WAITUNTILL THE ROBOT IS BACK" in Simtalk ? 

Thanks again ! 

BR
O.C

Re: PickAndPlace Control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

just set the source to interval=0 and look what happens

 

you could wait for PickAndPlace.occupied=false...

 

self.~.cont.move triggers first the movement of the robot. At the end of the movement the robot will move the part itself. It is quite the same, like a station is fixed connected to the PickAndPlace.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: PickAndPlace Control

Legend
Legend
The condition "PickAndPlace.empty" it's okay to change the capacity but this condition is not enough to start moving the entities. We should wait the robot to get back .

Re: PickAndPlace Control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
The PickAndPlace doesn't work in this way. The robot turns, if an MU is present on one of the entrances. Then start the movement in this direction. This you can also trigger with <MU>.move (without a destination!!! -> this means the movement is using the connector). This causes the turning of the robot.
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: PickAndPlace Control

Legend
Legend

Thank you very much Steffen ! I never had the oppurtunity to use the PickAndPlace object. Today thanks to your help I get exactly how it's working.

 

BR
O.C