Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Events and Callbacks

Execute functions triggered by specific events

Functions

opccallback Event information for OPC Toolbox callbacks
cleareventlog Clear event log, discarding all events
showopcevents Event log summary for OPC Toolbox events

Properties

ErrorFcn Callback function file to execute when error event occurs
EventLog Event information log
EventLogMax Maximum number of events to store in event log
ShutDownFcn Callback function file to execute when OPC server shuts down
TimerFcn Callback function file to execute when predefined period passes
TimerPeriod Period between timer events
CancelAsyncFcn Callback function file to execute when asynchronous operation is canceled
DataChangeFcn Callback function file to execute when data change event occurs
ReadAsyncFcn Callback function file to execute when asynchronous read completes
RecordsAcquiredFcn Callback function file to execute when RecordsAcquired event occurs
RecordsAcquiredFcnCount Number of records to acquire before RecordsAcquired event occurs
StartFcn Callback function file to execute immediately before logging starts
StopFcn Callback function file to execute immediately after logging stops
WriteAsyncFcn Callback function file to execute when asynchronous write completes

Examples and How To

Use the Default Callback Function

Introduces events and callbacks by showing a simple example

Access Data in the Event Log

Describes how to access data from the EventLog property

View Recently Logged Data

This example configures an OPC Toolbox™ object hierarchy and sets the records acquired event callback function property to the display_opcdata function, created in Write a Callback Function.

Retrieve Event Information

Describes the information generated with each event and describes how to access it

Create and Execute Callback Functions

Describes how to write a callback function and associate it with an event callback

Concepts

Event Types

Defines all the event types supported by the toolbox

Was this topic helpful?