
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
94
C79000-G8976-C108-01
Parameters
Name Description
user_handle User handle assigned with the DP_open call.
slv_add
Address of the slave (0-126 or DP_NEXT_ALARM for the
next message of any slave (seen chronologically))
alarm Pointer to the DP_ALARM_S structure with the alarm or
status data.
typedef struct DP_ALARM_S
{
DPR_WORD msg; // out
DPR_WORD slv_add; // out
DPR_BYTE slot_number; // out
DPR_BYTE alarm_type; // out
DPR_BYTE specifier; // out
DPR_BYTE length_s; // out
DPR_BYTE data_s[DP_ALARM_SIZE];
//out
} DP_ALARM_T;
The "msg" parameter contains the type of data read:
DP_MSG_NONE no alarm/status message
DP_MSG_ALARM alarm data
DP_MSG_STATUS status message
Slv_add indicates the slave from which the alarm or status
data originate.
For information on the slot_number, alarm_type, and
specifier elements, see Section 4.6.4.
The "length_s" structure element contains the number of
alarm or status data stored in the "data_s" array.
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).
Comentarios a estos manuales