Main Content

Events and Callbacks

Execute functions triggered by specific events

You can enhance the power and flexibility of your OPC application by using event callbacks. An event is a specific occurrence that can happen while an OPC Data Access client object is connected to an OPC server. The toolbox defines a set of events that include starting, stopping, or acquiring records during a logging task, as well as events for asynchronous reads and writes, data changes, and server shutdown notification.

Functions

opccallbackEvent information for OPC callbacks
cleareventlogClear event log, discarding all events
showopceventsEvent log summary for OPC events

Properties

ErrorFcnCallback function file to execute when error event occurs
EventLogEvent information log
EventLogMaxMaximum number of events to store in event log
ShutDownFcnCallback function file to execute when OPC server shuts down
TimerFcnCallback function file to execute when predefined period passes
TimerPeriodPeriod between timer events
CancelAsyncFcnCallback function file to execute when asynchronous operation is canceled
DataChangeFcnCallback function file to execute when data change event occurs
ReadAsyncFcnCallback function file to execute when asynchronous read completes
RecordsAcquiredFcnCallback function file to execute when RecordsAcquired event occurs
RecordsAcquiredFcnCountNumber of records to acquire before RecordsAcquired event occurs
StartFcnCallback function file to execute immediately before logging starts
StopFcnCallback function file to execute immediately after logging stops
WriteAsyncFcnCallback function file to execute when asynchronous write completes

Topics