
Description of the DP Functions, Data, and Error Codes
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-01
79
4.1.9 DP_set_mode
Purpose
This function sets the required DP mode (OFFLINE, STOP, CLEAR, OPERATE).
!
Warning
If you want the master to change from DP_CLEAR to DP_OPERATE, but
AUTOCLEAR (see 2.8) is configured and one or more slaves have failed, it cannot
change to the DP_OPERATE mode. Instead of this, it changes to
DP_AUTOCLEAR which has the identical significance to DP_CLEAR. Your user
program must therefore not query whether or not the DP_OPERATE mode has
been reached endlessly but must also check whether the master has changed to
the DP_AUTOCLEAR mode as a result of a slave problem (USIF_state, see
Section 4.3.6).
Note 1
Since it can take some time to reach a new mode (depending on the data
transmission rate, number of slaves etc.), the function does not wait until the new
mode has been reached. This prevents the user program being delayed
unnecessarily long.
Note 2
When a new mode is set, no other modes can be skipped. Starting from the
current mode, the modes must be run through in the specified (ascending or
descending) order OFFLINE - STOP - CLEAR - OPERATE. Following a
DP_set_mode call, the "Master Info" area of the process image (USIF_state, see
Section 4.3.6) must be queried to check whether or not the new mode was
reached. Only then can a new mode be set.
Note 3
If your DP master changed to the AUTOCLEAR mode instead of the OPERATE
mode, because a slave with the AUTOCLEAR property could not change to
productive operation, you can nevertheless change the DP master to OPERATE.
To do this, first deactivate the slave or its AUTOCLEAR property (in each case
using the DP_set_slv_state call).
Comentarios a estos manuales