Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

SubscriptionAddCallback

  • Last UpdatedJul 18, 2023
  • 1 minute read

Adds a function callback to a tag subscription. When the value change for a subscribed tag is detected, a callback function can be called. This implements change based Cicode and avoids continuously polling a tag value to monitor changes.

Multiple callbacks are possible to the same subscription.

To remove a callback from a subscription use the SubscriptionRemoveCallback function.

Syntax

SubscriptionAddCallback(iHandle, sCallback)

iHandle

Integer handle of the subscription to add a callback to.

sCallback

String stating the name of a function to call when the value is updated. The function should have the structure:

FUNCTION evtHandler(INT subsHandle)

..

End

Where subsHandle is the subscription that raised the event.

Return Value

0 (zero) if successful, otherwise an error code is returned.

TagSubscribe, TagUnsubscribe, SubscriptionGetAttribute, SubscriptionRemoveCallback

See Also

Tag Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in