Reach and Change Vision objects properties inside from OPC Tag Event func

Hello everyone,

I am now interested with vision to create a simple window. In that regard, I want to change a vision object by reaching it from a tag event. But it seems that I am getting an error.

Summarily in my case, I created a script project that name is myVisionScripts and it includes a function that name is change_color(). then am calling that function from the inside of a Tag event. But I am getting a error like not founding script project name ‘myVisionScripts’.

So, It is my goal that I want to reach, read or write a vision object from inside of OPC Tag event. How can I do that? Anyone help. Thanks for helps in advance.

There are two issues.

  1. Scripts external to the tag script like that need to be in the global project (or wherever you inherit from)

  2. But to the nub of your question, you can’t, as the scopes are different. Tag events run on the gateway, Vision components run on the client. The gateway has no reference to what the client is doing. Consider using a custom property, and using a propertyChange script, or use the style customizer on your component with the custom property as the driver.

What Jordan said. But also, you can use a client tag change script.

Thanks a lot. That is correct it is working.