Steps for PROFIBUS DP Master-Slave Configuration

Steps for PROFIBUS DP Master-Slave Configuration:

– Create a STEP 7 project – Insert the required SIMATIC S7-1200 station – Insert communication modules and other necessary modules in the station – Add the PROFIBUS DP network, assign DP addresses, define operation modes, and DP parameters

  • DP Address Definition

  • DP Master/Slave Mode Selection

  • Maximum Address: Since the PROFIBUS token is only passed to the master station, an appropriate maximum PROFIBUS address can optimize the bus

– Connect the DP slave station to the master station – Configure other modules – Save and download the project

1. General Configuration Method for DP Slave:

Taking S7-1200 and ET200S as examples, the configuration process is explained. (1) S7-1200 acts as the DP master station through CM1243-5

Steps for PROFIBUS DP Master-Slave Configuration

(2) Create the DP master station system by right-clicking on the DP interface of the DP master module CM1243-5 in the network view, and use the operation “Assign Master System” to create the DP master station.

Steps for PROFIBUS DP Master-Slave Configuration

(3) Drag ET200S from the hardware catalog/distributed I/O into the network view, drag the slave communication interface to the master interface with the mouse, and release the mouse button to create the PROFIBUS connection.

Steps for PROFIBUS DP Master-Slave Configuration

Click on “Unassigned” on ET200S to assign it to CM1243-5. Displayed as follows:

Steps for PROFIBUS DP Master-Slave Configuration

Right-click on the network cable to view network parameters. In the network settings, you can modify the transmission rate, maximum station address, etc.

Steps for PROFIBUS DP Master-Slave Configuration

Steps for PROFIBUS DP Master-Slave Configuration

(4) Double-click ET200S to configure other modules such as power module PM-E, DO module, and DI module as shown in the figure.

Steps for PROFIBUS DP Master-Slave Configuration

(5) Compile, save, and download to S7-1200 CPU

2. Configuration Method for Intelligent Slave Stations

Taking two S7-1200 DP configured communications as an example. (1) PLC_1_DP_Master acts as the PROFIBUS DP master station through CM1243-5, while PLC_2_DP_Slave acts as the PROFIBUS DP slave station through CM1242-5. Configure the devices and create the DP master station network.

Steps for PROFIBUS DP Master-Slave Configuration

(2) Connect the slave station to the master station, assigning PLC_2_DP_Slave to DP master CM1243-5.

Steps for PROFIBUS DP Master-Slave Configuration

(3) Double-click PLC_2_DP_Slave, click on the DP port to configure the data transfer area through properties.

Steps for PROFIBUS DP Master-Slave Configuration

Transfer Area_1: The master station reads 33 words from the slave station, and Transfer Area_2: The master station sends 10 bytes to the slave station, maintaining data consistency by length unit. “By length unit” consistency data reading does not require writing communication programs.

Steps for PROFIBUS DP Master-Slave Configuration

For example, in Transfer Area_1, the master station reads 33 words starting from the slave station QW100 into the address starting from IW104. Compile, save, and download the program to each CPU. The corresponding relationship of data can be seen through the monitoring table.

Steps for PROFIBUS DP Master-Slave Configuration

For the I/O modules of intelligent slave stations: The DP master station cannot directly read and write the I/O modules of the intelligent slave station. A program needs to be written in the intelligent slave station CPU to exchange data between the I/O modules and the DP transfer area.

Steps for PROFIBUS DP Master-Slave Configuration

If the master station wants to read the integral input point IW0 of the slave station CPU, a MOVE program needs to be inserted into the main loop program OB1 of the slave station as shown in the figure, using the MOVE instruction to transfer IW0 to QW120. Using the above configuration, the slave data QW120 reaches the master station’s IW124 through Transfer Area_1.

Steps for PROFIBUS DP Master-Slave Configuration

The monitoring table in the figure below shows that the master station read the integral point IW0 of the slave station CPU at IW124.

Steps for PROFIBUS DP Master-Slave Configuration

3. Configuration of GSD-Based DP Slave

When the DP slave is a third-party device or a Siemens device not found in the STEP7 V11 hardware list, the device can be added to STEP7 V11 by installing the GSD file, thus adding the device to the system. The GSD file for the device is provided by the device supplier. The configuration process is introduced with S7-1200 as the master station through CM1243-5 and S7-200 as the slave station through EM277: (1) Install the EM277 GSD file in STEP7 V11. Before installing the GSD file, close the hardware and network editor, and select the command “Install Device Description File” from the “Options” menu.

Steps for PROFIBUS DP Master-Slave Configuration

Select the folder where the GSD file to be installed is located from the “Source Path”, choose the file to install from the displayed list of GSD files, and click the “Install” button.

Steps for PROFIBUS DP Master-Slave Configuration

After restarting STEP7, the DP slave installed via the GSD file can be found in the hardware catalog under the “Other Field Devices” folder.

Steps for PROFIBUS DP Master-Slave Configuration

(2) Drag EM277 into the network view and connect it to the master module CM1243-5.

Steps for PROFIBUS DP Master-Slave Configuration

(3) Double-click EM277 to view the PROFIBUS DP parameters in the properties. The EM277 DP address is 4, and the V area address offset is 0.

Steps for PROFIBUS DP Master-Slave Configuration

(4) Configure communication data. The EM277 device overview has only one configurable slot. Based on the communication data requirements, either fixed message or general module can be selected. In this example, the general module is selected, defining the data exchange with the master station as 10 bytes input and 10 bytes output, with consistency chosen as “by length unit”.

Steps for PROFIBUS DP Master-Slave Configuration

(5) Compile to check the configuration and download to S7-1200 CPU.

(6) Set the EM277 address dip switch to 4 and start the PLC.

Check the communication data through the monitoring table of S7-1200 and the status table of S7-200.

Steps for PROFIBUS DP Master-Slave Configuration

4. Master and Slave Not in the Same Project

When the DP master station and DP slave station are not in the same project, the DP communication configuration must be completed in their respective projects. For example, CPU315-2PN/DP acts as the DP master station, while CPU1214C and CM1242-5 act as the DP intelligent slave station. The configuration of CPU315-2PN/DP is completed in STEP7 V5.5, while S7-1200 uses STEP7 V11 SP2 for configuration. (1) Configure the DP master station in STEP7 V5.5.

In STEP7 V5.5 hardware configuration, go to Option/Install GSD File, and install the CM1242-5 GSD file into STEP7 V5.5.

Steps for PROFIBUS DP Master-Slave Configuration

b. Configure the master/slave communication by connecting the DP slave module CM1242-5 with address 3 to CPU315-2PN/DP. Insert a general module in slot 1 for 2 bytes input; insert a general module in slot 2 for 2 bytes output.

Steps for PROFIBUS DP Master-Slave Configuration

c. Download the DP master station configuration as above. Compile and check for errors; if none, save and download to CPU315-2PN/DP.

(2) Configure the DP slave in STEP7 V11 a. In STEP7 V11, configure S7-1200 in the STEP7 V11 project view by adding the PLC station S7-1200 and the CM1242-5 module. Add a new network PROFIBUS_1 to the DP port of the CM1242-5 module, defining the DP address as 3, the same as in STEP7 V5.5. Since the master station is not in the same project, the master station allocation status for S7-1200 is “Unassigned”.

Steps for PROFIBUS DP Master-Slave Configuration

b. Configure communication transmission area by selecting the DP port properties on module CM1242-5, adding the data transfer area for communication with the master station. Insert 2 bytes output in slot 1 and 2 bytes input in slot 2, crossing the slots corresponding to the master station communication configuration.

Steps for PROFIBUS DP Master-Slave Configuration

c. Download to the S7-1200 CPU by selecting the S7-1200 PLC station, compiling, and if there are no errors, download the configuration to CPU 1214C.

(3) Check the communication status through the variable table of STEP7 V5.5 and the monitoring table of STEP7 V11 to view the DP communication results.

Steps for PROFIBUS DP Master-Slave Configuration

Steps for PROFIBUS DP Master-Slave Configuration

Leave a Comment