Siemens SIMATIC NET PROFIBUS Manual de servicio Pagina 158

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 238
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 157
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
158
C79000-G8976-C108-01
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",
p->info_watch.slave_info[5].slave_type);
/* 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",
p->info_watch.slave_info[5]. slave_out_byte);
printf("number of input bytes -> %d",
p->info_watch.slave_info[5]. slave_in_byte);
printf("In database -> %d",
p->info_watch.slave_info[5]. slave_in_database);
Vista de pagina 157
1 2 ... 153 154 155 156 157 158 159 160 161 162 163 ... 237 238

Comentarios a estos manuales

Sin comentarios