Status Chart DownTime not accurate

Hi there,
We are working on a machine status chart where we show if the machine is either running or stopped.
We have a counter on the machines and we take its value by Modbus TCP
We use an OPC tag to display the values, we then have a BOL tag that checks if the OPC Tag value has changed,
if the BOL tag value stays in 0 after 5 minutes an alarm triggers, this work fine.
We then created another tag that takes the value from the AlarmActive property from the BOL tag,
so when the alarm is active the value for the tag is 1, and we are loggin the information for this tag and displaying a status chart, with 2 values. green if the alarm is not active and red when the alarm is active (the last tag created value)
Our issue is that time when the alarm gets activated and the time that shows the status chart in red is really inconsistent, as you see in this example, the alarm activated at 10:38 but the status chart show that the alarm was active since 10:17.
Are we doing something here or is there a better way to have this achieved? Please let me know if you need more info
Thankyou!!!

[attachment=0]StatusChart.png[/attachment]