Cancel
Showing results for 
Search instead for 
Did you mean: 

Waituntil exitblocked problem

Creator
Creator

I have a problem with controling the exit of a SingleProc.

In my case I have 3 types of MUs which I segregate between 4 stations in a control station using a method:

is
par : object[];
do
par := makeArray(Piec1, Piec3);
inspect @.Index
when 15 then
@.move(Piec2);
when 16 then
@.move(Piec4);
when 167 then
--@.move(par)
@.move(Piec1);
end;
end;

 

 

Then I have a station named Piec1 which do not start before there are 24 MUs in it. When the number reaches 24 it should process and then move all MUs forward before unlocking the entrance. I created a method to control it:

Piec1.entrancelocked:= false;
Piec1.exitlocked:= true;
waituntil Piec1.NumMU >= 24 prio 1;
wait 60;
Piec1.entrancelocked:= true;
Piec1.exitlocked:= false;
waituntil Piec1.NumMU = 0 prio 1; 

 

This should be a simple method but it do not work anyway. When the first MU reaches Piec1 it blocks the Exit, the system goes on, but blocks when the second MU leaves control station. No idea why. Can anybody help me with that? 

1 REPLY

Re: Waituntil exitblocked problem

Experimenter
Experimenter

Hi PiotrekO,

 

you are using a SingleProc for 'Piec1' which has a max. capacity of 1.

 

You can either replace the SingleProc with a ParallelProc or use a Buffer in front of the SingleProc - depends if the MUs are processed parallel or one after the other.

 

If you use the ParallelProc my suggestion is to use Method2 as EntraceCtrl:

 

is
do

	if Piec1.NumMU = 1 then;
	   Piec1.exitlocked:= true;
	   Piec1.entrancelocked:= false;
	elseif Piec1.NumMU = 24 then;
		   Piec1.entrancelocked:= true;
		   Piec1.exitlocked:= false;
		   waituntil Piec1.NumMU = 0 prio 1;
		     Piec1.exitlocked:= true;
	   Piec1.entrancelocked:= false;
	   end;

end;

 

Regards,