
Contents
DP Base Programming Interface for CP 5613/CP 5614
6
C79000-G8976-C108-01
4 Description of the DP Functions, Data, and Error Codes ............................................65
4.1 List of Functions of the CP 5613 and CP 5614.....................................................66
4.1.1 Overview of the Functions ...................................................................................68
4.1.2 DP_start_cp ........................................................................................................70
4.1.3 DP_reset_cp........................................................................................................71
4.1.4 DP_open .............................................................................................................72
4.1.5 DP_get_pointer ...................................................................................................73
4.1.6 DP_release_pointer.............................................................................................75
4.1.7 DP_close.............................................................................................................76
4.1.8 DP_get_err_txt ....................................................................................................78
4.1.9 DP_set_mode......................................................................................................79
4.1.10 DP_slv_state.......................................................................................................81
4.1.11 DP_read_slv_par.................................................................................................83
4.1.12 DP_global_ctrl.....................................................................................................85
4.1.13 DP_ds_read ........................................................................................................87
4.1.14 DP_ds_write........................................................................................................90
4.1.15 DP_read_alarm ...................................................................................................93
4.1.16 DP_alarm_ack.....................................................................................................96
4.1.17 DP_get_actual_cfg ..............................................................................................99
4.1.18 DP_enable_event..............................................................................................102
4.1.19 DP_disable_event .............................................................................................107
4.1.20 DP_get_result....................................................................................................108
4.1.21 DP_get_cref ......................................................................................................111
4.1.22 DP_init_sema_object.........................................................................................112
4.1.23 DP_delete_sema_object....................................................................................114
4.1.24 DP_fast_logic_on ..............................................................................................115
4.1.25 DP_fast_logic_off ..............................................................................................116
4.2 Additional Functions of the CP 5614..................................................................117
4.2.1 Overview of the Slave Module Functions ...........................................................118
4.2.2 DPS_open.........................................................................................................120
4.2.3 DPS_close ........................................................................................................124
4.2.4 DPS_start..........................................................................................................125
4.2.5 DPS_stop..........................................................................................................126
4.2.6 DPS_get_baud_rate ..........................................................................................127
4.2.7 DPS_get_gc_command.....................................................................................129
4.2.8 DPS_get_state ..................................................................................................131
4.2.9 DPS_set_diag ...................................................................................................133
4.2.10 DPS_get_ind.....................................................................................................135
4.2.11 DPS_set_resp ...................................................................................................140
4.2.12 DPS_calc_io_data_len ......................................................................................142
4.3 Access to the Process Image of the CP 5613/CP 5614......................................143
4.3.1 Reading the Input Data of a DP Slave................................................................144
4.3.2 Reading the Diagnostic Data of a DP Slave.......................................................146
4.3.3 Writing the Output Data of a DP Slave...............................................................148
4.3.4 Checking the Slaves for Changed Data .............................................................150
4.3.5 Querying the State of a DP Slave ......................................................................152
4.3.6 Querying Information about the DP Master ........................................................154
4.3.7 Querying Current Bus Parameters of the Master................................................155
4.3.8 Querying Information about DP Slaves ..............................................................158
4.3.9 Reading PROFIBUS Statistical Data..................................................................159
4.3.10 Querying the Fast Logic Status..........................................................................161
4.3.11 Activating/Deactivating the Generation of Hardware Events...............................162
4.3.12 Sending Data with the CP 5614 as DP Slave.....................................................164
Komentarze do niniejszej Instrukcji