01/2017 Using S7-300 PROFIBUS CP As DP Master Or DP Slave

4m ago
5 Views
1 Downloads
675.46 KB
12 Pages
Last View : 10d ago
Last Download : 3m ago
Upload by : Ciara Libby
Transcription

FAQ 01/2017 Using S7-300 PROFIBUS CP as DP master or DP slave CP 342-5, STEP 7 (TIA Portal) /109744374

This entry is from the Siemens Industry Online Support. The general terms of use (http://www.siemens.com/terms of use) apply. Security Information Siemens provides products and solutions with industrial security functions that support the secure operation of plants, systems, machines and networks. In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions only form one element of such a concept. Customer is responsible to prevent unauthorized access to its plants, systems, machines and networks. Systems, machines and components should only be connected to the enterprise network or the internet if and to the extent necessary and with appropriate security measures (e.g. use of firewalls and network segmentation) in place. Additionally, Siemens’ guidance on appropriate security measures should be taken into account. For more information about industrial security, please visit http://www.siemens.com/industrialsecurity. Siemens AG 2017 All rights reserved Siemens’ products and solutions undergo continuous development to make them more secure. Siemens strongly recommends to apply product updates as soon as available and to always use the latest product versions. Use of product versions that are no longer supported, and failure to apply latest updates may increase customer’s exposure to cyber threats. To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed under http://www.siemens.com/industrialsecurity. Contents 1 Introduction . 3 2 CP 342-5 as DP Master . 4 2.1 2.2 2.3 2.4 3 Setup . 4 Address Area of the Inputs and Outputs . 4 Module Start Address . 5 Parameterization of the DP SEND and DP RECV Instructions . 6 CP 342-5 a DP Slave . 8 3.1 3.2 3.3 3.4 3.5 Setup . 8 Set DP Slave Mode . 9 Create Transfer Areas . 9 Module Start Address . 10 Parameterization of the DP SEND and DP RECV Instructions . 10 Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 2

1 Introduction 1 Introduction If you are operating an S7-300 PROFIBUS CP as DP master or DP slave, then you have to call the DP SEND and DP RECV instructions in the user program of the CPU. Siemens AG 2017 All rights reserved STEP 7 (TIA Portal) includes the DP SEND and DP RECV instructions in the "Instructions" task card under "Communication Communications Processor SIMATIC NET CP PROFIBUS CP". Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 3

2 CP 342-5 as DP Master 2 CP 342-5 as DP Master This chapter describes how to configure and program an S7-300 PROFIBUS CP as DP master in STEP 7 (TIA Portal). In the example, a CP 342-5 is used as DP master. The DP SEND instruction transfers the data of a specified DP output area to the PROFIBUS CP for output to the distributed IO. The DP RECV instruction reads the process data of the distributed IO and status information into the specified DP input area. Figure 2-1 DP RECV CPU CP (DP master) inputs DP slave outputs DP SEND Siemens AG 2017 All rights reserved 2.1 Setup In section 2.4 we describe the parameterization of the DP SEND and DP RECV instructions taking the example below (see Figure 2-2). Figure 2-2 2.2 Address Area of the Inputs and Outputs 3 DP slaves with the following input and output modules are configured on the CP 342-5 (DP master): 1. Slave 1 – 1 byte DI with the address area 0-1 – 1 byte DO with the address area 0-1 Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 4

2 CP 342-5 as DP Master 2. Slave 2 – 1 byte DI with the address area 380-381 – 1 byte DO with the address area 470-471 3. Slave 3 – 1 byte DI with the address area 2000-2001 – 1 byte DO with the address area 2140-2141 The address area of the inputs is 2001 bytes (0-2000). Siemens AG 2017 All rights reserved The address area of the outputs is 2141 bytes (0-2140). 2.3 Module Start Address 1. Mark the CP 342-5 in the Network view or Device view. The properties of the CP 342-5 are displayed in the inspector window. 2. Go to the "General" tab and navigate to "I/O addresses" to determine the module start address. In this example the CP 342-5 has the following module start address: 256 (dec) 16#100 (hex). Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 5

2 CP 342-5 as DP Master 2.4 Parameterization of the DP SEND and DP RECV Instructions Call the DP SEND and DP RECV instructions in the user program of the CPU. In this example the call is made cyclically in OB1. DP SEND The following figure shows the call of the DP SEND instruction. Figure 2-3 The table below shows the inputs of the DP SEND instruction. Table 2-1 Siemens AG 2017 All rights reserved Input Data type Description CPLADDR WORD Module start address (See section 2.3) SEND ANY Specify the address area of the outputs (see section 2.2). The table below shows the outputs of the DP SEND instruction. Table 2-2 Output Data type Description DONE BOOLEAN The Status parameter indicates whether the order has been executed error-free. ERROR BOOLEAN Error display STATUS WORD Status display Data transfer with DP SEND has been successfully completed when all the following conditions are fulfilled: Value of the output ERROR false Value of the output DONE true Value of the output STATUS 16#0000 When the data has been transferred successfully, the value of the output STATUS changes between 16#0000 und 16#8180 and the value of the output DONE changes between true and false, because the DP SEND instruction is called cyclically. Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 6

2 CP 342-5 as DP Master DP RECV The following figure shows the call of the DP RECV instruction. Figure 2-4 The table below shows the inputs of the DP RECV instruction. Table 2-3 Input Data type Description CPLADDR WORD Module start address (See section 2.3) RECV ANY Specify the address area of the outputs (see section 2.2). The table below shows the outputs of the DP RECV instruction. Siemens AG 2017 All rights reserved Table 2-4 Data type NDR BOOLEAN Description The Status parameter indicates whether new data has been received. ERROR Error display STATUS Status display DPSTATUS DP status display Data transfer with DP RECV has been successfully completed when all the following conditions are fulfilled: Value of the output ERROR false Value of the output NDR true Value of the output STATUS 16#0000 When the data has been transferred successfully, the value of the output STATUS changes between 16#0000 und 16#8180 and the value of the output NDR changes between true and false, because the DP RECV instruction is called cyclically. Note If you use the start address 0 for address area of the inputs, p#DB*.DBX0.0 Byte *, for example, then in program processing you can access the areas of the data blocks using the download and transfer commands as if the address of the data block corresponds to the addresses of the process IO. You use the command "L DB2.DBB380" to read the input EB 380. You use the command "T DB1.DBB470" to write to the output AB 470. The outputs are transferred and the inputs are loaded. Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 7

3 CP 342-5 a DP Slave 3 CP 342-5 a DP Slave This chapter describes how to configure and program an S7-300 PROFIBUS CP as DP slave in STEP 7 (TIA Portal). In the example, a CP 342-5 is used as DP slave. If you use the CP 342-5 as DP slave, you call the DP SEND and DP RECV instructions in the user program of the S7-300 CPU. In this way the data is transferred from the S7-300 CPU to the CP 342-5 and read. The DP SEND instruction transfers the input data of the DP slave to the PROFIBUS CP for transfer to the DP master. The DP RECV instruction reads the output data transferred from the DP master into the DP data area specified in the instruction. The DP master reads the data out of the CP 342-5 and writes the data to the CP 342-5. In this way the CP 342-5 functions as a data buffer between the controllers of the DP slave and the DP master. You have to configure a communication for the DP slave and the DP master. Figure 3-1 Siemens AG 2017 All rights reserved DP SEND CPU CP (DP slave) inputs DP master outputs DP RECV 3.1 Setup In section 3.5 we describe the parameterization of the DP SEND and DP RECV instructions taking the example below (see Figure 3-2). Figure 3-2 Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 8

3 CP 342-5 a DP Slave 3.2 Set DP Slave Mode 1. Mark the CP 342-5 in the Network view or Device view. The properties of the CP 342-5 are displayed in the inspector window. 2. Go to the "General" tab and under "Operating mode" you select the operating mode "DP slave". Siemens AG 2017 All rights reserved 3. Assign the relevant DP master to the CP 342-5. 3.3 Create Transfer Areas You have to create the transfer areas for the data exchange with the DP master. 1. Mark the CP 342-5 in the Network view or Device view. The properties of the CP 342-5 are displayed in the inspector window. 2. Go to the "General" tab and under "Operating mode I-slave communication" you create the transfer areas for data exchange with the DP master. The transfer area for the inputs has a length of 15 bytes. The transfer area for the outputs has a length of 35 bytes. 3. Only specify the master address. The slave address is configured with the DP SEND and DP RECV instructions. Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 9

3 CP 342-5 a DP Slave 3.4 Module Start Address 1. Mark the CP 342-5 in the Network view or Device view. The properties of the CP 342-5 are displayed in the inspector window. Siemens AG 2017 All rights reserved 2. Go to the "General" tab and navigate to "I/O addresses" to determine the module start address. In this example the CP 342-5 has the following module start address: 256 (dec) 16#100 (hex). 3.5 Parameterization of the DP SEND and DP RECV Instructions Call the DP SEND and DP RECV instructions in the user program of the CPU. In this example the call is made cyclically in OB1. DP SEND With the DP SEND instruction the input addresses are sent to the DP master. The following figure shows the call of the DP SEND instruction. Figure 3-3 The table below shows the inputs of the DP SEND instruction. Table 3-1 Input Data type Description CPLADDR WORD Module start address (See section 3.4) SEND ANY Specify the length of the transfer area of the inputs (see section 3.3). Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 10

3 CP 342-5 a DP Slave The table below shows the outputs of the DP SEND instruction. Table 3-2 Output Data type Description DONE BOOLEAN The Status parameter indicates whether the order has been executed error-free. ERROR BOOLEAN Error display STATUS WORD Status display Data transfer with DP SEND has been successfully completed when all the following conditions are fulfilled: Value of the output ERROR false Value of the output DONE true Value of the output STATUS 16#0000 When the data has been transferred successfully, the value of the output STATUS changes between 16#0000 und 16#8180 and the value of the output DONE changes between true and false, because the DP SEND instruction is called cyclically. Siemens AG 2017 All rights reserved DP RECV With the DP RECV instruction the output addresses of the DP master are received. The following figure shows the call of the DP RECV instruction. Figure 3-4 The table below shows the inputs of the DP RECV instruction. Table 3-3 Input Data type Description CPLADDR WORD Module start address (See section 3.4) RECV ANY Specify the length of the transfer area of the outputs (see section 3.3). The table below shows the outputs of the DP RECV instruction. Table 3-4 Data type NDR BOOLEAN Description The Status parameter indicates whether new data has been received. ERROR Error display STATUS Status display DPSTATUS DP status display Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 11

3 CP 342-5 a DP Slave Data transfer with DP RECV has been successfully completed when all the following conditions are fulfilled: Value of the output ERROR false Value of the output NDR true Value of the output STATUS 16#0000 Siemens AG 2017 All rights reserved When the data has been transferred successfully, the value of the output STATUS changes between 16#0000 und 16#8180 and the value of the output NDR changes between true and false, because the DP RECV instruction is called cyclically. Using S7-300 PROFIBUS CP as DP master or DP slave Entry ID: 109744374, V1.0, 01/2017 12

The DP master reads the data out of the CP 342-5 and writes the data to the CP 342-5. In this way the CP 342-5 functions as a data buffer between the controllers of the DP slave and the DP master. You have to configure a communication for the DP slave and the DP master. Figure 3-1 CPU CP (DP slave) DP master DP_RECV DP_SEND inputs outputs 3.1 Setup

Related Documents:

Aug 07, 2019 · CAFCO 300, CAFCO 300 SB, CAFCO 300 HS, CAFCO 300 AC, CAFCO 300 ES Safety Data Sheet according to Federal Register / Vol. 77, No. 58 / Monday, March 26, 2012 / Rules and Regulations P

Title: Cisco_pass4lead_300-410_2021-04-22_by_Nil_145 Author: pass4lead Subject: Cisco_pass4lead_300-410_2021-04-22_by_Nil_145 Keywords: Latest Cisco exams,latest 300-410 dumps,300-410 pdf,300-410 vce,300-410 dumps,300-410 exam questions,300-410 new questions,300-410 actual

Title: Cisco_pass4itsure_300-410_2021-04-06_by_benz_133 Author: pass4itsure Subject: Cisco_pass4itsure_300-410_2021-04-06_by_benz_133 Keywords: Latest Cisco exams,latest 300-410 dumps,300-410 pdf,300-410 vce,300-410 dumps,300-410 exam questions,300-410 new questions,300-410 actual

ADLY 300 Thunderbike 300 04/ FQA022 105 — — 300 Utilitarie 300 04/ FQA022 105 — — 300 Interceptor 300 05/ FQA022 105 — — 300 Crusader Utilitaire 300 05/ FQA022 105 — — APRILIA 125 RS 125 97/06 FMA0531 66 — — 650 I.E Pegaso 97/04 FMB0507 9 13721342355 BM1298 1000 RST Mille Futura 01/04 FMA0472 5 8102610 AL1098 1000 RSV Mille

88 137 Vikas Gupta D.P. Gupta 300 Eco city-I 5/D 3256 General 300 89 19 Kirpal Singh Norang Singh 300 Eco city-I 5/D 3301 General 300 90 152 Suresh Kumar Davinder Nath 300 (3) Eco city-I 5/E 4181 General 300 91 154 Saroj Bala Om Parkash 300 (2) Eco city-I 5/D 3300 General 300 92 283 Manjeet Kaur,Rajinder Singh,Amrik Singh

IEC 61326-2-6 EN 61326-2-6 JIS C 1806-1 Radio Communications (Excluding Protocol Testing) ETSI EN 300 086 ETSI EN 300 113 ETSI EN 300 220-1 ETSI EN 300 220-2 ETSI EN 300 220-3-1 ETSI EN 300 220-3-2 ETSI EN 300 220-4 ETSI EN

chung li ling 84060612xxxx 300 eric ng chin yau 95062110xxxx 300 50 . melyssa nah khai lynn 97041210xxxx 300 50 mohd faeizz akmal bin azman84042001xxxx 300 mohd nazwan bin borhan 84020814xxxx 300 . tiong koong lin 83111813xxxx 300 tiong sum hoo 77022710xxxx 300

Nov 26, 2017 · Chemtrails, HAARP and The Full Spectrum Dominance of Planet Earth – Hosted By Bye Bye Blue Sky and Conspiracy Culture Bookstore Archives November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2