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


Reads a value of a subscribed tag.


SubscriptionGetValue(iHandle, sOffset )


Integer handle of the subscription to read from.


Optional integer expressing the zero based index of an array attribute. Default value is 0.

Return Value

Returns a value of a subscribed tag. The type of the returned variable depends on a type of the subscribed tag. The quality and timestamps of the subscribed tag are not read i.e. quality of the returned value can be consider as GOOD and its timestamps as 0 (INVALID TIMESTAMP).

Using SubscriptionGetValue gives similar results as using direct reference to tag’s v item ex. tag1.v, tag1.Field.v.

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

Related Functions

SubscriptionGetTimestamp, SubscriptionGetQuality, SubscriptionGetInfo, SubscriptionGetTag


INT Value = SubscriptionGetValue(hSub);

See Also

Tag Functions