GetTagInfo
Called to get an array of all tag entries
Function
Array GetTagInfo()
Parameters
None
Return Value
An array of tag object type. If there are no tags in the project, the function will return an empty array.
Tag object type contains properties shown below. All these properties are read only.
Name | Type | Description |
---|---|---|
Name | String | Tag Name |
DataType | String | Data type of the tag |
DataSource | String | Name of the DataSource associated with the tag |
Address | String | Address within the server that the tag value is located |
UpdateRate | Integer | Rate at which the tag value should be inspected by the server, in milliseconds. |
Simulated | Boolean | Indicates this tag must be subscribed to through the internal tag provider. |
EquipmentName | String | Equipment Name the tag is associated with. |
EquipmentType | String | Type of equipment the tag is associated with. |
EquipmentProperty | String | The property of the equipment the tag is bound to. |
ScriptHandler | String | Name of the simulation script function to execute. |
EquipmentIOType | String | Either Input (to Sym3) or Output (from Sym3). |
InvertedLogic | Boolean | Invert Boolean type only (True to False, False to True). |
Example
// Get all tags
var tags = GetTagInfo();
// Go through each tag and log properties
for(var i=0; i<tags.length; i++) {
var tag = tags[i];
LogDebug("Name= " + tag.Name+ ", DataType= " + tag.DataType+", DataSource= " + tag.DataSource+", Address= " + tag.Address
+ ", UpdateRate= " + tag.UpdateRate+ ", Simulated= " + tag.Simulated+", EqName= " + tag.EquipmentName+", EqType= " + tag.EquipmentType
+ ", EqProperty= " + tag.EquipmentProperty+ ", ScriptHandler= " + tag.ScriptHandler+", EqIOType= " + tag.EquipmentIOType+", InvertedLogic= " + tag.InvertedLogic);
}