Using the "S7-Web2PLC" function you can create user-defined websites in STEP 7 as from version V5.5, which are populated with the content of CPU variables. The web servers provide the websites and are integrated in the CPU modules that support this function.
- STEP 7 as from V5.5
- S7-Web2PLC (included on the STEP 7 V5.5 DVD)
- Internet browser
- CPU module that supports this function
Proceed as described in the table below to create a user-defined website.
||Preparation: Installation of the "S7-Web2PLC" program|
This step has to be performed only once. Once the "S7-Web2PLC" program is installed on your PC, continue with Step 2. The "S7-Web2PLC" program is not installed automatically when you install STEP 7 V5.5. You must install it separately afterwards.
- Insert the STEP 7 V5.5 DVD in the drive of your programming device.
- Open the "CD_2 > Optional Components > S7 Web2PLC" folder on the STEP 7 DVD.
- Start the "Setup.exe" program and follow the installation instructions.
After installation, the "S7-Web2PLC" function is available in the SIMATIC Manager under "Options > S7-Web2PLC".
||Enable web server for the CPU module|
You must enable the web server so that the CPU module can be made available for the user-defined website. In this example we have used the CPU 319-3 PN/DP (MLFB: 6ES7318-3EL01-0AB0).
- Open the HW Config in your STEP 7 project and then open the Object Properties of your CPU.
- Select the "Web" tab and enable the "Enable web server on this module" option. After enabling this function the buttons and selection fields are grayed out and you can add and edit a new user.
- Click the "Add..." button to enter a new user. In the dialog that opens you must then specify the user name, password and rights for the user.
- Close the "Edit User Entry and Password" dialog and the CPU Properties dialog with OK.
- Save and compile the changes and close the HW Config.
||Create a Web2PLC project
- Open the "S7-Web2PLC" program
- by right-clicking the block folder and then selecting the "S7-Web2PLC" program in the pop-up menu that opens,
- or open the program via the menu command "Options > S7-Web2PLC".
- Create a new project using the menu command "File > New Project..." and specify a project name.
- Open the "Project Settings" dialog with the menu command "File > Change project settings...".
- The "Project folder:" field shows the specified path where S7-Web2PLC has stored the project and project file.
- In the "HTML folder:" field you can save the websites and edit them as required.
- Insert your HTML file in the "Start HTML page:" field. Right-click to navigate to your folder and insert the file.
- In the "Application name:" field you specify a name for your website and close the dialog again with "OK".
You can also insert your HTML file in your project via the Windows Explorer. After creating an S7-Web2PLC project with the menu command "File > New project..." (Point 2) S7-Web2PLC automatically creates the "Web2PLC" folder in your STEP 7 project.
- Open the Windows Explorer and navigate to the drive where you have stored your project.
- In your project open the "Web2PLC / <S7-Web2PLC project name> / html" file.
- Then insert your HTML page into the "html" folder.
||Convert website into data blocks|
The "S7-Web2PLC" dialog has a series of configuration steps that you must click one after the other in the given order.
- Click "Export symbols" button to export the symbols from the STEP 7 project and prepare them for the website. If you do not need all the symbols from your project for the website, you can use the "Filter..." function to define the input and output areas, markers and DB variables you require for exporting.
- After successful exporting you click the "Generate DB Source" button. The DB sources created are then stored in the source folder of the S7 station.
- You then click the "Compile DB Source" button to compile the DB sources in the data blocks DB333 and DB334. These data blocks contain the metadata and the complete web application and are stored in the block folder of the S7 station.
- After successful compilation you can click the "Download to CPU" button to download the blocks to your module.
- Close the "S7-Web2PLC" program.
In the "Log:" field you can monitor the results of the project steps performed and evaluate any error messages or warnings. The configuration steps below can only be performed if the actions described above have been carried out with 0 errors.
||Parameterization in the STEP 7 program
- Open the LAD/STL/FBD editor, OB1, for example, and call the system function SFC99 "WWW".
- You can insert the SFC 99 in the STEP 7 program after installation of S7 Web2PLC.
- Set DB333 for the "CTRL_DB" parameter.
- Save the LAD/STL/FBD editor and download the block into the CPU.
You can also rename the data blocks DB333 and DB334. You can tell that the DBs are blocks for the web application from the name of the author. In the SIMATIC Manager and in "View > Details" the name "Web2PLC" is in the "Author" column for the DBs.
||Display of of the website in the browser
- Start the Internet Explorer and enter the address for your website in the address bar. The address corresponds to the PROFINET IP address that you specified in the Object Properties (PN-IO interface) of your configured CPU.
- Click "Enter" to open the home page of the S7 station.
- If you have assigned a user ID, you enter the name and password and click "Login".
- On the left in the navigation area you select "User pages" and then click the home page of your user site. Your website is then displayed.
Fig. 06: Example of a website
More information and an extensive set of commands for programming user-defined websites are available in the S7-Web2PLC Online Help under "Configuring user-defined websites". Furthermore, a detailed example of how to create a website for plant visualization is available in "Applications & Tools" (Entry ID: 44212999).
The pictures in this FAQ were created with STEP 7 V5.5.