STEP 7 Professional V13.0 - Industry Support Siemens

STEP 7 Professional V13.0
D_ACT_DP: Enable/disable DP slaves
D_ACT_DP: Enable/disable DP slaves
Description
Use the "D_ACT_DP" instruction to specifically deactivate and reactivate configured DP slaves/
PROFINET IO devices. In addition, you can determine whether each assigned DP slave or
PROFINET IO device is currently activated or deactivated.
If you use the instruction to deactivate an IE/PB Link PN IO type of gateway, then all connected
PROFIBUS DP slaves will also cease to function. These failures will be reported.
The instruction cannot be used on PROFIBUS PA field devices that are connected by a DP/
PA link to a DP master system.
Note
As long as one or more "D_ACT_DP" jobs are active, you cannot load a changed configuration
from the programming device to the CPU (within the scope of CiR).
When a changed configuration is loaded from the programming device to the CPU during
ongoing operation (CiR), the CPU rejects activation of a "D_ACT_DP" job.
Several runs through the cycle control point are required to perform the disabling or enabling
job. Therefore, you cannot wait for the end of such a job in a programmed loop.
Parameter
The following table shows the parameters of the instruction "D_ACT_DP":
Parameters
Declaration
Data type
Memory area
Description
REQ
Input
BOOL
I, Q, M, D, L
Level-triggered control parameter
REQ=1:
Execute activation or deactivation
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims
all liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties. The complete
documentation can be found at:
/dokumentation/default.aspx?DocVersionId=63972520715&Language=en-US&TopicId=26650640267
6/16/2017
STEP 7 Professional V13.0
D_ACT_DP: Enable/disable DP slaves
Parameters
Declaration
Data type
Memory area
Description
MODE
Input
BYTE
I, Q, M, D, L or
constant
Job identifier
Possible values:
•
•
•
•
•
0: Request information on
whether the
addressed component is activated
or
deactivated
1: Activate the DP slave/PROFINET IO
device
2: Deactivate the DP slave/PROFINET IO
device
3: Activate DP slave/PROFINET IO
device and call OB 86 after the change of
the activation state has been completed
4: Deactivate DP slave/PROFINET IO
device and call OB 86 after the change of
the activation state has been completed
LADDR
Input
WORD
I, Q, M, D, L or
constant
Any logical address of the DP slave/
PROFINET IO device
RET_VAL
Return
INT
I, Q, M, D, L
If an error occurs while the instruction is
being executed, the return value contains an
error code.
BUSY
Output
BOOL
I, Q, M, D, L
Active code:
•
•
BUSY=1: The job is still active.
BUSY=0: The job was terminated.
For additional information on valid data types, refer to "Overview of the valid data types".
Parameter RET_VAL
Error code
Explanation
(W#16#...)
0000
Job was executed without errors.
0001
The DP slave/PROFINET IO device is active (this error code is possible only with MODE = 0.)
0002
The DP slave/PROFINET IO device is deactivated (this error code is possible only with MODE = 0.)
7000
First call with REQ=0. The job specified with LADDR is not active; BUSY has the value "0".
7001
First call with REQ=1. The job specified with LADDR was initiated. BUSY has the value "1".
7002
Intermediate call (REQ irrelevant). The activated job is still active; BUSY has the value "1".
8090
•
•
You have not configured a module with the address specified in LADDR.
You operate your CPU as I-Slave and you have specified in LADDR an address of this I-Slave.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims
all liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties. The complete
documentation can be found at:
/dokumentation/default.aspx?DocVersionId=63972520715&Language=en-US&TopicId=26650640267
6/16/2017
STEP 7 Professional V13.0
D_ACT_DP: Enable/disable DP slaves
Error code
Explanation
(W#16#...)
8092
The deactivation of the currently addressed DP slave/PROFINET IO device (MODE=2) cannot be canceled
by being activated (MODE=1). Activate the component at a later time.
8093
No DP slave/PROFINET IO device is assigned to the address specified in LADDR (no configuration
available) or the MODE parameter is not known.
8094
You have attempted to activate a device which is potential partner for a tool change port. However, another
device is already activated on this tool change port at this time. The activated device will remain activated.
80A1
Parameters could not be assigned for the addressed component. (This error code is only available when
MODE = 1.)
Note:
"D_ACT_DP" returns this error information only if the activated slave/device fails again during parameter
assignment. If the parameter assignment of a single module was unsuccessful, "D_ACT_DP" returns the
error information W#16#0000.
80A2
The addressed DP slave does not return an acknowledgment. (This error information is not available with
PROFINET IO devices. The process is not time-monitored by PROFINET.)
80A3
The DP master/PROFINET IO controller concerned does not support this function.
80A4
The CPU does not support this function for external DP masters/PROFINET IO controller.
80A6
Slot error in the DP slave/PROFINET IO device; not all user data can be accessed (this error code is only
available when MODE=1).
Note:
"D_ACT_DP" returns this error information only if the activated component fails again after parameter
assignment and before the end of "D_ACT_DP". If only a single module is unavailable, "D_ACT_DP" returns
the error information W#16#0000.
80C1
80C3
"D_ACT_DP" was started and will continue with another logical address (this error code is only available
when MODE=1 and MODE=2).
•
•
Temporary resource error: The CPU is currently processing the maximum possible activation and
deactivation jobs. (This error code is available only when MODE = 1 and MODE = 2.)
The CPU is busy receiving a modified configuration. Currently you can not enable/disable DP slaves/
PROFINET IO devices.
80C5
DP: Jobs not collected by the user are discarded at restart.
80C6
PROFINET: Jobs not collected by the user are discarded at restart.
8xyy
General error information
See also: Evaluating errors with output parameter RET_VAL
Application
If you configure DP slaves/PROFINET IO devices in a CPU which are not actually present or
not currently required, the CPU will nevertheless continue to access these DP slaves/
PROFINET IO devices at regular intervals. After the slaves are deactivated, further CPU
accessing will stop. With PROFIBUS DP, the fastest possible DP bus cycle can be achieved
in this manner and the corresponding error events no longer occur.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims
all liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties. The complete
documentation can be found at:
/dokumentation/default.aspx?DocVersionId=63972520715&Language=en-US&TopicId=26650640267
6/16/2017
STEP 7 Professional V13.0
D_ACT_DP: Enable/disable DP slaves
Examples
From a machine OEM's point of view, there are numerous device options possible in series
production of machines. However, each delivered machine includes only one combination of
selected options.
Every one of these possible machine options is configured as a DP slave/PROFINET IO device
by the manufacturer in order to create and maintain a common user program having all possible
options. Use "D_ACT_DP" to deactivate all DP slaves/PROFINET IO devices not present at
machine startup.
A similar situation exists for machine tools having numerous tooling options available but
actually using only a few of them at any given time. These tools are implemented as DP slaves/
PROFINET IO devices. With "D_ACT_DP", the user program activates the tools currently
needed and deactivates those required later.
Functional description
"D_ACT_DP" works asynchronously, that is, its execution extends over multiple calls. You start
the job by calling D_ACT_DP with REQ = 1.
The output parameters RET_VAL and BUSY indicate the status of the job.
See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous
instructions.
Identification of a job
If you have started a deactivation or activation job and you call "D_ACT_DP" again before the
job is complete, the behavior of the instruction depends on whether or not the new call involves
the same job: If the input parameter LADDR matches, then the call will be interpreted as a
follow-on call.
Deactivating DP slaves/PROFINET IO devices
When you deactivate a DP slave/PROFINET IO device with "D_ACT_DP", its process outputs
are set to the configured substitute values or to 0 (safe state). The assigned DP master/
PROFINET IO controller does not continue to address this component. Deactivated DP slaves/
PROFINET IO devices are not identified as faulty or missing by the error LEDs on the DP
master/PROFINET IO controller or CPU.
The process image of the inputs of deactivated DP slaves/PROFINET IO devices is updated
with 0, that is, it is handled just as it is for failed DP slaves/PROFINET IO devices.
If you are using your program to directly access the user data of a previously deactivated DP
slave/PROFINET IO device, the I/O access error OB (OB 122) is called, and the corresponding
start event is entered in the diagnostics buffer. If you attempt to access a deactivated DP slave/
PROFINET IO device via an instruction (such as "RD_REC"), you will receive the same error
information in RET_VAL as for an unavailable DP slave/PROFINET IO device.
Deactivating a DP slave/PROFINET IO device does not start the program error OB (OB 85),
even if its inputs or outputs belong to the system-side process image to be updated. Also there
is no entry in the diagnostics buffer.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims
all liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties. The complete
documentation can be found at:
/dokumentation/default.aspx?DocVersionId=63972520715&Language=en-US&TopicId=26650640267
6/16/2017
STEP 7 Professional V13.0
D_ACT_DP: Enable/disable DP slaves
Whether the deactivation of a DP slave/PROFINET IO device leads to a start of the rack failure
OB (OB 86) and an entry in the diagnostics buffer, depends on the MODE parameter:
•
•
MODE = 2: No OB 86 start and no diagnostics buffer entry
MODE = 4: OB 86 start and diagnostics buffer entry
If a DP station/PNIO station fails after you have deactivated it with "D_ACT_DP", the operating
system does not detect the failure. As a result, there is no subsequent start of OB 86 or
diagnostics buffer entry.
Applies to PROFIBUS DP: If you wish to deactivate DP slaves functioning as transmitters in
slave-to-slave communication, we recommend that you first deactivate the receivers (listeners)
that detect which input data the transmitter is transferring to its DP master. Deactivate the
transmitter only after you have performed this step.
Activating DP slaves/PROFINET IO devices
When you reactivate a DP slave/PROFINET IO device with "D_ACT_DP", this component is
configured and assigned parameters by the associated DP master/PROFINET IO controller
(as with the return of a failed DP station/PROFINET IO station). This activation is complete
when the component is able to transfer user data.
Activating a DP slave/PROFINET IO device does not start the program execution error OB (OB
85), even if its inputs or outputs belong to the system-side process image to be updated. Also
there is no entry in the diagnostics buffer.
Whether the deactivation of a DP slave/PROFINET IO device leads to a start of the rack failure
OB (OB 86) and an entry in the diagnostics buffer, depends on the MODE parameter:
•
•
MODE = 1: No OB 86 start and no diagnostics buffer entry
MODE = 3: OB 86 start and diagnostics buffer entry
If you attempt to use "D_ACT_DP" to activate a DP slave that has been deactivated and is
physically separated from the DP bus, the instruction will return the error code W#16#80A2
after approximately one minute and the DP slave will remain deactivated. If the slave is
reconnected to the DP bus at a later time, it must be reactivated with "D_ACT_DP".
If you attempt to activate a PROFINET IO device that is physically separated from the
PROFINET bus, "D_ACT_DP" will remain active. There is no automatic cancellation after a
specific period as with DP slaves. You need to manually cancel the running job.
Note
Activating a DP slave/PROFINET IO device may be time-consuming. If you wish to cancel a
current activation job, start "D_ACT_DP" again with the same value for LADDR and MODE = 2.
Repeat the call of "D_ACT_DP" with MODE = 2 until successful cancellation of the activation
job is indicated by RET_VAL = 0.
If you wish to activate DP slaves which take part in the slave-to-slave communication, we
recommend that you first activate the transmitters and then the receivers (listeners).
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims
all liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties. The complete
documentation can be found at:
/dokumentation/default.aspx?DocVersionId=63972520715&Language=en-US&TopicId=26650640267
6/16/2017
STEP 7 Professional V13.0
D_ACT_DP: Enable/disable DP slaves
CPU startup
Depending on the startup mode, the CPU operating system behaves as follows regarding DP
slaves/PROFINET IO devices:
•
•
During cold and warm restarts, slaves/devices are activated automatically.
―
With S7-400: Activation of the DP slaves/PROFINET IO devices may take some time. In this
case, the CPU continues to run and I/O access errors occur until the activation is complete.
The reaction of the CPU depends on the configuration (OB 85 call for I/O access errors) and
the program in OB 85. You cannot suppress these I/O access errors.
―
For S7-300: Activation of the DP slaves/PROFINET IO devices may take some time. In this
case, the CPU waits until the DP slaves / PROFINET IO devices are activated. The maximum
waiting period for activation of the DP slaves / PROFINET IO devices is approx. 1 minute. No
I/O access errors occur during this time.
During a hot restart, the activation status of slaves/devices remains unchanged: Activated slaves/
devices remain activated, deactivated slaves/devices remain deactivated.
After the CPU start-up, the CPU cyclically attempts to contact all configured and not deactivated
slaves/devices that are either not present or not responding.
Note
A call of "D_ACT_DP" in startup OBs is not supported.
See also
→ RD_REC: Read data record from I/O
→ Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions
→ Evaluating errors with output parameter RET_VAL
→ Overview of the valid data types
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims
all liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties. The complete
documentation can be found at:
/dokumentation/default.aspx?DocVersionId=63972520715&Language=en-US&TopicId=26650640267
6/16/2017