You are on page 1of 18

HTML Code Generator V 1.

0
For Simatic IT Modules
CP 443-1 IT, 343-1 IT, 243-1 IT

Manual

This manual and program are freeware. Every user can use, copy or forward this
program and documentation FREE OF CHARGE. The authors and owners of this
program take no responsibility whatsoever for the functionality and compatibility of
this software. Use of the software is entirely at the users own risk. Since this
software is free of charge, there is no warranty, nor claim for error correction and
hotline support.
Table of Contents
Welcome to HTML Code Generator! ... 3 Bit Number...................................... 11
Software Requirements..................... 3 No of Values ................................... 11
Hardware Requirements.................... 3 Width............................................... 11
Current Features:............................... 4 Height.............................................. 11
Features Coming Soon!..................... 4 Debug Level.................................... 11
The Main Setting Screen....................... 5 Edit Parameters Online ................... 11
HTML Page Title.............................. 5 Use Symbolic Access...................... 11
CPU Type.......................................... 5 Symbol Name.................................. 11
Rack Number .................................... 5 Auto Append Rack/Slot .................. 12
CPU Slot Number ............................. 5 The S7 Ident Applet Selection Tab..... 13
Language........................................... 5 Width............................................... 13
Create Index ...................................... 6 Height.............................................. 13
Create selected S7 Applets................ 6 Debug Level.................................... 13
The S7 Get Applet Selection Tab ......... 7 Edit Parameters Online ................... 13
Applet Name ..................................... 7 Ident Selection Check boxes........... 13
Variable Name .................................. 7 Rack/Slot......................................... 13
Data Area .......................................... 7 Text Field ........................................ 13
Data Type.......................................... 7 The S7 Status Applet Selection Tab ... 14
Cycletime .......................................... 7 Width............................................... 14
Format ............................................... 7 Height.............................................. 14
DB Number....................................... 7 Debug Level.................................... 14
Address ............................................. 8 Edit Parameters Online ................... 14
Bit Number........................................ 8 Cycletime ........................................ 14
No of Variables ................................. 8 Status Selection Check boxes ......... 14
Width................................................. 8 Rack/Slot......................................... 14
Height................................................ 8 Text Field ........................................ 14
Debug Level...................................... 8 Generator Button................................. 15
Edit Parameters Online ..................... 8 Generating your HTML Page ......... 15
Use Symbolic Access........................ 8 The Output Screen .............................. 16
Symbol Name.................................... 9 Print................................................. 16
Auto Append Rack/Slot .................... 9 Save to File ..................................... 16
Use Graphic Display ......................... 9 Save to IT CP .................................. 16
Min Value / Max Value .................... 9 The FTP Screen................................... 17
Dimension ......................................... 9 CP IP Address ................................. 17
The S7 Put Applet Selection Tab........ 10 User Name ...................................... 17
Applet Name ................................... 10 Password ......................................... 17
Variable Name ................................ 10 Filename.......................................... 17
Data Area ........................................ 10 Transfer File.................................... 17
Data Type........................................ 10 Cancel ............................................. 17
Format:............................................ 10 All Files........................................... 17
DB Number..................................... 10 Save Password ................................ 17
Address ........................................... 10 HCG Index-Page Example.................. 18

2
Welcome to HTML Code Generator!
Introduction:

Welcome to the HTML Code Generator (HCG) and Applet generation Utility V 1.0 for
the Simatic IT Modules: CP 443-1 IT, CP 343-1 IT, CP 243-1 IT. With this program,
any user can generate web pages quickly and effectively for the Simatic IT Module
family. The focus is on the use of the S7 Applets, which are part of the CP file system.
We have up to 4 possible applets and multiple combinations of them. The 4 main applets
are the S7 Get (get data from PLC), S7 Put (write/put data to PLC), S7 Ident
(Identification), and S7 Status (Status of module in rack). For the most part, the
generation process creates the HTML and applet code automatically. But, if necessary,
you can refer to the manual for the IT CP’s to make code changes or find further
information which is located on Siemens customer support website at:
http://www4.ad.siemens.de/view/cs/en/16832609

You can also use this program to change the HTML Code to build your own web pages
and use the utility as a helpful tool to learn about the applets.

Software Requirements

Operating Systems tested: Windows 98SE, NT, 2000 and XP.


Internet Explorer (4.02 or higher) tested 6.0 + Sp1.
Microsoft Java VM or Sun Java (1.4.1 or higher)
The Microsoft Java VM is no longer downloadable on Microsoft’s website, but can be
obtained through many 3rd party sites by searching on the web.
Latest File system for IT Cp’s, which can be downloaded from:
http://www4.ad.siemens.de/WW/view/en/19000429 //200 file system 2.5.3
http://www4.ad.siemens.de/WW/view/en/19026376 //300 file system 2.5.3
http://www4.ad.siemens.de/WW/view/en/18644576 //400 file system 2.5.3

This program requires Internet Explorer version 4.02 or higher.


V 6.0 + SP1 or greater is recommended!

Hardware Requirements
Cp 243-1 IT or Cp 343-1 IT or Cp 443-1 IT with latest firmware (latest firmware
available on customer support website.) It might be necessary to reformat the file
system of the IT CP. Read the firmware instructions carefully for this information)
Valid Ethernet Network/Cabling arrangement between PC and CP
PC w/ Software requirements above

Comments or suggestions on the HTML Code Generator can be submitted to the


hotline e-mail address: Simatic.Hotline@sea.siemens.com with ATTN: HTML Code
Generator in the subject line. We can’t make any promises that we will be able to
grant all requests or follow up on all comments, but will try our best! All ideas for
the HTML code generator will become SE&A property.

3
Current Features:

Generation of HTML and Applet code for the 200/300/400 IT Module family
CP 443-1 IT, CP 343-1 IT, CP 243-1 IT using the built in applets S7 Get, S7 Put, S7
Ident and S7 Status.

Note: Ident and Status are not currently supported by the Cp 243-1!
You can use the built-in Ident and Status page on the S7 200 if necessary.

Applets can be adjusted to support almost all of the different features such as applet
color, data areas, data types, symbolic access, graphical display, and multi-read with S7-
Get.

Note: The generator cannot currently create a multi-variable Put.

Generated Pages can be printed directly to the printer and/or saved to local files.
Generated Pages can also be saved directly to the IT Modules via the built in FTP
functionality and be displayed automatically by Internet Explorer using a hotkey (hit
Shift key while pressing the Transfer button).

If selected, the utility can create a HTML page structure with a main index page and sub-
index for all of the applets created in the HTML Code Generation sessions.

Warning!
If you select to use the Index feature, be forewarned that this will overwrite the existing
index page! An example of using the index / sub-index feature is located on the last page
of the manual. This should not be a problem, because the links to the standard page can
still be used by selecting your IT Cp version from the menu bar, on the HCG index page.
(200,300, or 400). See last page for example.
The file system can always be restored if necessary. If you have files on the CP which
you don’t want to be overwritten, please back up all files beforehand.
See the information above in the software requirements section.

This manual covers the different screens and functions of the HTML Code Generator
program and explains how to use them.

Features Coming Soon!

Multi-put
New Applets w/ selectable graphic display support!
IT File System Restore Utility embedded.

4
The Main Setting Screen

Let’s first get started by looking at the main screen.

Tip: If you hold your mouse over the different fields in the program, help text will
automatically be displayed!

HTML Page Title


Please enter the HTML Page title (displayed in the Browser Title).

Tip: If you have the index option checked, the HTML Page title is automatically
added to the sub-index column on the index page.

CPU Type
Select the CPU Type you are working with. S7 200 or 300/400.

Rack Number
Select the Rack number in which your CPU is located. (Normally 0 unless CPU is in an
expansion rack)

CPU Slot Number


Select the CPU Slot number in which your CPU is located.

Tip: Make sure you don’t use the CP slot here because the applets will not work!

Language
Please select English or German.

Background Color
Please select the color of your applets / page
with this setting. You can choose to use
default colors or select your own with the
‘User Defined’ Option. If you opt to select
your own color, another screen will appear
and allow you to customize it.
Using the R (Red), G(Green) and B(Blue)
selectors, please change the output window
to the desired color and hit the ‘OK’ button
to continue.

5
Warning! The applets use a font, which is usually black. Using dark colors
and shades may make the display unreadable.

Create Index
If checked, will automatically create a ‘master’ index (Navigation) file on the CP, which
will contain all generated pages (when checked). Pages must be given different names in
order to be added to the sub-index, which is a part of the ‘master’ index page. If you use
the same name for a file, then the page with the same name will be overwritten and
updated in the index.

Warning!
If you select to use the Index feature, be forewarned that this will overwrite the existing
index page! If necessary, the file system can be restored with the factory file system
settings as discussed in the requirements section. See the last page of the manual for an
example of using the index feature.
The S7 300/400/200 file system is also located on the manual CD supplied with the
product(s).

Create selected S7 Applets


This selection allows the user to select which applets to display on the HTML page. You
can do many combinations of applets per page with this feature. (See picture below for
example, notice the highlighted checkboxes.)

Warning! If create selected S7 Applets is checked and no selection is made,


the page will be blank

6
The S7 Get Applet Selection Tab

Applet Name
Please enter the name of your applet here. If you are in Index Mode, the applet name
automatically gets added to the sub-index title field.

Variable Name
Please enter the name of the variable displayed on the page

Data Area
Select the data area you wish to read from. Supported areas (depending on CPU type and
language selected) are M = memory, I = input, Q= output, E = input, A=output, and DB =
datablock.

Data Type
What is the data type you wish to read? Many different types are supported and some
special types will be added in the future versions of the generator.

Cycletime
Set the refresh rate for the applet. The default is 5000ms (5 sec) and it is not
recommended to go below this value.

Format
The format is how the data is formatted within the applet. This is an advanced feature
and normally automatically set by the generator. In the case that the user must change
the format, you can double click on the format field and hit yes on advanced mode. Then
you can set the format manually using the format field.

DB Number
If you select DB under the data area field, then you set the DB Number here.

7
The S7 Get Applet Selection Tab (cont.)

Address
What is the starting address to read?

Bit Number
If you selected bit for the data type, what is the bit number?

No of Variables
You can read multiple variables with certain data types from the starting address using
this field. If you select the proper types then the field becomes available.

Width
Select the width of the applet. Be careful and don’t make the width too small or the data
may not be visible.

Height
Select the Height of the applet. Be careful and don’t make the height too small or the
data may not be visible.

Debug Level
Select the debug level for the applet. (See manual for more details)

Edit Parameters Online


Can the user edit the applet parameters while online?

Use Symbolic Access


If you configured the IT Module with Symbols (Hardware configuration / Symbols Tab),
then you can opt to use the symbolic name here.

8
The S7 Get Applet Selection Tab (cont.)

Symbol Name
What is the symbol name you wish to use?

Auto Append Rack/Slot


Some of the symbolic names automatically get the rack/slot number appended to the
symbol name (see IT CP Symbols Tab in Hardware config).
Check if you would like to auto append the rack/slot of CPU to symbolic name.

Use Graphic Display


If you would like to display the data graphically then check the box and select the type of
display from the dropdown.

Min Value / Max Value


What is the max/min for the display?

Dimension
What is the dimension or units for the graphical display?

9
The S7 Put Applet Selection Tab

Applet Name
Please enter the name of your applet here. If you are in Index Mode, the applet name
automatically gets added to the sub-index title field.

Variable Name
Please enter the name of the variable displayed on the page

Data Area
Select the data area you wish to write to. Supported areas (depending on CPU type and
language selected) are M = memory, I = input, Q= output, E = input, A=output, and DB =
datablock.

Data Type
What is the data type you wish to write to? Many different types are supported and some
special types will be added in the future versions of the generator.

Format:
The format is how the data is formatted within the applet. This is an advanced feature
and normally automatically set by the generator. In the case that the user must change
the format, you can double click on the format field and hit yes on advanced mode. Then
you can set the format manually using the format field.

DB Number
If you select DB under the data area field, then you set the DB Number here.

Address
What is the starting address to write?

10
The S7 Put Applet Selection Tab (cont.)

Bit Number
If you selected bit for the data type, what is the bit number?

No of Values
This field cannot be changed. The generator does not currently support a multi-put.

Width
Select the width of the applet. Be careful and don’t make the width too small or the data
may not be visible.

Height
Select the Height of the applet. Be careful and don’t make the height too small or the
data may not be visible.

Debug Level
Select the debug level for the applet. (See manual for more details)

Edit Parameters Online


Can the user edit the applet parameters while online?

Use Symbolic Access


If you configured the IT Module with Symbols (Hardware configuration / Symbols Tab),
then you can opt to use the symbolic name here.

Symbol Name
What is the symbol name you wish to use?

11
The S7 Put Applet Selection Tab (cont.)

Auto Append Rack/Slot


Some of the symbolic names automatically get the rack/slot number appended to the
symbol name (see IT CP Symbols Tab in Hardware config).
Check if you would like to auto append the rack/slot of CPU to symbolic name.

12
The S7 Ident Applet Selection Tab

Width
Select the width of the applet. Be careful and don’t make the width too small or the data
may not be visible.

Height
Select the Height of the applet. Be careful and don’t make the height too small or the
data may not be visible.

Debug Level
Select the debug level for the applet. (See manual for details)

Edit Parameters Online


Can the user edit the applet parameters while online?

Ident Selection Check boxes


The Ident applet supports the identification of up to 4 modules. Please select how many
you wish to use.

Rack/Slot
Use the rack/slot fields to tell the Ident applet what modules to identify.

Text Field
The text field can be used for a description of the module.

13
The S7 Status Applet Selection Tab

Width
Select the width of the applet. Be careful and don’t make the width too small or the data
may not be visible.

Height
Select the Height of the applet. Be careful and don’t make the height too small or the
data may not be visible.

Debug Level
Select the debug level for the applet. (See manual for details)

Edit Parameters Online


Can the user edit the applet parameters while online?

Cycletime
Set the refresh rate for the applet. The default is 5000ms (5 sec) and it is not
recommended to go below this value.

Status Selection Check boxes


The status applet supports reading the status of up to 4 modules. Please select how many
you wish to use.

Rack/Slot
Use the rack/slot fields to tell the status applet what modules to read the status from.

Text Field
The text field can be used for a description of the module.

14
Generator Button
Generating your HTML Page

After you are finished with the applet settings you can press the ‘Generate’ button to
automatically create your page and the output screen will appear. (Discussed on the
following page).
Anytime you have made changes to the applet and have not pressed generate you will see
that the status of the Generate button is ‘RED’. In order to generate the most recent
changes, hit the Generate button again and a ‘GREEN’ Status appears along with the
output window (or changes are made to the output window if not closed).

15
The Output Screen

Print
If you would like to Print the HTML Code press the Print Button. The print dialog will
appear. You can either select a portion of the text to print or print all text.

Save to File
If you would like to save the HTML Code and files to your local PC storage media press
this button. The save file dialog will appear.

Save to IT CP
If you would like to FTP the files directly to the IT CP and save to the IT files system
select this button. The FTP Screen will appear (Discussed on the next page).

Another hint when using the output screen is that you can select and copy and paste using
the clipboard from the output screen into another file, etc. Right click in the output field
for options.

16
The FTP Screen

Warning: Password file


is not protected!

The password is stored in a


local file that is not encrypted!

CP IP Address
Put in the IP Address of the CP or name of the FTP Server (if using DNS)

User Name
User Name setup in the IT CP for File system access

Password
User password (masked with * characters)

Filename
What is the name for your html file you wish to save?

Transfer File
After entering the proper Address, user name, password, and filename (case sensitive!)
Press the transfer file button to attempt and store the pages to the IT Module.

Tip: If you press the Shift key when hitting the transfer button, the page will
automatically open in Internet Explorer upon the completion of a successful download.

Cancel
Exit this screen and cancel FTP download

All Files
All files should really only be selected one time and then disabled again. This feature
stores all of the HCG (HTML Code Generator) files, graphics, etc to the module and only
needs to be done once because it takes some time.

Save Password
If you opt to save your password to the local file settings then select this option. See
warning above.

17
HCG Index-Page Example
To better understand how the index works please follow this procedure initially.
This example assumes the IT CP is already configured and on the Ethernet segment.

Example for the first program run when saving files directly to the IT CP from
HCG using the index feature:

Open the HCG Program.


Select CPU Type and Rack / Slot.
Check the create index checkbox.
Press the ‘Generate’ Button.
Click Save to IT CP.
Fill in proper parameters (ip, username, password) and then check ‘all files’ (this is all
the support files for the web page display and only needs to be done once).
Type in test.htm for the filename.
Click Transfer while holding the ‘Shift’ Key.
Acknowledge the ‘Transfer Successful’ Box.
Now you should have your first page displayed if everything worked correctly!
Clicking the link on the left should display the test.htm page.

On the next run through, you will want to change some of the applet parameters (Variable
Name, Applet Name), try another bit, etc. Then generate again and when you save to the
IT Cp, change your HTML filename from test.htm to test2.htm and be sure to uncheck
the All Files button. This only needs to be checked the first time you download to the CP
for all the HCG web page support files (and can cause the download to be very slow).

The ‘create index’ checkbox should always stay checked when you want to keep adding
pages to the sub-index.

Now when you enter the


page, you should have two
links in the sub index on
the left.
The first link should point
to your test.htm page, and
the second to test2.htm.-->
Also note that on the
upper right you can access
the previous file system
index page by selecting
200,300, or 400 depending
on the CP in use.

Congratulations! You
have just created your first
successful index / sub-
index pages with HCG!

18

You might also like