Vorbereitungen zum SIMOTION Webserver Tutorial

Vorbereitungen zum SIMOTION Webserver Tutorial
SIMOTION Tutorials
Preparations for the SIMOTION web server
tutorial "User-defined web pages"
Unrestricted / © Siemens AG 2015. All Rights Reserved.
siemens.com/answers
• Prepare SIMOTION project
2
• Activate web server
3
• Add demo variables
4
• Set up web editor
• Set up web project using card reader
6
10
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Activate SIMOTION web server
SIMOTION SCOUT TIA V4.4, TIA Portal V13 SP1
1. Open the Device
Configuration of the
SIMOTION controller
in your TIA Portal
project
2. Open the properties of the controller in the device view
3. In the "Webserver" settings, check the box for "Activate web
server on this device". A security note appears. Confirm this
note.
4. Activate the required web services (e.g. HTTP)
5. Load the modified project into the controller
►
Prepare
SIMOTION
project
►
Activate web
server
►
Add demo
variables
►
Set up web
editor
►
Set up web
project using
card reader
Note: When using SIMOTION SCOUT V4.4 with SIMATIC STEP 7, the web server is
already activated as standard.
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Import the ST program source with the user-defined variables into your
SIMOTION SCOUT TIA project
1. Double-click on
"SIMOTION
configuration". This
opens SIMOTION
SCOUT TIA.
2. In SIMOTION
SCOUT TIA right click
on "PROGRAMS"
below your
SIMOTION controller.
3. In the context menu click on Export/Import
Import external source  ST source.
4. This opens a file selection dialog. Select the
file FillingMachine.st and confirm the
dialog by clicking "OK".
You will find the file FillingMachine.st
in the Zip file
CustomWebPagesTUTORIAL.zip.
5. Click on "Save project and compile changes".
6. Load the modified project into the controller.
►
Prepare
SIMOTION
project
►
Activate web
server
►
Add demo
variables
►
Set up web
editor
►
Set up web
project using
card reader
Note: When using SIMOTION SCOUT V4.4 with SIMATIC STEP 7, the import of the
ST source functions in an identical manner.
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
• Prepare SIMOTION project
3
• Set up web editor
5
• Install NetBeans IDE
6
• Open demo project
7
• Set up syntax highlighting
8
• Set up web project using card reader
10
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Installation of the "NetBeans IDE" development environment
You can basically use any text editor to
develop your user-defined web pages
for the SIMOTION controller.
It is recommended that you use editors
or development environments that
support syntax highlighting for HTML,
CSS and JavaScript.
NetBeans IDE 8.0.2 from Oracle was
used for creating this tutorial.
NetBeans IDE is an integrated
development environment with HTML5
support.
Installation:
1. Open the following link:
https://netbeans.org/downloads/
This opens a page with an
overview of the available
NetBeans IDE download bundles.
2. Select a NetBeans IDE version for
downloading which supports the
HTML5 technology, e.g. the
"HTML5 & PHP" version.
►
Prepare
SIMOTION
project
►
Set up web
editor
►
►
Install NetBeans
IDE
►
Open demo
project
►
Set up syntax
highlighting
Set up web
project using
card reader
3. Install NetBeans IDE.
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Open demo project
Unpack the file CustomWebPagesTUTORIAL.zip. This contains the demo project with
the user-defined web pages as well as the associated configuration files.
Open with NetBeans IDE
Open the
demo project
by means of the
"File" menu:
In the "Projects"
overview you will
now see the new
HTML5 project:
►
Prepare
SIMOTION
project
►
Set up web
editor
Opening with another web editor
The source code files of the demo
project are located in the sub-folder
public_html of the demo project.
Copy the contents of public_html
into a folder of your choice. You can
open and edit the source code files with
your preferred text or web editor.
►
►
Install NetBeans
IDE
►
Open demo
project
►
Set up syntax
highlighting
Set up web
project using
card reader
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Syntax highlighting for MWSL files in NetBeans IDE
The HTML files of your user-defined web pages for SIMOTION must have the file extension
".mwsl". To ensure that you have the correct colored HTML syntax highlighting displayed in
the NetBeans editor, please perform the following settings:
1. Open the "Tools" menu and select
the "Options" entry
2. In the "Options" dialog, select
"Miscellaneous" and then the
"Files" tab
3. Click on "New…" and insert the
new "mwsl" file extension.
4. Link the new "mwsl" file extension
with the file type "HTML Files
(text/html)" and confirm by clicking
"OK"
►
Prepare
SIMOTION
project
►
Set up web
editor
►
►
Install NetBeans
IDE
►
Open demo
project
►
Set up syntax
highlighting
Set up web
project using
card reader
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
• Prepare SIMOTION project
3
• Set up web editor
6
• Set up web project using card reader
9
• Web server configuration
10
• User administration
11
• User-defined web pages
12
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Web server configuration
1. Remove the SIMOTION memory card from the
controller and connect the memory card with
your computer using a suitable CF card reader.
CAUTION: Only remove the card from the
controller when it is deenergized!
2. Overwrite the file WebCfg.xml in the following
folder on the memory card:
\USER\SIMOTION\HMICFG
►
Prepare
SIMOTION
project
►
Set up web
editor
►
Set up web
project using
card reader
►
Web server
configuration
►
User
administration
►
User-defined web
pages
You can find the prepared WebCfg.xml in the
Zip file CustomWebPagesTUTORIAL.zip.
All user-relevant settings of the SIMOTION web server are stored in the file
WebCfg.xml.
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
User administration
1. Overwrite the file UserDataBase.xml
in the following folder on the memory card:
\USER\SIMOTION\HMICFG\UserDataBase
You will find the appropriately prepared user
database UserDataBase.xml for the Tutorial in
the Zip file CustomWebPagesTUTORIAL.zip.
2. Whenever necessary, add further users to the user
administration in accordance with the example
shown. For this purpose, edit the XML file.
The password for all users in this example is:
simotion
Users
"Administrator"
group
"Service group"
group
Newton
 YES
 YES
Tesla
 YES
 NO
Kepler
 NO
 YES
►
Prepare
SIMOTION
project
►
Set up web
editor
►
Set up web
project using
card reader
►
Web server
configuration
►
User
administration
►
User-defined web
pages
The file UserDataBase.xml is the user database, including the user groups for the
login administration of the SIMOTION web server.
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
User-defined websites
1. Open the folder of the demo project on your
computer using the File Explorer. Open the subfolder public_html. Here you will find the source
files of the demo project.
2. Copy the file user.mwsl and the folder DEMO
completely into the following folder of the SIMOTION
memory card:
\USER\SIMOTION\HMI\FILES
This path is provided for all your user-specific files
and folders.
►
Prepare
SIMOTION
project
►
Set up web
editor
►
Set up web
project using
card reader
►
Web server
configuration
►
User
administration
►
User-defined web
pages
3. Insert the CF memory card back in the controller.
Tip: When the SIMOTION controller is switched on, you can update the contents of
the FILES folder even when using FTP access.
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Thank you for your attention!
siemens.com/answers
Unrestricted / © Siemens AG 2015. All Rights Reserved.
V1.0
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising