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