4.3.8
Querying Information about DP Slaves
Uses of the DP Slave Information
In the process image of the CP 5613/CP 5614, there is a memory area from which
you can read out the configuration data for DP slaves, for example,to display it in
your user program.
Example
"p" is a pointer to the process image that your user program obtained with the
"DP_get_pointer" call. To display this information in a simple application, you would
write a program similar to that below:
printf("Slave type -> %d",
/* 0 means slave is not configured */
/* 1 means slave is configured */
/* 2 means DP-V1-compliant slave is configured */
printf("number of output bytes -> %d",
printf("number of input bytes -> %d",
printf("In database -> %d",
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-02
Description of the DP Functions, Data, and Error Codes
p->info_watch.slave_info[5].slave_type);
p->info_watch.slave_info[5]. slave_out_byte);
p->info_watch.slave_info[5]. slave_in_byte);
p->info_watch.slave_info[5]. slave_in_database);
165