Download Siemens SIMATIC NET PROFIBUS Technical data

Transcript
Description of the DP Functions, Data, and Error Codes
4.2.8
DPS_get_state
Purpose
This function queries the current DP slave state. The function simply provides
information for the user program.
Note 1
During operation, the slave runs through the states: OFFLINE, waiting for
parameter assignment data, waiting for configuration data and finally data
exchange.
In its default state it is OFFLINE. After DPS_start, it first expects a parameter
assignment frame (DPS_WAIT_PRM). This must be followed by a configuration
frame (DPS_WAIT_CFG). If these two frames are confirmed as being correct, the
slave changes to productive operation (DPS_DATA_EX).
Note 2
If the slave is not operated in the DPS_SM_SIMPLE mode, the input data of the
slave module must be written after receiving the positive confirmation of a
configuration frame. The slave can only change to productive operation after the
input data have been initialized.
Syntax
DPR_DWORD
DPS_get_state(
DPR_DWORD
DPR_WORD
DP_ERROR_T
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-01
user_handle,
*dps_state,
*error);
// in
// out
// out
131