Pick one value from duplicate timestamp

Discussion created by alanR on Jul 28, 2020
Latest reply on Jul 28, 2020 by sraposo

Hi ,


 i have an issue where two values are being written to the same timestamp. The values are 0,1 and -255.

The PI tag displays in SMT and AF;


0, 12:00:00

1, 12:05:00

-255, 12:05:00

0, 12:10:00

1, 12:15:00


The -255 value does not happen at the same time everyday.

I have tried analysis statements such as; 

if TagVal('Heartbeat') < 0 then 1 else 0

if TagVal('Heartbeat') = -255 then 1 else 0


To try and pick up the -255 value, the only thing that seems to work for me , is using TagMin() and i have also tried sing DigState() to see if it would pick the -255, with no luck.


What im trying to do is if the value of the tag is -255 send a notification.