
Contents
DP Base Programming Interface for CP 5613/CP 5614
6C79000-G8976-C108-02
4 Description of the DP Functions, Data, and Error Codes ............................................67
4.1 List of Functions of the CP 5613 and CP 5614.....................................................68
4.1.1 Overview of the Functions ...................................................................................70
4.1.2 DP_start_cp ........................................................................................................72
4.1.3 DP_reset_cp........................................................................................................73
4.1.4 DP_open.............................................................................................................74
4.1.5 DP_get_pointer ...................................................................................................75
4.1.6 DP_release_pointer.............................................................................................77
4.1.7 DP_close.............................................................................................................78
4.1.8 DP_get_err_txt....................................................................................................80
4.1.9 DP_set_mode......................................................................................................81
4.1.10 DP_slv_state.......................................................................................................83
4.1.11 DP_read_slv_par.................................................................................................85
4.1.12 DP_global_ctrl.....................................................................................................87
4.1.13 DP_ds_read........................................................................................................89
4.1.14 DP_ds_write........................................................................................................92
4.1.15 DP_read_alarm...................................................................................................95
4.1.16 DP_alarm_ack.....................................................................................................98
4.1.17 DP_get_actual_cfg............................................................................................101
4.1.18 DP_enable_event..............................................................................................104
4.1.19 DP_disable_event .............................................................................................109
4.1.20 DP_get_result....................................................................................................110
4.1.21 DP_get_cref ......................................................................................................113
4.1.22 DP_init_sema_object.........................................................................................114
4.1.23 DP_delete_sema_object....................................................................................116
4.1.24 DP_fast_logic_on..............................................................................................117
4.1.25 DP_fast_logic_off ..............................................................................................121
4.1.26 DP_watchdog....................................................................................................122
4.2 Additional Functions of the CP 5614..................................................................125
4.2.1 Overview of the Slave Module Functions ...........................................................126
4.2.2 DPS_open.........................................................................................................128
4.2.3 DPS_close ........................................................................................................132
4.2.4 DPS_start..........................................................................................................133
4.2.5 DPS_stop..........................................................................................................134
4.2.6 DPS_get_baud_rate..........................................................................................135
4.2.7 DPS_get_gc_command.....................................................................................137
4.2.8 DPS_get_state..................................................................................................139
4.2.9 DPS_set_diag ...................................................................................................141
4.2.10 DPS_get_ind.....................................................................................................143
4.2.11 DPS_set_resp...................................................................................................148
4.2.12 DPS_calc_io_data_len ......................................................................................150
4.3 Access to the Process Image of the CP 5613/CP 5614......................................151
4.3.1 Reading the Input Data of a DP Slave................................................................152
4.3.2 Reading the Diagnostic Data of a DP Slave.......................................................154
4.3.3 Writing the Output Data of a DP Slave...............................................................156
4.3.4 Checking the Slaves for Changed Data .............................................................158
4.3.5 Querying the State of a DP Slave......................................................................160
4.3.6 Querying Information about the DP Master ........................................................162
4.3.7 Querying the Current Bus Parameters of the Master..........................................163
4.3.8 Querying Information about DP Slaves..............................................................165
4.3.9 Reading PROFIBUS Statistical Data..................................................................166
4.3.10 Querying the Fast Logic Status..........................................................................168
4.3.11 Reading and Triggering User Watchdog in the Dual-Port RAM...........................170