
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-01
163
Example of Deactivation
The following activation sequence would be canceled by your user program as
follows:
/* Deactivate event for cycle start */
p->ctr.D_cycle_start_mask = 1;
/* Deactivate event for slave 5 data change */
p->ef.input[5].req_mask = DPR_DATA_INT_CLEAR_AND_MASK;
/* Deactivate event if diagnostic data arrive
from slave 5 */
p->ef.diag[5].req_mask = DPR_DATA_INT_CLEAR_AND_MASK;
Note 1
If your user program has not yet passed through a semaphore, it will not be
incremented again. When the program passes through a semaphore, you should
therefore always check whether multiple events have already occurred.
Note 2
When a hardware event is received, the correspondin
control condition is reset so
that your user program must set it again. This avoids overload on your PC when
your user program does not process hardware events quickly enough.
Note 3
The use of hardware events for a lot of active slaves at the same time puts greater
load on the PC than polling; refer to the suggestions in the FAQ list.
Comentarios a estos manuales