Skip to main content
1-Visitor
December 5, 2019
Solved

KEPServerEX LocalHistorian to not only store on value change

  • December 5, 2019
  • 1 reply
  • 3052 views

With great success is the LocalHistorian able to store values that frequently change value or state.

 

However, I'm having difficulties with the LocalHistorian not storing any values unless there is a change from the driver. As a result we have experienced data inconsistencies. For states that only change a handful times a month this creates a challenge, and in worst case we could miss a state change. At the source I see that the value is sent with a new timestamp every 30 seconds. My LocalHistorian scan rate is 1 second.

 

I need a feature that can force a new value storage at least every x seconds to be sure that all states are current.

Best answer by sam_kepware

Hello!

 

Thanks for writing in. With the current features of the Local Historian, it is only possible to log data when the value or quality of the item changes.


The only potentially reasonable workaround I could offer you would be to, when you want to "force" collection of unchanging values, is to disable and re-enable the device object(s) providing the tags within KEPServer. This can be done via Configuration tool, System tags, or via the Configuration API (for system tags, tag addresses like <channelName.<deviceName>._System._Enabled.) Once your device is disabled, your tags will move to bad quality which due to the change in quality will cause them to be logged by Local HIstorian. From there, when you re-enable your device, the tags will move to good quality and the current value/quality/time will be logged.

 

This workaround comes at the expense of inserting unnecessary bad quality data updates into the Local Historian, but it is the only mechanism that could reasonably meet your requirements. 

 

We certainly value your feedback and will consider a future enhancement where data can be logged into the Local Historian at a static interval instead of only on value or quality change. 

 

Thanks, 
Sam

1 reply

12-Amethyst
December 20, 2019

Hello!

 

Thanks for writing in. With the current features of the Local Historian, it is only possible to log data when the value or quality of the item changes.


The only potentially reasonable workaround I could offer you would be to, when you want to "force" collection of unchanging values, is to disable and re-enable the device object(s) providing the tags within KEPServer. This can be done via Configuration tool, System tags, or via the Configuration API (for system tags, tag addresses like <channelName.<deviceName>._System._Enabled.) Once your device is disabled, your tags will move to bad quality which due to the change in quality will cause them to be logged by Local HIstorian. From there, when you re-enable your device, the tags will move to good quality and the current value/quality/time will be logged.

 

This workaround comes at the expense of inserting unnecessary bad quality data updates into the Local Historian, but it is the only mechanism that could reasonably meet your requirements. 

 

We certainly value your feedback and will consider a future enhancement where data can be logged into the Local Historian at a static interval instead of only on value or quality change. 

 

Thanks, 
Sam

Support
December 27, 2019

Hi @andyba.

 

If the response provided by @sam_kepware answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon