I’m creating a feeder that produces trays with subproducts (cylinders) on. i wan’t the cylinders on the tray to vary between 7-12 randomly, but I can’t seem to find out how to change the subproducts value
Hope you guys can help ![]()
I’m creating a feeder that produces trays with subproducts (cylinders) on. i wan’t the cylinders on the tray to vary between 7-12 randomly, but I can’t seem to find out how to change the subproducts value
Hope you guys can help ![]()
Probably easiest to do a different assembly for each subproduct amount.
Then you use a distribution mode for creating a random assembly.
I had a similar example which I changed for your case:
Create Assembly with Random Amount of Products.vcmx (453.9 KB)
Thanks for the suggestions <3
Where do you control the ratio in which the feeder choses how many cyllinders that comes out
In the Process #1:
I created 2 variables in the process: a counter and an integer to store a random number. You can use the uniform function to generate a random number in a range –> Uniform distribution in range a <= x < b
In each iteration of the while loop, it will get one product (the GetAssembly allows you to choose the first empty step, that’s why you need all cylinder in a different step).
It will loop until the variable “counter” reach the random value generated by the uniform function.