Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Extended Stored Procedure Arguments

  • Last UpdatedMar 18, 2021
  • 2 minute read

Note: Extended stored procedures are no longer supported.

Most of the extended stored procedures for the AVEVA Historian use one or more of the following arguments:

StartTime, EndTime

The StartTime string value represents the starting timestamp for the data to query. The EndTime string value represents the ending timestamp for the data to query. The date/time value can be any valid SQL Server date/time string.

The notion of specifying a time zone is not supported. All date/time strings passed as parameters to an extended stored procedure are considered as local server time.

For start and end times, the GetDate() and DateAdd(...) functions are supported, as well as literal dates. For more information, see Literal Date Expressions, GetDate() Expressions, and DateAdd(...) Expressions.

The extended stored procedures round timestamps up or down to the next supported millisecond value: 0, 3, or 7. The standard four-part query and open query do not round timestamps, so if you retrieve data with the extended stored procedure and the four-query, you can have different timestamps for the same data value.

Resolution

The sampling rate, in milliseconds, for retrieving the data in cyclic mode. The system returns values stored over the requested time period at the interval specified by the resolution. For example, if you specify a 5000 ms resolution, the system queries for all data during the time period and then only returns those values that occur at each 5000 ms interval, starting with the start date and ending with the end date.

MaxRowCount

The maximum number of rows to be returned for a specified time period.

ValueDeadBand

The percentage of the difference between the minimum and maximum engineering units for the tag. Any data values that change less than the specified deadband are not stored. The value deadband applies to delta storage only. A value of 0 indicates that a value deadband will not be applied.

TimeDeadband

The minimum time, in milliseconds, between stored values for a single tag. Any value changes that occur within the time deadband are not stored. The time deadband applies to delta storage only. A time deadband of 0 indicates that the system will store the value of the tag each time it changes.

Description

The description of the history data that will be copied.

TagN

Tag1, Tag2… TagN are tagname values. Each tagname must be comma delimited and can optionally be surrounded with quotes. For example:

exec xp_AnalogHistory "DateAdd(HOUR, -1, GetDate())", "GetDate()", 1000, SysTimeSec, SysTimeMin

exec xp_DiscreteHistory "DateAdd(HOUR, -1, GetDate())", "GetDate()", 1000, "SysPulse"

If a tagname is not of the same type as expected for the named stored procedure then it is ignored. For example, if you pass an analog tagname as a parameter to xp_DiscreteHistory, it will be ignored.

For information regarding valid tagnames, see "Naming Conventions for Tagnames" in Chapter 2, "System-Level Concepts and Functionality" in the AVEVA Historian Concepts Guide.

TitleResults for “How to create a CRG?”Also Available in