How could I calculate the rate of change of a tag? I think I could probably write a script that takes two reads on the tag at different times, but I want to know the typical implementation. This tag’s history is also being stored to the DB, but it doesn’t seem like a good idea to use this to find the rate of change.
There are several ways you could do this. You could set up a transaction group to log a tag value every 60 seconds, or whatever time interval you need, into a table. Then find the difference between the last two values. This would give you the rate of change per minute updating every minute. The shorter the capture time the more instantaneous the rate of change, the longer the capture time, the more average it will be. Finding the difference between the two values will be determined by the type of db you use with the transaction group.
Thanks, that’s a really simple setup