aaAnalogTagInsert
- Last UpdatedMar 10, 2025
- 7 minute read
Inserts an analog tag.
Syntax
aaAnalogTagInsert TagName, Description, AcquisitionType, StorageType, StorageRate, ItemName, TimeDeadband, CreatedBy, DateCreated, CurrentEditor, EUKey, MinEU, MaxEU, MinRaw, MaxRaw, Scaling, RawType, ValueDeadband, InitialValue, IntegerSize, SignedInteger, TopicKey, IOServerKey, StorageNodeKey, AIRetrievalMode, SamplesInActiveImage, RateDeadband, InterpolationType, RolloverValue, ServerTimeStamp, DeadbandType, 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 10000. |
|
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. |
|
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. |
|
EUKey |
The unique numerical identifier of an engineering unit. This value is of data type int, with a default of 1. |
|
MinEU |
The minimum value of the tag, measured in engineering units. This value is of data type float, with a default of 0. |
|
MaxEU |
The maximum value of the tag, measured in engineering units. This value is of data type float, with a default of 100. |
|
MinRaw |
The minimum value of the raw acquired value. This value is of data type float, with a default of 0. |
|
MaxRaw |
The maximum value of the raw acquired value. This value is of data type float, with a default of 4095. |
|
Scaling |
The type of algorithm used to scale raw values to engineering units. For linear scaling, the result is calculated using linear interpolation between the end points. 0 = None 1 = Linear 2 = Square Root (reserved for future use) This value is of data type int, with a default of 1. |
|
RawType |
The numeric type for the raw value. 1 = Euro Float, an outdated data type (4 bytes) 2 = MS Float (4 bytes) 3 = Integer (2 or 4 bytes) 4 = MS Double (8 bytes; reserved for future use) This value is of data type int, with a default of 3. |
|
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. This value is of data type float, with a default of 0. |
|
InitialValue |
The initial value as imported from an external source (for example, from InTouch). This value is of data type float, with a default of 0. |
|
IntegerSize |
The bit size of the analog tag. 12 = 12-bit 15 = 15-bit 16 = 16-bit 32 = 32-bit 64 = 64-bit (reserved for future use) This value is of data type tinyint, with a default of 16. |
|
SignedInteger |
Used to specify whether an integer is a signed number (positive or negative) or an unsigned number (positive only). 0 = Unsigned 1 = Signed This value is of data type bit, with a default of 0. |
|
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. |
|
StorageNodeKey |
The unique numerical identifier for the storage node. This value is of data type int, 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.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. 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. |
|
RateDeadband |
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 0. |
|
InterpolationType |
The interpolation type for retrieval. 0 = Stair-stepped interpolation 1 = Linear interpolation (if applicable, based on the tag type) 254 = System default interpolation mode The system default interpolation type is to use the system default for the analog type, either integer or real. The system default interpolation type for an analog type is determined by the setting of the InterpolationTypeInteger and InterpolationTypeReal system parameters. This setting impacts Interpolated, Average, and Integral retrieval modes. This value is of data type tinyint, with a default of 254. |
|
RolloverValue |
The first value that causes the counter to "roll over." This rollover value is used by the "counter" retrieval mode. For example, a counter that counts from 0 to 9999, the counter rolls over back to 0 for the 10,000th value it receives. Therefore, set the rollover value to 10,000. 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. |
|
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.