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

AVEVA™ Historian

aaStringTagInsert

  • Last UpdatedMar 18, 2021
  • 5 minute read

Inserts a string tag.

Syntax

aaStringTagInsert TagName, Description, AcquisitionType, StorageType, StorageRate, ItemName, TimeDeadband, CreatedBy, DateCreated, MaxLength, InitialValue, TopicKey, IOServerKey, CurrentEditor, DoubleByte, SamplesInActiveImage, ServerTimeStamp, DeadbandType, AIRetrievalMode, SourceTag, SourceServer, AITag, TagId, ChannelStatus, AIHIstory

where:

Argument

Description

TagName

The unique name of the tag within the AVEVA Historian system. This value is of data type nvarchar(256), with no default.

Description

The description of the tag. This value is of data type nvarchar(512), with a default of an empty string.

AcquisitionType

The method by which the tag's value is acquired. If the tag value is acquired from an I/O Server, specify the name of the I/O Server, topic, and item.

0 = Not acquired

1 = Acquired via an I/O Server

2 = Acquired via HCAL or MDAS or a manual update

3 = System driver

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

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 smallint, with a default of 2.

StorageRate

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

ItemName

The address string of the tag. This value is of data type nvarchar(256), with a default of an empty string.

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

CreatedBy

The name of the user or application that created the tag. This value is of data type nvarchar(256), with a default of an empty string.

DateCreated

The date that the tag was created. This value is of data type datetime2(7), with a default of NULL.

MaxLength

The maximum number of characters for the string. This value is of data type smallint, with a default of 131. Valid values are:

  • 8

  • 16

  • 24

  • 32

  • 48

  • 64

  • 128

  • 131

  • 256

  • 512

InitialValue

The initial value as imported from an external source (for example, from InTouch). This value is of data type nvarchar(512), with a default of an empty string.

TopicKey

The unique numerical identifier for the topic. This value is of data type int, with a default of NULL.

IOServerKey

The unique numerical identifier for the I/O Server. This value is of data type int, with a default of NULL.

CurrentEditor

Used to specify which application or editing environment controls the tag definition. Tags imported from the InTouch HMI software use InTouch as the current editor. If modifications are made to an imported tag in the historian Configuration Editor, then the current editor for the tag is changed to AVEVA Historian. If a re-import is performed, any modifications made using the Configuration Editor are preserved. You can manually maintain InTouch as the current editor for re-importing; however, all changes made to the tag using the Configuration Editor are lost during the re-import. Tags (attributes) that are initially configured using AVEVA Application Server use the ArchestrA Integrated Development Environment (IDE) as the current editor. If you modify an Application Server tag using the historian Configuration Editor, then the current editor for the tag is changed to AVEVA Historian. However, the next time you redeploy the engine, the changes are not preserved. 0 = AVEVA Historian; 1 = InTouch; 2 = AVEVA Application Server. This value is of data type int, with a default of 0.

DoubleByte

Used to store the string as a double-byte string. 0 = Not stored as double-byte; 1 = Stored as double-byte. This value is of data type tinyint, with a default of 0.

SamplesInActiveImage

The number of samples that the active image holds for the tag. 0 indicates that the active image is using the default of 65 values. The higher the number of samples, the higher the load on memory resources. This value is of data type int, with a default of 0.

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 bit, with a default of 0.

DeadbandType

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.

AIRetrievalMode

Used to specify the behavior of retrieval for data in active image. You can either retrieve from all acquired data values that are currently in the active image, or only the data values that are configured to be stored on disk. Data on disk may be a subset of that in the active image, depending on the storage rate for the tag. This value is of datatype tinyint. Valid values are:

0 = All of the values received into the active image will be included in the returned data (default).

1 = Only the values that will be moved into storage will be included in the returned data.

SourceTag

The name of the source tag to create the tag from. This value is of data type nvarchar(256), with a default of an empty string.

SourceServer

The name of the source server for the source tag. This value is of data type nvarchar(256), with a default of an empty string.

AITag

Used to specify whether the tag's values are stored by the Classic Storage subsystem.

0 = Not stored by the Classic Storage subsystem;

1 = Stored by the Classic Storage subsystem.

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

TagId

The unique identifier for the tag. The value is of data type uniqueidentifier, with a default of NULL.

ChannelStatus

Used for tags from AVEVA Application Server 2012 R2 or later or the AVEVA Historian SDK 2012 R2 or later. Used to specify how disconnects between these sources and the AVEVA Historian are reflected in the data until the disconnect period can be backfilled with store-and-forward data, if store-and-forward is enabled.

1 = Enabled. NULL values are injected into the data stream for the disconnect period. For a trend, this means that a line gap appears during the period of NULL values. The tag remains in store-and-forward mode until the timestamps become greater than the startup time of the server or the time that the connection was restored.

0 = Disabled. NULL values are not injected and no gap is shown in client-side trends. The channel status value is ignored for tags that use classic storage.

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

AIHistory

Used to specify whether data exists for a tag in both storage and classic storage.

0 = No data was previously collected by classic storage.

1 = The tag may have data previously collected by classic storage.

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

Permission

Execute permission defaults to the aaPowerUsers and aaAdministrators groups.

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