Cancel
Showing results for 
Search instead for 
Did you mean: 

Control MU Exit

Experimenter
Experimenter

Hi,

 

I have the following line setup for part flow:

SP1 - SP2 - SP3 - SP4 (each single proc here has a part  capacity of 1)

 

I want to write a method where if SP2 is idle (starved), an MU already at SP3 does not exit SP3 and move to SP4.

Instead, it waits for a part to arrive at SP2 from SP1 before letting the part at SP3 move ahead .

 

I have the following method:

 

is
do
  if SP2.numMu <1 then
 SP3.exitLocked:=true;
   else
SP3.exitLocked:=false;
  end;
end;

 

I am using this method as the Exit control for SP3 but its not working. Any suggestions??

 

 

4 REPLIES

Re: Control MU Exit

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the part with the waiting... is missing in your code; e.g.

 

is
do
  if SP2.numMu <1 then
       SP3.exitLocked:=true;
        --wait for a part on SP2
       waituntil SP2.occupied prio 1;
       --move the part
      SP3.exitLocked:=false;  
else SP3.exitLocked:=false; end; end;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Control MU Exit

Experimenter
Experimenter

Hi ,

 

So i edited the code as you suggested, but the part still doesnt move out of SP3 and the whole line is just blocked now. I have attached the file. Could you please have a look?

 

May be I am doing something wrong here?

Re: Control MU Exit

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I guess, it is a problem with the exit locked: if the exit is locked, the exit control will not be called; but you dont need to lock the exit; if you use a exit control front, Plant Simulation waits for a move command to transport the part; try this:

 

is
do
  if .Sample_Model_1.SP2.numMu <1 then
       --wait for a part on SP2
       waituntil .Sample_Model_1.SP2.occupied prio 1;
       --move the part
	   @.move; 
  else
	  @.move;
  end;
end;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Control MU Exit

Experimenter
Experimenter

Thank you so much for all your help!!