Dynamic OPC tag properies

Hi,

I am trying to find a way to make dynamically changing "Engineering Limit High" for a tag, what would be the possibilities?

I have a OPC tag that is linearly growing (total energy register) and i have some data quality problems with sometimes saving a value of only 3000 units higher to DB. So i would like to make a dynamic tag property which will always be higher then for example this weeks start "total energy" + 1000 units.

Any ideas, or is it even possible? I am new to the community

You can use a script to write to the engHigh property of the tag using writeBlocking.

One way is you could have a SQL tag or name query getting the DB value. Then onChange event of the tag, write to your engHigh property.

system.tag.writeBlocking(['your/tag.engHigh'], [DB+3000])