Status Chart Issue

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

Hello garciami,

You should have a look at the settings “Historical scanclass”, “Historical deadband”, “Max time between records” and “Timestamp source” at the history tab at the SqlTag settings window for the given tag.

Could you list those settings here?

Hi Steve,
Thanks for the guidance, here is a screenshot from one fo the tags that log the historical values.
And the settings of the status chart as well.

As you see in this image, the Alarm viewer is displaying the time when the time stopped, which is correct, but the status chart states that the value from the alarm was activated 15 minutes earlier. The status chart is set up to collect data in real time for a 25 minute range.
I am going to read more about the parameters you mentioned, let me know if you find something with the settings or if you need more information

Thank You!!

I can’t immediately see anything wrong with your tag history setup.
In your status chart, how have you set up your historical data binding?

You should use min/max as aggregation mode, and on change as sample size. Also you would need to set the polling mode to relative or absolute unless you are using realtime date range.

Also what scanclass have you set for your memory tag?

Hello stave -
I think I have the status chart correct now.
I ended up doing a few things, and it is displaying the correct information on the chart
Here are the things I did for the set up.

  • Changed the historical tags that the chart takes to “ReadOnly”

  • Changed the alarm to delay 1 minute instead of 5

  • On the tag’s history I have Historical deadbandmode as Absolute and Value Mode as Discrete.

Scan class that I am using is the default historical.
As you can see in this picture I am getting the correct info.

Thanks a lot for you support!!