Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 217631, Entry date: 07/24/2000

Processing the data from DP slaves via CP342-5 on CPU31x

  • Entry
  • Associated product(s)

Under which address is data from DP slaves, which is processed via the CP342-5 as DP master, addressed in the user program of the CPU 31x?

In the hardware configuration you assign the addresses for your DP slaves just as you are used to doing for other interfaces. The data of the DP slaves is stored in the DP master according to the address assignment made. The data transfer between the CPU and the CP is done via block calls. You need the "DP-Send" block to transfer data from the CPU to the CP, and with "DP-Recv" you can fetch data from the CP into the CPU. When calling these two blocks you specify the data areas in which the data of the DP slaves is to be located.

Example for providing parameters for the block FC 1 "DP-Send"





P#DB1.DBX0.0 BYTE 30
M 99.1
M 99.0
MW 104

Address of CP342-5 from HW Config
This is where the data is located on the CPU

With "1" data is transferred to the CP
With "1" an error has occurred
Status display shows cause of error

The following information is transferred with the parameter SEND of the block:

SEND:= "Initial address of the data area on CPU" BYTE "Length"

Initial address on CPU:
Initial address area of the CPU (e.g. M10.0; E4.0; DB1.DBX0.0). Here you specify where the data is located on the CPU.

Amount of data to be transferred from the CPU to the CP. In the above example, 30 bytes of data are transferred from the CPU to the CP.

The following diagram clearly shows the assignment of the data of the DP slaves to the addresses in the CPU at which the data is stored. The hatched areas are not used.

Fetching data from the CP into the CPU using the "DP-Recv" block works in the same way.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit