Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ShutDownFcn

Callback function file to execute when OPC server shuts down

Description

You configure ShutDownFcn to execute a callback function file when the OPC server shuts down. Prior to calling the ShutDownFcn callback, the Status property of the opcda object is changed to 'disconnected'.

When a shutdown event occurs, the function specified in ShutDownFcn is passed two parameters: Obj and EventInfo. Obj is the object associated with the event, and EventInfo is an event structure containing the fields Type and Data. The Type field is set to 'Shutdown'. The Data field contains a structure with the following fields.

FIeld Name

Description

LocalEventTime

The time the event occurred, as a MATLAB® date vector.

Reason

The reason for the server shutdown.

Shutdown event information is stored in the EventLog property.

Characteristics

Access

Read/write

Applies to

opcda

Data type

character vector, function handle, or cell array

Values

The default value is @opccallback.

See Also

Functions

opccallback

Properties

EventLog

Was this topic helpful?