User Manual






Sepasoft - MES Modules
Cirrus Link - MQTT Modules


Inductive University
Ignition Demo Project
Knowledge Base Articles
IA Support
SDK Documentation
SDK Examples


Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages


Sign In

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: audited examples, small edits

Logging data is easy with Tag Historian. Once you have a database connection, all you do is set the tags Tags to store history and Ignition takes care of the work. Ignition creates the tables, logs the data, and maintains the database.

As mentioned previously, the historical tag The historical Tag values pass through the store-and-forward engine before ultimately being stored in the database connection associated with the historian provider. The data is stored according to its datatype directly to a table in the SQL database, along with its quality and a millisecond resolution time stamp. The data is only stored on-change, according to the value mode and deadband settings on each tagTag, thereby avoiding duplicate and unnecessary data storage.The storage of scan class execution statistics ensures the integrity of the data.

Tag Configuration

The first step to storing historical data is to configure Tags to record values. This is done from the History section of the Tag Editor in the Designer. Select the History Enabled property to turn on history. The properties include an Historical Tag group that will be used to check for new values. Once values surpass the specified deadband, they are reported to the history system, which then places them in the proper store and forward engine. Complete information on the History properties (and all properties in the Tag Editor), can be found on the Tag Properties Table


Scroll html ignore

NameConfiguring Tag History

Sample Mode

The Sample Mode setting determines how often a historical record should be collected.

  • On Change - Collects a record whenever the value on the Tag changes.
  • Periodic - Collects a record based on the Sample Rate and Sample Rate Units properties.
  • Tag Group - Collects a record based on the Tag Group specified under the Historical Tag Group property.

Historical Tag Group

Historical Tag Group setting shows up with Sample Mode is set to Tag Group.  Historical Tag Group setting determines how often to record the value on the Tag. It uses the same Tag Groups that dictate how often your Tags should execute. Typically, the Historical Tag Group should execute at the same rate as the Tag's Tag Group or slower: if a Tag's Tag Group is set to update at a 1,000ms rate, but the Historical Tag Group is set to a Tag Group that runs at 500ms rate, then the Tag History system will be checking the Tag's value twice between normal value changes, which is unnecessary. 

Max and Min Time Between Samples

Normally Tag Historian only stores records when values change. By default, an "unlimited" amount of time can pass between records – if the value doesn't change, a new row is never inserted in the database. By modifying these settings, it is possible to specify the maximum number of scan class execution cycles that can occur before a value is recorded. Setting the value to 1, for example, would cause the Tag value to be inserted each execution, even if it has not changed. Given the amount of extra data in the database that this would lead to, it's important to only change this property when necessary.

Deadband and Analog Compression

The deadband value is used differently depending on whether the Tag is configured as a Discrete Tag or as an Analog Tag. Its use with discrete values is straight forward, registered a change any time the value moves +/- the specified amount from the last stored value. With Analog Tags, however, the deadband value is used more as a compression threshold, in an algorithm similar to that employed in other Historian packages. It is a modified version of the 'Sliding Window' algorithm. Its behavior may not be immediately clear, so the following images show the process in action, comparing a raw value trend to a "compressed" trend.

The Deadband Style property sets the: Auto, Analog, or Discrete.

When set to Auto, this setting will automatically pick from Analog or Discrete, based on the datatype of the Tag.

  • If the datatype of the Tag is set to a float or double, then Auto will use the Analog Style.
  • If the datatype of the Tag is any other type, then the Discrete style will be used.

In this image, an analog value has been stored. The graph has been zoomed in to show detail; the value changes often and ranges over time +/- 10 points from around 1490.0. The compressed value was stored using a deadband value of 1.0, which is only about .06% of the raw value, or about 5% of the effective range. The raw value was stored using the Analog Tag mode, but with a deadband of 0.0. While not exactly pertinent to the explanation of the algorithm, it is worth noting that the data size of the compressed value, in this instance, was 54% less than that of the raw value.

By looking at one specific sequence, we can see how the algorithm works:

The sequence starts with the second stored compressed value on the chart.

  1. A value is stored. No further action is taken.
  2. The next value arrives. A line is made through the value, with the size of the specified deadband value. A line is projected from the last stored value to the upper (line U1), and lower (line L1), bounds of this new value line. This establishes the initial corridor.
  3. A new value arrives. The same procedure is taken, and new lines are created. However, only lines that are more restrictive than the previous are used. In this case, that means only line U2, the new upper line.
  4. Another value arrives, causing a new lower line (L3) to be used.
  5. Finally, a value arrives that falls outside of our corridor. The last received value (value 4) is stored, and a the process is started again from that point.

Log Tag History Data

Do the following steps to log history data for your tagsTags:

  1. In the Tag Browser, select one or more tagsTags. For example, we selected several Sine tags  Tags in the Sine folder.
  2. Right-click on the selected tagsselected Tags, and then select Edit tag Tag .
    The Tag Editor window is displayed. Here, you can edit the tag Tag and change the name, data type, scaling options, metadata, permissions, history, and alarming.

  3. Scroll down to the History section of the Tag Editor. Select the History Enabled check box. 
  4. Choose a database (for example, MySQL) from the Storage Provider dropdown.
  5. Set the Sample Mode to Tag Group.
  6. Set the Historical Tag Group to Default Historical.

  7. Click OK.
      Now look in the Tag Browser. To the right of each Sine tag each Sine Tag that is storing history, a History  icon appears letting you know it is set up.

    If you were to look in your database, you can see all the tables and data Ignition has created for you.


Set the UDT to Log History Data

You can set the UDT to log history data, then all the instances of that UDT will log data without having to edit the individual instances.

  1. In the Tag Broswerbrowser, right-click on the UDT (for example, a Motor UDT) and select Edit tag Tag .
    The Tag Editor is displayed. 

  2. In Tag Editor, click a tag Tag (for example, the AMPS tagthe AMPS Tag). Scroll down to the History section.

  3. Set the following properties in the Tag Editor:
    History Enabled: true
    Storage Provider: MSSQL
    Sample Mode: Tag Group
    Historical Tag Group: Default Historical

  4. Click Apply. 

  5. Next, select the HOA tagTag

  6. Set the following properties in the Tag Editor:
    History Enabled: true
    Storage Provider: MSSQL
    Sample Mode: Tag Group
    Historical Tag Group: Default Historical

  7. Click OK to save the changes to the UDT. Now every motor instance automatically starts logging data.

Scroll html ignore

NameAdd History to Tags in UDT