cancel
Showing results for 
Search instead for 
Did you mean: 

PickAndPlace Logic

Creator
Creator

Hello!

 

We're currently working on a project where we don't have the time to fully understand and learn Simtalk 2.0

 

Our model looks like this:

Picture1.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The movement of the line is as following: The PickAndPlace picks up one of three different entities from BufferIn. It then moves the entity, to UL. After that, one of the three entities is moved immediately to BufferOut while the other two types are moved to G1-G3. After G1-G3 is finished the PnP then places the entity in BufferOut. Right now another issue besides the PnP placing things wherever it feels like is that it places objects in the processes that are already full (blocking is already checked in all the processes).

 

From what I understand we're going to need several methods. I'm familiar with switch, so I tried using that one. The @.move clearly doesn't work since it doesn't apply to the PnP. Therefore I tried making a method that looks like this:

switch @.name
case "EGE"


 if @.destination = BufferOut
     PickAndPlace.setDestination( BufferOut, false )
 else
  PickAndPlace.setDestination( BufferOut, true )
 end
else
 if @.destination = G1
     PickAndPlace.setDestination( @.destination, false )
 else
  PickAndPlace.setDestination( @.destination, true )
 end

end

 

Now this code is not in any way working or complete. I don't find the "Context Help" helpful at all. It basically speeds through the process of programming the robot. I really don't understand the if-conditional, which is taken straight from the Context Help->setDestination. It seems illogical to set @.destination, false and true, for the same destination.

 

I'd really appreciate if someone could take the time to explain what types of methods we need. If I just get to understand how the PnP handles one station, I'm sure I can apply that to the others. Probably need some sort of priority order since G1-G3 needs to have the highest priority.

 

Thanks in advance.

 

11 REPLIES

Re: PickAndPlace Logic

Creator
Creator

I realized that the code was completely irrelevant, however. I still find myself completely unable to move anything away from the first process. It just picks it up and places it back down.

Re: PickAndPlace Logic

Creator
Creator

Alright, I've managed to come up with a code that sort off does what I want. I have two problems at the moment.

1. The entire simulation ends after one object has passed through the line.

2. The robot doesn't work with multiple entities. For example, I want the robot to first pick up an entity at BufferIn. Then it's supposed to place the entity in the UL. After the UL it is supposed to place the entity in G1, G2 or G3 (depending on which one is empty. Might be good to do an if-else-end with G1-G3.Full?). After it places an entity in G1, G2 or G3 the robot is supposed to pick up a new entity and do the process all over again. Once the entity in the G1-G3 is finished it's supposed to have the highest priority and be delivered to Buffer ASAP.

 

I'm guessing it's possible to do a priority list, but I'm currently not getting that to work.The current modelThe current model

 

The .spp can be found here:

Re: PickAndPlace Logic

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

attached you will find an example.

 

Kind regards

Karola

Re: PickAndPlace Logic

Siemens Legend Siemens Legend
Siemens Legend

And so your model also works.

 

Kind regards

Karola

Re: PickAndPlace Logic

Creator
Creator

Thanks for the reply.

This is however not really applicable to my case. I don't understand where @.destination is coming from, since it's not mentioned anywhere. I can't find that it's an actual attribute anywhere. I need to have a percentual split that's 20%, 18,5% and 61,5% between the different entities.

 

EDIT: Just saw the later reply. That's not how the model is supposed to work. The robot is supposed to transport an entity from UL to G1 OR G2 OR G3, not all of them. It's also supposed to be working with multiple parts, so once an entity enters G1, G2 or G3, it's supposed to start taking a new entity from BufferIn to UL. That's because the processtime on the G1, G2 or G3 is 412 seconds while the processtime on UL is 68 seconds. 

Re: PickAndPlace Logic

Creator
Creator

I guess I need to fully elaborate, I might have been a bit unclear.


There's 3 entities that are going with a percentual split. "EGE" is supposed to go to the UL and then immediately to the BufferOut.

 

"RPX" is supposed to go to UL->G1 or G2 or G3 (whichever one is avaliable) and then after that it's supposed to go to a SingleProc for a certain amount of time, and then to the BufferOut.

 

"Other" is supposed to go from UL-> G1 or G2 or G3->BufferOut.

 

Re: PickAndPlace Logic

Siemens Legend Siemens Legend
Siemens Legend

now the entity is transported to G1 or G2 or G3 and the pickAndPlace doesn't wait there. And the RPX is transported to the singleproc

 

destination is a build-in attribute of the entity. With this attribute you also can determine the target of the pickAndPlace

 

Kind regards

Karola

Re: PickAndPlace Logic

Creator
Creator

Thanks a lot for your reply and model, that's exactly what I needed.

There's still one problem however. When I try to change the processingtime for the model, the robot eventually gets stuck. The processing time for the G1, G2 and G3 is 412 seconds while the UL is 68 seconds. So the robot does the first processes fairly quickly and then it has to wait while the G1-G3 is full.

 

I haven't tried adding another line in the code that tells it to wait yet, but I think it would look something like this
if G1.full and G2.full and G3.full

     wait...

 

I don't really know what the line should really say since I'm not familiar with Simtalk. I might be able to figure it out, but I don't know yet.

Re: PickAndPlace Logic

Creator
Creator

Actually, let me rephrase that. I placed a buffer next to the PickAndPlace that is supposed to have 2 bufferspots. Whenever G1, G2 or G3 is full, I want to place the entity in the buffer. If the buffer is full, I want the robot to waituntil G1, G2 or G3 is done. This is where I can't figure out what to write.

if G1.Full and G2.Full and G3.Full

         waituntil ...