Cancel
Showing results for 
Search instead for 
Did you mean: 

Distribution code Question

Creator
Creator

Hello at all!

In the attached model , I have a question whether the code I write to  define destination of PickAndPlace is right or not.

That Pallet A all go to Line1, and 50% of Pallet B , 90% of Pallet C go to Line1, as the others go to Line11.

I will really appreciate for your help!!!

Have a nice day!

4 REPLIES 4

Re: Distribution code Question

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the name of the container is A,B and C you you need to check @.name not @.muPart.name (that returns the name of the part inside the container).  Since you have an else-condition (all to line11), you can simplify your code:

 

var i,j: real
i:= z_uniform(1,0,1)
j:= z_uniform(1,0,1)
if @.Name="A"
	PickAndPlace.SetDestination(Line1)
elseif @.Name="B" and i<=0.5
	PickAndPlace.SetDestination(Line1)
elseif @.Name="C" and j<=0.9
	PickAndPlace.SetDestination(Line1)
else
	PickAndPlace.SetDestination(Line11)
end
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Distribution code Question

Creator
Creator

Thank u so much!!!

Re: Distribution code Question

Creator
Creator

Hello,sir!

I am sorry to bother you with another problem that after the sorting the products go to the high-bay warehouse and will not be stored.

If there any problem in the setting of racklane?

Re: Distribution code Question

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you have already the method userSetTarget in your frame; this method you need to call using a sensor on line11;

after line1, you need another conveyor to connect the second rack

 

I guess, in your constallation you will need two WMS objects and also two userSetTarget methods (you need to change the second one to adress the right WMS)

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net