Examples on how to use Custom tag properties

Hello.
I am trying to use Custom tag properties but I am not finding any examples in the documentation more than they exists.

I would like an example how to access that properties from the tag value change to read and write values.

It could be really helpful to create logics with steps.

Use system.tag.readBlocking() as usual to read them. If the tag is read-only, you will need to use system.tag.configure to write them. Otherwise, system.tag.writeBlocking() can write them, too.

Be aware that there is no formal way to access changes to tag properties by script, other than the native events for .value and for alarms. (UI tag bindings do seem to subscribe properly, now-a-days.)

That sounds like a disaster in the making, if you plan on writing to custom properties regularly. They aren't really designed for that. Use custom properties as static configuration information (dynamic user interfaces and such), where the normal use of the property is just read.

For values, like state information, that will change with your process, use ordinary tags (memory tags, presumably).

Thanks for the tip, to me it looked like the properties could be a good option to store data.

I have a question related the memory tags and performance due tags are stored into the database and many of my tags are just volatile.

Is it possible to have memory tags just in ram?

No, but you can use scripting global variables for such things. Look at my Integration Toolkit's globalVarMap() functions.

1 Like