07_3425Mast
-
Upload
sokolpolece -
Category
Documents
-
view
15 -
download
2
description
Transcript of 07_3425Mast
3425MastPage 1Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.1
SIMATIC NET Information and Training CenterKnowledge for Automation
CP 342-5 as DP Master
PG 720
MPI=2
CPU CP I/O I/O I/O I/OIM
ET 200B
ET 200M
ET 200L-SC
CP 342-5DP master
DP Slave DP Slave
DP slave
PROFIBUS cable
Contents Page
Differences Between CP 342-5 and the Integrated Interface.................................................... 2Hardware Configuration............................................................................................................. 4Assignment of DP Process Data to Data Areas........................................................................ 5Principle of Data Exchange....................................................................................................... 6Integration of the Blocks into the CPU Cycle............................................................................ 7Principle of Addressing............................................................................................................. 8DP_SEND................................................................................................................................. 9DP_RECV.................................................................................................................................. 11Exercise..................................................................................................................................... 14
3425MastPage 2Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.2
SIMATIC NET Information and Training CenterKnowledge for Automation
Differences Between CP 342-5 and the IntegratedInterface
� Configuration:� You create the DP master system when configuring the CP and not
when configuring the CPU.
� Programming:� You use FCs to read and write process and diagnostic data.
� Bit memories and data blocks can be used as I/O data areas in additionto the process image.
� Quantity of data
� Baud rate
Differences in CP 342-5 with MLFB 6ES7 342-5DA00-0XE0 as master.Configuring You can only use the DP slaves given in the Hardware Catalog under the
headings Profibus DP, CP 342-5 as DP Master.
From MLFB 6ES7 342-5DA01-0XE0 onwards you can use the standardslaves. You can also use S7 slaves with this module
Differences in You do not need a program for the DP interfaces integrated in the CPU.Programming You can access the input and output data direct, using Load and Transfer
instructions, for example. For the CP 342-5 DP you always need the blocksDP-SEND and DP-RECV. These blocks transfer the data between the CPUand the CP via the backplane bus. You have a completely free choice ofsource and destination areas. You can read and write data to and fromdata blocks, bit memories and the I/O area
Difference in CP 342-5:Constant Data � Data is always transferred consistently
� Maximum length for master: 240 bytes� Maximum length for slave: 86 bytes
CPU 315-2 DP:� If the consistent data block is 3 bytes long or longer than 4 bytes, the
data has to be read with SFC14 and written with SFC15� Maximum length 32 bytes
3425MastPage 3Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.3
SIMATIC NET Information and Training CenterKnowledge for Automation
Differences Between CP 342-5 and the IntegratedInterface
� Configuration:� You create the DP master system when configuring the CP and not
when configuring the CPU.
� Programming:� You use FCs to read and write process and diagnostic data.
� Bit memories and data blocks can be used as I/O data areas in additionto the process image.
� Quantity of data
� Baud rate
Difference in CP 342-5:Data Quantity � As master: Maximum total length of I/O data: 240 bytes
� As slave: Maximum total length of I/O data: 86 bytes
CPU 315-2 DP:� Maximum total length of I/O data: 122 bytes (master or slave)
Difference in CP 342-5:Baud Rate � Max.: 1.5 Mbit/s
CPU 315-2 DP:� Max.: 12 Mbit/s
3425MastPage 4Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.4
SIMATIC NET Information and Training CenterKnowledge for Automation
Hardware Configuration
Operating Mode When configuring the CP, you have to set the operating mode (DP Master/ DPSlave or No DP).
3425MastPage 5Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.5
SIMATIC NET Information and Training CenterKnowledge for Automation
Assignment of DP Process Data to Data Areas
DP I/O Areas The design of the DP interface is so flexible that it allows different datain the CPU areas in the CPU to be used for storing DP process data. Your choice of
data area depends on the type of CPU and on the application. The followingstorage areas are available for the DP input area and DP output area:
� Process imageThis is the standard assignment. There must be sufficient space in the process image of the CPU to reserve a consecutive input area and aconsecutive output area for DP. This may be restricted by the size of the process image and the number of signal modules in the central configuration.
� Bit memory areaLike the process image, this area is suitable for global storage of DPsignals. For example, you can use the bit memory area if the space available in the process image (space not occupied by central signal modules) is not sufficient.
� Data block (DB)You can also assign data blocks for storing DP signals. You should preferably only use this type of storage when the relevant DP data area is only processed by one program block.
3425MastPage 6Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.6
SIMATIC NET Information and Training CenterKnowledge for Automation
Principle of Data Exchange
FC Blocks Two blocks of type FC (Function) are available for data exchange using theSTEP 7 user program:
� DP–SENDThis FC passes the data from a specified DP data area in the CPU to thesend buffer of the PROFIBUS CP for transmission to the DP slaves.
� DP–RECVThis FC takes the data read from the DP slaves out of the receive buffer of the PROFIBUS CP and places it in a specified DP data area in the CPU.
3425MastPage 7Training Centerfor Automation and Drives
Integration of the Blocks into the CPU Cycle
3425MastPage 8Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.8
SIMATIC NET Information and Training CenterKnowledge for Automation
Principle of Addressing
Specification of the DP data area as an address offset when using the PROFIBUS CP
Address In HWConfig you give an address to each slave. This address assigns toAssignment each input/output an address offset in the DP data area in which it is addressed.
A starting address (address offset) is therefore assigned to each module of a DPslave. STEP 7 automatically assigns default addresses, which are unique and inuninterrupted sequence.
Block Call In the call to the FC block DP_RECV you enter an address for the parameter“RECV“. This address is added to the address offset. The information from theDP slave can then be processed at this address.
3425MastPage 9Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.9
SIMATIC NET Information and Training CenterKnowledge for Automation
DP_SEND
This block passes the data from a specified DP output area to the PROFIBUS CP for output to the distributed I/Os.
3425MastPage 10Training Centerfor Automation and Drives
3425MastPage 11Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.11
SIMATIC NET Information and Training CenterKnowledge for Automation
DP_RECV
DP_RECV receives the process data and status information from the distributed I/Os and stores it in aspecified input area.
3425MastPage 12Training Centerfor Automation and Drives
3425MastPage 13Training Centerfor Automation and Drives
How the Block Works
The following diagram illustrates the normal sequence of data acceptancetriggered by a DP_RECV in the user program.Each DP_RECV job in the user program is acknowledged by the PROFIBUS CP withan entry in the output parameters NDR, ERROR and STATUS.
3425MastPage 14Training Centerfor Automation and Drives
Siemens AG 1998. All rights reservedDate: 08.09.98File No.: 3425Mast.14
SIMATIC NET Information and Training CenterKnowledge for Automation
Exercise
CP 342-5 as DP master
� Configure a second PROFIBUS subnet in the existing project withthe CP 342-5 as DP master and the existing ET 200 components asslaves.
� Program an output to an ET 200 using the DP-SEND/DP-RECVblocks.