DataBase write interval

I have some tags marked as historical. They are in the default scanclass and the rate is set at 10 seconds.

The values are pulled out of a PLC and change once per hour.

These tags are pulled into Easy Chart.

When I have Easy Chart export the data, I see 4 or 5 data points per hour. The values are identical as they should be. The data points are 14 minutes apart.

I checked the Scan Classes. Is there anywhere else I should look?

This is on 7.3.4.



The scan class only affects how often the value is checked. If you’re trying to force the history to contain values every x time interval you’ll need to set the “Max time between records” setting in the “Tag History” section of the tag. Also, you may have to fiddle with the provider settings as it may be combining like values and then interpolating the data for individual requests to conserve space.

First off, what’s the result you’re trying to achieve? One value per hour?

The tag history system works quite a bit differently than what it sounds like you have in mind. First off, on the storage: the tags are checked at the scan class rate, but will only store values when the value actually changes (and what constitutes a change depends on deadband and analog vs. discrete mode). As gbuehler mentioned, you can play with the “max time” setting in order to force storage, but I’m not sure that is really necessary here.

On the query side, the tag history system provides various options. The easy chart asks for a fixed number of results over a range of time. When you use the csv export from the chart, you’re writing out the data from the underlying query, so you’ll end up with evenly spaced values.

If you want something different, you’ll likely have to use scripting to query the tag history as you want it, and write it to CSV.


The data in the PLC tag is changing on the hour.
Therefore, we should not see lots of records in the database. Definitely not at a 14 minute interval.

We would be better off generating a report from the database to give the user his data.

The max time can be used to generate hourly data points when they don’t occur naturally. ie: save value as last hour?




Right, the chart should have “interpolated” values- those made up to fill in regular results. If you really want to see what is being stored in the database, try creating a table, bind the data to a “tag history binding”, select the tag and make the query mode “on change”. This will return only the rows stored in the db (as long as only one tag is selected).