Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Carry parts from shiftbuffer - leave parts on station

Pioneer
Pioneer

Hello together,

 

again a problem with model. If the worker carries the parts out of the shift buffer after a pause or a shift, there occures an error in the debugger after a while. The problem is, that there are already parts in the station and the entrance control is triggered, but can't run.

So there are different possibilites, but maybe there is an easier way to solve it.

 

1. the entrance should be locked until the station is empty, I already tried it without success. Something like this.

if ?.empty = false

?.entrance.locked := true

waituntil ?.empty = true

 

2. in the exitcontrol of the buffer. As I tried it, the worker carried only one part to the destination.

   waituntil @.destination.empty = true

@.move

 didn't work either

 

3. This would be the best opportunity. If the shifts ends or the worker is going to take the pause, the parts shouls rest on the station. Maybe it's to complicated and destroys the whole system. For this solution I asked myself if it's possible to get the time which the worker needs for the transport. So that it is possible to write a method. But I don't now if it would destroy the other exit controls. RemainingTime.PNG

 

I'm happy for any idea. Thanks Smiley Happy

16 REPLIES 16

Re: Carry parts from shiftbuffer - leave parts on station

Phenom
Phenom

locking a station looks a bit different.

 

Entrance method:

 

?.entranceLocked:=true

 

Exit method ( triggered with MU rear end !)

 

if ?.empty

entranceLocked:=false

end

 

Don't forget to reset the station7.entranceLocked in an init method

 

at simulation begin.

 

Re: Carry parts from shiftbuffer - leave parts on station

Phenom
Phenom

Hi @Jean9 

 

It is possible to bypass some built-in behaviors, take a look at the attached model. I've created a pause status observer to demonstrate that. So, when the shift ends, the worker is sent to the pool. At this time, I check if the worker is carrying a part, if yes, I change his status to planned. By doing this, Plant Simulation will send the worker again to the previous destination. When he arrives there, I do some checks and move the part to rest in the station. When I set the status of the worker to unplanned again, he goes to the pool.

 

You would increment this logic with different checks, behaviors, etc. Hopefully, it will shed some light on your case.

 

worker.PNG

Best Regards,
Paulo Araujo

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Carry parts from shiftbuffer - leave parts on station

Pioneer
Pioneer

@araujopaulo I only have V 14.0, so I can't open your model Smiley Sad

 

@simulator I started 2,5 month ago, to learn Plant Simulation so I might have some problems with the logics. So as I understood

For the entrance control:

 

var i: integer
var j: integer

Produktionsplan.setCursor(1,1) -- Zeiger auf Zelle 1,1 setzen


if Produktionsplan.find({3,1}..{3,*},@.name)           
i := Produktionsplan.cursorY                                       

for j:=1 to Produktionsplan["LotSize",i]                      
?.ydim := ceil(Produktionsplan["LotSize",i]/?.xdim)

next


?. entrancelocked:= true      -- I put it here, because I thought after the dimensions are set the parts are in the station, so that the entance should be locked at this point. also tried to use it after end.

end

 

For the exit control:

 

After all parts are moved the station is empty and the entrance is locked. And in the settings of the station I can set rear, to trigger the last mu? 

 

-- Arbeitsstationen automatisch zuweisen, nach Reihenfolge im Arbeitsplan

var Product:=@                                                      
var ProductName := @.Name                             
var Step:=to_str(@.Schritt+1)                             
@.Schritt:=@.Schritt+1                                         

if @.Schritt>Max_Steps or Arbeitsplan[Step,ProductName]=VOID

@.umlagern(Warenausgang)

else
var NächsteStation:=str_to_obj(Arbeitsplan[Step,ProductName]) 
waituntil NächsteStation.empty = true and NächsteStation.operational = true 
@.destination := NächsteStation
@.umlagern 
end

 

if ?.empty
?.entrancelocked := false
end

 

In the init method I set all parralelprocs like this, but it's not possible to call all stations or?

 

station7.exitlocked := false

 

That's how I thought, but then the worker only takes one part out of the shiftbuffer and has problems where to put the rest. Then I thought there must be a for loop, so that he takes the hole batch, but what I tried didn't work. And I don't know why he carried before the whole batch and afterwards only one part. 

Re: Carry parts from shiftbuffer - leave parts on station

Phenom
Phenom

@Jean9 

 

Check this new file.

Best Regards,
Paulo Araujo

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Carry parts from shiftbuffer - leave parts on station

Phenom
Phenom

@Jean9 

 

In my last post I clearly stated, that 

 

the exit method to unlock the entry should be triggered

 

by the rear end of the mu.

 

In any other case the attribute value of  ?.empty  will be false

 

as the (last) Mu is still on the station.

 

Workaround for your case:

 

if ?.numMu =1 then  ?.entranceLocked :=false; end;

 

 

Re: Carry parts from shiftbuffer - leave parts on station

Pioneer
Pioneer

Thanks for your responses.

I changed the model now on the basis of araujopaulos model. So far so good.But I've still problems with exit and entrancelock. Or I don't get it how it works right and where to put it.

I tried out different changes of entrance and exit controls, but the parts don't rest on the station. So worker sarts carrying even if the next station isn't empty, so that he doesn't know where to put them. So the exit should be locked, so that the worker can only upload the parts, when the NextStation is empty.

In Version 1 is my model without exit/entrance control, in version 2 with.

Re: Carry parts from shiftbuffer - leave parts on station

Phenom
Phenom

Hi @Jean9 

 

It is quite normal to get a bit confused when changing an object behavior from different places. My suggestion is to concentrate everything possible in a single place to help future model maintenance.

 

For example, quite often I saw this behavior in situations like yours:

- The worker should perform a task

- The worker check if there is time to that

- If yes, he does it

- If not, leave it for the next shift

 

In the first model, I override ShiftCalendar behavior. Therefore, the worker will follow your instructions, but the part is already with him. This new version, check if there is enough time to perform the task. This way, you control when the part leaves the station. You may define the threshold that better represents your situation. Take a look at the attached model:

 

worker.PNG

 

Take a look at line 27 and 32. In these positions you may add waituntil calls to avoid situations like this:

 


So worker sarts carrying even if the next station isn't empty, so that he doesn't know where to put them. So the exit should be locked, so that the worker can only upload the parts, when the NextStation is empty.

In sum, you just move the part (call the worker) if there is enough time to complete the task and if the destination is empty. Further increments will depend on your real-world logic, but I am attaching a new suggestion to you using an exit control method.

 

Best Regards,
Paulo Araujo

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Carry parts from shiftbuffer - leave parts on station

Pioneer
Pioneer

Thank you, think that's the right idea. I have two shift-calendars, so I've to search in the 4th column of the eventcontroller table if there "Schichten_Werker". As you see in the picture I tried out different possibilieties to read it, but I get only false back, even if it is listed. I get only the value true back if I search for "Pause" or "Shift". I marked it on the picture below.

also tried eventList [{4,*}] = "Schichten_Werker"

 

SHift_Worker_Station.PNG

Re: Carry parts from shiftbuffer - leave parts on station

Phenom
Phenom

@Jean9 

 

The format of the imported table is a bit different from the EventList Window:

 

eventList.PNG

 

Column 3 stores the PATH to the receiver. You could find this entire path as a string, or you can set a variable to this receiver and get its NAME attribute to use in your if statement.

Best Regards,
Paulo Araujo

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.