Cicode Programming Reference > Cicode Function Categories > Tag Functions Introduction > SubscriptionGetTag


Reads a value, quality and timestamps of a subscribed tag.


SubscriptionGetTag(iHandle, sOffset )


Integer handle of the subscription to read from.


Optional integer expressing the zero based index of an array attribute. This is only valid for the Value attribute. Default value is 0.

Return Value

Returns a value, quality and timestamps of a subscribed tag. The type of the returned value depends on a type of the subscribed tag. The quality and timestamps of the subscribed tag are read and passed with the returned value.

Using SubscriptionGetValue gives similar results as using direct reference to a tag without item ex. tag1, tag1.Field.

On error, returns either 0 for numerical data types or an empty string for strings.

Related Functions

SubscriptionGetTimestamp, SubscriptionGetQuality, SubscriptionGetInfo, SubscriptionGetValue


INT Value = SubscriptionGetTag(hSub);

See Also

Tag Functions