
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-01
155
4.3.7 Querying Current Bus Parameters of the Master
Uses of the Bus Parameter Query
In the process image of the CP 5613/CP 5614, there is a memory area from which
you can read out the current bus parameters, for example, to display them 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("Baudrate -> %d",
p->info_watch. aspc2_buspara.baud_rate);
The parameters are bytes, words or double words. Refer to the header file for the
formats, structure DPR_ASPC2_BUSPARA_T.
Komentarze do niniejszej Instrukcji