
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
102
C79000-G8976-C108-01
4.1.18 DP_enable_event
Purpose
Calling this function means that the following important events (software events) on
the DP master can be signaled explicitly to the DP application:
x
Diagnostic data, alarms and status messages can be fetched
x
Slaves are included in the cyclic DP processing
(operational) or have dropped out
x
The mode of the master has changed
The function does not wait for the events but simply registers its program for
notification. To fetch the events, use DP_get_result.
Note 1
By calling this function, your user program simply indicates that it is ready to
receive the specified event type. The actual event message must be fetched with
DP_get_result.
Note 2
When a DP_enable_event confirmation is received (see DP_get_result), the
DP_enable_event function must be called again, if the user program wants to be
informed of new events. The events DP_DIAG_ALARM and DP_SLV_STATE are
buffered in the time between receiving the confirmation and calling
DP_enable_event again so that they are not lost.
Note 3
When you first call DP_enable_event with the DP_SLV_STATE selector activated,
note the following points:
If slaves are operable at the time of the call (READY state), the event message
DP_SLAVE_ENTER is triggered immediately for these slaves.
If no slaves are operable at the time of the call (NOT READY state), no
DP_SLAVE_EXIT event message is triggered.
Komentáře k této Příručce