
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-01
111
4.1.21 DP_get_cref
Purpose
This function obtains the c_ref from the slave address and the user_handle for
DPC1 functions. c_ref must be entered in these functions in the DPC1_REQ_S
structure as a job-defining parameter.
Note
The c_ref for a slave only needs to be obtained once. It is not necessary to call
DP_get_cref again before each DPC1 function.
Syntax
DPR_DWORD DP_get_cref (DPR_DWORD user_handle, // in
DPR_WORD slv_add, // in
DPR_DWORD *c_ref, // out
DP_ERROR_T *error ); // out
Parameters
Name Description
user_handle User handle assigned with the DP_open call.
c_ref After successful completion of the function *c_ref contains
the required reference.
slv_add Slave address
error
Address of a structure provided by the user program of the
type DP_ERROR_T - If an error occurred, the structure
contains details for troubleshooting (see Section 4.4).
Return Value
Name Description
DP_OK c_ref was obtained.
other Unsuccessful completion of the function, no result available
Comentarios a estos manuales