Subject of article below is the visualization of the assignment of addresses (I/O addresses and diagnostic addresses) to the slots within the DPV1 model. We shall pay close attention to the addresses that do not carry user data and especially to the configuration of those addresses.
The Slot Model for DPV1
With DPV1 (IEC 61158) a slave is built of slots in the same way as DP (EN 50 170). The slot numbers are 0, 1, ...n. Slot 0 - a new slot - is of high significance because it is representative of the complete DP Slave. Representative means, for example, that interrupts triggered via slot 0 are assigned quasi to the global DP slave rather than to a certain slot within the DP Slave. Diagnostics output from this slot are globally assigned to the DP Slave rather than to any individual slot or module.
Excursion: Addresses for DP Interface
Seen from the CPU, a separate logical address is available for every one of your interfaces.
You can locate this address in the "Addresses" tab of the Master interface and of the Slave interface (double-click on the "DP" row in the configuration table ). These addresses have nothing in common with the slot model of DP Slaves. Rather, they are used by the CPU internally for the identification of, for example, the failure of an interface. This address is of little significance to the user program.
Configuring the Distributed I/O (DP)
Slots and Addresses for User Data
Generally speaking, the manufacturer of a DP Slave can freely choose what kind of data he assigns to any slot.
The first I/O module of DP Slaves (often referred to as "S7 Slaves") configured in Step 7 via the internal STEP 7 module knowledge base are always located in slot 4. In contrast, the DP Slaves that are installed in Step 7 via the GSD file can contain user data as of slot 1.
Distributed peripheral data are usually addressed in the same way as centralized peripheral data via their addresses. Therefore, for S7 Slaves the user data are always addressed as of the start address of slot 4.
This is also valid for intelligent DP Slaves. For intelligent DP Slaves you can assign the I/O memory area of the Slave via a table ("Configuration" tab) to the I/O
memory area of the Master. In operate state (cyclic data exchange) the data that you transfer in the user program of the intelligent DP Slave to these memory areas are transferred to the assigned Master memory areas.
However, the slot number remains hidden when you configure the addresses, because the slot limits are not formed by real modules (for example, with
ET 200M). This is formed rather by a freely customizable length of the respective I/O area. In such cases we also speak of "virtual" slots.
Important for the assignment of addresses is:
• In addition to "real" slots, the memory area of an intelligent Slave also has "virtual" slots.
• Virtual slots are addressed in the same way as real slots, namely via their logical address. For "Standard" DP Slaves such as ET 200M this happens via module start address, and for an I-Slave via the address configured in the "Configuration" tab (I/O area).
• The addresses of the virtual slots are different from the DP Master point of view than from the DP Slave. The assignment is configurable. Therefore, the DP Master and the DP Slave as a rule use different addresses to address one and the same DP Slave slot.
Configuring the Distributed I/O (DP)
Example of an Address Assignment for User Data
ORFDO'36OD352),%86'3SDUWQHU
,2 $GGU ' 3 ,2 $GGUHVV + 8QLW &RQVLVWHQF\ , 4 , 4 4 , % % % 8QLW 8QLW 8QLW /HQJWK Previously the assignment of "virtual" slots was as follows. Example address from the view of the DP Slave Significance (for DP Slave) Slot (not visible when
configuring)
Significance (for DP Master)
Example address from the view of the DP Master
0
1
2
3
E 2 Reading via input byte 2 that ...
4 ... what the Master wrote into output byte 4.
A 4
A 5 What was written to output byte 5 in the Slave ...
5 ... can be read in the Master as input byte 6.
E 6
E 8 ... 6 ... A 8
...
35
Tip: the slot assignment is displayed in the address overview of the Master CPU or
Slave CPU.
Slots and Addresses for System Information
Addresses for system information are used, for example, to handle diagnostic information or information on operating state transitions.
Configuring the Distributed I/O (DP)
Addresses of the DP Slave
The system information of DP Slaves is also assigned to slots. Relevant for operating mode DPV1 in this context are the following slots:
• Slot 0 (Station representative):
Via the address of this virtual slot, seen from the view of the DP Master, the DP Master diagnoses the failure or return of the intelligent DP Slave.
Via the address of this virtual slot, seen from the view of the DP-Slave, the intelligent DP Slave diagnoses the failure or return of the DP Master. • Slot 2 (for "Standard" DP Slaves the DP interface):
Via the address of this virtual slot, seen from the view of the DP Master, the DP Master can detect an operating state transition of the DP Slave.
Via the address of this virtual slot, seen from the view of the DP-Slave, the DP Slave can detect an operating state transition of the DP Master.
• Slots 1 and 3 are not relevant for intelligent DP Slaves.
In the table below you can find an assignment for slots 0 to 3 ("virtual" slots). The tab designations relevant for the configuration of the Master station and of the Slave station are listed below the table.
In STEP 7 addresses are automatically assigned "from top to bottom" in order to avoid conflicts with user data. You should apply the recommended addresses, even though you can edit them. Check whether or not the size of the addresses area matches the "smallest" CPU in case the user program is to run on different CPUs. Example address from the view of the DP Slave Significance (for DP Slave) Slot (not visible when configuring) Significance (for DP Master) Example address from the view of the
DP-Masters
8189 Station failure / station return of the DP Master (see 1)
0 Station failure / station return of the DP-Slaves (see 3)
16381
- Not relevant 1 Not relevant -
8188 Operating state transition of the DP Master (see 2)
2 Operating state transition of the DP Slave
(see 4)
16380
- Not relevant 3 Not relevant -
User data (see above) 4 ... 35 User data (see above)
(1) Double-click on the DP interface of the intelligent DP Slave (e.g., CPU 414-3 DP) in the Slave station, "Configuration" tab; input is possible in the table, "Diagnostics" field.
(2) Double-click on the DP interface of the intelligent DP Slave (e.g., CPU 414-3 DP) in the Slave station, "Operating Mode" tab; input is possible under the option "DP Slave" in the field "Address for virtual slot 2".
(3) Double-click on the DP Slave icon in the Master station, "General" tab; input is possible under "Addresses" in the "Diagnostic address" field.
(4) Double-click on the DP Slave icon in the Master station, "General" tab; input is possible under "Addresses" in the field "Address for virtual slot 2".
Configuring the Distributed I/O (DP)
Summary
With openly presented virtual slots, the configuration of the intelligent DP Slave looks as follows: '30DVWHU'39PRGH 352),%86 9LUWXDOVORWV '36ODYH'39PRGH $GGUHVVHV0DVWHUYLHZ $GGUHVVHV6ODYHYLHZ ($ $GGUHVVHVIRUV\VWHPLQIRUPDWLRQ $GGUHVVHVIRUXVHUGDWD
Triggering Hardware Interrupts with SFC 7
With SFC 7 you can trigger a hardware interrupt for any configured address via the user program of the I-Slave CPU. This also applies to user data addresses of the I/O range as well to the address of the virtual slot 2.
In the I-Slave user program, for example, use the I/O addresses configured in the "Local..." column for the SFC 7.
An hardware interrupt is then triggered in the user program of the Master. In the start information of the hardware interrupt OB (e.g., OB 40) the address you have configured in the column "PROFIBUS-DP-Partner" is passed on as the address that has triggered the interrupt.
Configuring the Distributed I/O (DP)