Hi Michel,
If the StDev is any use then there is something you can do for this.
First, you can create a dataset to check for deviations.
- Create a new PI Expression Dataset, name it "SPChangeCheck".
- Set the expression to be "if StDev('sinusoid','*-8h','*') > 2 then 1 else 0" (Replace sinusoid with your tag name)
- Save it.
- Draw a value symbol on your display that displays your SetPoint tag.
- MultiState it, only now set the MultiState to use the Expression Dataset (Calculation) you created above.
- It will give you a couple of states by default, which is fine.
- Set State 1 to be "0.00000 -> 0.99999" with your normal colour.
- Set State 2 to Blink and change colour to Red.
Now whenever the current temperature has deviated by more than 2 over 8 hours it will blink red. No VBA needed
Alternatively, you can programatically access a PI Expression Dataset to set the Expression. e.g. Do your calc in VBA, then access the Dataset set the Expression to "1" or "0", this will then be used in the MultiState to blink.
Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies