laitimes

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

author:Look automation

1 Concept

As in the standard system, master-to-master safety-related communication can take place between the CP1542-5 DP port of the S7-1500F and the CM1243-5 DP port of the S7-1200F in the TIA safety system. Communication occurs through two secure application blocks, the SENDDP block for sending data and the RCVDP block for receiving data. These blocks are invoked by the user in the corresponding security program of the F-CPU and can be used for secure transfer of a fixed amount of BOOL and INT type data.

2 Security-related communication between DP masters

In this example, CPU1511F-1PN with CP1542-5 is used as a PROFIBUS master and CPU1215FC with CM1243-5 is used as another PROFIBUS master. Secure-related communication between the two CPUs via DP/DP Coupler.

2.1 The hardware and software environment used by the example

  • · STEP7 Professional V14 SP1
  • · STEP7 Safety Advanced V14 SP1
  • · CPU1511F-1PN V2.0 Order No. 6ES7 511-1FK01-0AB0
  • · CP1542-5 V1.0 Order No. 6GK7542-5FX00-0XE0
  • · CPU1215FC V4.2 Order no. 6ES7215-1HF40-0XB0
  • · CM1243-5 V1.3 Order No. 6GK7243-5DX30-0XE0
  • · DP/DP Coupler order number 6ES7158-0AD01-0XA0

Test Purpose: Implement safety-related communication between the master and the F-CPU of the master via DP/DP Coupler, send using F application block SENDDP and receive with RCVDP. Use to securely transfer 16 BOOL-type data and 2 INT-type data at once, as shown in Figure 1-1

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

Note: RCVDP must be invoked at the beginning of the security program, and SENDDP must be invoked at the end of the security program.

2.2 Hardware Configuration

1) First establish the hardware on the S7-1500F side, open the TIA software, click "New Project" to enter the project name, set the project file storage path, click "Create" to complete the project creation, as shown in Figure 2-1.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

2) Add a new device, name it: CPU1500F, select CPU1511F, as shown in Figure 2-2.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

3) Set the IP address and Industrial Ethernet network, as shown in Figure 2-3.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

4) Set the protection level of the CPU, activate the fail-safe protection, and set the fail-safe password according to the prompt, in this example, the password is: 1, as shown in Figure 2-4.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

5) Set the security program password, in this case the password is 1, as shown in Figure 2-5.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

6) In the "Unit View", configure the CP1542-5, set the PROFIBUS interface, and create a new PROFIBUS subnet, PRODIBUS address 2, as shown in Figure 2-6.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

7) In the "Network View", configure the DP/DP Coupler, as shown in Figure 2-7, the DP line of the CP1542-5 in the physical object is connected to the DP1 port on the left side of the DP/DP Coupler.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

8) Assign the DP/DP Coupler to the DP master, and enter the DP slave assignment parameters, slave address 3, as shown in Figure 2-8, slave dial code setting 3 of DP1 on the left side of DP/DP Coupler in physical objects.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication
Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

9) Introduction of the DP/DP Coupler module, as shown in Figure 2-9.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication
Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

When this device communicates between F-CPUs, the following points must be noted:

  • a. DIA must be unchecked, i.e. DIA=OFF;
  • b. ADDR must be the actual DIP switch setting, i.e. ADDR=OFF;
  • c. The data address area definition rules for secure communication are: sender: 6 bytes input/12 bytes output; Recipient: 12
  • Byte input / 6 byte output.

10) Allocate the IO communication area and establish a transmit entry (6 bytes input/12 bytes output) on the 1500F side, as shown in Figure 2-10.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

11) According to the above method, configure the CPU of S7-1215FC, add the CM1243-5 module, configure DP/DPCoupler, create a receive entry (12-byte input/6-byte output), and the final configuration result, as shown in Figure 2-11. In the physical object, the DP line of CM1243-5 is connected to the DP2 port on the right side of the DP/DP Coupler, and the slave dial code of DP2 on the right side of the DP/DP Coupler is set to 4.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

Note: The transmission entries of the two communicating parties should match, send to receive, receive to send.

12) Compile and save both safe CPUs, and then download, take S7-1500F download as an example, as shown in Figure 2-12, 2-13.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication
Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

13) After the 1500F/1200F project is compiled, saved and downloaded, the network view is online after the status, as shown in Figure 2-14.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

2.3 Communication programming

1) On the S7-1200F side, open the security compiler page, the security operation group has been automatically generated by the system when adding the security CPU hardware, and the security main program "Main_Safety_RTG1" FB1 is called in OB123 by default, as shown in Figure 2-15.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

2) Add F-DB for the RCVDP instruction output variable interface connection, as shown in Figure 2-16.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

3) Open "Main_Safety_RTG1" (FB1) under "Block" and call the RCVDP data receiving function command. Note: RCVDP must be invoked at the beginning of the security program, i.e. Network 1 is the receive function instruction, as shown in Figure 2-17.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

4) Receive function instruction RCVDP pin definition, as shown in Figure 2-18.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication
Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

6) On the S7-1500F side, create a new F-DB for the SENDDP instruction output variable interface connection, as shown in Figure 2-20.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

7) Open "Main_Safety_RTG1" (FB1) under "Block" and call the SENDDP data sending function command. Note: SENDDP must be invoked at the end of the security program and the send function instruction at the end of the network, as shown in Figure 2-21.

Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication
Botu implements S7-1200F and 1500F using DP/DP Couple for safety-related master-to-station communication

7) Compile and save both projects, and then download them to the PLC to monitor the test results in the monitoring table, as shown in Figure 2-23, 2-24.