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
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.
Ultimately I want to keep a count that doesnât reset after each process routine execution, so it cannot simply be process variables.
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âŚ