Using Events and Callbacks
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
(opcda 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.
When a particular event occurs, the toolbox can execute a function
that you specify. This is called a callback.
Certain events can result in one or more callbacks. You can use callbacks
to perform processing tasks while your client object is connected.
For example, you can display a message, analyze data, or perform other
tasks. Callbacks are controlled through OPC Toolbox object properties.
Each event type has an associated property. You specify the function
that you want executed as the value of that property.
 | Working with Different Data Types | | Example: Using the Default Callback Function |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit