Cancel
Showing results for 
Search instead for 
Did you mean: 

PickAndPlace method robot multu-tasking

Experimenter
Experimenter

Hi Everyone,

 

I am trying to wirte an OnTagret method for the PickAndPlace robot so it carry out the loading and unloading of two processes, test and weld (beware that the part must go to the tester before to the welder). I have made it with the following method where the robot would follow the process in sequence, where first it has to load the tester, then wait for the test to be finished, then unload the tester, then load the welding machine, wait for the weld to be finish, and finally unload the welder once the welding process is finished.

 

--------------------------------------------------------------

if ?.empty
 return
end


if @.LastStation = Buffer1111
 ?.setDestination(Load11, true)
 waituntil Load11.empty prio 1;
 waituntil Test11.occupied prio 1;
 waituntil Test11.empty prio 1;
 ?.setDestination(Unload11, true);

elseif @.LastStation = Unload11
 ?.setDestination(Wload11, true)
 waituntil WLoad11.empty prio 1;
 waituntil Weld11.occupied prio 1;
 waituntil Weld11.empty prio 1;
 ?.setDestination(WUnload11, true)
 
elseif @.LastStation = WUnload11
 ?.setDestination(Buffer12, false)
 
else
    ?.setDestination(Load11)
end

---------------------------------------------------------

 

The problem is that in reality the robot would not wait for the weld process to be finished before loading the next part onto the tester. I have tried this logic (of loading and unloading both tester and welder). I have tried different way with if... else function or switch cases.

 

Waht would be the best way to load tester while the weld is bieng carried out and wait the welder is free to load the next part ?

 

 

 

7 REPLIES

Re: PickAndPlace method robot multu-tasking

Phenom
Phenom

I think the Pick & Place pull control (pullCtrl) makes it easier for you / your robot

 

to individually select the next part to handle from the forward blocking list (fwBlockList) than parts being pushed  to

 

the robot and therefore forcing the robot to handle the pushed part.

 

 

 

 

 

 

Re: PickAndPlace method robot multu-tasking

Phenom
Phenom

have a look

 

 

Unbenannt.png

Re: PickAndPlace method robot multu-tasking

Experimenter
Experimenter

Hi Phenom,

 

Many thanks for the help, it is working with PullControl only.  

 

Although it kinda worked with the following OnTaget and OnPull control. However, once the robot has loaded the welder, it will go to the buffer to pick-up the next, but as the weld process has already finished, the robot goes back to the welder to unload the welder before picking up a new part. Is there a way to wait to load the new part in the tester before unblocking the welder ?

 

-- OnTarget

if ?.empty
	return
end

if @.LastStation = Buffer1111 
	?.setDestination(Load11, true)
	waituntil Load11.empty prio 1;
	waituntil Test11.occupied prio 1;
	--waituntil Test11.empty prio 1;
	
	if WLoad11.empty and Weld11.empty and WUnload11.empty then
		?.setDestination(Unload11, true)
	else
		?.setDestination(WUnload11, true)
	end

	
elseif @.LastStation = Unload11 
	?.setDestination(Wload11, true)
	waituntil WLoad11.empty prio 1;
	waituntil Weld11.occupied prio 1;
	if Load11.empty and Test11.empty and Unload11.empty
		?.setDestination(Buffer1111)
		@.move
	else
		?.setDestination(WUnload11, true)
		@.move
	end
				
elseif @.LastStation = WUnload11
	?.setDestination(WUnload11, true)
	waituntil WUnload11.empty prio 1
	?.setDestination(Buffer12, false)
	if Unload11.occupied
		?.setDestination(Unload11, true)
	else
		?.setDestination(Buffer1111)
	end
else
end
-- OnPull

var blockList:table
?.fwBlockList(blockList)


if WUnload11.full = true
	for var y := 1 to blocklist.yDim
		if blocklist[1,y].~.full = true
			?.unblock(blockList[1,y])
		end
	next
	
elseif Unload11.full = true
	for var y := 1 to blocklist.yDim
		if blocklist[1,y].~.full = true
			?.unblock(blockList[1,y])
		end
	next

else
	?.unblock(blockList[1,1])
end

Re: PickAndPlace method robot multu-tasking

Phenom
Phenom

hello,

 

it is a bit difficult to follow your simtalk code w/o the simulation model.

 

Nevertheless the ideas behind using the pull control is to give the robot

 

full control over all handling request.

 

Which request will be selected next from the fwBlock list is fully in the hands of the pullControll.

 

To additionally block the robot during the handling process for all other requests I added

 

the waituntil ?.full

 

I do not see any waituntil ?.full in your code therefore I assume a request is taking over command 

 

over the robot whilst processing.

 

 

Re: PickAndPlace method robot multu-tasking

Phenom
Phenom

I had a 2. look at your "pull" code

 

comments see below

 

-- OnPull

var blockList:table
?.fwBlockList(blockList)


if WUnload11.full = true	--why are you checking if station is full ?
	--all mus ready to unload are listed in the blocklist
	
	for var y := 1 to blocklist.yDim
		if blocklist[1,y].~.full = true --why are you checking if station is full ?
			--all mus ready to unload are listed in the blocklist
			?.unblock(blockList[1,y]) 
			--no waituntil ?.full defined
			--no destination defined
			
		end
	next
	
elseif Unload11.full = true --why are you checking if station is full ?
	--All mus ready to unload are listed in the blocklist
	for var y := 1 to blocklist.yDim
		if blocklist[1,y].~.full = true --why are you checking if station is full ?
			?.unblock(blockList[1,y]) 
			--no waituntil ?.full defined
			--no destination defined						
		end
	next

else
	
	?.unblock(blockList[1,1])  			-- the system  not the robot is choosing the mu !
	
	-- no destination is defined 
	end

 

in attachment a working model similiar to your's

Unbenannt.png

Re: PickAndPlace method robot multu-tasking

Phenom
Phenom

I had a 2. look at your "pull" code

 

comments see below

 

-- OnPull

var blockList:table
?.fwBlockList(blockList)


if WUnload11.full = true	--why are you checking if station is full ?
	--all mus ready to unload are listed in the blocklist
	
	for var y := 1 to blocklist.yDim
		if blocklist[1,y].~.full = true --why are you checking if station is full ?
			--all mus ready to unload are listed in the blocklist
			?.unblock(blockList[1,y]) 
			--no waituntil ?.full defined
			--no destination defined
			
		end
	next
	
elseif Unload11.full = true --why are you checking if station is full ?
	--All mus ready to unload are listed in the blocklist
	for var y := 1 to blocklist.yDim
		if blocklist[1,y].~.full = true --why are you checking if station is full ?
			?.unblock(blockList[1,y]) 
			--no waituntil ?.full defined
			--no destination defined						
		end
	next

else
	
	?.unblock(blockList[1,1])  			-- the system  not the robot is choosing the mu !
	
	-- no destination is defined 
	end

 

in attachment a working model similiar to your's

Unbenannt.png

Re: PickAndPlace method robot multu-tasking

Experimenter
Experimenter

Hi Phenom,

 

Sorry for the late reply and many thanks for your help. your first PullControl methods work perfectly and I was only curious about otherway to write my methods. i have not had the chance to try your other method but will do at some points.

 

Many thanks for the help again,