Good afternoon.
I need some help. I’m creating a parameter called Weight in a Product, which should randomly generate the product’s weight in the range of 10,000–12,000 grams.
I can’t figure out how to correctly use the random number generation function for Integer and Real types.
Thank you!
Hello,
- If you created a Product Property, you will be able to get it from the Process with
<VariableName>.<PropertyName>, so in your case it would probably be: ProductIn.Weight - If you created a Component Property, you will be able to get it from the Process with
<VariableName>.Component.<PropertyName>, so in your case it would be ProductIn.Component.Weight for example.
To assign a weight to the products, you need to do it in a process, for example in a Feeder process after the Product was created with an “Assign” statement.
If you want a uniform distribution (–> in range a <= x < b) the you can write it uniform(stream, a, b), so in your example it would be uniform(0,10000,12000) . You can write this function it the same way for a Real or Integer property.
You can find this informations in the Help file under “Expressions” - “Functions” and “Expressions” - “Process Statement Expressions”.
I think you should be able to simply create Real type product property in the Product Type editor and assign a distribution to it. Each product will then get a static sampled value from the distribution.
Distributions aren’t supported for integer properties, though.
That’s works!
Thank to both of you!
One more time, thank you both very much for your help.
Maybe you could then tell me what could be the issue with the depalletizing of the boxes from the pallet?
The task is simple — the robot is supposed to unload boxes from a pallet, and when the pallet is empty, it moves further along the wide conveyor.
I’m trying to do it by analogy with the sample layout Assembly – Depalletizing.vcmx, but I just can’t really figure out how the logic of Assemblies works.
Quantum.vcmx (331.8 KB)
You need to set the TransportIn in the ToConveyor process on “From previous process” and it should work.
Thank you, it’s working now!
I’ll never be able to grasp the logic of working with assemblies ![]()
You had it right with the Assembly!
The only problem is that when the TransportIn is set on “From Component Container”, it will expect a product to arrive from the conveyor for example. With “From previous process”, it requests a product from the process before which can be transported with the robot.
Don’t hesitate to have a look at the processes in the examples of Layout Templates in the eCat. It helped me a lot when I started!
Thank you very much for your kind attention, Tilma. Working with assemblies is quite challenging for me, although I’m carefully studying the lessons on VC Academy, YouTube, and the Layout templates. But I’m not giving up! ))
Could you lease take a look at my layout one more time. Another robot has been added, which is supposed to pick up boxes from the conveyor and place them onto the pallet, forming an assembly, but for some reason it’s not working again.
I’m trying to do it by analogy with the training example Assembly Palletizing.vcmx, but something keeps going wrong.
Quantum.vcmx (767.1 KB)
Except in parallel processes, you should avoid using the same name for different processes. Here the Flow got confused about the “FromConveyor” process.
Change the name of one of these processes, and check the Process Flow Editor to see if the steps still match.
Thanks, now it works ![]()
