We try to log some sqltag in history with 1 data point per seconds for some period.
For that purpose we override some history’s parameters of the sqltag (with system.tag.edit)
We obtain in history database, 1 point per 2 seconds instead of 1 point per 1 seconds as expected.
See File attached for the detail: history_1second.pdf (666 KB)
Change your Max time between records to 1 Executions (instead of Seconds) which I guess to be HistoryMaxAgeMode=1, this will cause the Historian to record a value every time the Scanclass executes.
Another option to force the Historian to record a value every time the Scanclass executes is to Change the Historical Deadband to -1.0.
This issue you are seeing with a record every 2 seconds is a timing issue. The Scanclass is executing and seeing that the last record isn’t greater than one second ago, therefore no new entry, second time around the last record is greater than one second then your get a new record. You can see this issue in your query, where most of your records are 2 seconds apart, but you have a record at 14:05:13.8300 and another record at 14:05:14.8310, that scan took slightly over a second to execute hence you have a record during both of those seconds.