Skip to end of metadata
Go to start of metadata

 

The Tag Historian binding type, which is only available for Dataset type properties, runs a query against the Tag Historian.

Selected Historical Tags

For this type of query, you must select at least one tag path to query. The Dataset returned by the query will have a timestamp column, and then a column for each path that you select here.

These paths may use indirection following the same rules as the Indirect Tag Binding. Simply type the indirection parameters (for example, {1}) into a selected tag path by double-clicking in the list of selected paths. All valid parameters will appear in the lower indirection table.

Date Range

Choose either a Historical or Realtime query. Historical queries use a date range that must be bound in from other components on the screen, typically a Date Range or a pair of Popup Calendars. Realtime queries always pull up a range that ends with the current time, so all they need is a length.

Sample Size and Aggregation Mode

The sample size determines how the query results will look.

  • Natural - A Natural query will look up the logging rate for the queried tags (when possible), and return results spaced apart at that rate. This means that the return size will vary with the date range.
  • On Change/Raw - An On Change query will return points as they were logged, and can be thought of as a "raw" query mode. This means that the results may not be evenly spaced. Also, it is important to note that every changed value will result in a row, and therefore if you are querying multiple tags and once, you may end up with more rows than you anticipated. For example, if tag A and tag B both change, you would end up with [[A0, B0],[A1, B0], [A1, B1]]. Note: If you want to essentially retrieve raw values, while coalescing them down into fewer rows, try using the Interval sample mode, with an interval set to your largest acceptable time between rows, and select "prevent interpolation" from the advanced settings.
  • Fixed - A Fixed query will return the given number of rows. Where data was sparse, interpolated values will be added. Where data is dense, the Aggregation Mode will come into play.
  • Interval - Similar to fixed, but with the spacing based on time, rather than the number of requested results.

 

The aggregation mode dictates what happens when multiple raw values are encountered for a given sample window (the size of which is determined by the number of requested rows, or the interval size).

 

  • Min/Max - The minimum and maximum values will be returned for the window. In other words, two rows will be returned. If only one value is seen in the interval, only one row will be returned.
  • Time-weighted Average - The values are averaged together, weighted for the amount of time they cover in the interval.
  • Closest Value - The value closest to the ending time of the interval will be returned.
  • Simple Average - The values are summed together and divided by the number of values.
  • Sum - The values in the interval are summed together.
  • Maximum - The maximum value in the interval.
  • Minimum - The minimum value in the interval.
  • Duration On - Returns the number of seconds that the value was recorded as non-zero.
  • Duration Off - Returns the number of seconds that the value recorded as zero.
  • Count On - Returns the number of times the tag's value went from a zero value to non-zero: i.e., 
  • Count Off - Returns the number of times the tag's value changed from a non-zero value to zero.

    The following feature is new in Ignition version 7.8.1
    Click here to check out the other new features

  • Count - Returns the number of times a value was recorded 
  • The following feature is new in Ignition version 7.8.3
    Click here to check out the other new features

  • Percent Good - Time-weighted percentage of good values over the date range. 
  • Percent Bad - Time-weighted percentage of bad values over the date range.
  • Range - Returns the range between the highest and lowest value for the period.
  • Standard Deviation - Returns the standard deviation of values, or how much spread is present in the data; low standard deviation shows the values are close to the mean, and high standard deviation shows that the data points are spread out over a large range of values. Only good quality values are used when calculating. 
  • Variance - Returns the variance of values. Similar in concept Standard Deviation. Only good quality values are used when calculating. 

Return Format

Return format dictates how the requested data will be returned. The options are "wide" (default), in which each tag has its own column, and "tall", in which the tags are returned vertically in a "path, value, quality, timestamp" schema.

Advanced Options

These option affect the query results in more subtle ways.

  • Ignore Bad Quality - Only data with "good" quality will be loaded from the data source.
  • Prevent Interpolation - Requests that values not be interpolated, if the row would normally require it. Also instructs the system to not right result rows that would only contain interpolated values. In other words, if the raw data does not provide any new values for a certain window, that window will not be included in the result dataset.
  • Avoid Scan Class Validation - "Scan class validation" is the mechanism by which the system determines when the gateway was not running, and returns bad quality data for these periods of time. By enabling this option, the scan class records will not be consulted, which can improve performance, and will not right bad quality rows as a result of this check.

 

Tags Historian information is often easiest to work with in the Easy Chart component, which handles all of these options automatically.

IULocgo


Tag Historian Binding

 

 

 

 

 

 

 

 

  • No labels