Using the system function SFC12 "D_ACT_DP" how can I obtain an
overview of all the enabled and disabled DP slaves?
Using the system function SFC12 "D_ACT_DP"
you can determine the status of a DP slave by specifying a logical
address for the "LADDR" parameter and job ID 0 for the "MODE"
parameter. In order to monitor all the DP slaves of the master
system you have to execute this system function for each DP
It is better to use the system function SFC51 "RDSYSST" for this
task. Using this system function you can determine the status of
all the slaves of a DP master in one call. The following table
shows the parameters to be assigned in SFC51 for this task.
||Trigger processing with TRUE|
||OK status of all the DP slaves|
||Number of the master system, e.g. 1|
||Processing still in progress|
||Target area for data determined|
Table 1: Parameters of system function SFC51
Notes on the parameters in Table 1:
System function SFC51 is an asynchronous function, i.e. processing
can take several cycles. Therefore, before calling the function
again you should evaluate the BUSY parameter. Only if this is not
set can you start a new job.
The value specified in Table 1 is valid only for master systems on
integrated DP interface modules. For external DP interface modules
(e.g. CP443-5 Ext.) you have to use the value W#16#4692.
You get the value for this parameter from the Hardware
Configuration (PROFIBUS(x); DP master system(1)).
You do not need this parameter, but you must declare it. The
STRUCT variable to be transferred to this parameter consists of two
For this parameter you specify the variable for the data
determined. In this application case the variable must be an ARRAY
OF BYTES [1...16]. There is a bit reserved in this ARRAY for each
DP slave (16 x 8 = 128). The status of the DP slave with Address 1
is in Bit 0 of the first byte. If this bit is set, then that DP
slave is either defective or disabled.
More detailed information on system function SFC51 is available in
the STEP 7 Online Help or by going to Start > SIMATIC >
DOCUMENTATION and selecting the manual "System Software for
S7-300/400 System and Standard Functions", which is also available
in Entry ID: 1214574.