Showing results for 
Search instead for 
Do you mean 
Reply

Crash when trying to load Worker contents onto Conveyor contents?

Having trouble debugging this issue, not sure where I'm going wrong with my logic. When a tray is sent down a conveyor, a worker is called to pick it up. If the tray is partially empty, the worker is directed to another workplace to pick up whatever number of parts required to fill the tray. Once the worker has the parts, he is supposed to go back to the conveyor workstation and deposit the parts into the tray, then take the now full tray to the drop off location. The program crashes while the worker is grabbing the parts or just before he is directed to go back to the conveyor workstation. Attached is the project in question; it's my first project so it may be unnecessarily complicated. I think the problematic method is the "DispenseExtraParts" method:

 

if ? = LHPartPick_MP1 //workstation at part source
	
	while .Resources.Worker:1.NumMUParts /= .Resources.Worker:1.Capacity
		waituntil LHPart_MP1.Full = true
		LHPart_MP1.cont.destination := LHTrayConveyorB_MP1.cont
		LHPart_MP1.cont.move(.Resources.Worker:1)
	end
	
	.Resources.Worker:1.goto(LHTrayPick_MP1)
	
elseif ? = RHPartPick_MP1
	
	while .Resources.Worker:1.NumMUParts /= .Resources.Worker:1.Capacity
		waituntil RHPart_MP1.Full = true
		RHPart_MP1.cont.move(.Resources.Worker:1)
	end
	
	.Resources.Worker:1.goto(RHTrayPick_MP1)
	
elseif ? = LHPartPick_MP2
		
	while .Resources.Worker:1.NumMUParts /= .Resources.Worker:1.Capacity
		waituntil LHPart_MP2.Full = true
		LHPart_MP2.cont.move(.Resources.Worker:1)
	end
	
	.Resources.Worker:1.goto(LHTrayPick_MP2)
		
elseif ? = RHPartPick_MP2
		
	while .Resources.Worker:1.NumMUParts /= .Resources.Worker:1.Capacity
		waituntil RHPart_MP2.Full = true
		RHPart_MP2.cont.move(.Resources.Worker:1)
	end
	
	.Resources.Worker:1.goto(RHTrayPick_MP2)

end

The project is still work in progress, let me know if anything needs explaining.

1 REPLY

Re: Crash when trying to load Worker contents onto Conveyor contents?

Hi vmorr,

 

it is not allowed to set a container (conveyor content) as destination. The destination must be a stationary object which can have a workplace assigned or the workplace itself.

The crash will be fixed in the next release.

 

Kind regards

Karola