Description For S7-CPUs you can create web pages yourself, so-called "user-defined web pages". Or you can use standard CPU web pages already stored in the CPU. There are three ways of updating user-defined web pages:
Manual updating with "F5"
Updating using HTML code
Updating using JavaScript
Manual updating
Automatic updating using HTML
Automatic updating using JavaScript
Function
Press the F5 to reload the page
An update time is defined in the header of the HTML file
Use JavaScript to update single variables
Advantages
No compilation required
Regular updating
Regular updating, little data required
Disadvantages
No automatic updating
Whole web pages are reloaded (data, possible flickering)
Programming required for the algorithm
Automatic updating of user-defined web pages using HTML
You enable automatic updating of user-defined web pages by making an entry in your HTML web page.
Insert the code below into the header of the HTML file:
<meta http-equiv="refresh" content="30"/>
The "content" parameter contains the time (in seconds) after which the page is to be updated. In the example described above, the web page is updated every 30 seconds.
Automatic updating of user-defined web pages using JavaScript In this FAQ response we take a sample web page to show how to update using JavaScript. The sample web page has a simple input option and its JavaScript program code does not have to be changed.
The idea behind updating with JavaScript is that a small web page is embedded in the user-defined web page. This happens by means of so-called "inline frames" (iFrame). The complete web page does not have to be reloaded in order to fetch new values from the controller, but only the small web page in the inline frame. The advantage here is that only a small volume of data has to be called from the controller. If, for example, pictures are used on the main page, these do not have to be requested from the controller for each update, which is necessary with the other two mechanisms presented here. Updating using JavaScript causes only a small data transfer, which has a positive effect on the network load and the controller's cycle time.
The figure below shows the updating principle.
Fig. 01
A sample web page is available for downloading below. There are two files in the archive:
Main_Webpage.html (main page)
Update_Page.html (inline frame web page for updating)
The "Update_Page.html" file includes two tables. The first table is used to set the updating time. The time is entered in milliseconds in the second line. The left column of the second table (the first line is not taken into account) shows the individual AWP commands of the variables to be updated. The right column shows the associated ID names (IDs) which determine at which point of the main page this variable is to be updated. The IDs must be unique.
The source text of the main page contains the IDs (VarId1, VarId2, VarId3) predefined in the sample page. In a table, VarId1 is used with a DIV element, VarId2 with a SPAN element and VarId3 with a TD element. In order to use an element for updating you must insert the "ID" attribute and predefine it with the associated ID name. This can be used for all HTML elements that support the ".innerHTML" method.
Open the "STEP_7_Update_Main_Webpage.zip" file attached below and unpack the files in a directory on your hard disk.
Open the "Update_Page.html" file with Microsoft Frontpage, for example, and enter the updating time in milliseconds (20000, for example) in the second line of the first table.
In the second table, in the left column starting at the second line, you insert the AWP commands (:="VarName1":, for example) for the variables to be read. If more or less than 3 variables (as on the sample page) are used, you can delete or insert lines as required.
In the right column of the second table you enter the IDs (Varld 1, for example) you want to use for the AWP commands you inserted. These must be unique; this means that the IDs used must only occur once on the main web page. The JavaScript program code embedded in the "Update_Page.html" web page automatically determines the current size of the table during runtime. Here, on the main web page, the HTML element with the ID entered in the right column of the table is determined.
Insert these defined IDs into your main page. An example is given in the "Main_Webpage.html" file. This can be used with most HTML elements. Typical HTML elements are "DIV", "SPAN" or in a "TD" table. Add the "ID" attribute and assign to it the associated name of the ID. The JavaScript program code replaces the complete contents of this HTML elements with the contents of the left table column of the "Update_Page.html" file (including any HTML elements used). Finally, a delay time is set based on the time defined in the first table and and updating is executed once again.
You need the HTML code below to embed the "Update_Page.html" in your page:
<iframe src="Update_Page.html" style="display:none;" />
Generate the web DBs with the TIA Portal or in STEP 7 V5.5 with the Web2PLC tool and load your configuration data into the CPU.
Note The writing of variables continues to be programmed by means of the main web page.
If variable updating does not work, check your web browser for error messages. In the Internet Explorer, for example, a JavaScript error is indicated by a yellow exclamation mark displayed at the bottom left edge. Click on it to see the details of the error message.
Example
The error message "parent.document.getElementById(...) is zero or not an object" indicates that the no element with a specific ID can be found in the main web page. In this case you check the IDs used in the update page and the main web page.
Automatic updating of standard CPU web pages You can enable automatic updating for standard CPU web pages in the CPU properties. Follow the instructions in the table below.
No.
Procedure
1
In the project navigation you right-click the PLC folder and open the "Properties" in the pop-up menu that opens.
2
In the "Properties" dialog, in the "General" tab click "Web server". The web server properties are displayed in the window on the right.
3
Under "Automatic update" you enable the "Enable" option (the check mark must be set). The default setting for the update interval is 10s. Now you can change this to suit your requirements.
Fig. 02
Note
You must enable the web server before you can enable automatic updating. You cannot change the update interval in the S7-1200.
4
Click OK to close the dialog.
5
Save and compile your project.
6
Download your project into the CPU.
Creation environment
The screens in this FAQ response were created with STEP 7 V11.0+SP2.
Additional Keywords
Refresh, Image regeneration
Why must you never remove a memory card when the S7-300/S7-400/S7-1200 CPU is in operation (RUN)?
Instructions
If you remove the memory card from the CPU during a write process, this can make the content of the memory card invalid. The memory area retentivity might be lost as well. Under circumstances you might have to delete the memory card on the PG and reload the program. Observe the notes below before removing the memory card:
Always remove the SIMATIC memory card only in STOP mode.
Switch off the power supply.
If there is no write access through the PG, you can also remove the memory card when the power is switched on in STOP mode. In this case it is better to disconnect all communication connections beforehand.
More information is available in the TIA Portal Online Help under
"Accessing memory cards"
"Add user-defined card reader"
"Information about memory cards (S7-1200)"
"Information about memory cards for S7-300 (S7-300/400)"
Additional Keywords Memory cards
How do you configure the SIMATIC MV440 / MV420 code reader device with STEP 7 (TIA Portal) V11 as a PROFINET IO device on the PROFINET IO system of a SIMATIC S7-300?
Description The documentation included in this entry describes how to connect a SIMATIC MV440 code reader device to a SIMATIC S7-300 using PROFINET IO.
In this example, a CPU315-2PN/DP is used as PROFINET IO controller.
The figure below illustrates this device configuration.
Sample programs The downloadable "MV4x0_PROFINET_sample_project_V1_0.zip" file provides you with the following sample program including all the necessary components:
The "MV4x0_PROFINET_sample_project_V1.0.ap11" project that was created with STEP 7 (TIA Portal)V11 and includes the configuration of a CPU315-2PN/DP as PROFINET IO controller and a SIMATIC MV440 code reader device as PROFINET IO device.
Block "FB79_Application[FC1]", which is called in the user program of the CPU.
Creation environment The screens and downloads in this FAQ were created with STEP 7 (TIA Portal)V11.
Note on security
Caution The functions and solutions described in this article confine themselves predominantly to the realization of the automation task. Furthermore, please take into account that corresponding protective measures have to be taken in the context of Industrial Security when connecting your equipment to other parts of the plant, the enterprise network or the internet. Further information can be found in Entry ID: 50203404.
How do you connect the SIMATIC Field PG to the bus system to parameterize and diagnose the distributed I/O devices?
Configuration Notes From STEP 7 V5.4 SP2 onwards, STEP 7-external tools (Device Tools) are integrated for parameterizing and diagnosing distributed I/O devices via the Tool Calling Interface (TCI) in STEP 7. The following distributed devices are concerned:
PROFIBUS DP V1 Slave
PROFINET IO devices
Requirements
The device tool must support the TCI specification. TCI is a calling interface specified by PROFIBUS & PROFINET International (PI). You can use the TCI calling interface to transfer configuration from the Engineering Tool to the Device Tool.
The device tool and STEP 7 have to be installed on the same computer.
You have the following options for connecting the SIMATIC Field PG to the bus system to parameterize and diagnose the distributed I/O devices via the TCI calling interface.
SIMATIC Field PG is connected to the same bus system as the distributed I/O devices
Fig. 01: SIMATIC Field PG and distributed I/O devices in the same bus system
SIMATIC Field PG is not connected to the same bus system as the distributed I/O devices It is possible to parameterize and diagnose the distributed I/O devices from a different bus system via the TCI calling interface.
Here you need a data record gateway. The modules below support the data record routing function and can thus be implemented as data record gateway.
Module
Order number
Firmware
IE/PB Link
6GK1411-5AB00
6GK1411-5AA00
-
CPU412-2 PN
6ES7412-2EK06-0AB0
from V6.0
CPU414-3 PN/DP
6ES7414-3EM05-0AB0
from V5.1
CPU414-3(F) PN/DP
6ES7414-3EM06-0AB0
6ES7414-3FM06-0AB0
from V6.0
CPU416-3(F) PN/DP
6ES7416-3ER05-0AB0
6ES7416-3FR05-0AB0
from V5.1
CPU416-3(F) PN/DP
6ES7416-3ES06-0AB0
6ES7416-3FS06-0AB0
from V6.0
CP443-5 Extended
6GK7443-5DX04-0XE0
from V3.0
CPU319-3(F) PN/DP
6ES7318-3EL00-0AB0
6ES7318-3FL00-0AB0
from V2.7
CPU319-3(F) PN/DP
6ES7318-3EL01-0AB0
6ES7318-3FL01-0AB0
from V3.2
CPU317-2(F) PN/DP
6ES7317-2EK14-0AB0
6ES7317-2FK14-0AB0
from V3.1
CPU315-2(F) PN/DP
6ES7315-2EH14-0AB0
6ES7315-2FJ14-0AB0
from V3.1
IM151-8(F) PN/DP CPU with DP master module 6ES7138-4HA00-0AB0
6ES7151-8AB00-0AB0
6ES7151-8FB00-0AB0
from V2.7
IM151-8(F) PN/DP CPU with DP master module 6ES7138-4HA00-0AB0
6ES7151-8AB01-0AB0
6ES7151-8FB01-0AB0
from V3.2
IM154-8(F) CPU
6ES7154-8AB01
6ES7154-8FB01
from V3.2
You can parameterize DP slaves connected to the PROFIBUS from the MPI network or from the Industrial Ethernet via the data record gateway.
Fig. 02: Parameterizing DP slaves from MPI / Industrial Ethernet
How do you configure the SIMATIC MV440 code reading system as PROFINET IO device on the PROFINET IO system of a SIMATIC S7-300?
Description The documentation included in this entry describes how to connect a SIMATIC MV440 code reading system to a SIMATIC S7-300 via PROFINET IO.
In this example, a CPU319-3PN/DP is used as PROFINET IO controller.
The following figure illustrates this device configuration.
Sample programs The "41726666_PROFINET_IO_with_MV440.zip" file provides the following sample programs and the components required as a download.
The STEP 7 project "MV440.zip" that includes the configuration of a CPU319-3PN/DP as PROFINET IO controller and a SIMATIC MV440 code reading system as PROFINET IO device. The sample program "Example.zip" is integrated in the STEP 7 application program of the CPU319-3PN/DP.
The sample program "Example.zip" that is on the CD included in the delivery package of the SIMATIC MV440 code reading system.
The GSD file of the SIMATIC MV440 code reading system, which is on the CD included in the delivery package of the SIMATIC MV440 code reading system.
Description With the S7 program available for download in this FAQ document you can acquire the UTC time and date information from a GPS signal. This is effected with the help of a GPS mouse which receives the GPS signal in the form of an NMEA protocol and transmits it to a
SIMATIC S7-300/400 CPU for further processing.
The current time and date information is used to set the CPU module clock.
Description If you are using an Industrial Ethernet CP that supports the "IP access list" function in the S7-300/400, you can prevent unauthorized access via the LAN (local area network).
The following modules support the "IP access list" function:
6GK7 343-1GX20-0XE0 - from V1.0 (CP343-1 IT) 6GK7 343-1GX21-0XE0 - from V1.0 (CP343-1 Advanced) 6GK7 343-1GX30-0XE0 - from V1.0 (CP343-1 Advanced) 6GK7 343-1EX21-0XE0 - from V1.0 (CP343-1) 6GK7 343-1EX30-0XE0 - from V2.0 (CP343-1)
6GK7 443-1EX10-0XE0 - from V2.3 (CP443-1)
6GK7 443-1EX11-0XE0 - from V2.3 (CP443-1) 6GK7 443-1EX20-0XE0 - from V1.0 (CP443-1)
6GK7 443-1EX40-0XE0 - from V1.0 (CP443-1 Advanced)
6GK7 443-1EX41-0XE0 - from V1.0 (CP443-1 Advanced)
6GK7 443-1GX20-0XE0 - from V2.0 (CP443-1 Advanced)
IP access list
The IP access list is configured in the Properties dialog of the Industrial Ethernet CP concerned.
In the configuration, it is possible to define a list of IP addresses that are permitted access to the module. For example, in the configuration you can enter all the IP addresses of the programming devices that are authorized to have access. This then prevents unauthorized access from PCs, for example, to the S7-300/400 via the LAN.
The CP works on the following principle Every time a message is received via the LAN, a check is made to see whether the sender's IP address is on the IP access list. If not, the message is discarded, and the partner receives neither a positive nor a negative response. If the IP address is on the IP access list, i.e. it has access authorization, the message is forwarded and processed.
Special feature of the IP access list If you want double IP addresses to be recognized in the network, then you must enter the IP address of the Industrial Ethernet CP in the IP access list.
Otherwise, no reply is made to the PING sent by the partner module, because the IP access list check reveals that it does not have access authorization. The double IP address in the network is not recognized otherwise.
Configuration of the IP access list
Open the HW Config of your S7-300/400.
Double-click on the Industrial Ethernet CP. The Properties dialog opens.
Select the "IP Access Protection" tab.
Check the "Activate access protection for IP communication" function to activate the IP access list.
Now enter the IP addresses or IP address bands of the devices that have access authorization.
Fig. 01
Note The IP Access List is only effective in TCP / UDP or ISO-on-TCP communication. It does not take into account messages sent via the ISO transport protocol and MAC addresses.
Loading the configuration into the module
You have the following options for loading the configuration data.
Loading via the MPI interface of the CPU.
Loading via the LAN (ISO protocol or TCP/IP protocol).
The following points should be noted here.
Loading via MPI There are no restrictions for loading configuration data via MPI.
Loading via ISO protocol The Industrial Ethernet CP, via which the configuration data is to be loaded, must support the ISO protocol.
Loading via the TCP/IP protocol If the configuration is to be loaded with the IP access list into the module via TCP/IP, the IP address of the configuration PC/PG has to be entered in the IP access list! The IP access list becomes effective before the loading into the module procedure has been terminated. The IP address of the PC/PG then suddenly no longer has access authorization to the S7-300/400. STEP 7 then reports a faulty loading procedure and the CPU reports inconsistent configuration.
Remedy Enter the IP address of the configuration PC/PG into the IP access list and the load the configuration again via ISO protocol or MPI.
Note If the IP address of the PC/PG is not to be entered in the IP access list, then the configuration usually has to be loaded via MPI or ISO protocol.
Description:
You can choose between three protection levels:
Protection level 1: corresponds to the default behavior
Protection level 2: read-only access possible
Protection level 3: neither read nor write-access possible
You can assign a CPU password within the hardware configuration of your S7 station. Open the Properties dialog box of the CPU there. The protection level 2 (read-only access) and a password assignment are recommended inside the Properties dialog box.
A user who does not know the password can then read the program in the CPU, without entering a password. However, he cannot make changes within the program.
Fig. 1: Setting CPU protection
Block protection (Know_How_Protect) can be assigned for self-created STEP 7 blocks. You can find more information about this under "Block protection (Know_How_Protect) for DBs, FBs and FCs" - entry ID: 10025431.
If you forget your password:
If you forget the password, you do not have write-access (or read-access in level 3) in the password-protected CPU.
To restore access, you have to reset the CPU and reload the program into the CPU.
Note:
The password only becomes active once the changed data has been downloaded into the S7-CPU.
Keywords: Block protection
Master / Slave (SIMOVERT) communication on the DP PROFIBUS
QUESTION:
What are the options for communication between a SIMOVERT and a PROFIBUS DP master?
ANSWER:
You have the following options for connecting a SIMOVERT as PROFIBUS DP slave to a PROFIBUS DP master:
1. Interfacing the slave to the integrated DP connection of an S7-300 CPU
When configuring your SIMOVERT slave in the HW Config you are requested to make a choice regarding the setpoint configuration. If you decide for the PPO type 5, then you have the choice between: "PPO 5: 4 PKW | 4 + 4 + 2 PZD"
and "PPO 5: 4 PKW | 10 PZD".
In both case the sum of all parameter and process data words is identical. There is however a difference in the communication process due to the different distribution of the consistent data areas.
If you select the configuration "PPO 5: 4 PKW | 4 + 4 + 2 PZD", then you must program the communication via three calls of the SFC 15 (DPWR_DAT) and SFC 14 (DPRD_DAT). You always use the SFC 15 and SFC14 when your data length is either 3 bytes exactly or greater than 4 bytes. Since in this case three data blocks of 8 bytes each and one data block of 4 bytes have been selected, it is necessary to have the three SFC calls. The fourth data block is 4 bytes long and can therefore be read directly. Note: the format of the data length in the HW Config is of the "WORD" type.
If you select the configuration "PPO 5: 4 PKW | 10 PZD", then you only need two calls each of the SFC 15 (DPWR_DAT) and the SFC 14 (DPRD_DAT). One call for the parameter data block (PKW) and one for the process data block (PZD).
2. Using the CP342-5 as DP master
If you use the CP342-5 as DP master, it doesn't matter which setpoint configuration you choose. You can only use the functions FC1 (DP_SEND) and FC2 (DP_RECV). The system functions SFC14 and SFC15 are not available to you in this case.
Note: if you configure a SIMOVERT CBP together with a CP342-5, then the data block is two bytes longer than predefined in the HW Config (PKW+PZD). These two extra bytes are needed for diagnostics.
What can you do if new modules, e.g. CPUs, are missing in the STEP 7 module catalog?
Description: As from STEP 7 version V5.2 you have the option of updating your module catalog.
If the PG/PC on which STEP 7 is installed has a direct Internet access, you can download the required software components (Hardware Support Packages) directly from the relevant Internet page. The individual steps for integration in the module catalog of the HW Config are described in Entry ID 17581199.
If the PG/PC on which STEP 7 is installed does not have direct Internet access, the download "STEP 7_HSP.zip" is available in Entry ID 23183356 for updating the hardware catalog of your STEP 7 installation. The download contains the software components (Hardware Support Packages) needed for the modules and can be transferred to the PC with the STEP 7 installation, for example with a memory stick.
The individual steps for integration in the module catalog of the HW Config are described in Entry ID 22374877.
Keywords:
HSP, Hardware Support Packages, Hardware updates
Where can I procure the GSD files for my S7-300 CPUs?
Description: If you wish to connect a PROFIBUS DP slave, e.g. a CPU, to an external master, you need the GSD file. On an S7 master you can configure this directly via HW Config.
You can procure the GSD files for Siemens products directly via the Internet if the information is not in the module catalog of HW Config:
You can reach the PROFIBUS GSD files: SIMATIC in Entry ID 113652. The language is coded in the file designation, e.g. "xxxx.gse" stands for English. Please note how the order numbers of the CPUs, e.g. CPU 315, are assigned to the station types.
If you want to include the DP devices in the module catalog of HW Config, the GSD files must be stored on a data medium that you can access from STEP 7. How to do this is described in detail in Entry ID 2383630.
Description:
In an automation network of multiple SIMATIC stations you have the option of synchronizing the clocks of all the CPUs. For this, you parameterize the clock of one CPU as the "master clock" and set the interval at which synchronization is to take place. You parameterize the CPUs to be synchronized as "slave clocks". You set the parameters via the CPU properties.
Fig. 01: Setting synchronization on a CPU 315-2DP as example
You can set synchronization separately:
in the PLC (i.e. internal)
on an MPI (i.e. external)
on an MFI (i.e. external via 2nd interface)
Detailed information on time synchronization is available from the following sources:
For S7-300 CPUs - the manual "S7-300 CPU 31xC and CPU 31x, Technical Data", "Interfaces" chapter, in Entry ID:12996906
For S7-400 CPUs - the manual "Automation System S7-400 CPU Specifications", "Time Synchronization" chapter, in Entry ID:23904550
For CP 343-1 - the device manual "Part B CP 343-1", "Time Synchronization" chapter, in Entry ID:24485272
For CP 443-1 - the device manual "Part B CP 443-1", "Time Synchronization" chapter, in Entry ID:27013386
Note:
A description of time synchronization via Industrial Ethernet with the SIMATIC procedure is available in Entry ID:18130164.
A description of time synchronization via PROFIBUS in the SIMATIC environment is available in Entry ID:17544115.
A description of time synchronization via MPI subnetwork in the SIMATIC environment is available in Entry ID:17521938.
What is the startup behavior of an S7-300/400 CPU when you have configured an "empty" DP master system with "Startup when expected/actual configuration differ", but no slave is incorporated?
Instructions:
If you have configured an S7-300 CPU as DP master without incorporating a slave, then in the Hardware Configuration, in the Properties of the CPU, you have to activate the "Startup when expected/actual configuration differ" option in the "Startup " tab.
This option has to be activated because the DP interface expects a "Finish" message from all the slaves before startup. If there is no slave, then this "Finish" message doesn’t come and the monitoring time expires. The CPU then goes into STOP with a parameterization error.
Fig. 1: Setting the Startup behavior
The Startup behavior of an S7-400 CPU is not identical to that of an S7-300 CPU. If you have configured an "empty" DP master system, the S7-400 CPU starts up even though the "Startup when expected/actual configuration differ" option is not activated. If, however, a configured slave is not available, there is no startup of the S7-400 CPU. Startup cannot be blocked individually for the DP master systems.
What are the conditions for assigning the addresses of I/O modules (central or distributed) to an S7 CPU?
Configuration Notes: When assigning addresses in the Hardware Configuration you must note that a data area created (e.g. a double-word) must not be configured on the limit of the process image (i.e. a part of the area within and the rest of this area outside the double-word).
Example:
If, with a process image of 256 bytes in size (address area 0 to 255), you configure an input double-word to the addresses 254 to 257, you must match the size of the process image accordingly (can be set in the Properties of the CPU).
Fig. 01
Fig. 02
The following table lists the S7 CPUs that have a variably settable process image:
S7-300 CPU
Order number
Restriction
IM154-8 CPU
6ES7 154-8AB00-0AB0
Firmware versions from V2.5 onwards
CPU 315-2 PN/DP
6ES7 315-2EH13-0AB0
Firmware versions from V2.5 onwards
CPU 317-2
6ES7 317-2AJ10-0AB0
Firmware versions from V2.5 onwards
CPU 317-2 PN/DP
6ES7 317-2EK13-0AB0
Firmware versions as from V2.3
CPU 317-2 PN/DP
6ES7 317-2EJ10-0AB0
Firmware versions as from V2.3
CPU 318-2 DP
6ES7 318-2AJ00-0AB0
-
CPU 319-3 PN/DP
6ES7318-3EL00-0AB0
-
S7-400 CPU
Order number
Restriction
CPU 4xx..
6ES7 41..
Firmware versions from V1.1 onwards
CPU 416-2
6ES7 416-2XK00-0AB0
only selection between
512 and 1024 bytes possible
6ES7 416-2XK01-0AB0
6ES7 416-2XL00-0AB0
6ES7 416-2XL01-0AB0
Note:
From STEP 7 V5.3 onwards this configuration of the I/O addresses is checked and an error message is output if necessary.
Error message "The address you entered is invalid": If the address area of a module is set so that the addresses would lie partly inside and partly outside the process image, then the addressing is rejected with the following message:
Fig. 03
Remedy: In this case you correct the address of the module or the area of the process image so that the address area is either entirely inside or entirely outside the process image.
Error message (13:4919):
If, on the other hand, a valid address is first configured for the I/O module and then the size of the process image of the CPU is changed, then when you save and compile the configuration, it is reported that the system data could not be generated; after clicking on "Details..." the following explanations are displayed:
Fig. 04
Remedy:
By clicking on "Go To" you select the module and correct its address so that the address area is either entirely inside or entirely outside the process image, or correct the size of the process image.
QUESTION:
How can you link an S7-300 module as DP slave to a DP/PA-Link
in the hardware configuration of STEP 7?
ANSWER:
The normal way of linking the above-mentioned modules from the
PROFIBUS-DP catalog of the hardware configuration of STEP 7 to the
DP master segment of the DP/PA-Link is not possible. Linking the
S7-300 as slave to a DP/PA-Link is only possible via the GSD files.
When handling CPU-I slaves via GSD file you must make sure as user
that the I/O areas match each other. First download the GSD
files required for the above-mentioned modules onto your STEP 7
system. If these GSD files are already incorporated in your
hardware configuration, you can skip this step. The GSD files are
available in the Internet in the Entry ID: 113652 "PROFIBUS GSD
files : SIMATIC". Via the menu item "Options > Install
New GSD…" you can incorporate the GSD files in your hardware
configuration. Please close your S7 station before doing
this.
Fig. 1: Installation of the new GSD file of the catalog
Open your hardware configuration again and configure the module
IM157 (e.g. the DP/PA-Link with MLFB: 6ES7157-0AA81-0XA0). From the
PROFIBUS DP catalog/subdirectory "DP/PA link" you can link this
module directly to the segment of the redundant master system using
drag-and-drop.
Fig. 2: Selecting the DP/PA link in the HW Config
Specify a PROFIBUS address for the DP/PA-Link and select
"Interface Module for PROFIBUS-DP" (see Fig. 3).
Fig. 3: Selecting the interface module in the HW Config
You will then find the S7-300 modules in the PROFIBUS DP catalog
under "Additional Field Devices" (see Fig. 4).
Fig. 4: Selecting the S7-300 module
Now use drag-and-drop to copy these modules to the master
system. Make sure here that you select the right bus system (in
Fig. 5: PROFIBUS (5)) and a PROFIBUS address. If you use the
GSD files available at the time, then the CPU 315-2 DP is
incorporated as DPV0 slave.
Fig. 5: Configuration in the HW Configuration
Now you still have to create the HW configuration for the CPU
being operated as DP slave. In the case of a standard slave, you
usually only have to set the DP address and the baud rate.
Create an S7-300 station according to your HW
configuration.
Connect the DP interface to a bus. (You now have to select a bus
other than the one on your DP/DP link, because you have already
assigned the address for the DP slave here).
Set the DP interface of the CPU to slave mode (double-click DP
Interface > Operating Mode tab). Please make sure that the PG
functions are not activated.
Fig. 6: Settings as DP slave
Set the bus parameters for the bus. Use the same bus parameters
as you have set on the secondary side of your DP/DP link.
Load the configuration into the DP slave CPU.