GetTagValue
Called to get the value of a tag
🔁 Function
object GetTagValue(name: string);
object GetTagValue(id: number);
⚙️ Parameters
Name | Type | Description |
---|---|---|
id or name |
Number or String | Either the unique number returned from the call to SubscribeToTag or the name of the tag. |
↩️ Return Value
The value of the tag, or undefined if the tag could not be found.
📝 Example
Get tag value by name:
var tag2Result = GetTagValue("Tag2");
Get tag value by id:
var tagID = SubscribeToTag("Tag1", 500, null, Tag1ValueChanged);
var tag1Result = GetTagValue(tagID);