We want to log values to the tag historian on a specific timestamp.
We tried making a driven scan class which triggered on an expression tag which was true once every minute when seconds was 00. The scan calss is set to "One-shot execution’.
This seems to work, but our tag history has gaps.
It looks like if the previous value is identical with the current value it does not make a new log in the tag historian.
We then tried to set the ‘Value Mode’ in the tags history settings to ‘Discrete’ and the ‘Historican Deadband’ to 0,0.
According to the documentation a historical entry log will be created if |v2-v1| >= 0, ie. also if the values are identical.
We also set the scan class trigger tag to be true the first 10 seconds of the minute.
Does anyone know how to set up a historical logging on a specific timestamp?
I’m still waiting for Ignition to download on my new work computer, so I haven’t tested this.
I think the best way to approach that is using scripting and the system.tag.storeTagHistory function to store them at a specific time. I don’t the tag history options are setup to let you do what you want to do without using scripting.
So maybe what you could do is setup a transaction group to execute at specific times and use the runScript expression function to trigger a script function that accepts a tag and will store the tag history using system.tag.storeTagHistory.
Thank you for your reply.
I’m still very interested in knowing if it is possible to create a historical log at a specific time and how it is done.
Not through configuration alone. The tag historian doesn’t provide alignment of timestamps across multiple tags, nor does it provide any direct means to trigger history on one or more tags based on another (or others). What you are looking for is called a transaction group, which stores many tags to a dedicated table, each in its own named column, using a common timestamp column, and with many timing and triggering options.
The closest thing you can get to this without a transaction group would be a timer event to retrieve and evaluate your trigger condition, and then execute a similar operation but using the store tag history scripting functions instead of a DB insert.