Changing product properties with PM statements

Hi,

Recently I have been looking for ways to change product properties as the simulation is running, preferably with PM statements.

Unfortunately I have not been able to do so with PM features, but only through a Property Setting Point mounted on a conveyor. This solution limits the possibilities because it can only be done in-line on conveyors.

Is it possible to change a product property based on some logic without having it go through a property setting point? Ideally with PM statements.

And why is the “Assign Variable” not able to do this, when it can be done through another component?
e.g.
TransportIn: xx as ProductIn
Assign ProductIn.Property = True/123/whatever

In my opinion, this should be very basic functionality without having to make custom scripts/code etc.

Thank you in advance!

3 Likes

This would be soooooooo important!

In VC 4.4 the Assign statement was extended to support providing an expression that defines the target property to set. It should be now possible to set all kinds of properties, including those of Product instances.

Generally you should not rely on component properties (ProductIn.Component.PropertyName) in PM processes but use Product instance properties (ProductIn.PropertyName) instead.
The reason is that the component is considered just a visualization for the Product instance and all process logic should operate on the Product instances and their properties.

1 Like

Hy,

I get this:

Is there something wrong? → I have VC4.4 Premium

Thx & Regards
Feature

I don’t know German, but looks like you have defined a component property in the Product Type, not a Product property.

On the left side is the product property defined. Or how you defined it?

On the right side I try to set the value over PM, what you said that should work in 4.4 but the property couldn’t be set over AssignVariable…

Do I anything wrong or you have a small working example?

The errormessage is in english! :wink:

Thx & Regards
Feature

@captain_feature So you are saying Komponenteneigenschaften means “Product Properties” while Produkteigenschaften means something else?
I’m inclined to doubt that.
image

Hy @TSy,

sorry you’re alrigth, I’m taking all back! → Everything working fine in 4.4…

Thx & Regards
Feature

1 Like

It’s great to see it is now supported.

Regarding your first message @TSy about using product properties instead of component properties, I am not really sure about that. I am unable to write to product properties with the “Assign” statement by using ProductIn.testprop as an example (see below).
image
Where can I see that the product property actually is changed?
When using the Component property, it is possible to see the change to the flow element as it is assigned a new value and can then be used for other things such as routing on conveyor diverts.

The Product (instance) properties can be read using expressions in PM processes, or from Python API.
So you can use e.g. an If statement with ProductIn.testProp == True

Conveyor routing rules don’t have support for Product properties, but there is routing based on either Transport solution or Product Type of a Product instance.

Also sadly there isn’t a way to see Product property values or really any other Product instance info in the UI.

Alright, that is what I expected. Thank you for the answer.

The inability to see the values makes it very difficult to work with and debug, which is why I have been using the Component property previously. I don’t see any issues with using component properties instead really.