How do i change component property from within process modeling

I would like to turn on a light of the inspection camera when the product enters the conveyor, but i cannot find a command that it would allow me to do that. How do i change component property from within process modeling?

Hi,
you can use GetProperty for that. Select the camera and then chose the Property. with the assign statement you can then assign a True or False value to this property

1 Like

Thank you for a reply. But how do i assign True or False to it.

Neverminded. I didn’t realize that once you use GetProperty there is bi-directional link that allows you to assign value to property or variable.
Thank you @Tilma

Hi,

What if I want to increment an integer property in a component?

I can get the property and use it in if statements, etc., but I can’t seem to be able to read the property in an expression for assigning.

For example, if I have a PartCount property, I can’t assign it a value of “PartCount+1” even though this can easily be done for local process variables. I can assign an explicit value no problem (such as “5”), I just don’t know how to assign the property’s value to something.

I just get this message:
Error in property ‘ValueExpression’. Property ‘PartCount’ in expression ‘PartCount +1’ is not found.

image

Ultimately I want to keep a count that doesn’t reset after each process routine execution, so it cannot simply be process variables.

1 Like

which release are you using?
should be possible since visual components
4.4…

Using VC 4.3 unfortunately.

I know 4.4 introduced new functionalities for the assign variable statement, but I’m just surprised that I can both read and write a component property, but I cannot write what I read from the component property (hopefully that sentence makes sense).

But no worries, I can work around with python scripts as usual. Sometimes I feel like it would be more efficient to just write the entire project using Python API…

1 Like