Cancel
Showing results for 
Search instead for 
Did you mean: 

Exit control problem

Dear Community,

 

i've a problem with the exit method of a buffer.

When the last MU of the last lot pass into the exit method it has to be moved to the next assembly station and the container moved even if it's not full.

I've placed a breakdown in the method so if you launch the simulation you'll see that one last mu is working and the next one, always last mu, don't and i don't understand why.

Thansk for your help.

 

2 REPLIES 2

Betreff: Exit control problem

Gears Phenom Gears Phenom
Gears Phenom

Hi Francescopoli,

I'm not sure that I understood your question correctly, but I'll try anyway Smiley Happy

grafik.png

I assume you are referring to the "@.move" part; I've debugged both events, the first time the MU @ will loop through tabLotEnd and in row 1 it sees that it is not the last part of the lot "fibbia1/2", so it is moved to the assembly/loaded and then continues to check the 2nd row, where it finds that it is the last MU of lot "tiralampo1/2" and sends the container away. So far, so good.

The 2nd time, the MU @ starts looping through tabLotEnd and finds in the first row that it is the last MU of that lot, so it sends the container away and then continues to check the 2nd row, where it finds that it is not the last MU of a different lot (naturally), so it tries to do @.move, but you sent the container away before, so now there is no main part and moving to the assembly station is impossible.

I suggest you change the last code block like this:

 

--detect last MU of last lot
LastMUofLot := false
for j:=1 to tabLotEnd.yDim 
	If @.Lotto=TabLotEnd[1,j] and @.LotMuNmbr=TabLotEnd[2,j]
		LastMUofLot := true
		exitLoop
	end
Next

-- move to assembly station (always *before* sending the container away)
@.move

-- send container away, if last MU of last lot
if LastMUofLot 
	?.succ.cont.OP:=?.succ.cont.mu.OP
	for i:=1 to ?.succ.cont.numMU 
		?.succ.cont.MU(i).OP:=?.succ.cont.MU(i).OP+1
		?.succ.cont.MU(i).CycleTimes.writerow(1,?.succ.cont.MU(i).CycleTimes.yDim+1,?.succ.cont.MU(i).name,?.succ.cont.MU(i).lotto,?.name,?.succ.cont.~.~.name,?.succ.cont.entryTime,eventController.simtime)
	next
	-- aumenta lo user attribute op del telaio
	?.succ.cont.OP:=?.succ.cont.OP+1 
	--muovi telaio in legatura
	?.succ.cont.move(legatura_Buffer_OUT)
end

I hope this helps Smiley Happy
Alex

 

 

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: Exit control problem

Dear Alex,

yes, it helped a lot. Thank you so much.