
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-01
149
Example of Consistent Writing
"p" is a pointer to the process image that your user program obtained with the
"DP_get_pointer" call. Then 200 bytes from a local buffer "buf" are written to slave
5 as follows:
/* Copy data */
memcpy(&p->pi.slave_out[5].data[0], buf, 200);
/* Trigger transfer */
p->ctr. D_out_slave_adr = 5;
!
Warning
The lock is canceled by the following:
Locking a different slave to read its input data (Section 4.3.1)
Locking a different slave to read its diagnostic information
Note 1
The data is only transferred to the slave when the master is in the OPERATE
mode and the slave is in the READY state.
Note 2
The memory area with index 127 contains the data of the slave module of the
CP 5614.
Note 3
The output data are not sent as long as the slave reports static diagnostic data
(Section 4.6.2, byte 2 - stationstatus_2, bit 1).
Comentarios a estos manuales