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

AVEVA™ Historian

aaSetStorageRule

  • Last UpdatedMar 18, 2021
  • 3 minute read

Sets storage rules at various levels of the tag definition.

Syntax

aaSetStorageRule Type, Key, StorageType, StorageRate, TimeDB, ValueDB, AcqType, DBType, RateDB, ServerTimeStamp, LateData, IdleDuration, ProcInterval

where:

Argument

Description

Type

The level at which the new storage rule will be set for the tag definition.

1 = I/O Server

2 = Topic

This value is of data type tinyint, with no default.

Key

The database key value for the relevant type, either the I/O Server key or the topic key. This value is of data type int, with no default.

StorageType

The type of storage defined for the tag.

0 = Not stored.

1 = Cyclic.

2 = Delta.

3 = Forced storage.

17 = The storage type has been changed from cyclic to "not stored."

18 = The storage type has been changed from delta to "not stored."

19 = The storage type has been changed from "forced" to "not stored."

This value is of data type tinyint, with no default.

StorageRate

The rate at which the tag is stored if the storage type is cyclic. The rate is in seconds. This value is of data type int, with a default of 0.

TimeDB

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. This value is of data type int, with a default of -1.

ValueDB

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. This value is of data type float, with a default of -1.

AcqType

Used to turn acquisition on or off.

0 = Acquisition off

1 = Acquisition on

This value is of data type smallint, with a default of -1.

DBType

The type of delta storage deadband to be applied for the tag. This setting is only in effect if delta storage is configured for the tag.

1= Time and/or value deadband

2 = Rate (swinging door) deadband

This value is of data type smallint, with a default of -1.

RateDB

Used to percentage of deviation in the full-scale value range for an analog tag. The swinging door (rate) deadband applies to delta storage only. Time and/or value deadbands can be used in addition to the swinging door deadband. Any value greater than 0 can be used for the deadband. A value of 0 indicates that a swinging door deadband will not be applied. This value is of data type float, with a default of -1.

ServerTimeStamp

Used to specify whether local timestamping by the AVEVA Historian is used.

0 = The IDAS timestamp is used.

1 = The AVEVA Historian time is used for the timestamp.

If a fast-changing tag is configured to use server timestamping, the packet of data that is sent to the storage subsystem may contain multiple data values with the same timestamp, which may affect data calculations, such as for swinging door storage.

This value is of data type smallint, with a default of -1.

LateData

Used to enable acquisition of "late" data.

0 = Late data disabled

1 = Late data enabled

This value is of data type smallint, with a default of -1.

IdleDuration

The amount of time, in seconds, before data is processed from the I/O Server. For example, if you set this value to 60 seconds, data from this I/O Server is cached and only processed by the storage engine after no more data has been received from the I/O Server for at least 60 seconds. This value is of data type int, with a default of 60.

ProcInterval

The amount of time, in seconds, after which late data from the I/O Server is processed, regardless of the idle duration. If the nature of the data is such that the idle duration is never satisfied, the historian storage engine processes data from the topic at least one time every processing interval. The processing interval defaults to twice the idle duration and cannot be set to a value less than the idle duration. This value is of data type int, with a default of 120.

Remarks

To ignore an argument, set the value to -1.

Permission

Execute permission defaults to the aaAdministrators and aaPowerUsers groups.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in