Download as pdf or txt
Download as pdf or txt
You are on page 1of 202

Preface, Contents

Information Technology with


SIMATIC S7 and the IT-CP
1
Sending Process Messages
by E-Mail
2
File Management and File Access
SIMATIC NET with FTP
3
IT–CP
Creating Your Own HTML Pages
4
Instructions for
the CP 343–1 IT and CP 443–1 IT Graphic Display with JavaBeans
5

for STEP 7 / NCM S7 V5.x or higher


IT–CP as FTP Client
Sample Program
A
This manual is part of the Additional JavaBeans for
documentation package with order number: Visualization
B
6GK7080–1AA03–8BA0

Help on the S7 Applets


C

References
D
SIMATIC NET
Support and Training
E

Glossary
F
Index

11/2000
C79000–G8976–C120
Release 03
Safety Guidelines
This manual contains notices which you should observe to ensure your own personal safety, as well as to
protect the product and connected equipment. These notices are highlighted in the manual by a warning
triangle and are marked as follows according to the level of danger:

Danger
! indicates that death, severe personal injury or substantial property damage will result if proper precautions
are not taken.

Note
! indicates that death, severe personal injury or substantial property damage can result if proper precau-
tions are not taken.

Caution
! indicates that minor personal injury or property damage can result if proper precautions are not taken.

Warning
draws your attention to particularly important information on the product, handling the
product, or to a particular part of the documentation.

Qualified Personnel
Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are
defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and sy-
stems in accordance with established safety practices and standards.

Correct Usage
Note the following

Note
! This device and its components may only be used for the applications described in the catalog or the
technical description, and only in connection with devices or components from other manufacturers which
have been approved or recommended by Siemens.
This product can only function correctly and safely if it is transported, stored, set up, and installed
correctly, and operated and maintained as recommended.

Trademarks
SIMATICR , SIMATIC HMIR and SIMATIC NETR are registered trademarks of the SIEMENS AG.
Third parties using for their own purpose any other names in this document which refer to trademarks
might infringe upon the rights of the trademark owners.

Copyright E Siemens AG 1999/2000 All rights reserved Disclaimer of Liability


The reproduction, transmission or use of this document or its We have checked the contents of this manual for agreement with the
contents is not permitted without express written authority. hardware and software described. Since deviations cannot be
Offenders will be liable for damages. All rights, including rights precluded entirely, we cannot guarantee full agreement. However,
created by patent grant or registration of a utility model or design, are the data in this manual are reviewed regularly and any necessary
reserved. corrections included in subsequent editions. Suggestions for
improvement are welcomed.
Siemens AG
A&D Technical data subject to change.
Industrial Automation Systems
Postfach 4848, D-90327 Nürnberg

Siemens Aktiengesellschaft C79000-G8976-C120–03


Preface

We recommend the following procedure when you want to...

...Use the option of access to S7 stations with existing IT-CPs.

You only require the general information in


Chapter 1. There, you will find information
on what is required of your Web browser
and the settings you should make.

...Set up the IT-CP for operation and use standard functions.

S7-300 Chapter 1 provides information about


S7-400 network attachment and standard
functions.
Chapter 2 explains all aspects of
configuration and programming
(E-mail).
IT-CP

...Create the displays of information for your processes individually.

Chapter 3 explains the additional


functions of the IT-CP. These
allow you to create and use HTML
pages for individual access and
visualization of process data.
Preface

Startup to get you off the mark


To familiarize yourself quickly with the available functionality, a Startup package
with a wide range of information, examples and links is available.
Where you see this symbol in the documentation, you know that you can find more
information on the relevant topic on the Startup CD.

IT-CP Startup CD
Instructions

General overviews of How can I use the Fast introduction /


functions and IT-CP and for what trying out / learning!
applications of the IT-CP purposes?
with
How simple is S Films on
it ? configuring and
programming
S Ready-made,
Description of the Where do I find loadable samples
principles and information on (HTML pages,
interfaces standard applets)
S Sending Process applications? S Loadable file
Messages by system for IT-CP
E-Mail (backup)
S Creating Your How do I handle
Own HTML Pages more complex Using all the programming
displays of the
S Applet Parameter process?
options!
Settings S The JavaBeans
S Using FTP Interface

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


ii C79000-G8976-C120 - 03
Preface

This release of the Instructions describes the new IT-CPs, CP 343-1 IT for the
SIMATIC S7-300 and CP 443-1 IT for the SIMATIC S7-400 with their new
functions.
New features include:
S The standard HTML pages stored on the IT-CP have been extended.
S The FTP functionality has been greatly simplified. The information you require is
now in a separate chapter.
S The options for creating your own user-defined HTML pages with process
graphics have been extended and simplified considerably by the JavaBeans
concept.
We have extended the description as follows:
– The topic of JavaBeans is dealt with in a separate chapter.
– The appendix introduces additional beans that support you when you want to
create graphic displays.
S The Startup CD has also been modified to reflect the new functionality of the
IT-CP.

What You Should Already Know


S To install and start up the module, you should be familiar with the STEP 7
standard software and the use of computers or PCs, for example programming
devices, with the Windows 98/NT 4.0 operating system.
S To adapt the functions to your requirements, you should also have experience in
creating HTML pages.
S To use the module, you only require basic knowledge of handling one of the
common Web browsers, for example the Netscape Navigator. Even for the
graphic creation or linking of applets, for example with IBM VisualAge, you do
not need extensive programming experience.
S The maximum freedom and range of options are open to you if you are familiar
with Java and are capable of creating your own Java programs. You then have
the data acquired and transmitted on the Web by the IT-CP available for further
processing, for example, for archiving or evaluation in databases.

Scope of this Manual


These instructions are valid
S from version 5.x of the STEP 7 configuration software with the NCM S7 for
Industrial Ethernet option; the new FTP functionality is supported from version
5.1 SP1 and higher.
S for the CP 443-1 IT for the SIMATIC S7-400
S for the CP 343-1 IT for the SIMATIC S7-300

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 iii
Preface

Additional Information
This manual is also part of the NCM S7 for Industrial Ethernet documentation
package. The following table provides you with an overview.

Title Contents
NCM S7 for Industrial This primer helps to familiarize you with the topic “Attaching and networking
Ethernet SIMATIC S7 stations with CPs on Industrial Ethernet” based on simple
Primer examples. The primer explains how to configure the communication calls in
the user program to allow you to use the services of the SEND/RECEIVE
interface.
The primer also illustrates how simple configuration of standard applications
with STEP 7 and the NCM S7 optional package can be.
NCM S7 for Industrial This manual serves both as an instruction manual and a reference work for
Ethernet configuring and programming Industrial Ethernet CPs.
When working with the configuration software, you can also refer to the online
help.
Manual The manuals on the Startup CD contain information about the performance,
S CP 343-1 IT installation, and interfacing of the CPs.
S CP 443-1 IT

Tip:
You should also refer to the recommended reading on the topics of the Web, HTML
etc. in the appendix of this manual.
This symbol draws your attention to useful tips throughout the instructions.

Additional Information on SIMATIC S7 and STEP 7


The following documentation contains additional information about the STEP 7
standard software of the SIMATIC programmable controllers and can be obtained
from your local Siemens office.

Topic Document Source


Basic information for technical STEP 7 basic knowledge with Available as an online
personnel using the STEP 7 S Users guide document in STEP 7
standard software for control
tasks with S7-300/400
S Programming manual or can be ordered under
order no.:
programmable controllers. S Manual for converting from S5 to S7
6ES7810-4CA02-8AA0
S Primer for a fast start
The reference works describing STEP 7 Reference manuals with Available as an online
the programming languages S Manuals for LAD/FBD/STL document in STEP 7
LAD/FBD and STL as well as the
standard and system functions in
S Standard and system functions for or can be ordered under
S7-300/400 order no.:
addition to the STEP 7 basic
6ES7810-4CA02-8AR0
knowledge.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


iv C79000-G8976-C120 - 03
Preface

Access to the online help of STEP 7 and NCM S7


With the online help, you can obtain the following information:
S Contents with the Help –> Contents menu command
S Context-sensitive help on the selected object using the Help –> Help menu
command, the F1 function key or the question mark in the toolbar.
From the contents page, you can access further information relating to the
current topic.
S Glossary for all STEP 7 applications by clicking the “Glossary” button.
Please note that each STEP 7 application has its own contents and
context-sensitive help.

References /.../
References to further documentation are specified with documentation numbers in
slashes /.../. Based on these numbers, you can check the title of the documentation
in the list of references at the end of the manual.
-

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 v
Preface

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


vi C79000-G8976-C120 - 03
Contents
1 Information Technology with SIMATIC S7 and the IT-CP . . . . . . . . . . . . . . . . . . . 1-1
1.1 Keeping the Process Under Control Wherever You Are . . . . . . . . . . . . . . . 1-2
1.2 Process Control with Standard Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
1.3 Security when Accessing Process Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
1.4 Configuring the IT-CP with STEP 7 and NCM S7 . . . . . . . . . . . . . . . . . . . . 1-9
1.5 Settings in the Web Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
1.6 Contacting the IT-CP using a Web Browser . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
1.7 Accessing HTML System Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
1.8 Creating Your Own “Home Page” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
2 Sending Process Messages by E-Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
2.1 Overview of the Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2.2 Configuring the E-Mail Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
2.3 Sending E-Mails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
2.4 Testing the E-Mail Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
3 File Management and File Access with FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
3.1 FTP Functions in an S7 Station with the IT-CP . . . . . . . . . . . . . . . . . . . . . . 3-2
3.2 The IT-CP as FTP Server for the File System on the IT-CP . . . . . . . . . . . 3-3
3.2.1 How it Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.2.2 File System – Structure and Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
3.3 The IT-CP as FTP Server for S7 CPU Data (S7-400) . . . . . . . . . . . . . . . . . 3-7
3.3.1 How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
3.3.2 FTP Commands on the FTP Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3.3.3 File Allocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
3.3.4 Structure of the Data Blocks (File DB) for FTP Services . . . . . . . . . . . . . . 3-16
3.4 IT-CP as FTP Client for S7 CPU Data (S7-400) . . . . . . . . . . . . . . . . . . . . . 3-20
3.4.1 How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
3.4.2 Configuring FTP connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
3.4.3 Structure of the Data Blocks (File DB) for FTP Services . . . . . . . . . . . . . . 3-24
3.4.4 FCs for FTP Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27
3.4.5 FC FTP_CONNECT (FC40) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
3.4.6 FC FTP_STORE (FC41) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
3.4.7 FC FTP_RETRIEVE (FC42) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
3.4.8 FC FTP_DELETE (FC43) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37
3.4.9 FC FTP_QUIT (FC44) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39
3.4.10 Parameters for CP and Connection Assignment (Input parameters) . . . . 3-40
3.4.11 Status Information (Output Parameters) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42
4 Creating Your Own HTML Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.1 Creating HTML Pages for the IT-CP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4.2 Designing HTML Pages – A Few Essentials . . . . . . . . . . . . . . . . . . . . . . . . 4-5

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 vii
Contents

4.3 S7 Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8


4.3.1 Applet Call and Parameter Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
4.3.2 Parameter Assignment Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
4.3.3 S7IdentApplet – Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
4.3.4 S7IdentApplet – Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
4.3.5 S7StatusApplet – Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
4.3.6 S7StatusApplet – Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19
4.3.7 S7GetApplet – Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
4.3.8 S7GetApplet – Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27
4.3.9 S7PutApplet – Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
4.3.10 S7PutApplet – Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35
4.4 Configuring Variables for Access Using Symbols . . . . . . . . . . . . . . . . . . . . 4-37
4.5 Testing and Using HTML Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-40
4.6 JavaScript Linking to the S7Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-41
4.6.1 S7GetApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42
4.6.2 S7PutApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44
4.6.3 S7StatusApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-46
4.6.4 S7IdentApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-48
5 Graphic Display with JavaBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
5.1 JavaBeans Concept and Possible Applications . . . . . . . . . . . . . . . . . . . . . . 5-2
5.2 The S7 Beans Class Library (S7BeansAPI) . . . . . . . . . . . . . . . . . . . . . . . . . 5-3

A IT–CP as FTP Client – Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1


B Additional Beans for Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
B.1 Geometric Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
B.1.1 Rechteck (rectangle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
B.1.2 Rundrechteck (rounded rectangle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4
B.1.3 Kreis (circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5
B.1.4 Kreissegment (circular segment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6
B.1.5 Kreisbogen (circular arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-7
B.1.6 Ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-8
B.1.7 Ellipsensegment (ellipse segment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-9
B.1.8 Ellipsenbogen (ellipse arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
B.1.9 Linien (lines) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-11
B.1.10 Polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-12
B.1.11 Polygonzug (polyline) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-14
B.2 Logical Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-16
B.2.1 Berechnung (calculation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-16
B.2.2 Logik (logic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-18
B.2.3 Konstante (constant) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-20
B.3 Display Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-21
B.3.1 Ein–/Ausgabefeld (input/output field) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-21
B.3.2 Laufschrift (ticker text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-23
B.3.3 Bildtabelle (image map) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-24

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


viii C79000-G8976-C120 - 03
Contents

C Help on the S7 Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1


D References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1
E SIMATIC NET – Support and Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Customer Support, Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
F Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-1
F.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-2
F.2 Industrial Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-6
Index
-

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 ix
Contents

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


x C79000-G8976-C120 - 03
Information Technology with SIMATIC S7
and the IT-CP 1
To allow you to use the IT functions of your IT-CP simply and quickly, this chapter
contains a brief overview of the functions and the most important information on
configuring the CP and using the browser and other tools.
The chapter covers the following topics:
S Configuring the IT-CP with STEP 7 and NCM S7
S Making Settings in the Web Browser
S How you access the system pages of the IT-CP

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-1
Information Technology with SIMATIC S7 and the IT-CP

1.1 Keeping the Process Under Control Wherever You Are

Opportunities Provided by the IT-CP


With the IT-CP, you have decided to use the advantages of Internet technology in
your automation system. For you, this means the following:
S You can use Web browsers available everywhere to call up information from
your automation system.
S You can receive important information about your plant by E-mail.
S To communicate with the automation system, you can use devices that are
generally available everywhere such as mobile telephones or notebooks.
S Whenever necessary, you can obtain information from your process worldwide,
even via the Internet.

HTML process control E-mail

Intranet / Internet

Bridge/router

Industrial Ethernet

HTML process control


IT-CP

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-2 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

Overview of the Performance of the IT-CP


The IT-CP provides you with the following additional options for creating process
control for your automation task:
S Process communication via Industrial Ethernet
With the communication services S7 communication and SEND/RECEIVE
interface (including the FETCH/WRITE services), the IT-CP supports
communication between PLCs and with PGs/PCs.
S Sending E-mails
The controller is capable of sending messages about process events.
S File transfer with FTP
The IT-CP provides both FTP client and server functionality. You can therefore
program the transfer of data blocks in the user program in the S7 station using
FTP and exchange data with the S7 station using FTP when working at a
PC/PG. The functionality can be distinguished as follows:
– S7 station with IT-CP in the FTP server role
for the file system on the IT-CP (S7-300 / S7-400)
or
for data blocks (CPU data), to be handled as files ( S7-400)
– S7 station with IT-CP in the FTP client role for CPU data (S7-400)
S Monitoring devices and process data (HTML process control)
You use the supplied functions and HTML pages to query important system
data using a Web browser.
To create a more complex information network, you can use the existing system
functions (S7 applets and S7 beans) to create your HTML pages, for example,
to visualize certain plant configurations and to supply current process values.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-3
Information Technology with SIMATIC S7 and the IT-CP

Accessing the IT-CP with a Web Browser


The basis of communication via an intranet or the Internet is the Internet TCP/IP
protocol that is implemented on the IT-CP. In principle, the following few steps are
all that is necessary to make your plant accessible via your intranet or the Internet:
S For intranet and Internet communication
– Connect the IT-CP to Industrial Ethernet.
– During configuration of the hardware, assign an IP address to the IT-CP.
S In addition, for Internet communication
– You connect your manufacturing network to public transmission facilities
using suitable connectivity devices, for example a router. Generally, you
create access to your own company intranet. This already has the required
protection mechanisms on the interface to Internet (firewall).
For more information on the topic of security mechanisms, refer to our White
Paper /2/.
The following sections will explain these steps in greater detail.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-4 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

1.2 Process Control with Standard Tools

Using the Existing Infrastructure


To operate the IT-CP and to make full use of the functionality it provides, you only
need to do the following:
S Select a mail server
To handle data exchange using E-mail, you require a mail server access (for
further information on the E-mail function, see Section 2.1).
S Provide the required tools
You use a standard Web browser to display the information and an HTML editor
if you want to design your own HTML pages.
For extended graphics options, use the tools for creating and configuring Java
beans such as IBM VisualAge.
S Establish a network attachment
You require an attachment to your intranet or to the Internet using appropriate
Industrial Ethernet devices. Generally, you establish access to your own
company intranet since this already has the required protection mechanisms on
the interface to Internet (firewall/proxy server).

Web Browser – What is Required?


To access the HTML pages on the IT-CP or on the Web server you require a Web
browser, for example Netscape Navigator or Internet Explorer. The Web browser
must meet the following requirements:
S JDK (Java Development Kit) 1.1.X is supported; For further information refer to
/24/.
The Netscape Navigator and Internet Explorer meet these requirements. Other
Web browsers with the same range of functions can also be used.
Other Web browsers meet these requirements only with certain restrictions. You
require a plug-in component corresponding to the Java reference implementation
of a SUN Java Virtual Machine.
Note the other information including the versions of the products mentioned here in
the manuals /1/ on the Startup CD.
Further information and additional programs required are available on the Internet
(refer to Appendix LEERER MERKER).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-5
Information Technology with SIMATIC S7 and the IT-CP

HTML Editor
To create your own HTML pages, you require an editor. It is easier to keep to the
syntactic conventions for HTML pages if you use a suitable HTML editor. These
normally allow the input of formatted text and the inclusion of graphics. The
conversion to HTML syntax then takes place in the background. It is also normally
possible to change the view and make your input directly in the HTML form.
Examples:
S AOLpress
A powerful HTML editor that can be obtained as shareware and that has all the
features listed above.
S Netscape Composer
This is also an HTML editor providing functions comparable with AOLpress.
The Composer is included with the Netscape Communicator.
S Front Page from Microsoft (can only be used with restrictions)
A powerful HTML editor. Certain options can however lead to specific HTML
codes that can only be edited with the Internet Explorer from Microsoft.

Guaranteeing Information Security


The access to process data by the IT-CP via Internet brings with it the danger of
misuse. You should therefore always protect process data not only with passwords
but also by restricting access to your network with suitable security mechanisms.
For more information on the topic of security mechanisms, refer to our White
Paper /2/.

Establishing a Network Attachment – Operation with Firewall and Proxy Server


The operation of an internal company network (Intranet) is normally protected
against external, uncontrolled access by a firewall. Operation with a firewall is
possible if the IP addresses set in the S7 applets can pass through the filter
mechanism of the firewall. Check with your network administrator whether a
firewall is used and how certain ports can be enabled; See also “Settings in the
Web Browser” in Section 1.5.
To use the full functionality of the IT-CP, the network administrator must allow
breaks in the firewall for certain ports. The following table lists the ports and
functions:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-6 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

Table 1-1

TCP Port to be Function used Enabling required for access in


enabled direction
80 Access to an HTML page on the IT-CP or on Web browser –> Firewall –> CP
a Web server (the IT-CP or Web server is the
HTTP server).
25 Access by the mail client (IT-CP is SMTP CP –> Firewall –> Mail Server
client) to a mail server (SMTP server).

20 and 21 File access: FTP Client –> Firewall –> CP


Access to files on the IT-CP using FTP
functions (IT-CP is the FTP server).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-7
Information Technology with SIMATIC S7 and the IT-CP

1.3 Security when Accessing Process Data

Multi-Level Password Protection


If you want to exchange process information on the Internet, security plays an
important role. With graded password protection, your process data are protected
from unauthorized access and from external influences on communication.
It is generally the case that different groups of people require different types of
access to process data. For this reason, it is possible
1. to assign different rights for access to an S7 station.
2. to create additional write or read rights for process variables themselves. You
specify these access rights when you configure the IT-CP (see Section 1.4).

Figure 1-1 Password Query when Opening the “Status” System Page

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-8 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

1.4 Configuring the IT-CP with STEP 7 and NCM S7

Creating a Network Attachment


Like every other S7 module, the IT-CP is configured with STEP 7 hardware
configuration (HW Config) in the S7 station. You will find the IT-CP in the catalog of
HW Config under S7-400/CP/... For detailed information, refer to the STEP 7
documentation.
You can configure the special properties of the IT-CP in the corresponding tabs of
the Properties dialog of the IT-CP as explained in this chapter. You can open the
Properties dialog, for example from within HW Config, by double-clicking the
module.
Following this, the IT-CP must be networked in the STEP 7 project.

Further Tabs in the Properties Dialog for the IT-CP


In addition to the general tabs such as “Addresses”, “Options” and “Diagnostics”,
the IT-CP also has the following:
S ”Users” tab
Contains the user names, passwords and rights of the authorized users.
S “Symbols” tab
Contains the symbols or structure elements of a data block defined as a symbol
that can be reached via this CP. Using this tab is described in detail in Section
4.4.
S “DNS Parameters” tab
Contains the addresses of the DNS (Domain Name Service). The DNS assigns
the Internet address to symbolic addresses. If you prefer to use a symbolic
address when you configure your E-mail (see Section 2.2 ), the absolute
address is obtained by querying the DNS specified here.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-9
Information Technology with SIMATIC S7 and the IT-CP

“Users” tab: Configuring Access Rights

Figure 1-2

In this tab, you specify which users should have which rights.
Under User, you will find a list in alphabetical order with the users already entered
for whom a password has already been recorded.
The “everybody” entry is present as default. This cannot be deleted. No password
can be assigned to it. As default, no rights whatsoever are assigned to this entry.
For service purposes, it is however possible to assign rights. Remember to cancel
the rights again following service!

Danger
! Make sure that you cancel any access rights assigned to “everybody”. Otherwise
you allow access to the corresponding services without any authorization
whatsoever.

With the “Add” or “Edit” buttons, you display the dialog box in which you can
specify or modify rights.
The dialog illustrated shows the possible settings.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-10 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

Figure 1-3

Here, select the access rights for the entered user.


S If you select the “Add...” button in the “Users” tab,
entries are only accepted after a password has been entered.
S If you select the “Edit...” button in the “Users” tab,
you can modify rights without entering a password.
No password is necessary to delete an entry in the list, you are simply asked for
confirmation.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-11
Information Technology with SIMATIC S7 and the IT-CP

Printing the Configuration Data


The print function of HW Config provides a clear printout of the configuration data
created for operation with the IT-CP such as authorization, symbols and other user
entries. The following printout is a typical example:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-12 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

1.5 Settings in the Web Browser

General
Before you can access the IT-CP using your Web browser, you must make or at
least check certain settings. The settings are explained below based on the
example of the Netscape Navigator.
The settings shown here have been selected so that the execution of the S7
applets and S7 beans (JavaBeans) used on the IT-CP is possible.

Settings in the Netscape Navigator/Communicator


In the Netscape Navigator, most settings are made in the “Preferences”. Select the
menu command Edit " Preferences... (Edit " Preferences...)

Figure 1-4

The following settings are recommended:


S Starting the Java Interpreter
By selecting “Enable Java” in the “Category – Advanced” you start the Java
Interpreter when an applet first occurs in an HTML page and permit execution
of the applet.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-13
Information Technology with SIMATIC S7 and the IT-CP

Note:
If you make this setting when an HTML page is already loaded, the Java
applets contained in the page will not be executed even after making the
setting. The HTML page must first be loaded again so that the Java Interpreter
is started and the Java applets executed.
S Setting a Proxy Server
For more information, check with your system administrator.

Settings in the Internet Explorer


S Starting the Java Interpreter
You will find the functions for the Java applications in the Internet options in the
“Advanced” tab under the entry “VM”.

Figure 1-5

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-14 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

S Setting a Proxy Server


For more information, check with your system administrator.

Starting the Java Console


To track the execution of the Java applet and to get information about problems,
you can start the Java Console. Select
S the menu command Communicator " Extras " Java Console
(Communicator " Java ) in the Netscape Navigator;
S In the Internet Explorer please use the option in the Internet Options dialog box
in the “Advanced” tab as shown above. To open the Java console, use the
menu command View " Java Console

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-15
Information Technology with SIMATIC S7 and the IT-CP

1.6 Contacting the IT-CP using a Web Browser

URL: Uniform Resource Locator


In the World Wide Web, addressing using URL has become standard. You can
also contact the IT-CP with your Web browser using the URL. This URL can have
almost any complexity but consists in principle of four essential parts. The following
schematic illustrates the structure (typical URL) and shows the contents for calling
IT-CPs.

Protocol Server name[:Port] [Folder] File name

Typical URL http://www.ad.siemens.de/net/page.htm

URL for http://142.80.00.01/user/index.htm


IT-CP

HTTP protocol IP address [Folder] Name of the


HTML page

When accessing the IT-CP using a Web browser, you use the HTTP or FTP
protocol to address the server on the IT-CP (Web server or FTP server):

You inform the CP of the IP address during configuration with STEP 7 (see Section
1.4). If you have an attachment from Industrial Ethernet to your intranet or to the
Internet, the CP can be contacted using the IP address in the intranet or Internet.
A detailed description of the structure of the IP address and the options of creating
subnets or subnet masks is beyond the scope of this manual. You will find more
detailed information in the STEP 7 online help and in the documentation listed in
the references, for example in /23/.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-16 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

1.7 Accessing HTML System Pages

Basic information is available immediately


HTML system pages are HTML pages saved on the IT-CP containing system
information that you can display without any further adaptation using your Web
browser.
From the Start page that you can adapt and replace by an application-specific
home page, you can call up other HTML pages.
The Start page is obtainable under http://<IP_address>/index.htm.

Figure 1-6

If you only enter the IP address without the file name (http://<IP_address>), the file
is searched for in the following order in the file system of the IT-CP:
1. /index.htm
2. “Display of the root folder”

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-17
Information Technology with SIMATIC S7 and the IT-CP

“Administration” System Page


From this page, you can start the following actions:
S Sending a test mail (Send Test Mail)
The “Test Mail” system page allows you send a test mail from your Web
browser. For more detailed information, refer to Section 2.4.
S Obtain additional information about the IT-CP (Server Information)
You can obtain information about the total memory configuration and free space
as well as the software version of the HTTP server.

Figure 1-7

Access Protection
The HTML system pages are protected by the access protection you configured on
the IT-CP. In the administration page shown, this affects the Send Test Mail
function.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-18 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

“Status” System Page


This page provides you with general information about the structure of the
configured S7 station and the status of the modules in the station.

Figure 1-8

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-19
Information Technology with SIMATIC S7 and the IT-CP

1.8 Creating Your Own “Home Page”

Flexible Use of the IT-CP File System


The existing Start page provides you with basic functions that are adequate for a
large number of requirements. It provides access to all the functions and HTML
pages shipped with the module.
The IT-CP file system provides a flexible instrument for the presentation of
functions and data adapted to your plant. By creating your own start page, you
have the tool to extend the view to cover your entire plant or even further.
You can modify the existing start page or can replace it by your own home page.

Controller 1

Controller 2

Your own start


page could
resemble the one
shown here Controller 1 Controller 2

Process picture 1 Process picture 1

Process picture 2 Process picture 2

Figure 1-9

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-20 C79000-G8976-C120 - 03
Information Technology with SIMATIC S7 and the IT-CP

What to Do
If you want to start with the existing start page, load this in your HTML editor and
add the additional instructions you require.
S The online option
Load the HTML start page from your IT-CP in your HTML editor and save it for
further editing locally on your PC.
S The offline option
You will also find the HTML start page in the Startup package. You can then
adapt your start page regardless of whether you have access to the IT-CP and
then download it to the IT-CP.

Points to Remember
Refer to the information in the manual of the IT-CP /1/ regarding the following
points.
S The number of files that can be stored is limited by the size of the file system
S The number of characters in the URLs to be specified is limited.
S The length of the file names is limited.

Including S7 Applets
Flexible access to distributed HTML system pages is one aspect of designing the
home page.
You have further opportunities for querying information if you include the S7
applets and S7 Beans in your HTML pages. This is explained in detail in
Chapter 3.

Examples:
Examples of various designs of HTML pages are included in the Startup
package.

Downloading HTML Pages


Use the FTP file management functions (FTP client) as described in Chapter 3.2 to
add to or replace the existing HTML pages.
-

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 1-21
Information Technology with SIMATIC S7 and the IT-CP

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


1-22 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail 2
This chapter contains instructions on the E–mail functions of the IT–CP. The
following topics are covered:
S What preparations need to be made?
S What options are there for sending E–mails from the IT–CP?
S How can you test the E–mail function?
You can see an outline of the procedures in the flowchart in the following section.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-1
Sending Process Messages by E-Mail

2.1 Overview of the Functions

The Controller Signals Process Events


With the E-mail function of the IT-CP, the programmable controller can send
messages containing process information either process-dependent or at specific
times.

Figure 2-1 Sending E-Mails

As usual with electronic mail, a message can be sent alone or with attachments.
The form you choose depends on the amount of data and the properties of the
E-mail recipient you are using. It is sometimes necessary to send E-mails with
attachments, for example to transfer binary-coded information from the controller
for evaluation.
Further features:
S The IT-CP operates as an E-mail client. It supports the SMTP service (Simple
Mail Transfer Protocol).
S E-mails can be sent by the programmable controller but cannot be received.
To send E-mail in the user program of the S7 CPU, use the send call of the
SEND/RECEIVE interface (FC AG_SEND / AG_LSEND).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-2 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail

Procedure
...follow the steps outlined below:

Clarify the mail server situation


S Is there already an E–mail server in your network environment?
S Who can set up access for the CP?
With STEP 7 and
NCM S7 for Ind.
Ethernet
Configure the E-mail connection
See Section 2.2
With the Web
browser or
NCM diagnostics

Check availability: Start/send a test mail Use FC


AG_SEND
See Section 2.4
/AG_LSEND

Send E-mails from the user program


See Section 2.3

Receive E–mail on receiving device

S Configure the E-mail connection


By configuring an E-mail connection you establish a connection between the S7
CPU and the IT-CP for sending E-mails.
S Check availability
You can check the availability of the E-mail function at any time by initiating a
test mail on the IT-CP. For more detailed information, refer to Section 2.4.
S Send E-mails from the user program
The information to be sent by E-mail including the address information is stored
in a data block (DB). The information is sent via the user program using an FC
AG_SEND/AG_LSEND.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-3
Sending Process Messages by E-Mail

Mail Server Operation


In principle there are three ways of operating the required mail server. The
following table explains the advantages and special features:

Table 2-1

Mail Server Operation Advantage Special Features Steps Necessary


Internal/local S Fast installation S E-mail reception only S Use mail server
You use the mail server S Inexpensive within the company software; you will
software on a PC find a link for
available in your LAN. downloading on the
startup CD.

Internal with external S Use of an existing S Administrative tasks


connection infrastructure involved
You use a mail server S Output to external
set up in your intranet devices such as
that can pass on mails mobile phones, fax
to the outside. possible 1)
External S Inexpensive if you S Register with
You address a mail do not have your provider
server outside your own infrastructure S Make a router
intranet. S Output to external available
devices such as
mobile phones, fax
possible 1)
1) Sending E–mails to mobile phones or to fax devices is possible using “SMS/Fax Gateway”. How to address
the gateway and to enable the recipient depends on the particular service provider.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-4 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail

Configuring a Mail Server and Addressing Recipients


Addressing the recipient takes two stages:
S Configured Mail Server Address
You specify the address of the mail server when you configure the connection.
For this configuration, you must know the IP address (absolute or symbolic) of
the mail server.
In the following schematic, one possibility, namely that of a mail server
connected to your intranet is assumed (see Table 2-1; Mail server operation
“internal with external connection”) .
Example: server.local
S Programmed recipient address
You specify the recipient address in the data block in the user program in which
the E-mail is prepared.
Example: plant.control@provider.com

STEP 7 configuration
Mail server: server.local
User program
E-mail DB with the recipient address
plant.control@provider.com

server.local

provider.com

plant.control

Figure 2-2

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-5
Sending Process Messages by E-Mail

2.2 Configuring the E-Mail Connection

Overview
To send E-mails, one E-mail connection must be set up per IT-CP. The E-mail
connection specifies the E-mail server via which all the mails sent by the IT-CP are
delivered.

Requirements
You can set up an E-mail connection after the IT-CP has been configured in the
station with STEP 7 HW Config.

Setting up the E-mail Connection


Creating a new connection with STEP 7 is described in detail in the NCM S7 for
Industrial Ethernet manual and in the online help. In contrast to other types of
connection, follow the steps outlined below:
1. Select the connection type E-mail in the “New Connection” dialog. As the
connection partner, select “(Unspecified)” or “Other station”.
2. Select the Option “Open Properties Dialog” and confirm your entry.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-6 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail

3. Select the Addresses tab in the Properties dialog and specify the address
parameters.

Table 2-2 Available Parameters

Parameter Description Examples:


E-mail Server – IP Address of the mail server via which the E-mails S absolute:
Address are sent. 140.80.0.4
You can specify an absolute or alias IP address. S As an alias:
The use of an alias assumes that the IT-CP knows mail.compuserve.co
the address of the domain name server (DNS). m
This entry must be made when configuring the
IT-CP in HW Config; For more detailed information
refer to the STEP 7 online help.
Default sender address Specifies an address that is always inserted in the Station2.CPU412@xy.c
E–mail as the sender address if the sender ompany.de
information (FROM parameter) is empty in the
header of the E–mail (DB, refer to Section 2.3).
A maximum of 126 characters can be specified.

4. Confirm your entry and close the dialog. After downloading the configuration
data, the user program can send E-mails on this E-mail connection.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-7
Sending Process Messages by E-Mail

2.3 Sending E-Mails

Overview
To send an E-mail:
S Prepare the E-mail data in a data block.
S Use the function ( FC) AG_SEND or AG_LSEND in the user program.

Requirements
You can send E-mails if the E-mail connection was set up in the connection
configuration with STEP 7 (see Section 2.2). You use the ID specified in the
connection configuration for the FC AG_SEND/AG_LSEND call.

Data Block
The entire E-mail, in other words, the address information and the message itself,
is put together in a data block. Below, you will find an example of the DB structure
required based on an example in STL notation.
Use the LAD/FBD/STL editor for creating and entering the DB data.

Table 2-3 E-Mail Data Block in STL Notation in STEP 7

Address Name Type Initial value Comment Entry


0.0 STRUCT
+0.0 TO1) STRING[40] ’TO:name.name@t–online.de;’ Recipient Mandatory
+42.0 CC1) STRING[40] ’CC:name.name@t–online.de;’ CC recipient optional
+84.0 FROM STRING[40] ’FROM:plant.works2@xyz–onli Sender optional
ne.de;’
+126.0 SUB STRING[40] ’SUB:Status Station 7;’ Topic optional
+168.0 Text STRING[100] ’TXT:Fault in plant Sector 2;’ Mail text Mandatory

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-8 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail

Table 2-3 E-Mail Data Block in STL Notation in STEP 7, (Fortsetzung)

Address Name Type Initial value Comment Entry


+270.0 Attach STRING[50] ’BNY:’ The attachment is optional
ment introduced here3)
+276.0 Value1 BYTE B#16#272) Plant/binary optional
value3)
+277.0 Value2 BYTE B#16#032) Plant/binary optional
value3)
=278.0 END_STRUC
T
1) Several recipients can be specified. In this case, separate recipients by a comma.
2) The information shown in bold face is sent to the recipient as an attachment.
3) (Data can also be supplied dynamically)

Notes on Table 2-3:


S Structure and syntax of the data in the E-Mail DB
The structure suggested here with several STRINGs is one of several
variations. The entries in the “Initial value” column with the IDs (TO:, SUB:, CC:,
FROM:, TXT:, BNY:) are decisive. These must be used with exactly this syntax
in the DB to identify the mail contents!
The string length in the table is simply an example; it can be adapted to the
actual number of characters.
Another variation, could be, for example, to use only one STRING and to assign
the entire text with the IDs.
S Attachments
The user data entered in the E-mail DB can be sent to the recipient entirely or
in part as an attachment. The sender must assign the ’BNY:’ ID to the data.
The data specified after this ID are sent to the recipient as an attachment.
S Data Length
The data length specified in the AG_SEND/AG_LSEND call must be at least
the length of the data in the DB; Note the information in the address column in
the STL editor (the information is the number of bytes).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-9
Sending Process Messages by E-Mail

Sending E-Mail with AG_SEND/AG_LSEND


Use FC AG_SEND (FC 5) to send an E-mail or with data lengths >240 bytes, use
AG_LSEND (FC 50). For a detailed description of the call parameters, refer to /3/.
Example:

STL Explanation
call fc 50 //AG_LSEND block call
ACT := M 10.0 //Bit for triggering job
ID := MW 12 //Connection ID (connection configuration)
LADDR := W#16#0100 //Module address 256Dec. In HW configuration
SEND := P#db99.dbx10.0 byte 278, //Address of the data block; DB length
LEN := MW 12 //Length of the data area to be sent
DONE := M 10.6 //Address for return parameter DONE
ERROR := M 10.7 //Address for return parameter ERROR
STATUS := MW 14 //Address for return parameter STATUS

Note on the displayed information:


The STATUS parameter only provides information about the sending of the E–mail
(mail arrived at the configured mail server); the parameter does not provide any
information as to whether the E–mail arrived at the recipient.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-10 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail

2.4 Testing the E-Mail Function

Purpose and Possibilities


With E-mail functionality, you make your programmable controller capable of
sending specific up-to-date information from the process at any time.
To allow you to check that E-mail is functioning correctly at any time, you can
initiate a test mail. The following mechanisms are available for the test mail:
S Test mail using the Web browser
S Test mail using NCM diagnostics

Conclusions Drawn from Receiving a Test Mail


If the test mail is received, you can conclude the following:
S The IT-CP is ready to send E-mails
S An E-mail connection is established that can be used by the user program.
S The recipient specified in the request is available.
You cannot draw conclusions about the following:
S The status of the user programs in which the sending of E-mails is started by
calling FC AG_SEND/AG_LSEND
S The time required from a mail being sent until it is received.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-11
Sending Process Messages by E-Mail

Triggering a Test Mail with the Web Browser


With the “Test Mail” system page, you can specify and trigger a test mail with your
Web browser (see also Section 1.7).

Figure 2-3

Immediately after sending the test mail you receive a message indicating whether
the mail could be transferred to the configured mail server.
Remember the following restrictions regarding input in the fields:
S Length (TO) < 128 characters
S The rule for the total length is:
Length (FROM) + Length (TO) + Length (SUBJECT) + Length (TEXT)
< 220 characters

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-12 C79000-G8976-C120 - 03
Sending Process Messages by E-Mail

Requesting Test Mail with NCM Diagnostics


In the “E-mail” tab of NCM diagnostics, you can also specify and trigger a test mail.
To do this, you require an online connection between you PC/PG and your S7
station.
NCM diagnostics can be called either directly from the Windows Start menu
“Industrial Ethernet Diagnostics” or using the Properties dialog of the IT/CP in the
“Diagnostics” tab.
When you select the menu command Options " Send E–mail, a test mail is sent
to the specified address.

Figure 2-4

For further information about working with NCM diagnostics, refer to the NCM S7
for Industrial Ethernet manual /5/ and the online help.
-

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 2-13
Sending Process Messages by E-Mail

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


2-14 C79000-G8976-C120 - 03
File Management and File Access with
FTP 3
With its file transfer functions (FTP), the IT-CP provides a useful tool for
transferring files to and from your S7 station.
Files can be transferred both from the PG/PC to the S7 station or initiated by the
S7 station to an FTP server; this could be, for example, a PC/PG station or
another S7 station.
This chapter will familiarize you with the FTP client and FTP server functionality of
the IT-CP in the S7 station.
The chapter also includes a detailed description of the FCs you require for file
transfer functions in your S7 station.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-1
File Management and File Access with FTP

3.1 FTP Functions in an S7 Station with the IT-CP

Range of Functions
The FTP functions of the IT-CP support both FTP client and FTP server
functionality on the S7 station.

S7 Station with an IT-CP in the Role of FTP Server


The server role can be divided into two distinct functions:
S The IT-CP as FTP server for the file system on the IT-CP
You can access the files of the file system on the IT-CP (CP 443-1 IT / CP
343-1 IT) from an FTP client, for example a PC/PC. These files are made up
mainly of the HTML pages intended for display in the WEB browser.

FTP client FTP server

PG/PC IT-CP file system S7-300


S7-400

S The IT-CP as FTP server for CPU data


You can access the data blocks in a CPU of the S7 station (S7-400 only!) via
the IT-CP (CP 443-1 IT) from an FTP client, for example PG/PC.

FTP client FTP server


CPU data blocks
PG/PC S7-400

S7 Station with IT-CP in the FTP Client Role for CPU Data
The user program on the CPU can access the IT-CP as an FTP client for the
transfer of data blocks from or to an FTP server.

FTP client FTP server

CPU data blocks


S7-400

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-2 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.2 The IT-CP as FTP Server for the File System on the IT-CP

3.2.1 How it Works

The IT-CP manages the predefined HTML system pages as well as the HTML
pages you have created yourself in a special memory area.
Using FTP (File Transfer Protocol) you have standardized access to the files
managed on the IT-CP.

FTP client: FTP server:


PG/PC S7 station with IT-CP
S7-300
S7-400

The following screen shot is an example of a typical access sequence in the


MS-DOS window:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-3
File Management and File Access with FTP

3.2.2 File System – Structure and Features

Structure of the File System on the IT-CP as Shipped


When accessing using an FTP tool, the file system of the IT-CP appears as
follows:

Tip:
The readme.htm file contains information about the file system.
Figure 3-1

Available Memory
For more information about the total memory available in the file system, refer to
the manual of your IT-CP /1/.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-4 C79000-G8976-C120 - 03
File Management and File Access with FTP

Files are protected by Access Rights


Chapter 1.3 explains the security mechanisms governing information exchange
using a Web browser. Chapter 1.4 explains how access rights are created when
you configure the IT-CP.
The IT-CP reacts to file access using FTP according to the access rights; in other
words you must authorize the access using a password. The specified user must
also have the right to access files on the S7 station with FTP (see Section 1.4 ).
Remember that using the “everybody” user name, access is possible without a
password, however this user name normally has no access rights.

File Access with FTP Tools


Depending on your requirements, you can use different methods and tools for FTP
access.
S Special FTP Tools
Special FTP tools are available that allow convenient use of FTP commands.
Generally, working with these tools is very similar to working with the Windows
Explorer. This means that you will use functions such as copying, moving or
deleting files intuitively rather than having to worry about the syntax of FTP
commands. You will only need the MS DOS prompt occasionally.
You will find more detailed information and software support in the Startup
package.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-5
File Management and File Access with FTP

S MS DOS Prompt
In the MS DOS prompt of Windows 95/NT, you can establish an FTP
connection and then execute all the FTP commands supported by the IT-CP.
The following example shows how you can find out which FTP commands are
available using the ’quote help’ command.

Figure 3-2

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-6 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.3 The IT-CP as FTP Server for S7 CPU Data (S7-400)

3.3.1 How It Works

The functionality described here allows you to transfer data in the form of files to
data blocks or from data blocks of an S7 station using FTP commands. At the
same time, the conventional FTP commands for reading, writing and managing
files can also be used.
For FTP transfer, you therefore create data blocks in the CPU of your S7 station
that are known as file DBs due to their special structure.
When the IT-CP in the FTP server role receives an FTP command, it checks a file
allocation table (file_db.txt) to find out how the data blocks used on the S7 station
for file transfer are mapped to files.
Using the information in the file allocation table, it is possible to address data
blocks in one or more (up to 4) CPUs on an S7 station.

FTP client: FTP server:


PG/PC S7 station with IT-CP

File allocation table


file_db.txt

cpu1db30
cpu1db127
... File DBs
DB30
DB127 Header
DB244 User data

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-7
File Management and File Access with FTP

3.3.2 FTP Commands on the FTP Client

Example of Access
The following screen shot shows an example of a typical access sequence in the
MS-DOS window.

How typical FTP functions use the permitted FTP commands


The following table shows which FTP commands can be executed to access file
DBs on the CPU. The table also shows which FTP functions are used for these
FTP commands in typical input consoles such as the MS-DOS prompt.

Table 3-1

Typical FTP Functions FTP Command Meaning

open dir put get close del


x user Login
x pass Authorization by
password
x x x port
x list Lists the file DBs in the
addressed CPU.
x dele Deletes a file DB by
setting the EXIST bit in
the file DB header to
“0”.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-8 C79000-G8976-C120 - 03
File Management and File Access with FTP

Table 3-1 , continued

Typical FTP Functions FTP Command Meaning

open dir put get close del


x retr Reads the user data in
the specified file DB
into the specified file on
the FTP client.
x stor Transfers the specified
file from the FTP client
to the user data area in
the specified file DB.
x quit Closes down the
current FTP
connection.

Note
You cannot use a “rename” FTP command with the file DBs.

How FTP Commands are Executed on the IT-CP


To illustrate how the FTP interface to the file DBs on the CPU works, the execution
sequence is explained below based on the example of the stor command.
The FTP server on the IT-CP executes the sequence shown below:
1. Identifies the addressed file DBs based on the entry in the file allocation table.
2. Checks the bits in the file DB header (see Section 3.3.4); the write function is
executed only when the following applies:
LOCKED bit = 0
NEW bit = 0
WRITEACCESS bit = 1
3. Writes the file content to the user data area of the file DB on the CPU. At the
beginning of the write function, the LOCKED bit is set and reset when writing is
completed.
4. When the write function is completed, the NEW bit is also set in the file DB
header and the current date entered in the DATE_TIME field.
5. The FTP server sends a message about the file transfer event to the FTP
client.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-9
File Management and File Access with FTP

Note
If you specify a file for the transfer that is not included in the file allocation table,
the requested file system operation is executed on the current folder.

Transfer Mode for File Transfer


File transfer only uses the binary mode.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-10 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.3.3 File Allocation Table

Meaning
In the FTP server role, the IT-CP requires information on how the data blocks used
in the S7 station for file transfer are mapped to files. You store this file allocation
table in a file file_db.txt in the file system on the IT-CP.

Structure
The file allocation table contains two areas in which the assignments are entered
row-oriented as shown in the example below:
S Rack/slot assignment of the CPU
S DB assignment
File transfer only uses the binary mode.

Notes on the Syntax


S Relevant rows can be recognized by the character string “cpux” (where x = a
character “1–4”); this applies to both areas.

Note
Please note the use of lower-case letters. The files will otherwise not be
recognized.

S Valid separators for the entries are “blanks” or “tabs”.


S All other characters are interpreted as comment characters.
S The rules for the file names of a file DB are as follows:
– Length: Maximum 64 characters
– Permitted characters: Letters “A-Z,a-z”; numbers “0-9”, “_”, “.”
S Row length: Maximum 256 characters

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-11
File Management and File Access with FTP

Example:
# CONFIGURATION FILE for file transfer between an FTP client of a remote system
# and an S7-CPU using the FTP server of the IT-CP

# This is an ASCII file and may be edited.


# This file must be located in the directory “/config” of the file system
# of the IT-CP. Its file name must be “file_db.txt” (all lowercase).

# All lines that do not begin with “cpu” (lowercase AND no leading blanks)
# are interpreted as comment.
# Maximum length per line is 256 characters.
# Delimiters are (one or more) blanks or tabs.

# The following table defines the rack and slot of the CPU(s).
# Definitions of “cpu1”, “cpu2”, “cpu3” and “cpu4” are allowed.

# CPU Rack Slot


Rack/slot # –––––––––––––––––––––––––––––
assignment cpu1 0 4
cpu2 0 7

# The following table defines pairs of file names and file DBs in the CPU.
# The maximum number of pairs is 100.
# The file name must begin with “cpuX” (where X = 1, 2, 3 or 4).
# Note that “cpuX” must be defined in the table above!
# The file name must consist of the characters “a-z”, “A-Z”, “0-9”, “_” or “.”
# It must not include a path. The maximum length of a file name is 64 characters.

# File Name File DB Number


DB assignment # ––––––––––––––––––––––––––––––––––––––––
cpu1db20 20
cpu1db35 35
cpu2_test.dat 5

In the example shown here, the FTP command


C:> PUT s7daten.txt cpu1db35
is used to transfer the s7daten.txt file to DB35 (file DB) that must be located on
CPU1.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-12 C79000-G8976-C120 - 03
File Management and File Access with FTP

How to Create and Manage the File Allocation Table


The file file_db.txt is located in the file system of your IT-CP in the folder /config.
You can upload the file as originally shipped with your CP to your PG/PC and use it
as a template for your application.
You can manage this file with the normal FTP commands as described in Section
3.2 for the IT file system.
If the file file_db.txt does not exist, it is not possible to access file DBs using the
FTP server of the IT-CP. After editing the file and transferring it to the file system of
the IT-CP, you should therefore make sure that the transfer was successful.
If both the transfer and syntax were correct, the following message is displayed:

“226 Transfer ok; closing data connection”

If the syntax is incorrect, a message similar to the one shown below will be
displayed:

“450 Requested action aborted – configuration file error in line 16”

If an error was reported, check your system configuration and repeat the transfer.
You can check your configuration with the following command:

ftp> dir cpux (where x = 1–4)

Note
Please note the use of lower-case letters. The files will otherwise not be
recognized.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-13
File Management and File Access with FTP

Example

In contrast to a directory listing of the file system, when the CPU folders are
configured, not only the file name is displayed but also the number of the
corresponding file DB.

Meaning of the Flags of “cpu” Folders with the dir Command:


S –r– –r– –r– – (read flag) :
If this flag is displayed, the EXIST bit is set in the file DB. It is possible to read
this file DB as long as the LOCKED bit is not set.
S – –w– –w– –w– (write flag):
If this flag is displayed, the NEW bit is not set in the file DB and the
WRITEACCESS bit is set. It is possible to write to this file DB as long as the
LOCKED bit is not set.
S l– – – – – – – – – (locked flag):
If this flag is displayed, the LOCKED bit is set in the file DB. Neither reading nor
writing the file DB is possible. If the “r” or “w” flags are set in addition to this
flag, this means that reading or writing will be possible if the LOCKED bit is
cleared.
If a file DB does not physically exist but is configured in the file allocation table
“file_db.txt”, all the flags are reset in the display (display: – – – – – – – – – –), the
date contains an error value and the message “FileDB <File-DB number> not
found” is displayed (see example).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-14 C79000-G8976-C120 - 03
File Management and File Access with FTP

Note
It is possible to change from one folder to another on the CPU. Remember,
however, that only the commands listed in Table 3-1 can be executed.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-15
File Management and File Access with FTP

3.3.4 Structure of the Data Blocks (File DB) for FTP Services

How the Function Works


To allow the transfer of data with FTP, you create data blocks (file DBs) in the CPU
of your S7 station. These data blocks must have a specific structure so that they
can be used as transferable files by the FTP services. These blocks consist of the
following sections:
S Section 1: File DB header (has a fixed length (20 bytes) and structure)
S Section 2: User data (variable length and structure)

File DB Header for FTP Server Operation


Note: The file DB header described here is largely identical to the file DB header
for client operation described in Table 3-4; the differences relate to the following
parameters:
S WRITEACCESS
S FTP_REPLY_CODE

Table 3-2

Parameter Type Value / Meaning Value set by


EXIST BOOL The EXIST bit indicates The dele FTP command sets EXIST=0
whether the user data area The stor FTP command sets EXIST=1
contains valid data.
The retrieve FTP command
executes the job only when
EXIST=1.
S 0:
The file DB does not
contain valid user data (”file
does not exist”).
S 1:
The file DB contains valid
user data (”file exists”).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-16 C79000-G8976-C120 - 03
File Management and File Access with FTP

Table 3-2 , continued

Parameter Type Value / Meaning Value set by


LOCKED BOOL The LOCKED bit is used to The stor and retr FTP commands set
restrict access to the file DB. LOCKED=1 when they are executed.
S 0: The following function is also possible
The file DB can be when writing from the user program:
accessed. The user program on the S7 CPU can
S 1: set or reset LOCKED during write
The file DB is locked. access to achieve data consistency.
Recommended sequence in the user
program:
1. Query LOCKED bit;
If =0
2. Set WRITEACCESS Bit=0
3. Query LOCKED bit;
If =0
4. Set LOCKED Bit=1
5. Write data
6. Set LOCKED Bit=0
NEW BOOL The NEW bit indicates whether After execution, the stor FTP command
data have been modified since sets NEW=1
the last read access. The user program on the S7 CPU must
S 0: set NEW=0 after the data have been
The content of the file DB is read to allow a new stor or allow the file
unchanged since the last to be deleted with the dele FTP
write access. The user command.
program of the S7 CPU has
registered the last
modification.
S 1:
The user program of the S7
CPU has not yet registered
the last write access.
WRITE_ BOOL 0: During the configuration of the DB, the
ACCESS The FTP client on the PG/PC bit is set to an initialization value.
has no write access rights for Recommendation:
the file DBs on the S7 CPU.
Whenever possible, the bit should
1: remain unchanged! In special situations,
The FTP client on the PG/PC adaptation during operation is possible.
has write access rights for the
file DBs on the S7 CPU.
ACT_LENGTH DINT Current length of the user data The current length is updated following
area. write access.
The content of this field is only
valid when EXIST = 1.
MAX_LENGTH DINT Maximum length of the user The maximum length should be
data area (length of the entire specified during configuration of the DB.
DB less 20 bytes header). The value can also be modified by the
user program during operation.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-17
File Management and File Access with FTP

Table 3-2 , continued

Parameter Type Value / Meaning Value set by


FTP_REPLY_C INT This parameter is irrelevant in Is set to “0” by the FTP server.
ODE FTP server operation.
DATE_TIME DATE_A Date and time of the last The current date is updated following a
ND_TIME modification to the file. write access.
The content of this field is valid If the function for passing on the time of
only when EXIST = 1. day is used, the entry corresponds to
the time that was passed on.
If the function for passing on the time of
day is not used, a relative time is
entered. This time relates to the startup
of the IT-CP (the initialization value is
1.1.1994 0.0 (midnight)).

Example and Reference for the File DB Header


After installing the NCM S7 for Industrial Ethernet option, you will find a predefined
data type (UDT1 = FILE_DB_HEADER) in the block library that you can copy to
your STEP 7 project and reference directly as a header in a file DB.
In the declaration, you will see the following structure.

Table 3-3

Address Name Type Initial value Comment


0.0 STRUCT
+0.0 bit08 BOOL FALSE reserved
+0.1 bit09 BOOL FALSE reserved
+0.2 bit10 BOOL FALSE reserved
+0.3 bit11 BOOL FALSE reserved
+0.4 bit12 BOOL FALSE reserved
+0.5 bit13 BOOL FALSE reserved
+0.6 bit14 BOOL FALSE reserved
+0.7 bit15 BOOL FALSE reserved
+1.0 EXIST BOOL FALSE if TRUE: FileDB content is valid
data
+1.1 LOCKED BOOL FALSE it TRUE: FileDB is locked caused
by changes of the content
+1.2 NEW BOOL FALSE if TRUE: FileDB content is new and
may not be overwritten
+1.3 WRITEACCESS BOOL FALSE if TRUE: FTP server of the IT-CP
has write access, else FTP server
+1.4 bit04 BOOL FALSE reserved

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-18 C79000-G8976-C120 - 03
File Management and File Access with FTP

Table 3-3 , continued

Address Name Type Initial value Comment


+1.5 bit05 BOOL FALSE reserved
+1.6 bit06 BOOL FALSE reserved
+1.7 bit07 BOOL FALSE reserved
+2.0 ACT_LENGTH DINT L#0 current size of the content in bytes
(not including the header of 20
bytes)
+6.0 MAX_LENGTH DINT L#0 current size of the content in bytes
(not including the header of 20
bytes)
+10.0 FTP_REPLY_CODE INT 0 last reply code from the remote FTP
server
+12.0 DATE_TIME DATE_AND_TIME DT#00–1–1–0:0:0.000 date and time of last change of the
content of the FileDB
=20.0 END_STRUCT

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-19
File Management and File Access with FTP

3.4 IT-CP as FTP Client for S7 CPU Data (S7-400)

3.4.1 How It Works

To transfer data using FTP, you create data blocks (file DBs) in the CPU of your S7
station (for structure, refer to Section 3.3.4).
Using special FCs (functions), the user program sends FTP jobs that are then
executed by the IT-CP in the role of FTP client.
The data are transferred on FTP connections. FTP connections are special TCP
connections that you configure in STEP 7 / NetPro.
In the job, you specify the IP address of the FTP server in an additional destination
parameter, the storage location of the file on the FTP server and the file name
along with access information.

FTP client: FTP server:


S7-400 station with IT-CP

FTP connection

File DBs

DB127 FTP_RETRIEVE
DB243 Header
DB244 User data

FTP_STORE
User program

CALL FTP_CONNECT
CALL FTP_RETRIEVE
CALL FTP_QUIT

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-20 C79000-G8976-C120 - 03
File Management and File Access with FTP

FTP Job Sequence with FC Calls


The following FCs are available for the FTP services; they must be used in the
order shown (see also the example in Appendix A):
1. FTP_CONNECT: Establish FTP connection
2. Productive services when the FTP connection is established:
– FTP_RETRIEVE: Retrieve file from FTP server and store in DB
– FTP_STORE: Read DB and store as file on FTP server
– FTP_DELETE: Delete file on FTP server
3. FTP_QUIT: Close FTP connection

Example of an FTP Job Sequence


Appendix A contains an example of STL code that you can download directly to the
file system of your IT-CP.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-21
File Management and File Access with FTP

3.4.2 Configuring FTP connections

Meaning
To run an FTP job sequence between the S7 station acting as the FTP client and
an FTP server, the IT-CP must establish a connection to the S7 CPU. This
connection is known as an FTP connection.

How to Configure FTP Connections


To use FTP functionality, you require TCP connections with special properties.
Follow the steps outlined below to configure the connection in STEP 7 / NetPro:
1. Create a TCP connection with an unspecified connection partner for the CPU in
your S7 station.

Use for FTP protocol

2. Select the option “Use for FTP protocol”


Selecting this option has the following consequences:
– The TCP connection is now used as an FTP connection.
– ”Addresses” tab: The addresses are specified automatically (Port=21)
– ”Options” tab: The mode is set permanently to FTP.
Number of connections: You can configure up to 10 FTP connections.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-22 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.4.3 Structure of the Data Blocks (File DB) for FTP Services

How It Works
To allow the transfer of data with FTP, you create data blocks (file DBs) in the CPU
of your S7 station. These data blocks must have a specific structure so that they
can be used as transferable files by the FTP services. These blocks consist of the
following sections:
S Section 1: File DB header (has a fixed structure and a length of 20 bytes).
S Section 2: User data (variable length and structure)

File DB Header for FTP Client Operation


Note: The file file DB header described here is largely identical to the file DB
header for server operation described in Table 3-2; the differences relate to the
following parameters:
S WRITEACCESS
S FTP_REPLY_CODE

Table 3-4

Parameter Type Value / Meaning Value set by


EXIST BOOL The EXIST bit indicates The dele FTP command sets EXIST=0
whether the user data area The stor FTP command sets EXIST=1
contains valid data.
The retrieve FTP command
executes the job only when
EXIST=1.
S 0:
The file DB does not
contain valid user data (”file
does not exist”).
S 1:
The file DB contains valid
user data (”file exists”).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-23
File Management and File Access with FTP

Table 3-4 , continued

Parameter Type Value / Meaning Value set by


LOCKED BOOL The LOCKED bit is used to The stor and retr FTP commands set
restrict access to the file DB. LOCKED=1 when they are executed.
S 0: The following function is also possible
The file DB can be when writing from the user program:
accessed. The user program on the S7 CPU can
S 1: set or reset LOCKED during write
The file DB is locked. access to achieve data consistency.
Recommended sequence in the user
program:
1. Query LOCKED bit;
If =0
2. Set WRITEACCESS Bit=0
3. Query LOCKED bit;
If =0
4. Set LOCKED Bit=1
5. Write data
6. Set LOCKED Bit=0
NEW BOOL The NEW bit indicates whether After execution, the stor FTP command
data have been modified since sets NEW=1
the last read access. The user program on the S7 CPU must
S 0: set NEW=0 after the data have been
The content of the file DB is read to allow a new stor or allow the file
unchanged since the last to be deleted with the dele FTP
write access. The user command.
program of the S7 CPU has
registered the last
modification.
S 1:
The user program of the S7
CPU has not yet registered
the last write access.
WRITE_ BOOL 0: During the configuration of the DB, the
ACCESS The user program (FTP client bit is set to an initialization value.
blocks) has write access to file Recommendation:
DBs on the S7 CPU.
Whenever possible, the bit should
1: remain unchanged! In special situations,
The user program (FTP client adaptation during operation is possible.
blocks) has no write access to
file DBs on the S7 CPU.
ACT_LENGTH DINT Current length of the user data The current length is updated following
area. write access.
The content of this field is only
valid when EXIST = 1.
MAX_LENGTH DINT Maximum length of the user The maximum length should be
data area (length of the entire specified during configuration of the DB.
DB less 20 bytes header). The value can also be modified by the
user program during operation.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-24 C79000-G8976-C120 - 03
File Management and File Access with FTP

Table 3-4 , continued

Parameter Type Value / Meaning Value set by


FTP_REPLY_C INT Unsigned integer (16-bit) This is updated by the FTP client when
ODE containing the last reply code the FTP command is executed.
from FTP as a binary value.
The content of this field is only
valid when EXIST = 1.
DATE_TIME DATE_A Date and time of the last The current date is updated following a
ND_TIME modification to the file. write access.
The content of this field is only If the function for passing on the time of
valid when EXIST = 1. day is used, the entry corresponds to
the time that was passed on.
If the function for passing on the time of
day is not used, a relative time is
entered. This time relates to the startup
of the IT-CP (the initialization value is
1.1.1994 0.0 (midnight)).

Example and Reference for the File DB Header: See Section 3.3.4

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-25
File Management and File Access with FTP

3.4.4 FCs for FTP Services

Block Library
The functions (FCs) described here are supplied along with the STEP 7 standard
package (V5.1 SP1 and higher).
The following list shows the numbers of the FCs as they are supplied with the
configuration tool. You can change these numbers.
The blocks are available after you have installed the NCM S7 for Industrial
Ethernet option.

FC SIMATIC Manager Library


SIMATIC_NET_CP
CP 300 CP 400
FC40 FTP_CONNECT – x
FC41 FTP_STORE – x
FC42 FTP_RETRIEVE – x
FC43 FTP_DELETE – x
FC44 FTP_QUIT – x

Setting Parameters for FC Calls


The following sections describe all the FCs and their specific call parameters.
It is possible to make the following general statements about the following
parameter groups that occur in all FCs:
S Parameters for CP and connection assignment (input parameters)
For a detailed description, refer to Section 3.4.10.
S Status information (output parameters)
For a detailed description, refer to Section 3.4.11.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-26 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.4.5 FC FTP_CONNECT (FC40)

Meaning
With this function call, the FTP client establishes an FTP connection to an FTP
server.
The IP address of the FTP server, the user identification (username) and (if
necessary) the password for user identification must be transferred to the FTP
server.
All further access by the FTP server is then based on this user identification if you
use the same FTP connection ID. Data is then exchanged with the FTP server
specified for this user.

Call Interface

FTP_CONNECT

BOOL ACT DONE BOOL


INT ID ERROR BOOL
WORD LADDR STATUS WORD
Input ANY LOGIN
Output
INT BUFFER_DB_NR

Example of a call in STL representation

STL Explanation
call fc 40 //FTP_CONNECT block call

ACT := M 420.0, // Job triggered by memory bit


ID := 4, // FTP connection ID acc. to
LADDR := W#16#3FFD, configuration
LOGIN := P#DB40.DBX 0.0 BYTE 170, // Module address acc. to configuration
BUFFER_DB_NR := 9, // Information for LOGIN in DB40
DONE := M 420.1, // Buffer area for FTP service
ERROR := M 420.2,
STATUS := MW 422);

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-27
File Management and File Access with FTP

Explanation of the General Call Parameters


The general parameters have the same significance in every FTP function call;
they are therefore described in one section.
S Parameters for CP and connection assignment (input parameters)
see Section 3.4.10
S Status information (output parameters)
see Section 3.4.11

Explanation of the Formal Parameters Specific to the Call

Table 3-5 Formal Parameters for FTP_CONNECT

Parameter Declaration Type Remarks


LOGIN INPUT ANY This parameter specifies the FTP server to be
(as VARTYPE accessed on the FTP connection.
only (for further details, refer to the following table)
BYTE permitted) Here, you specify the address and length of the
data area in which the target data are entered.
The address references a data block area.
The ANY pointer data type is used to address this
area. For more detailed information on this data
type, refer to the STEP 7 online help under the
topic “Format of the Parameter Type ANY”. You
will also find a detailed description of the ANY
point in /21/.
BUFFER_DB_NR INPUT INT Here, you enter a data block required as a buffer
area by the FTP client for FTP transfer.
You can use the same data block as the buffer
area for all FTP jobs.
Note:
The length of the reserved DB must be at least
255 bytes!

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-28 C79000-G8976-C120 - 03
File Management and File Access with FTP

LOGIN Parameter
This parameter record has the following content for FTP_CONNECT

Relative Name Type 1) Example Meaning


Address
2)

0.0 ip_address STRING[100] ’142.11.25.135’ IP address of the FTP server.


102.0 username STRING[32] ’user’ User name for the Login on the
FTP server.
136.0 password STRING[32] ’password’ Password for the Login on the FTP
server.
170.0 filename STRING[220] ’c:\S7_Station\block File name of the source or
s\db127.txt’ destination file
1) The maximum possible string length is specified in each case
2) The specified values relate to the string lengths specified in “Type”.
Note: The rows shown on a gray background are irrelevant for this call.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-29
File Management and File Access with FTP

3.4.6 FC FTP_STORE (FC41)

Meaning
This function call transfers a data block (file DB) from the FTP client (S7 CPU) to
the FTP server.
Here, you specify the data block that contains the file. The path/file name with
which the file will be created on the FTP server must also be specified.
If the file (file DB) already exists on the FTP server, it is overwritten.

Call Interface

FTP_STORE

BOOL ACT DONE BOOL


INT ID ERROR BOOL
WORD LADDR STATUS WORD
Input ANY FILE_NAME
Output
INT BUFFER_DB_NR
INT FILE_DB_NR

Example of a call in STL representation

STL Explanation
call fc 41 //FTP_STORE block call

ACT := M 420.0, // Job triggered by memory bit


ID := 4, // FTP connection ID acc. to
LADDR := W#16#3FFD, configuration
FILE_NAME := P#DB40.DBX 170.0 BYTE 220, // Module address acc. to configuration
BUFFER_DB_NR := 9, // Information for dest file in DB40
FILE_DB_NR := 42, // Buffer area for FTP service
DONE := M 420.1, // DB no. of the source file
ERROR := M 420.2,
STATUS := MW 422);

Explanation of the General Call Parameters


The general parameters have the same significance in every FTP function call;
they are therefore described in one section.
S Parameters for CP and connection assignment (input parameters)
see Section 3.4.10
S Status information (output parameters)
see Section 3.4.11

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-30 C79000-G8976-C120 - 03
File Management and File Access with FTP

Explanation of the Formal Parameters Specific to the Call

Table 3-6 Formal Parameters for FTP_STORE

Parameter Declaration Type Remarks


FILE_NAME INPUT ANY This parameter specifies the data destination.
(as VARTYPE (for further details, refer to the following table)
only Here, you specify the address and length of the
BYTE permitted) data area in which the target data are entered.
The address references a data block area.
The ANY pointer data type is used to address this
area. For more detailed information on this data
type, refer to the STEP 7 online help under the
topic “Format of the Parameter Type ANY”. You
will also find a detailed description of the ANY
point in /21/.
BUFFER_DB_NR INPUT INT Here, you enter a data block required as a buffer
area by the FTP client for FTP transfer.
You can use the same data block as the buffer
area for all FTP jobs.
Note:
The length of the reserved DB must be at least
255 bytes!
FILE_DB_NR INPUT INT The data block specified here, contains the file DB
to be read.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-31
File Management and File Access with FTP

FILE_NAME Parameter
This parameter record has the following content for FTP_STORE

Relative Name Type 1) Example Meaning


Address
2)

0.0 ip_address STRING[100] ’142.11.25.135’ IP address of the FTP server.


102.0 username STRING[32] ’user’ User name for the Login on the
FTP server.
136.0 password STRING[32] ’password’ Password for the Login on the FTP
server.
170.0 filename STRING[220] ’e:/S7_Station/block File name of the source or
s/db127.dat’ destination file
1) The maximum possible string length is specified in each case
2) The specified values relate to the string lengths specified in “Type”.
Note: The rows shown on a gray background are irrelevant for this call.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-32 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.4.7 FC FTP_RETRIEVE (FC42)

Meaning
This function call transfers a file from the FTP server to the FTP client (S7-CPU).
Here, you specify the data block in which the file will be stored. The path/file name
under which the file is located on the FTP server must also be specified.
If the data block (file DB) on the FTP client already contains a file, this is
overwritten.

Call Interface

FTP_RETRIEVE

BOOL ACT DONE BOOL


INT ID ERROR BOOL
WORD LADDR STATUS WORD
Input ANY FILE_NAME
Output
INT BUFFER_DB_NR
INT FILE_DB_NR

Example of a call in STL representation

STL Explanation
call fc 42 //FTP_RETRIEVE block call

ACT := M 420.0, // Job triggered by memory bit


ID := 4, // FTP connection ID acc. to
LADDR := W#16#3FFD, configuration
FILE_NAME := P#DB40.DBX 170.0 BYTE 220, // Module address acc. to configuration
BUFFER_DB_NR := 9, // Information for source file in DB40
FILE_DB_NR := 42, // Buffer area for FTP service
DONE := M 420.1, // DB no. of the dest file
ERROR := M 420.2,
STATUS := MW 422);

Explanation of the General Call Parameters


The general parameters have the same significance in every FTP function call;
they are therefore described in one section.
S Parameters for CP and connection assignment (input parameters)
see Section 3.4.10
S Status information (output parameters)
see Section 3.4.11

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-33
File Management and File Access with FTP

Explanation of the Formal Parameters Specific to the Call

Table 3-7 Formal Parameters for FTP_RETRIEVE

Parameter Declaration Type Remarks


FILE_NAME INPUT ANY This parameter specifies the data source.
(as VARTYPE (for further details, refer to the following table)
only Here, you specify the address and length of the
BYTE permitted) data area in which the target data are entered.
The address references a data block area.
The ANY pointer data type is used to address this
area. For more detailed information on this data
type, refer to the STEP 7 online help under the
topic “Format of the Parameter Type ANY”. You
will also find a detailed description of the ANY
point in /21/.
BUFFER_DB_NR INPUT INT Here, you enter a data block required as a buffer
area by the FTP client for FTP transfer.
You can use the same data block as the buffer
area for all FTP jobs.
Note:
The length of the reserved DB must be at least
255 bytes!
FILE_DB_NR INPUT INT The data block specified here contains the file DB
to be written to (data destination).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-34 C79000-G8976-C120 - 03
File Management and File Access with FTP

FILE_NAME Parameter
This parameter record has the following content for FTP_RETRIEVE

Relative Name Type 1) Example Meaning


Address 2)
0.0 ip_address STRING[100] ’142.11.25.135’ IP address of the FTP server.
102.0 username STRING[32] ’user’ User name for the Login on the
FTP server.
136.0 password STRING[32] ’password’ Password for the Login on the
FTP server.
170.0 filename STRING[220] ’e:/S7_Station/bloc File name of the source or
ks/db127.dat’ destination file
1) The maximum possible string length is specified in each case
2) The specified values relate to the string lengths specified in “Type”.
Note: The rows shown on a gray background are irrelevant for this call.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-35
File Management and File Access with FTP

3.4.8 FC FTP_DELETE (FC43)

Meaning
This function call deletes a file on the FTP server.

Call Interface

FTP_DELETE

BOOL ACT DONE BOOL


INT ID ERROR BOOL
WORD LADDR STATUS WORD
Input ANY FILE_NAME
Output
INT BUFFER_DB_NR

Example of a call in STL representation

STL Explanation
call fc 43 //FTP_DELETE block call

ACT := M 420.0, // Job triggered by memory bit


ID := 4, // FTP connection ID acc. to
LADDR := W#16#3FFD, configuration
FILE_NAME := P#DB40.DBX 170.0 BYTE 220, // Module address acc. to configuration
BUFFER_DB_NR := 9, // Information for dest file in DB40
DONE := M 420.1, // Buffer area for FTP service
ERROR := M 420.2,
STATUS := MW 422);

Explanation of the General Call Parameters


The general parameters have the same significance in every FTP function call;
they are therefore described in one section.
S Parameters for CP and connection assignment (input parameters)
see Section 3.4.10
S Status information (output parameters)
see Section 3.4.11

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-36 C79000-G8976-C120 - 03
File Management and File Access with FTP

Explanation of the Formal Parameters Specific to the Call

Table 3-8 Formal Parameters for FTP_DELETE

Parameter Declaration Type Remarks


FILE_NAME INPUT ANY This parameter specifies the data destination.
(as VARTYPE (for further details, refer to the following table)
only Here, you specify the address and length of the
BYTE permitted) data area in which the target data are entered.
The address references a data block area.
The ANY pointer data type is used to address this
area. For more detailed information on this data
type, refer to the STEP 7 online help under the
topic “Format of the Parameter Type ANY”. You
will also find a detailed description of the ANY
point in /21/.
BUFFER_DB_NR INPUT INT Here, you enter a data block required as a buffer
area by the FTP client for FTP transfer.
You can use the same data block as the buffer
area for all FTP jobs.
Note:
The length of the reserved DB must be at least
255 bytes!

FILE_NAME Parameter
This parameter record has the following content for FTP_DELETE

Relative Name Type 1) Example Meaning


Address 2)
0.0 ip_address STRING[100] ’142.11.25.135’ IP address of the FTP server.
102.0 username STRING[32] ’user’ User name for the Login on the
FTP server.
136.0 password STRING[32] ’password’ Password for the Login on the
FTP server.
170.0 filename STRING[220] ’e:/S7_Station/bloc File name of the source or
ks/db127.dat’ destination file
1) The maximum possible string length is specified in each case
2) The specified values relate to the string lengths specified in “Type”.
Note: The rows shown on a gray background are irrelevant for this call.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-37
File Management and File Access with FTP

3.4.9 FC FTP_QUIT (FC44)

Meaning
This function call closes the FTP connection identified by the ID.

Call Interface

FTP_QUIT

BOOL ACT DONE BOOL


INT ID ERROR BOOL
WORD LADDR STATUS WORD
Input Output

Example of a call in STL representation

STL Explanation
call fc 44 //FTP_QUIT block call

ACT := M 420.0, // Job triggered by memory bit


ID := 4, // FTP connection ID acc. to
LADDR := W#16#3FFD, configuration
DONE := M 420.1, // Module address acc. to configuration
ERROR := M 420.2,
STATUS := MW 422);

Explanation of the General Call Parameters


The general parameters have the same significance in every FTP function call;
they are therefore described in one section.
S Parameters for CP and connection assignment (input parameters)
see Section 3.4.10
S Status information (output parameters)
see Section 3.4.11

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-38 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.4.10 Parameters for CP and Connection Assignment (Input


parameters)

Apart from the input parameters specific to the jobs started with each FTP block
call, the following general input parameters must also be set:

Table 3-9 Formal Parameters for FTP FCs – Input Parameters

Parameter Declaration Type Possible Meaning / Remarks


Values
ACT INPUT BOOL 0,1 The parameter contains the initialization bit for
triggering the job.
S If ACT = 1, the job is executed.
During job execution, the FC returns the
following codes:
– DONE = 0
– ERROR = 0
– STATUS=8181H
S If ACT = 0, the called FC does not execute
any actions; the status codes are then set
as follows with this parameter setting:
– DONE = 0
– ERROR = 1
– STATUS=8F70H
Note / Recommendation:
You should execute the FTP calls conditionally
in your application, for example by evaluating
the codes. It is not a good idea to control the
call using the ACT bit.
ID INPUT INT 1,2...64 The FTP jobs are handled on FTP
connections. The parameter identifies the
connection being used.
LADDR INPUT WORD Module start address
When you call an FC, you transfer the module
base address IT-CP in the LADDR parameter.
The module base address of the IT-CP can be
found in the properties dialog of the IT-CP in
the “Addresses/Inputs” tab.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-39
File Management and File Access with FTP

Note
Make sure that only one FTP client block is called per ID used as long as
ACT = 1 is set.
For example, FC STORE and FC RETRIEVE must not be active on the same FTP
connection at the same time. This corresponds to normal FTP functionality. If this
is nevertheless attempted, you cannot rely on the output parameters (DONE bit,
ERROR bit and STATUS word) being correct.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-40 C79000-G8976-C120 - 03
File Management and File Access with FTP

3.4.11 Status Information (Output Parameters)

For status evaluation, the following parameters must be evaluated in the user
program:

Table 3-10 Formal Parameters for FTP FCs – Output Parameters

Parameter Declaration Type Possible Meaning / Remarks


Values
DONE OUTPUT BOOL 0: – This parameter indicates whether or not
1: Job the job was completed without errors.
executed

ERROR OUTPUT BOOL 0: – Error code


1: error This parameter indicates that the job could
not be executed error-free.
STATUS OUTPUT WORD see following Status code
table This parameter supplies detailed
information about the execution of the job.

For the meaning of this parameter in conjunction with the ERROR and STATUS parameters, refer to the
following table.

Example
During job execution, the FC returns the following codes:
S DONE = 0
S ERROR = 0
S STATUS=8181H

Evaluating Status Codes


Remember that the status codes DONE, ERROR, STATUS are updated at each
block call.

Note
For entries coded with 8FxxH in STATUS, refer to the information in the STEP 7
Standard and System Functions reference manual. The chapter describing error
evaluation with the RET_VAL output parameter contains detailed information.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-41
File Management and File Access with FTP

Table 3-11 Status Codes of the FCs for FTP

DONE ERROR STATUS Meaning


1 0 0000H Job completed without error.
0 0 0000H No job being executed.
0 0 8181H Job active.
0 1 8090H S No module with this base address exists.
S The FC being used does not match the system family being
used (remember to use different FC for S7-300 and S7-400).
0 1 8091H Logical base address not at a double word boundary.
0 1 8092H Type information in the ANY pointer is not byte.
0 1 80A4H The communication bus connection between the CPU and CP is
not established. (with newer CPU versions).
This can, for example, be caused by the following:
S No connection configuration;
S The maximum number of CPs that can be operated at the
same time has been exceeded.
0 1 80B0H The module does not recognize the data record.
0 1 80B1H S Destination area invalid.
For example, destination area > 240 bytes.
0 1 80B2H The communication bus connection between the CPU and CP is
not established.(with older CPU versions; otherwise 80A4H; ; for
further information, refer to this code)
0 1 80C0H The data record cannot be read.
0 1 80C1H The specified data record is currently being processed.
0 1 80C2H There are too many jobs pending.
0 1 80C3H Resources occupied (memory).
0 1 80C4H Communication error (occurs temporarily, it is usually best to
repeat the job in the user program).
0 1 80D2H Module start address incorrect.
0 1 8183H The configuration does not match the job parameters.
0 1 8184H S Bad data type specified for the FILE_NAME / LOGIN
parameter.
0 1 8186H ID parameter invalid. ID!=1,2 to 64.
0 1 8F22H Source area invalid; for example:
Area does not exist in the DB
0 1 8F24H Area error reading a parameter.
0 1 8F28H Alignment error reading a parameter.
0 1 8F32H Parameter contains a DB number that is too high.
0 1 8F33H DB number error.
0 1 8F3AH Area not loaded (DB).
0 1 8F50H File DB DB 0 or DB does not exist
0 1 8F51H Specified file DB data area larger than existing data area

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-42 C79000-G8976-C120 - 03
File Management and File Access with FTP

Table 3-11 Status Codes of the FCs for FTP, continued

DONE ERROR STATUS Meaning


0 1 8F52H File DB in write-protected memory
0 1 8F53H File DB max. length < current length
0 1 8F54H File DB does not contain any valid data
0 1 8F55H Header status bit: Locked
0 1 8F56H The NEW bit in the file DB header was not reset
0 1 8F57H The FTP client does not have write access to the file DB but
rather the FTP server (header status bit: WriteAccess)
0 1 8F5AH Buffer DB DB 0 or DB does not exist
0 1 8F5BH Buffer DB data area too short
0 1 8F5CH Buffer DB in write-protected memory
0 1 8F60H Bad user data, for example bad IP address of the FTP server
0 1 8F61H FTP server not obtainable
0 1 8F62H Job not supported or rejected by FTP server
0 1 8F63H File transfer aborted by the FTP server
0 1 8F64H Error on the FTP control connection; data could not be sent or
received; the FTP control connection must be established again
after such an error.
0 1 8F65H Error on the FTP data connection; data could not be sent or
received; the job (FTP_STORE or FTP_RETRIEVE) must be
called again.
This error can, for example, be caused by FTP_RETRIEVE when
the addressed file is already open on the FTP server.
0 1 8F66H Error reading/writing data from/to the CPU (for example DB does
not exist or too short)
0 1 8F67H Error in the FTP client on the IP-CP; for example attempting to
open more than 10 FTP connections.
0 1 8F68H The job was rejected by the FTP client
This error can, for example, be caused by FTP_RETRIEVE when
the value for the parameter MAX_LENGTH was selected too low
in the file DB header.
0 1 8F69H FTP connection in the incorrect status for this call, for example a
double connect call or when attempting to retrieve without
previously connecting (using the same NetPro ID)
0 1 8F6AH No new socket could be opened, temporary resource problem,
repeat the block call.
0 1 8F70H Calling an FTP client block with ACT = 0
0 1 8F7FH Internal error; for example, bad ANY reference

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 3-43
File Management and File Access with FTP

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


3-44 C79000-G8976-C120 - 03
Creating Your Own HTML Pages 4
This chapter answers the following questions:
S How are HTML pages created that can access information on the S7 station?
S What are S7 applets and how are they used in HTML pages? What do I need to
remember?
S How do I store my own HTML pages?
S How do I obtain a graphic representation of process information?
S How are HTML pages checked and tested?

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-1
Creating Your Own HTML Pages

4.1 Creating HTML Pages for the IT-CP

Uses
With your own HTML pages, the following possibilities are open to you:
S Process visualization in the Web browser adapted to your particular plant
S Process data represented numerically or graphically in the Web browser
S The ability to include the results of status queries in the display
S The querying and representation of process data in one HTML page on several
S7 stations and on distributed systems.

Figure 4-1

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-2 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

How to...
...create or adapt your own individual HTML pages:

Standard application: Use the tools


Use S7 applets; insert calls in
the HTML page according to
the description of the call para-
meters in Section 4.3.1.
Templates
Extended application: in Startup
Use application-specific applets
and the supplied S7 beans.

Solutions of any complexity:


Create Java source code; use ap-
plication-specific applets, Java-
Beans and the supplied S7 beans.

Save the HTML page on the IT-CP or in the Web


Server
For information on file transfer with FTP, see
Chapter 3

Configure variables for symbolic access


see Section 4.4

S Standard application:
You want to use the options of the HTML process control predefined for the
IT-CP without extensive programming.
S Extended application:
You want to use graphics options adapted to your application and create more
complex applets.
S Solutions of any complexity
You not only want to display your process data in the plant pictures but also
want to use the data, for example, for evaluation in a database.

S7 applets are applets for SIMATIC S7


The IT-CP provides several applets with which you can access the controller from
the Web browser on your PC. You do not need to be familiar with Java to use
these S7 applets. By following the instructions below, you will be able to integrate
the calls in your HTML page simply and quickly.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-3
Creating Your Own HTML Pages

Extended Access and Display Options – The JavaBeans Concept


The JavaBeans concept allows you to create objects (Java components) and to
link them simply to executable programs.
There is an S7 beans class library available for the IT-CP (S7BeansAPI). The
object classes contained in this library can be used for object-oriented access to a
variety of information on the SIMATIC S7 and for graphic display of process
variables.
The S7 beans class library provides an open interface allowing you to extend
process data evaluation for example with databases, table calculation or
management information systems.

Organizing Files – Resources of the IT-CP


The IT-CP has additional memory available for storing your HTML pages. For
further information refer to the manual of the IT-CP/1/.
Please note the information in the readme.htm file on the IT-CP. The simplest way
to open the readme.htm file is by clicking the “Help” button on the home page of
the IT-CP.
This contains information about the meaning and purpose of the shipped files. You
can then decide which files might be useful for your application. Using FTP
functions (see Section 3 ), you can organize the files on the IT-CP to suit your
requirements.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-4 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.2 Designing HTML Pages – A Few Essentials

A Word of Introduction
There is a considerable body of excellent literature dealing with the design of
HTML pages. Check the recommended literature dealing with the topics of Web,
HTML etc. in the appendix to this manual. This manual itself is deliberately
restricted to explaining how you can include the functions supplied with the IT-CP
in your HTML application.
With the information here, you should be in a position to create and run HTML
pages and use the S7 applets without needing a thorough study of HTML
techniques.
Experienced authors of HTML pages will be able to use the information about
assigning parameters for S7 applets in the following sections directly. For the less
experienced user, we have included a certain amount of information on the topic.
This information can then be extended by reading the literature mentioned above.

Planning the Structure


From the very beginning, you should be clear in your own mind about your
document and page structure. HTML allows you to jump from topic to topic in the
HTML pages displayed by the Web browser and, in the case of the IT-CP, from
controller to controller or plant to plant. Basically this means that the scope of the
HTML pages depends on the links that you specify when you create the pages. On
the other hand, the links themselves also depend on the storage of the HTML
documents.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-5
Creating Your Own HTML Pages

Linking Documents (HTML Pages)


HTML pages are connected by links that are structured as follows:
S URLs with absolute address information
Example:
<A HREF=”http://www.ad.siemens.de/net/index.htm”>ID_text</A>
S URLs for simplified link information with relative addresses:
– Use of relative URLs: Generally, these contain only the name of the folder
and the file or even only the file name if the HTML page called is in the same
folder as the calling HTML page.
Example:
<A HREF=”processpic.htm”>ID_text</A>
– Use of server-related URLs: These addresses begin with ”/” and indicate
that the HTML page is on the same server as the calling HTML page.
Example:
<A HREF=”/pics/processpic.htm”>ID_text</A>

Designing HTML Pages


To design pages that are both practical and attractive, HTML provides you with
various description elements. The literature provides suitable information usually
under the following topics:
S Displaying Tables
The table is an important tool in structuring information. In particular when
designing HTML pages, tables are suitable for compensating certain
weaknesses of HTML formats. Displaying HTML text in columns is, for example
only possible if you use tables.
S Inserting Pictures
The use of pictures in HTML pages is a topic dealt with extensively in the
literature on HTML. The image file formats you can use are GIF and JPG.
S HTML Forms (can only be used on the IT-CP in conjunction with JavaScript)
Forms are required when the user is intended to store information in the system
in a standardized form. HTML provides various structure elements for
interaction with the user. Form functions can also be useful for entering process
data.
S Using Format Templates
The use of format templates allows generally valid formats to be specified and
used in the HTML documents. This procedure is known from publishing
systems such as MS Word or Word Perfect.
Remember that there are various ways of linking format templates with HTML
documents.
S Creating Frames
Using frames, you can divide HTML pages into several areas. This can

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-6 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

significantly increase the clarity. You can, for example, use frames to make sure
that the navigation menu remains visible while new areas are loaded.
Note also the information on the topic ”The number of applet instances in an
HTML page is limited” in Section 4.3.
S Embedding Applets
This is the main topic of this chapter which describes the use of the special S7
applets.
S Using JavaScript
With adequate experience, using JavaScript can extend the function of HTML
pages and the interaction with the user.
Tip:
The Internet itself is a treasure trove for HTML design. You can load HTML pages
in your HTML editor at any time, save them and use them as a template for your
own page design.
You can, for example, call up HTML pages you find particularly attractive in the
HTML editor and then save them. If you do this, all the data of the pages, including
the graphics are saved.
You should, however, remember that some HTML pages are protected by
Copyright. You cannot, naturally, use these pages for your own page design.

The HTML Editor – Examples/Recommendations


The requirements of an HTML editor were outlined in Section 1.2. Suitable HTML
editors are recommended there.

S7 Applets
With the S7 applets, you incorporate process data display and the input of process
data into your HTML page. The S7 applets are described in the following section.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-7
Creating Your Own HTML Pages

4.3 S7 Applets

Meaning
S7 applets are special applets that allow read and write access to an S7 station via
the IT–CP.
The Web browser in which the applet was started is responsible for execution of
the applets. This activates the applet and assigns a frame to it within the current
HTML page according to the parameter settings.
The following example illustrates the situation where all the different S7 applets are
used within one HTML page. You can see that the S7 applets in this case are
embedded in an HTML table.

S7IdentApplet:
Identifies S7
S7StatusApplet: modules
Indicates the status
of S7 modules

S7GetApplet:
Reads process data;
here with graphic
output

S7PutApplet:
Accepts process
input

Figure 4-2

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-8 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

You will also find this HTML page in the Startup package.

The table below contains further information. The chapters that follow describe in
detail how to use and assign parameters for the S7 applets.

Table 4-1

S7 Applet Meaning
S7IdentApplet Identifies S7 modules based on the order number and version.
S7StatusApplet Displays the status of S7 modules
Example: Run/Stop
S7GetApplet Reads process data cyclically, for example memory words or data in a data
block.
The process data
S are addressed symbolically or in absolute form
S can be displayed graphically.
JavaBeans are used for graphic display.
S7PutApplet Enters process data in the HTML pages and transfers/writes them to the
controller, for example memory words or data in a data block.
The process data are addressed in symbolic or absolute form.

The Interaction of the Components


The S7 applets transfer special read or write jobs to the IT-CP from the Web
browser. When requested, the IT-CP passes on the jobs to the relevant module or
CPU.
The S7 applets provide messages about actions and errors on the Java Console
(see Section 4.5). These messages provide you with information about the current
status of program execution.

The number of Applet instances in an HTML page is limited


Remember that the number of applets that can be called in an HTML page is
limited. The possible number depends on the Web browser you are using and your
system environment (for example the operating system). You will find this
maximum number in the documentation of your Web browser.
Increasing complexity with S7 beans:
If you require more complex displays, you should use the options provided by the
S7 beans class library. If you create your own applets, you can access a larger
number of process variables using S7 beans. This will help you to avoid the
restrictions relating to the number of applets.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-9
Creating Your Own HTML Pages

4.3.1 Applet Call and Parameter Assignment

Calling S7 Applets in the HTML page


Like all Java programs, S7 applets have the file name extension ”class”. The
applet call is embedded in the HTML page with a corresponding HTML tag (refer to
the table below). The call to identify an S7 module in an S7 station is, for example,
specified as follows in the applet tag:
<Applet CODE=”de.siemens.simaticnet.itcp.applets.S7IdentApplet.class” ...>
This assignment specifies the name or the address of the file with the applet. The
notation used here indicates a relative address. All the applets are put together to
make a jar file. If the CODEBASE attribute is also used in the call, the applet is
located in the folder specified by CODEBASE.
Example:
The following call identifies an S7 module located in Rack 0 in Slot 3 of an S7
station. The information read is displayed on the HTML page in black script on a
green background.
<APPLET CODE=“de.siemens.simaticnet.itcp.applets.S7IdentApplet.class”
CODEBASE=“/applets/”

ARCHIVE=“s7applets.jar, s7api.jar” NAME=“s7_MLFB” WIDTH=150


HEIGHT=35>

<PARAM name=”RACK” value=0>


<PARAM name=”SLOT” value=3>
<PARAM name=”BACKGROUNDCOLOR” value=”0x00FF00”>
</APPLET>
You will find further examples of applications in the descriptions of the S7 applets
themselves.

General Parameter Assignment


Apart from the names of the S7 applets, you must specify certain general
attributes and parameters. In addition to the general attributes and parameters
required for each S7 applet, there are also function-dependent attributes and
parameters. These are described with the S7 applets themselves.
The following tables show you the HTML tags, the attributes and parameters that
are required with most S7 applets:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-10 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Table 4-2 HTML Tags Used with S7 Applets

HTML Tag and Attribute Meaning


<APPLET...>...</APPLET> This tag embeds an applet in an HTML document.
The applet is specified by attributes and parameters.
Example, see above.
<PARAM name=”...” value=”...”> This tag identifies applet parameters. Each parameter is identified by
a name and each parameter is assigned a value.
Example: <PARAM name=”RACK” value=0>

Table 4-3 General Attributes of the S7 Applets

Attribute Name Type Description


CODE string The attribute identifies the applet to be called.
The following must always be specified:
S Package path = constant
S Applet type = variable
Example:
CODE=“de.siemens.simaticnet.itcp.applets.S7IdentApple
t.class”
CODEBASE string This attribute identifies the path under which the applet
file or the applet archive (see ARCHIVE) is stored.
Example: CODEBASE=“/applets/”
ARCHIVE string This attribute names the applet archive in which the
applet is contained.
Example: ARCHIVE=“s7applets.jar, s7api.jar”
Name string Unique Applet Name
Using this name, displays in the Java Console, for
example, can be identified as belonging to the applet.
Example: NAME=“s7_MLFB”
WIDTH int Width of the display in the HTML page
This specifies the display width in the HTML page. The
value selected must be high enough for the particular
display.
Example: WIDTH=150
HEIGHT int Height of the display in the HTML page.
This specifies the display width in the HTML page. The
value selected must be high enough for the particular
display.
Example: HEIGHT=35

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-11
Creating Your Own HTML Pages

Table 4-4 General Parameters of the S7 Applets

Parameter Name Type Description


BackGroundColor string Background color (24 bits RGB in hexadecimal format)
This parameter controls the color intensity for the RGB
components.
For orientation, a selection of values is shown below:
white: 0xFFFFFF
black: 0x000000
red: 0xFF0000
green: 0x00FF00
blue: 0x0000FF
Note:
You can test the effects of the setting using the input tool
(see Section 4.3.1).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-12 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.3.2 Parameter Assignment Tools

To support you when assigning parameters for the S7 applets, you can use various
parameter assignment tools. These ensure that reliable, syntactically correct
parameters are set for the S7 applets. The following tools are described:
S Input tool with the HTML editor
S Online parameter assignment for testing
The HTML pages available in the Startup package and on the IT-CP also provide a
simple, efficient way to reuse existing call parameters by simply copying and
pasting them.

Input Tool of the HTML Editor


Some HTML editors, such as AOLpress provide input tools for syntactically correct
calls and parameter assignment of Java applets. The following screen shot shows
a dialog box in AOLpress for assigning parameters to applets.

Note: The disadvantage of this input tool is that you still need to type in the
parameter names correctly.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-13
Creating Your Own HTML Pages

Online Parameter Assignment for Testing


With the S7 applets, you can set parameters online. By double-clicking the output
box on the HTML page, it is possible to modify the current parameters of the
already active S7 applet in a dialog box.
Using the EDIT applet parameter you can activate or deactivate online parameter
assignment. If the parameter is not used in the applet call, the default setting is
online parameter assignment deactivated.
Example: By double-clicking the level of a tank in a plant picture, the dialog for
online parameter assignment of the corresponding S7 applet is called.

Figure 4-3

This function is intended primarily for testing. If you want to retain the modified
parameters after the HTML page call, they must be entered in the HTML page
using an HTML editor.
Access rights also apply during online parameter assignment.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-14 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.3.3 S7IdentApplet – Description

Meaning
This is used to identify an S7 module in an S7 station. The applet reads the order
number and the version of the specified S7 module.
Example of a display:

Call Tags
CODE=“de.siemens.simaticnet.itcp.applets.S7IdentApplet.class”
CODEBASE=“/applets/”
ARCHIVE=“s7applets.jar, s7api.jar”

Parameter Assignment
In addition to the general parameters (see Section 4.3.1), the following parameters
for the specific function must have values:

Table 4-5 Parameters Specific to the Applet

Parameter Name Type Description


Slot byte Slot number of the addressed module (1 to 18)
RACK byte Rack number of the addressed module (0 to 7)

Table 4-6 Optional Parameters Specific to the Applet

EDIT bool Online parameter assignment can be activated or deactivated.


Possible settings on = true
off = false
If the parameter in the applet call is not used, the default setting for
online parameter assignment is off (deactivated)!

Access Rights
With the user name used for access, the following access right must be available
(refer to the ”Edit User Entry” dialog in Section 1.4 ):
S “Query the order number of modules”

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-15
Creating Your Own HTML Pages

Parameter Assignment Tools (meaning and application see Section 4.3.2 )


Online parameter assignment is supported for test purposes. To use this option,
double-click the output field to open the parameter assignment dialog.

4.3.4 S7IdentApplet – Example

With the sample shown here, you obtain the identification code of an S7 module in
rack 0, slot 3 and display it in numeric format.
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<APPLET CODE=“de.siemens.simaticnet.itcp.applets.S7IdentApplet.class”
CODEBASE=“/applets/”
ARCHIVE=“s7applets.jar, s7api.jar” NAME=“s7_MLFB” WIDTH=150
HEIGHT=35>
<PARAM name=”RACK” value=0> <PARAM name=”SLOT” value=3>
<PARAM name=”BACKGROUNDCOLOR” value=”0x00FFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Result:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-16 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.3.5 S7StatusApplet – Description

Meaning
This queries the status information of the specified module.
Example of a display:

Data Output / Display


The data output/display is graphic with additional text. The following table provides
more information.

Table 4-7

Display / Color Additional Text Meaning


green Run The user program is running.
yellow Stop The user program has been stopped.
gray Unknown The connection to the CP is
established; waiting for response.
red: Error There is a module error message.
blue Error There is no connection to the
addressed connection.

Access Rights
With the user name used for access, the following access right must be available
(refer to the ”Edit User Entry” dialog in Section 1.4 ):
S “query the status of modules”;

Call Tags
CODE=“de.siemens.simaticnet.itcp.applets.S7StatusApplet.class”
CODEBASE=“/applets/”
ARCHIVE=“s7applets.jar, s7api.jar”

Parameter Assignment
In addition to the general parameters (see Section 4.3.1), the following parameters
for the specific function must have values:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-17
Creating Your Own HTML Pages

Table 4-8 Parameters Specific to the Applet

Parameter Name Type Description


Slot byte Slot number of the addressed module; (1–18)
RACK byte Rack number of the addressed module; (0–7)
CYCLETIME int Cycle time for the read job, specified in milliseconds. >5000
(cycle time) (recommended value)

Table 4-9 Optional Parameters Specific to the Applet

EDIT bool Online parameter assignment can be activated or deactivated.


Possible settings on = true
off = false
If the parameter in the applet call is not used, the default setting for
online parameter assignment is off (deactivated)!

Parameter Assignment Tools (meaning and application see Section 4.3.2 )


Online parameter assignment is supported for test purposes. To use this option,
double-click the output field to open the parameter assignment dialog.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-18 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.3.6 S7StatusApplet – Example

The example shown here displays the status of an S7 module in rack 0, slot 3
graphically.
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7StatusApplet.class”
ARCHIVE=”s7applets.jar, s7api.jar” NAME=”s7_status_3” WIDTH=80
HEIGHT=20>
<PARAM name=”RACK” value=0>
<PARAM name=”SLOT” value=3>
<PARAM name=”CYCLETIME” value=5000>
<PARAM name=”BACKGROUNDCOLOR” value=”0xFFFFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Result:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-19
Creating Your Own HTML Pages

4.3.7 S7GetApplet – Description

Meaning
The applet reads data or data areas cyclically according to the parameter
assignment from the S7 CPU. The S7 CPU must be specified in the relevant
S7ServerApplet. The variables can be identified using symbolic names or by their
addresses.
Using a format string that is explained later, you specify the output form of the
data.
The process values can be displayed either numerically or graphically.
Example of a display (numeric and graphic):

Valve: at level=2700 mm temperature=42_C

How to use graphic display and the JavaBeans is explained in Section 5.

Requirements
The variables can be identified using symbolic names or by their addresses.
Symbolic access is only possible if symbols were configured on the IT-CP. If
symbolic access is used, access rights are checked according to the variable
configuration (see Section 4.4).

Access Rights
With the user name used for access, the following access right must be available
(refer to the ”Edit User Entry” dialog in Section 1.4 ):
S ”Use the symbol table” (with symbolic access)
S ”Read variables using absolute addresses” (with absolute access)

Call Tags
CODE=“de.siemens.simaticnet.itcp.applets.S7GetApplet.class”
CODEBASE=“/applets/”
ARCHIVE=“s7applets.jar, s7api.jar”

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-20 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Parameter Assignment
In addition to the general parameters (see Section 4.3.1), the following parameters
for the specific function must have values:

Table 4-10 Parameters Specific to the Applet

Parameter Name Type Description


Slot byte Slot number of the addressed module (1 to 18)
RACK byte Rack number of the addressed module (0 to 7)
CYCLETIME int Cycle time for the read job, specified in milliseconds.
Range of values: >5000 (recommended)
FORMAT string The character string in the format parameter specifies how the read
variable values will be displayed (example and explanation see
below).

Table 4-11 Optional Applet-Specific Parameters – using JavaBeans

Parameter Name Type Description


DISPLAY string Identifies a JavaBean that can be used for graphic data display.
The currently possible values are as follows (see also Table 5-2,
Page 5-4):
S CLTacho
S CLLevel
S CLThermo
MINVAL int, float MINVAL and MAXVAL specify the range for formatting graphically
displayed variables.
MAXVAL int, float
DIMENSION string Here, you can specify a physical unit.
EDIT bool Online parameter assignment can be activated or deactivated.
Possible settings on = true
off = false
If the parameter in the applet call is not used, the default setting for
online parameter assignment is off (deactivated)!

Table 4-12 Parameters for Addressing Variables in Symbol Form (as an alternative to using
absolute addresses)

Parameter Name Type Description


SYMBOL string Name of the S7 variable symbol
The variable must be created with the STEP 7 symbol editor and
configured for access via the IT-CP (see Section 4.4).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-21
Creating Your Own HTML Pages

Table 4-13 Parameters for Indirect Variable Addressing using the ANY Pointer (as an alternative
to SYMBOL)

Parameter Name Type Description


VARTYPE int This variable type coding in the ANY pointer indicates the data type
(data type) of the variable to be read; possible entries are as follows:
0x02 BYTE bytes (8 bits)
0x03 CHAR characters (8 bits)
0x04 WORD words (16 bits)
0x05 INT integers (16 bits)
0x06 DWORD words (32 bits)
0x07 DINT integers (32 bits)
0x08 REAL real numbers (32 bits)
0x09 DATE date
0x0A TIME_OF_DAY (TOD) time of day
0x0B TIME Time
0x13 STRING Character string
This can be specified in decimal (for example 10) or hexadecimal (for
example 0x0A).
Note:
The following data types are available and can be selected in the
parameter dialog. Transferring these complex data types is, however,
supported only by the S7 beans (see Chapter 5). Based on the S5 or
S7 format description (see STEP 7 online help), these formats can
then be decoded and processed further by the program.
0x0C S5TIME S5TIME data type
0x0E DATE_AND_TIME (DT) Date and time (64 bits)
0x1C COUNTER counter
0x1D TIMER timer
VARCNT int Number of variables to be read;
(repetition factor) With this information, you can specify whether a variable or
contiguous variable area is transferred. STEP 7 identifies arrays and
structures as a number (here using the repetition factor) of data
types.
Example: If 10 words are to be transferred, the value 10 must be
specified for the repetition factor and the value 04 for the data type.
VARAREA int Area coding for identifying the memory area;
(memory area) 0x81 I memory area of inputs
0x82 Q memory area of outputs
0x83 M bit memory area
0x84 DB data block.
This can be specified in decimal (for example 131) or hexadecimal
(for example 0x83).
VARSUBAREA int Subarea coding; for example, by specifying the DB number.
(subarea)
VAROFFSET int Specifies a byte offset.
(byte address) This information can be used to address the variable within the
specified memory area (VARAREA), for example, the memory bit
number.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-22 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Notes on the Address Information VARTYPE...VAROFFSET


To read the data, the IT-CP uses the S7 function SFB14 (GET). To address
variables, the data type ANY pointer must therefore be supplied to transfer
parameters to the SFB.
For further information on SFB14 (GET), refer to the online help in STEP 7 under
the topic ”Format of the ANY Parameter Type”; you will also find a detailed
description of the ANY pointer in /21/.

Range of Values and Using the FORMAT Parameter


The following identifiers can be used in the FORMAT parameter:

Table 4-14 Meaning of the Format Parameter

Identifier Number of Representation


Relevant Bytes
\ 0 \; Indicates that the following character is an ID as listed in this
table.
To display ”\”
the following entry is necessary: ”\\”
Example of a variable of the type integer: \I
S 1 Bit string
Interprets the assigned byte as a string of bits to be
represented individually. Example of output: 01101110
O 1 Octal
H 1 Hexadecimal
B 1 Unsigned byte
C 1 Signed byte
D 4 Unsigned 32
L 4 Signed 32
W 2 Unsigned 16
I 2 Signed 16
F 4 Floating Point
Z 1 Character
X (n, string1, 1 Binary value (n= position 0 to 7, string1 = character string for
string2) value 1; string 2 = character string for value 0).
If you want to use several binary values within a byte for
output, the identifier Y must be used alternately!
Note the following!
Between the opening bracket and the first comma, there must
be no blank, otherwise the entry is not recognized.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-23
Creating Your Own HTML Pages

Table 4-14 Meaning of the Format Parameter, continued

Identifier Number of Representation


Relevant Bytes
Y (n, on, off) 0 Binary value (n= position 0 to 7, string1 = character string for
value 1; string 2 = character string for value 0).
Notes on the function: In contrast to ID X, the position counter
is not incremented. Y is used when several binary values
within a byte are to be output. The ID X is used only for the
output of the last binary value within a byte.
Note the following!
Between the opening bracket and the first comma, there must
be no blank, otherwise the entry is not recognized.
G 1 Increments the position counter by 1 byte without
representation:
This ID is required to skip bytes in the variable string. This is
necessary when empty bytes must be taken into account due
to the data structure (for example words and bytes are defined
alternately).

Interpretation of the Format String


The character string in the format parameter specifies how the read variable values
will be displayed (example see below). It is assumed that variable values are read
in the form of byte strings.
In the representation, the character string in the format string is interpreted starting
from the left and assigned to the variable string. With each value assigned and
output, a position counter is incremented according to the specified ”number of
relevant bytes” in Table 4-14.
Output continues until all the format IDs have been processed. If it is not possible
to assign all bytes, there is no further output. If more format IDs are specified than
can be assigned, output continues until the format IDs have all been processed.

Note
Make sure that the format string exactly matches the bytes in the variable string.

The following schematic illustrates the assignment and output based on an


example of 3 variables.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-24 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

The variables are read as a contiguous string of 6 bytes from the S7-CPU.
Following this, the format assignment assigns the various variable types and the
variables are displayed.
Format string:valve: \X(0, open, closed) tanklevel= \D mm temperature= \B _C
Variable string read (6 bytes):

Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6


1 2700 42

Valve Tanklevel Temperature

Display on the HTML Page


valve:open tanklevel=2700 mm temperature=42_C

An error message (refer to output in the Java Console in Section 4.5) is only
generated when there is an assignment conflict. Example: \D – a double word – is
defined in the format string, the variable read, however, is only 2 bytes long.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-25
Creating Your Own HTML Pages

Parameter Assignment Tools (meaning and application see Section 4.3.2 )


Online parameter assignment is supported for test purposes. To use this option,
double-click the output field to open the parameter assignment dialog.

To enter the address parameters, click


the display field shown on a gray
background.
This opens a further dialog box in which
you can view and modify the current
parameters.

If you want to address the variable(s) indirectly using ANY


pointers, leave the field for the symbolic address empty.
If you enter a symbolic address, you can no longer make entries
in the other input fields. The previously set parameters, however,
are retained and can be activated again by deleting the symbolic
address without having to enter the values again.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-26 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.3.8 S7GetApplet – Examples

The two possible access methods using applet parameter settings are shown
below based on simple examples.

Example 1: Accessing a variable in a data block


The example assumes a binary variable that contains the state of a valve –
open/closed –. This variable is stored with the name “valve” in DB10. DB10
contains the name “heater1” in the symbol table of the CPU.
The variable is displayed as a character string.
Display in the HTML page
Valve: open

To access this variable and to display it on the HTML page, the following applet
parameter settings are required.
a) Access with symbolic addressing of the variable
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<P ALIGN=Center><APPLET
CODE=“de.siemens.simaticnet.itcp.applets.S7GetApplet.class”

CODEBASE=“/applets/” ARCHIVE=“s7applets.jar, s7api.jar” NAME=“valve”


WIDTH=45 HEIGHT=30>

<PARAM name=”RACK” value=0> <PARAM name=”SLOT” value=3>


<PARAM name=”CYCLETIME” value=5000>
<PARAM name=”SYMBOL” value=”heater1.valve”>
<PARAM name=”FORMAT” value=”Valve: \X(0,open,closed)”>
<PARAM name=”BACKGROUNDCOLOR” value=”0xFFFFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
With the “Format” parameter, remember that a variable of the type byte is being
accessed that contains the binary value at position ”0”.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-27
Creating Your Own HTML Pages

This symbolic access is only possible if


the variable is configured in the symbol
table of the CPU and in the Properties dia-
log of the IT-CP (refer also to Page 4-37):

b) Access with indirect addressing of the variable


––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<P ALIGN=Center><APPLET
CODE=“de.siemens.simaticnet.itcp.applets.S7GetApplet.class”

CODEBASE=“/applets/” ARCHIVE=“s7applets.jar, s7api.jar” NAME=“valve”


WIDTH=45 HEIGHT=30>

<PARAM name=”RACK” value=0> <PARAM name=”SLOT” value=3>


<PARAM name=”CYCLETIME” value=5000>
<PARAM name=”VARTYPE” value=2>
<PARAM name=”VARCNT” value =1> This info corresponds to
<PARAM name=”VARAREA” value=0x84> ANY pointer:
<PARAM name=”VARSUBAREA” value=10>
P#DB10.DBX 40.0 BYTE 1
<PARAM name=”VAROFFSET” value=40>
<PARAM name=”FORMAT” value=”valve: \X(0,open,closed)”>
<PARAM name=”BACKGROUNDCOLOR” value=”0xFFFFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-28 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Example 2: Accessing the variable in a bit memory area


In the example, a 16-bit memory word (MW 12) will be read. Access is achieved by
indirect addressing of the variable.

The variable is displayed in graphic


form.

To access this variable and to display it on the HTML page, the following applet
parameter settings are required.
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<P ALIGN=Center><APPLET
CODE=”de.siemens.simaticnet.itcp.applets.S7GetApplet.class”
CODEBASE=”/applets/” ARCHIVE=”s7applets.jar, s7api.jar” NAME=”speed”
WIDTH=45 HEIGHT=30>
<PARAM name=”RACK” value=0> <PARAM name=”SLOT” value=3>
<PARAM name=”CYCLETIME” value=5000>
<PARAM name=”VARTYPE” value=5>
<PARAM name=”VARCNT” value =1> This info corresponds to
<PARAM name=”VARAREA” value=0x83> ANY pointer:
<PARAM name=”VARSUBAREA” value=0> P#MW12 INT 1
<PARAM name=”VAROFFSET” value=12>

<PARAM name=”DISPLAY” value=”CLTACHO”>


<PARAM name=”MINVAL” value=0><PARAM name=”MAXVAL” value=1000>
<PARAM name=”BACKGROUNDCOLOR” value=”0x00FFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
For the graphic display, the
S7 JavaBean CLTACHO is used.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-29
Creating Your Own HTML Pages

4.3.9 S7PutApplet – Description

Meaning
This applet receives variable values entered by the user and transfers them to the
S7-CPU.
According to the parameter settings in a format string, two fields are displayed in
the Web browser in which you select the data area and enter the variable value.
An additional button “Set” is used to trigger the write job.
Example of a display:

Requirements
The variables can be identified using symbolic names or by their addresses.
Symbolic access is only possible if symbols were configured on the IT-CP. If
symbolic access is used, access rights are checked according to the variable
configuration (see Section 4.4).

Access Rights
With the user name used for access, the following access right must be available
(refer to the ”Edit User Entry” dialog in Section 1.4 ):
S ”Use the symbol table” (only with symbolic access)
S ”Write variables using absolute addresses” (only with absolute access)

Call Tags
CODE=“de.siemens.simaticnet.itcp.applets.S7PutApplet.class”
CODEBASE=“/applets/”
ARCHIVE=“s7applets.jar, s7api.jar”

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-30 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Parameter Assignment
In addition to the general parameters (see Section 4.3.1), the following parameters
for the specific function must have values:

Table 4-15 Parameters Specific to the Applet

Parameter Name Type Description


Slot byte Slot number of the addressed module (1 to 18)
RACK byte Rack number of the addressed module (0 to 7)

Table 4-16 Optional Parameters Specific to the Applet

EDIT bool Online parameter assignment can be activated or deactivated.


Possible settings on = true
off = false
If the parameter in the applet call is not used, the default setting for
online parameter assignment is off (deactivated)!

Table 4-17 Parameter for Addressing Data as Symbols

Parameter Name Type Description


SYMBOLNUM int Number of variables that can be entered as symbols
SYMBOLn *) string Name of the S7 variable symbol. The name appears in the list box of
the first text field.
The variable must be created with the STEP 7 symbol editor and be
configured for access via the IT-CP (see Section 4.4).
SYMFORMATn *) string The character string in the format parameter specifies how the
entered variable values will be interpreted.
The assignment of the entry to S7 variables is made according to the
value n (example see below).
*) Key: “n” indicates consecutive numbering of the variables addressed as symbols within a call;

Table 4-18 Parameters for Addressing Data Using Absolute Addresses

Parameter Name Type Description


VARNUM int Number of variables to be written;
VARNAMEn *) string Variable name of a variable addressed indirectly. The name appears
in the display in the list box of the first text field.
Maximum 256 characters

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-31
Creating Your Own HTML Pages

Table 4-18 Parameters for Addressing Data Using Absolute Addresses

Parameter Name Type Description


VARTYPEn *) int Variable type coding in the ANY pointer;
(data type) The variable type coding in the ANY pointer indicates the data type of
the variables to be written; the following entries are possible:
0x02 BYTE bytes (8 bits)
0x03 CHAR characters (8 bits)
0x04 WORD words (16 bits)
0x05 INT integers (16 bits)
0x06 DWORD words (32 bits)
0x07 DINT integers (32 bits)
0x08 REAL real numbers (32 bits)
0x09 DATE date
0x0A TIME_OF_DAY (TOD) time of day
0x0B TIME Time
0x13 STRING Character string
Note:
The following data types are available and can be selected in the
parameter dialog. Transferring these complex data types is, however,
supported only by the S7 beans (see Chapter 5). Based on the S5 or
S7 format description (see STEP 7 online help), these formats can
then be decoded and processed further by the program.
0x0C S5TIME S5TIME data type
0x0E DATE_AND_TIME (DT) Date and time (64 bits)
0x1C COUNTER counter
0x1D TIMER timer
VARAREAn *) int Area coding for identifying the memory area;
(memory area) 0x81 I memory area of inputs
0x82 Q memory area of outputs
0x83 M bit memory area
0x84 DB data block.
This can be specified in decimal (for example 131) or hexadecimal
(for example 0x83).
VARSUBAREAn *) int Subarea coding; for example, by specifying the DB number.
(subarea)
VAROFFSETn *) int Specifies a byte offset.
(byte address) This information can be used to address the variable within the
specified memory area (VARAREA), for example, the memory bit
number.
VARFORMATn *) string The character string in the format parameter specifies how the
entered variable values will be interpreted.
The information is assigned to the S7 variable in the input field
according to the value specified for n (example see Section 4.3.10).
*) Legend: “n” stands for a continuous numbering of the indirectly (via ANY pointer) addressed variables within
a call beginning with “1”.

Range of Values for the FORMAT Parameter


The following identifiers can be used in the FORMAT parameter:

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-32 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Table 4-19 Meaning of the Format Parameter

Identifier Number of Bytes The input string is interpreted as follows


Used
S 1 Bit string
O 1 Octal
H 1 Hexadecimal
B 1 Unsigned byte
C 1 Signed byte
D 4 Unsigned 32
L 4 Signed 32
W 2 Unsigned 16
I 2 Signed 16
Z n Character string
F 4 Floating point 32

Note that in contrast to the S7GetApplet, the ”\” ID is not


required with the S7PutApplet.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-33
Creating Your Own HTML Pages

Parameter Assignment Tools (meaning and application see Section 4.3.2 )


S Online parameter assignment is supported for test purposes. The EDIT
applet parameter must be set to true.
Double-click on the display area (caution! not in the input field for the variable
value!) of the Put applet to open the following dialog box:

To enter the address parameters, click


the display field shown on a gray
background.
This opens a further dialog box in which
you can view and modify the current pa-
rameters.
If you want to address the variable(s) indirectly
using ANY pointers, leave the field for the symbolic
address empty.
If you enter a symbolic address, you can no longer
make entries in the other input fields. The pre-
viously set parameters, however, are retained and
can be activated again by deleting the symbolic
address without having to enter the values again.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-34 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.3.10 S7PutApplet – Examples

Example 1: Entering a variable


To enter a variable that will be used, for example for a setpoint, the following applet
parameter assignment is necessary:
a) when addressing the variable as a symbol
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7PutApplet.class”
CODEBASE=”/applets/”
ARCHIVE=”s7applets.jar, s7api.jar” NAME=”s7_client0” WIDTH=400
HEIGHT=40>
<PARAM name=”RACK” value=0>
<PARAM name=”SLOT” value=3>
<PARAM name=”SYMBOLNUM” value=”1”>
<PARAM name=”SYMBOL1” value=”Desired_value_tank1”>
<PARAM name=”SYMFORMAT1” value=”I”>
<PARAM name=”BACKGROUNDCOLOR” value=”0x00FFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
b) S7 applet with indirect access:
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<APPLET CODE=“”de.siemens.simaticnet.itcp.applets.S7PutApplet.class”
CODEBASE=“/applets/”
ARCHIVE=“s7applets.jar, s7api.jar” NAME=“s7_client0” WIDTH=400
HEIGHT=40>
<PARAM name=”RACK” value=0>
<PARAM name=”SLOT” value=3>
<PARAM name=”VARNUM” value=”1”>
<PARAM name=”VARNAME1” value=“Desired value tank1”>
<PARAM name=”VARTYPE1” value=2>
<PARAM name=”VARAREA1” value=0x84> This info corresponds to
<PARAM name=”VARSUBAREA1” value=0x10> ANY pointer:
<PARAM name=”VAROFFSET1” value=40>
P#DB10.DBX 40.0 BYTE 1
<PARAM name=”VARFORMAT1” value=”B”>
<PARAM name=”BACKGROUNDCOLOR” value=”0x00FFFF”>
<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-35
Creating Your Own HTML Pages

Example 2: Entering several variables


With an S7PutApplet, you can enter more than one variable. It is also possible to
mix the type of addressing (symbolic or indirect).
In the following example, three variables are addressed using symbolic addressing
and one variable using indirect addressing.
If you enter several variables with mixed address types, the parameter settings for
an applet might appear as follows:
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<APPLET CODE=“de.siemens.simaticnet.itcp.applets.S7PutApplet.class”
CODEBASE=“/applets/”

ARCHIVE=“s7applets.jar, s7api.jar” NAME=“s7_client0” WIDTH=400


HEIGHT=40>

<PARAM name=”RACK” value=0>


<PARAM name=”SLOT” value=3>

<PARAM name=”SYMBOLNUM” value=”3”>


<PARAM name=”SYMBOL1” value=”Desired_value_tank1”>
Three
<PARAM name=”SYMFORMAT1” value=”I”>
variables
<PARAM name=”SYMBOL2” value=”Desired_value_tank2”>
using
symbolic <PARAM name=”SYMFORMAT2” value=”I”>
addresses <PARAM name=”SYMBOL3” value=”Upper_limit_value”>
<PARAM name=”SYMFORMAT3” value=”I”>

<PARAM name=”VARNUM” value=”1”>


<PARAM name=”VARNAME1” value=“Desired_value_tank3”>
One variable
<PARAM name=”VARTYPE1” value=2>
using indirect
<PARAM name=”VARAREA1” value=0x83>
addressing
<PARAM name=”VARSUBAREA1” value=0x00>
<PARAM name=”VAROFFSET1” value=40>
<PARAM name=”VARFORMAT1” value=”B”>

<PARAM name=”BACKGROUNDCOLOR” value=”0x00FFFF”>


<PARAM name=”EDIT” value=”true”>
</APPLET>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-36 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.4 Configuring Variables for Access Using Symbols

The Use of Symbols Avoids Configuration Errors


The S7 applets S7GetApplet and S7PutApplet allow convenient access to
variables using symbolic names familiar from LAD/FBD/STL programming with the
symbol table. This saves you time and headache trying to work with absolute
addresses.
The following example shows how a name is assigned to data block DB100 in the
symbol table.

Figure 4-4

Symbols for HTML Pages


To access variables on the S7 CPU with Java applets using a Web browser, you
must inform the IT-CP of the names, addresses, and access rights of the variables.
There are tabs for these settings in the Properties dialog of the IT-CP.
The symbols that you specify here in the configuration must first be declared in the
symbol table with the STEP 7 symbols editor. Following this, the assignments of
the symbols to the variables have been established. With the configuration
described here, you select the symbols you want to be able to access with the
Web browser.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-37
Creating Your Own HTML Pages

Procedure
Open the Properties dialog of your IT-CP in STEP 7 HW Config.

Figure 4-5

Enter the symbols of the variables or structure elements you want to be able to
access with the Web browser. You can obtain detailed help on the dialogs at any
time with the online help.
Examples (see also syntax rules for symbols in the online help)
S Simple variables:
tank
temperature
S Structure elements
tank.pressure1
tank.temperature
You must first enter the symbols in the symbol table using the symbols editor of
STEP 7! Your entries will only be accepted if they match the entry in the symbol
table.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-38 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

Assigning Access Rights


It is possible to assign access rights to the variables declared as symbols and
these rights will be checked when the symbol is accessed. To set access rights,
select the ”Edit...” button.
Note: Access restrictions set here cannot be overridden by the EDIT applet
parameter.

Figure 4-6

Printing the List of Variables


Along with the parameters of the IT-CP module, you can print out a list of variables
in HW Config.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-39
Creating Your Own HTML Pages

4.5 Testing and Using HTML Pages

Test: Java Console


With the Web browser, you can follow and log the running of Java applets in a
Java Console.
The S7 applets used in your HTML pages display messages in the Java Console.
These messages provide you with information about unexpected reactions in the
display of your HTML pages.

Download: FTP for Transferring HTML Pages


Using FTP functions (see Section 3 ), you can download the HTML pages to the
IT-CP and organize the files on the IT-CP to suit your requirements.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-40 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

4.6 JavaScript Linking to the S7Applets


You can also access the values of the S7Applets with a JavaScript thanks to
special methods integrated in the S7Applets. These methods are listed below:

Table 4-20

S7Applet Method Return / Transfer Type


S7GetApplet getValue ( ) java.lang.Object
S7PutApplet setValue (param) java.lang.Object
S7StatusApplet getState ( ) java.lang.String
S7IdentApplet getIdent ( ) java.lang.String

In the next four chapters, you will find the Web pages in HTML code in which the
access to the S7Applets using JavaScript is illustrated in simple examples.
In these examples, the Event Handler onClick is used with which destination links
can be defined in forms. The Event Handler is then activated when the user clicks
on a form field in the HTML page.
The following HTML pages are included in the file system of the IT–CP in
Examples...

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-41
Creating Your Own HTML Pages

4.6.1 S7GetApplet

HTML example for accessing values supplied by an S7GetApplet.


This page displays the value of the S7GetApplets via JavaScript as follows:

The parameters of the Applet are set so that it is not directly visible (WIDTH=”0”
HEIGHT=”0”); it is simply referenced by the JavaScript function “onClick...”.
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<HTML>
<HEAD>
<TITLE>S7GetApplet and JavaScript</TITLE>
</HEAD>
<BODY BGCOLOR=”#FFFFFF”>
<CENTER>
<H1>Accessing S7GetApplet by JavaScript</H1>
<P>
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7GetApplet.class”
CODEBASE=”/applets/”
ARCHIVE=”s7applets.jar, s7api.jar” WIDTH=”0” HEIGHT=”0” NAME=”Get”>
<PARAM name=”RACK” value= 0>
<PARAM name=”SLOT” value= 3>
<PARAM name=”CYCLETIME” value= 4000>
<PARAM name=”BACKGROUNDCOLOR” value=0x00FFFF>
<PARAM name=”VARTYPE” value=8>
<PARAM name=”VARCNT” value=1>

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-42 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

<PARAM name=”VARAREA” value=131>


<PARAM name=”VARSUBAREA” value=0>
<PARAM name=”VAROFFSET” value=0>
<PARAM name=”FORMAT” value=”\F”>
</APPLET>
<FORM NAME=”form1”>
<INPUT TYPE=”text” SIZE=”20” NAME=”str”>
<INPUT TYPE=”button” VALUE=”Get value”
onClick=”document.form1.str.value = document.Get.getValue()”>
</FORM>
</CENTER>
</BODY>
</HTML>

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

Note
Please note that the value you obtain with mit getValue() from the S7GetApplet is
the value known to the S7GetApplet at this point in time. The value is not read
directly from the PLC!

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-43
Creating Your Own HTML Pages

4.6.2 S7PutApplet

HTML example for writing a value by JavaScript using the S7PutApplets. The
example also contains an S7GetApplet so that you can verify the written value.

The value set with the S7PutApplet can be displayed with the S7GetApplet.
The parameters of the Applets are set so that they are not directly visible
(WIDTH=”0” HEIGHT=”0”); they are simply referenced by the JavaScript function
“onClick...”.
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<HTML>
<HEAD>
<TITLE>S7PutApplet and JavaScript</TITLE>
</HEAD>
<BODY BGCOLOR=”#FFFFFF”>
<CENTER>
<H1>Accessing S7PutApplet by JavaScript</H1>
<P>
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7GetApplet.class”
CODEBASE=”/applets/”
ARCHIVE=”s7applets.jar, s7api.jar” WIDTH=”0” HEIGHT=”0” NAME=”Get”>
<PARAM name=”RACK” value= 0>
<PARAM name=”SLOT” value= 3>
<PARAM name=”CYCLETIME” value= 10000>
<PARAM name=”BACKGROUNDCOLOR” value=0x00FFFF>

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-44 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

<PARAM name=”VARTYPE” value=4>


<PARAM name=”VARCNT” value=1>
<PARAM name=”VARAREA” value=131>
<PARAM name=”VARSUBAREA” value=0>
<PARAM name=”VAROFFSET” value=100>
<PARAM name=”FORMAT” value=”MW100 = \H\H ”>
</APPLET>
<P>
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7PutApplet.class”
CODEBASE=”/applets/”
ARCHIVE=”s7applets.jar, s7api.jar” WIDTH=”0” HEIGHT=”0” NAME=”Put”>
<PARAM name=”RACK” value= 0>
<PARAM name=”SLOT” value= 3>
<PARAM name=”BACKGROUNDCOLOR” value=0x00FFFF>
<PARAM name=”VARNUM” value=”1”>
<PARAM name=”VARNAME1” value=”MW100”>
<PARAM name=”VARTYPE1” value=”4”>
<PARAM name=”VARAREA1” value=”131”>
<PARAM name=”VARSUBAREA1” value=”0”>
<PARAM name=”VAROFFSET1” value=”100”>
<PARAM name=”VARFORMAT1” value=”W”>
</APPLET>
<FORM NAME=”form1”>
<INPUT TYPE=”text” SIZE=”20” NAME=”inp”>
<INPUT TYPE=”button” VALUE=”Put value”
onClick=”document.Put.setValue(document.form1.inp.value)”> <BR>
<INPUT TYPE=”text” SIZE=”20” NAME=”out”>
<INPUT TYPE=”button” VALUE=”Get value”
onClick=”document.form1.out.value = document.Get.getValue()”>
</FORM>
</CENTER>
</BODY>
</HTML>

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-45
Creating Your Own HTML Pages

Note
Please note that the value you obtain with mit getValue() from the S7GetApplet is
the value known to the S7GetApplet at this point in time. The value is not read
directly from the PLC!
The value you transfer with the S7PutApplet using setValue() is passed on
immediately to the underlying S7BeansAPI for transfer to the PLC.
S7GetApplet and S7PutApplet are two programs that exist separately and do not
communicate immediately with each other. This means that a value you wrote to
the PLC with the S7PutApplet does not need to be known to the S7GetApplet
directly.

4.6.3 S7StatusApplet

HTML example for access to the status of an S7 module.


The S7StatusApplet queries the status of the specified S7 module and displays it.

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<CENTER>
<H1>Accessing S7StatusApplet by JavaScript</H1>
<P>
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7StatusApplet.class”
CODEBASE=”/applets/”
ARCHIVE=”s7applets.jar, s7api.jar” WIDTH=”68” HEIGHT=”40” NAME=”State”>

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-46 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

<PARAM name=”RACK” value= 0>


<PARAM name=”SLOT” value= 3>
<PARAM name=”CYCLETIME” value= 5000>
<PARAM name=”BACKGROUNDCOLOR” value=0x00FFFF>
<PARAM name=”EDIT” value=”true”>
</APPLET>
<P>
<FORM NAME=”form1”>
<INPUT TYPE=”text” SIZE=”20” NAME=”str”>
<INPUT TYPE=”button” VALUE=”Get status”
onClick=”document.form1.str.value = document.State.getState()”>
</FORM>
</CENTER>
</BODY>
</HTML>
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

Note
Please note that the status you obtain with mit getState() from S7StatusApplet is
the status known to the S7StatusApplet at this point in time. The value is not read
directly from the S7 module!
Remember also that not all S7 modules have the same status repertoire. The CP
443–1, for example, distinguishes between several causes of STOP (for example,
STOP switch, internal STOP) while the CPU 416–1 outputs internal STOP in both
cases (since it does not distinguish the STOP switch).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-47
Creating Your Own HTML Pages

4.6.4 S7IdentApplet

HTML example for querying the order (MLFB) number of an S7 module.


The S7IdentApplet reads the order number (MLFB) of the specified S7 module and
displays it.

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
<HTML>
<HEAD>
<TITLE>S7IdentApplet and JavaScript</TITLE>
</HEAD>
<BODY BGCOLOR=”#FFFFFF”>

<CENTER>
<H1>Accessing S7IdentApplet by JavaScript</H1>

<P>
<APPLET CODE=”de.siemens.simaticnet.itcp.applets.S7IdentApplet.class”
CODEBASE=”/applets/”
ARCHIVE=”s7applets.jar, s7api.jar” WIDTH=”174” HEIGHT=”34” NAME=”Ident”>
<PARAM name=”RACK” value= 0>
<PARAM name=”SLOT” value= 3>
<PARAM name=”BACKGROUNDCOLOR” value=0x00FFFF>
<PARAM name=”EDIT” value=”true”>
</APPLET>
<P>

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-48 C79000-G8976-C120 - 03
Creating Your Own HTML Pages

<FORM NAME=”form1”>
<INPUT TYPE=”text” SIZE=”20” NAME=”str”>
<INPUT TYPE=”button” VALUE=”Get identification”
onClick=”document.form1.str.value = document.Ident.getIdent()”>
</FORM>
</CENTER>
</BODY>
</HTML>

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 4-49
Creating Your Own HTML Pages

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


4-50 C79000-G8976-C120 - 03
Graphic Display with JavaBeans 5
In many situations, you will probably prefer to see a graphic visualization of the
process values rather than a simple display of the numbers. In the plant pictures
on operator control and monitoring systems, such display forms, for example level
displays or temperature scales are normal.

Figure 5-1

The JavaBeans concept in Java allows objects (Java components) to be created


and linked simply to executable programs. JavaBeans also allow extremely flexible
options for accessing process data on a SIMATIC S7 CPU.
As the IT-CP user, you have an S7 beans class library (S7BeansAPI) available for
Java programming. The object classes contained in this S7 beans class library
can be used for object-oriented access to a variety of information on the SIMATIC
S7 and can be used for graphic display of process variables.
You will find further information in the following sources:
S Additional beans for visualization are described in Appendix B.
S Additional programming instructions /4/ that you can download from the Internet
explain how to access the methods of the S7 beans and S7 applets and points
to remember when you develop your own JavaBeans that will communicate
with the S7BeansAPI.
This description is intended only for users with experience of Java and working
with JavaBeans!

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 5-1
Graphic Display with JavaBeans

5.1 JavaBeans Concept and Possible Applications

Standard Application: You can use S7 beans along with the S7GetApplet
Simply by using the “S7GetApplet” of the IT-CP, you can use a range of graphic
elements from the S7 beans class library for display on your HTML page using the
DISPLAY parameter (refer to the DISPLAY parameter in Section 4.3.7). The S7
beans to be used are marked in Table 5-2 in the following section.

Extended Applications: Configure S7 beans using “Builder Tools”


To be able to use the full range of S7 beans in the S7 bean class library, use
builder tools in your Java programming environment.
With these builder tools you can create an object-oriented configuration for your
application. In simplified form, this essentially involves the following steps:
S Select the required S7 beans
S Link the S7 beans together to specify the data flow
S Specify the parameter settings for the S7 beans
Using this technique, you can configure and program complex process displays in
your IDE with little effort.
For the experienced Java user, this provides almost unlimited options for further
processing of the data acquired by the IT-CP, for example, in databases or
management information systems.
For more information, you should also read the JavaDoc for the S7BeansAPI
supplied on the Startup CD–ROM.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


5-2 C79000-G8976-C120 - 03
Graphic Display with JavaBeans

5.2 The S7 Beans Class Library (S7BeansAPI)

Application: Startup CD
The S7 beans class library is on the startup CD. This also includes an extensive
tutorial that will familiarize you with the use of S7 beans step-by-step.
This also includes information about possible tools such as the BeanBox from SUN
Microsystems and VisualAGE from IBM.

The Available S7 Beans


The following tables provide you with an overview of the S7 beans supplied at the
current time. Based on this table, you will get an impression of the configuration
options provided by these S7 beans.
A distinction must be made between the following:
S S7 Beans for Devices
These JavaBeans in the S7BeansAPI are provided for the modules and
software objects that can be addressed the SIMATIC S7 rack. These provide
the link in the program to the S7 beans for input and output (S7 beans for the
client).
How to use the interface to these S7 beans is described in greater detail in the
interface description in /4/.
S S7 Beans for the Client
These Java beans are available in the S7BeansAPI for graphic output of
process data in process pictures on the client
S S7 Utility Beans for the Client
Utility beans are available for additional preparation of data. Since these are
simply conversion functions, there is no direct graphic display by these beans.
These S7 beans are in the JAR file s7util.jar.

Table 5-1 S7 Beans for Devices / Objects Package = API (included in the JAR file s7api.jar)

S7 Bean Function
S7CP This bean represents the IT–CP serving as the host. Any other IT–CPs that exist
must be addressed using S7Device.
This bean must be used with each applet for addressing and for saving the host
address.
S7 Device S7Device represents any intelligent S7 module such as a CPU, PROFIBUS CP,
Ethernet CP, other IT–CPs (however, under no circumstances the IT–CP serving as
host for the applets, to be addressed using the browser!)

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 5-3
Graphic Display with JavaBeans

Table 5-1 S7 Beans for Devices, Fortsetzung/ Objects Package = API (included in the JAR file s7api.jar)

S7 Bean Function
S7 Variable This bean represents variables in the S7 CPU.
CLTimer CLTimer is required for cyclic calling of methods of other beans.
Whenever you want to monitor the status of an S7 module or a process variable
continuously (cyclically), you require this bean.
Note: CLTimer has no graphic representation

Table 5-2 S7 Beans for the Client – Package = GUI (included in the JAR file s7gui.jar)

S7 Bean Function Can be used Representation


in
S7GetApplet
CLTextIn CLTextIn is a bean for entering text. no – Input Field –
This text can be passed on to the S7
variable bean.
CLTextOut CLTextOut is a bean for the textual no
output of values of process variables
of the S7 variable bean

CLIdentOut CLIdentOut is a bean required for the no


textual display of an identification
number of an IT-CP or module using
the S7 CP bean or s7 device bean.
Note:
Not all modules support this service.
CLStateLED CLStateLED is a bean for graphic no
representation of the status of an
IT-CP or a module.
This is represented by the color of
the LED:
S green: RUN
S yellow: STOP
S red: Error message from the
module
S blue: Connection error
S gray: Status unknown
Note:
Not all modules support this service.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


5-4 C79000-G8976-C120 - 03
Graphic Display with JavaBeans

Table 5-2 S7 Beans for the Client, Fortsetzung – Package = GUI (included in the JAR file s7gui.jar)

S7 Bean Function Can be used Representation


in
S7GetApplet
CLState3LED CLState3LED is a bean for graphic no
representation of the status of an
IT-CP or a module.
The representation is in the form of
three LEDs:
S green: RUN
S yellow: STOP
S red: Error message from the
module
S blue: Connection error
S gray: Status unknown
Note:
Only intelligent modules support this
service; I/O modules, for example,
do not.
CLTacho CLTacho is a bean for graphic yes
representation of a pointer
instrument.
The pointer represents the value of a
process variable.
It is also possible to visualize a value
reaching an upper or lower limit
value with an LED display.
The size of the bean is scalable.
CLLevel CLLevel is a bean for graphic yes
representation of the level of a
process variable.
It is also possible to visualize a value
reaching an upper or lower limit
value with an LED display.
The size of the bean is scalable.
CLThermo CLThermo is a bean for graphic yes
representation of a process variable
as a temperature value.
It is also possible to visualize a value
reaching an upper or lower limit
value with an LED display.
The size of the bean is scalable.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 5-5
Graphic Display with JavaBeans

Table 5-2 S7 Beans for the Client, Fortsetzung – Package = GUI (included in the JAR file s7gui.jar)

S7 Bean Function Can be used Representation


in
S7GetApplet
CLPipe CLPipe is a bean for graphic display no
or a horizontal or vertical pipe.
The color of the pipe changes with a
Boolean value.
The size of the bean is scalable.
CLValve CLValve is a bean for graphic no
representation of a valve The valve
with its inlet can be displayed
horizontally or vertically.
The valve is opened and closed by
setting a Boolean value.

Table 5-3 S7 Utility Beans Package = UTIL (included in the JAR file s7util.jar)

S7 Utility Bean Function


COUNTER Supplies the counter reading (for example, C1) as a string in the
format C#347.
TIMER Supplies the value of timers (for example, T1) as a string in the
format
S5T#1h3m2s.
DATE Supplies the S7 type DATE as a string in the format D#2000–12–31.
TIME Supplies the S7 type TIME as a string in the format T#9h6m6s.
DATEandTIME Supplies the S7 type DATE_AND_TIME as a string in the format
DT#00–12–31–12:31:47.487.
TIMEofDAY Supplies the S7 type Time Of Day as a string in the format
TOD#9:6:6.127.
S5TIME Supplies the S7 type S5TIME as a string in the format S5T#1h3m2s.
ConvertNumberSystem Supplies a decimal number in either hexadecimal, octal, or binary
format (as a string).
Decimal numbers can also be converted to BCD numbers and vice
versa.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


5-6 C79000-G8976-C120 - 03
IT–CP as FTP Client – Sample Program A
This sample program shows you a typical sequence of FCs for the FTP services in
the FTP client mode of the IT–CP. The following FCs are used:
S FTP_CONNECT (FC40)
S FTP_RETRIEVE (FC42)
S FTP_QUIT (FC44)
You can also download this sample to the file system of your IT–CP. The sample is
located in the /examples folder.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 A-1
IT–CP as FTP Client – Sample Program

// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// S7–400 DEMO PROGRAM FOR ONE FTP CLIENT CONNECTION
//
// This program performs the following actions in an endless loop as long as
// no error occurs:
// FTP_CONNECT (FC40)
// FTP_RETRIEVE (FC42)
// FTP_QUIT (FC44)
//
// The code is located in FC199. It is called in OB31.
// To use this simple demo successfully, follow the steps below:
//
// 1.) Use STEP 7 V5.1.1.x and create an S7–400 project with at least 1 CPU
// and 1 IT–CP (6GK7 443–1GX11–0XE0)
//
// 2.) Create an FTP client connection by opening NetPro and creating an
// unspecified TCP connection and checking the option ’Use FTP protocol’.
// Enter the ID of this connection at the beginning of FC199. See also
// comment: ”user modification (1)”
//
// 3.) Obtain the LADDR of your IT–CP and enter this value at the beginning of
// FC199. See comment: ”user modification (2)”
//
// 4.) Some modification is required in DB40. This DB defines the login
// properties for the FTP server and the file that will be retrieved
// in this example.
//
// 5.) Run an FTP server on a network that can be reached by your IT–CP.
// Create a small file (a few hundred bytes) with the name you specified
// in DB40. Place it in the root of the user you also specified in DB40.
//
// 6.) Copy UDT1 and the FCs FC40 – FC44 from the SIMATIC_NET_CP library and
// insert them in your project. Compile this source, download
// FC40 – FC44 and all the objects created from this source to the CPU.
// These objects are: DB9, DB40, DB42, FC199, OB31.
// The compiler should not report any errors or warnings.
// Set MW400 to 0 to start the sequence.
//
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

DATA_BLOCK DB40
FAMILY : S7400
NAME : FTP_DATA
STRUCT
ip_addr : STRING [100 ]; // Do not change the lengths
user : STRING [32 ]; // of the following items.
password : STRING [32 ]; //
file_name: STRING [220 ]; //
END_STRUCT ;
BEGIN
ip_addr := ’142.11.41.50’; // IP address, user and password of the
user := ’eric’; // FTP server that will be used in this
password := ’clapton’; // example. Modify the items to match
file_name := ’testfile.dat’; // your environment.
END_DATA_BLOCK

// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

DATA_BLOCK DB42
FAMILY : S7400
NAME : FTP_FILE
STRUCT
hdr :UDT 1;
filedata : ARRAY [0 .. 999 ] OF BYTE ;
END_STRUCT ;
BEGIN
hdr.exist := FALSE; // is set after the first FTP_RETRIEVE
hdr.locked := FALSE; // temp. is set and reset by FTP_RETRIEVE
hdr.new := FALSE; // is set after every FTP_RETRIEVE. Manual reset is necessary.
hdr.writeaccess:= FALSE; // write access: FALSE––>for FTP client on IT–CP, TRUE––>for server on IT–CP
hdr.act_length := L#0; // is set by FTP_RETRIEVE
hdr.max_length := L#1000; // initial value; change only if size of array ”filedata” is changed.
END_DATA_BLOCK

// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


A-2 C79000-G8976-C120 - 03
IT–CP as FTP Client – Sample Program

DATA_BLOCK DB9
FAMILY : S7400
NAME : FTP_BUFFER
STRUCT
b : ARRAY [0 .. 255 ] OF BYTE ;
END_STRUCT ;
BEGIN
END_DATA_BLOCK

// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

FUNCTION FC199: VOID


FAMILY : S7400
NAME : FTPCdemo
BEGIN
NETWORK
//To start, set MW400 to 0 in OB100
SET ;
// ––––––––––––––––––––––––––––––––––––––––––– user modification (1) ––––––––––
L 10; // Load connection ID of the FTP connection and store it
T MW402; // in MW402 for use in the FTP function calls
// ––––––––––––––––––––––––––––––––––––––––––– user modification (2) ––––––––––
L 520; // Load LADDR of your IT–CP and store it
T MW404; // in MW404 for use in the FTP function calls
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
S M 410.0; // ACT:=1 for FTP_CONNECT, FTP_RETRIEVE and FTP_QUIT.
S M 420.0; // Never call the FTP_xxx funtions with ACT:=0,
S M 430.0; // this will cause an error with STATUS 0x8F70 !
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
L MW 400; // This is a simple state machine so that commands
L 0; // are executed in the right order.
==I; //
JC con1; // Initiate or poll FTP_CONNECT
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
L MW 400; //
L 1; //
==I; //
JC ret1; // Initiate or poll FTP_RETRIEVE
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
L MW 400; //
L 2; //
==I; //
JC quit; // Initiate or poll FTP_QUIT
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
JU end; // Not a legal value for MW400, so do nothing.
// By setting MW400 to 0, the command sequence will start again
// and connect to the specified FTP server
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
con1: CALL ”FTP_CONNECT” (
ACT := M 410.0,
ID := MW402,
LADDR := MW404,
LOGIN := P#DB40.DBX 0.0 BYTE 170,
BUFFER_DB_NR := 9,
DONE := M 410.1,
ERROR := M 410.2,
STATUS := MW 412 );
// ––––––––––––––––––––––– if ( error == 1 ) ––––––––––––––––––––––––––––––––––
SET; // { Run a simple error routine. (An extended error routine
A M 410.2; // could repeat the connect command if the error code is
JC err1; // 0x8F61 : FTP server is off; 0x8F6A : temporary no resource on IT–CP) }
// ––––––––––––––––––––––– if ( done == 0 ) –––––––––––––––––––––––––––––––––––
SET; // {
AN M 410.1; // Poll again next cycle
JC end; // }
// ––––––––––––––––––––––– else –––––––––––––––––––––––––––––––––––––––––––––––
L 1; // { Set MW400 so that the program activates the RETRIEVE command
T MW400; // in the next cycle. This allows an FTP_RETRIEVE command on this DB.
R db42.hdr.new;// }
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
ret1: CALL ”FTP_RETRIEVE” (
ACT := M 420.0,
ID := MW402,
LADDR := MW404,

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 A-3
IT–CP as FTP Client – Sample Program

FILE_NAME := P#DB40.DBX 170.0 BYTE 222,


BUFFER_DB_NR := 9,
FILE_DB_NR := 42,
DONE := M 420.1,
ERROR := M 420.2,
STATUS := MW 422 );
// ––––––––––––––––––––––– if ( error == 1 ) ––––––––––––––––––––––––––––––––––
SET; // {
A M 420.2; // Run a simple error routine
JC err1; // }
// ––––––––––––––––––––––– if ( done == 0 ) –––––––––––––––––––––––––––––––––––
SET; // {
AN M 420.1; // Poll again next cycle
JC end; // }
// ––––––––––––––––––––––– else –––––––––––––––––––––––––––––––––––––––––––––––
L 2; // { Set MW400 so that the program activates
T MW400; // the FTP_QUIT command in the next cycle }
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
quit: CALL ”FTP_QUIT” (
ACT := M 430.0,
ID := MW402,
LADDR := MW404,
DONE := M 430.1,
ERROR := M 430.2,
STATUS := MW 432 );
// ––––––––––––––––––––––– if ( error == 1 ) ––––––––––––––––––––––––––––––––––
SET; // {
A M 430.2; // Run a simple error routine
JC err1; // }
// ––––––––––––––––––––––– if ( done == 0 ) –––––––––––––––––––––––––––––––––––
SET; // {
AN M 430.1; // Poll again next cycle
JC end; // }
// ––––––––––––––––––––––– else –––––––––––––––––––––––––––––––––––––––––––––––
L 0; // { Set MW400 so that the program activates
T MW400; // the FTP_CONNECT command in the next cycle
JU end; // }
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
err1: L 255; // This is the error exit for FC199. MW400 is set to 255.
T MW 400; // After this, the state machine will not execute any more
// FTP_xxx calls. Setting MW400 to 0 starts the sequence again.
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
end: BEU;
END_FUNCTION
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– OB 31 ––––––––––
ORGANIZATION_BLOCK OB 31
TITLE = FTP–C–TRIGGER
VAR_TEMP
OB31_EV_CLASS : BYTE; // Bits 0–3 = 1 (event entering state), bits 4–7 = 1 (event class 1)
OB31_STRT_INF : BYTE; //
OB31_PRIORITY : BYTE; // 7 (priority of 1 is lowest)
OB31_OB_NUMBR : BYTE; // 31 (organization block 31, OB31)
OB31_RESERVED_1 : BYTE; // Reserved for system
OB31_RESERVED_2 : BYTE; // Reserved for system
OB31_PHASE_OFFSET : WORD; // Phase offset (msec)
OB31_RESERVED_3 : INT ; // Reserved for system
OB31_EXC_FREQ : INT ; // Frequency of execution (msec)
OB31_DATE_TIME : DATE_AND_TIME ; // Date and time OB31 started
END_VAR
BEGIN
NETWORK
call FC199;
END_ORGANIZATION_BLOCK
// ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


A-4 C79000-G8976-C120 - 03
Additional Beans for Visualization B
There are further supplementary beans available that you can use for graphic
display.
The S7 beans class library is on the startup CD. This also includes an extensive
tutorial that will familiarize you with the use of S7 beans step-by-step.
The library name of the beans described here is: S7Misc.jar
If the additional beans described here are not yet on your Startup CD, you can
download them from the Internet.

Note
The properties to be configured for the in the Property editor for the components
described here (see table below) all have German names. You will find the
meaning in English in brackets beside the name.

Table B-1 The following additional beans are available:

Name Class Name Described


in
Geometric Rechteck (rectangle) Rectangle.class B.1.1
Components
Rundrechteck (rounded rectangle) RoundedRectangle.class B.1.2
Kreis (circle) Circle.class B.1.3
Kreissegment (circular segment) CircularSegment.class B.1.4
Kreisbogen (circular arc) CircularArc.class B.1.5
Ellipse (ellipse arc) EllipseArc.class B.1.6
Ellipsensegment (ellipse segment) EllipseSegment.class B.1.7
Ellipsenbogen (ellipse arc) EllipseArc.class B.1.8
Linien (lines) Line.class B.1.9
Polygon (polygon) Polygon.class B.1.10
Polygonzug (polyline) Polyline.class B.1.11

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-1
Additional Beans for Visualization

Table B-1 The following additional beans are available:, continued

Name Class Name Described


in
Logical Berechnung (calculation) ExpressionEvaluator.class B.2.1
Components
Logik (logic) Logic.Evaluator.class B.2.2
Konstante (constant) Constant.class B.2.3
Display Ein–/Ausgabefeld (input/output field) InOutField.class B.3.1
Components
Laufschrift (ticker text) TickerText.class B.3.2
Bildtabelle (image map) ImageMap.class B.3.3
Note:
The name of the bean is the name that will be displayed in the IDE, for example “Rechteck”. The class name
is the file name.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-2 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.1 Geometric Components


You can use the geometric components to draw and dynamize simple figures.

B.1.1 Rechteck (rectangle)

The Rechteck component draws a rectangle with the selected properties.

Properties of Rechteck
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-2

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-3
Additional Beans for Visualization

B.1.2 Rundrechteck (rounded rectangle)

The Rundrechteck component draws a rounded rectangle with the selected


properties.

Properties of Rundrechteck
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-3

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors
Eckradius X (corner radius X) >= 0, <= 360

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-4 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.1.3 Kreis (circle)

The Kreis component draws a circle with the selected properties.

Properties of Kreis
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-4

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-5
Additional Beans for Visualization

B.1.4 Kreissegment (circular segment)

The Kreissegment component draws a circular segment with the selected


properties.

Properties of Kreisegment
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-5

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors
Startwinkel (start angle)2) Integers
Endwinkel (end angle) 2) Integers
Segmentgrenzen (segment limits) unsichtbar/sichtbar (invisible/visible)

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).
2) Note on the start/end angle:
The angles are specified in degrees. The 0 degree angle is at 3 o’clock. All
angles greater than 360 degrees are calculated modulo 360.

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-6 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.1.5 Kreisbogen (circular arc)

The Kreisbogen component draws a circular arc with the selected properties.

Properties of Kreisbogen
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-6

Property Possible Values


Linienfarbe (line color) Java colors
Linienbreite (line width) >0
Startwinkel (start angle)1) Integers
Endwinkel (end angle)1) Integers

1) Note on the start/end angle:


The angles are specified in degrees. The 0 degree angle is at 3 o’clock. All
angles greater than 360 degrees are calculated modulo 360.

PropertyChange for Dynamic Display


None

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-7
Additional Beans for Visualization

B.1.6 Ellipse

The Ellipse component draws an ellipse with the selected properties.

Properties of Ellipse
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-7

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-8 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.1.7 Ellipsensegment (ellipse segment)

The Ellipsensegment component draws an ellipse segment with the selected


properties.

Properties of Ellipsensegment
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-8

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors
Startwinkel (start angle)2) Integers
Endwinkel (end angle) 2) Integers
Segmentgrenzen (segment limits) unsichtbar/sichtbar (invisible/visible)

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
The fill level is oriented on an imaginary complete ellipse.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).
2) Note on the start/end angle:
The angles are specified in degrees. The 0 degree angle is at 3 o’clock. All
angles greater than 360 degrees are calculated modulo 360.

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-9
Additional Beans for Visualization

B.1.8 Ellipsenbogen (ellipse arc)

The Ellipsenbogen component draws an ellipse arc with the selected properties.

Properties of Ellipsenbogen
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-9

Property Possible Values


Linienfarbe (line color) Java colors
Linienbreite (line width) >0
Startwinkel (start angle)1) Integers
Endwinkel (end angle)1) Integers

1) Note on the start/end angle:


The angles are specified in degrees. The 0 degree angle is at 3 o’clock. All
angles greater than 360 degrees are calculated modulo 360.

PropertyChange for Dynamic Display


None

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-10 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.1.9 Linien (lines)

The Linien component draws a line with the selected properties.

Properties of Linie
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-10

Property Possible Values


Linienfarbe (line color) Java colors
Linienbreite (line width) >0
Richtung (direction) Waagerecht, senkrecht, aufwärts, abwärts
(horizontal, vertical, up, down)

PropertyChange for Dynamic Display


None

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-11
Additional Beans for Visualization

B.1.10 Polygon

The Polygon component draws a polygon with the selected properties.

Properties of Polygon
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-11

Property Possible Values


Rahmenfarbe (frame color) Java colors
Rahmenbreite (frame width) >=0
Füllfarbe (fill color) Java colors
Füllmuster (fill pattern) Transparent, gefüllt (transparent, filled)
Füllstand (fill level)1) 0.0 – 1.0
Füllrichtung (fill direction) ↑,↓,→,←
Hintergrund (background) Java colors
Stützpunkte (vertices) see below

1) Note on the range of values:


A normalized range of values from 0.0 to 1.0 is used. Values less than 0.0 are
interpreted as 0.0. Values higher than 1.0 are interpreted as 1.0.
If your values are in another range (for example, a tank fill level between 0 and
1000 liters), normalize the range by dividing your values by 1000 using the
Berechnung (calculation) bean (see Section B.2.1).

Properties of Stützpunkte (vertices)


The Stützpunkte (vertices) are not entered
directly in the Properties dialog but in a
Preview dialog. This is activated in the
Properties dialog with the ”Change” button.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-12 C79000-G8976-C120 - 03
Additional Beans for Visualization

The preview dialog supports two modes, the draw mode and the move mode. You
can change between modes by clicking the right mouse button. In the draw mode,
new points are added the polygon when you click with the left mouse button. In the
move mode, individual points can be selected by clicking with the left mouse
button. The selected point can then be moved. If you press the ”DEL” key, the
selected point is deleted. If you press the ”ENTER” key, all points are deleted.

PropertyChange for Dynamic Display


Using the PropertyChange event, you can make the display of the “Füllstand” (fill
level) property dynamic. Wherever possible, the transferred value is converted to a
value of the type double 0.0 and 1.0.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-13
Additional Beans for Visualization

B.1.11 Polygonzug (polyline)

The Polygonzug component draws a polyline with the selected properties.

Properties of Polygonzug
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-12

Property Possible Values


Linienfarbe (line color) Java colors
Linienbreite (line width) >0
Stützpunkte (vertices) see below

Stützpunkte property: The Stützpunkte (vertices) are not entered directly in the
Properties dialog but in a Preview dialog. This is activated in the Properties dialog
with the ”Change” button.

The preview dialog supports two modes, the draw mode and the move mode. You
can change between modes by clicking the right mouse button. In the draw mode,
new points are added the polyline when you click with the left mouse button. In the
move mode, individual points can be selected by clicking with the left mouse
button. The selected point can then be moved. If you press the ”DEL” key, the
selected point is deleted. If you press the ”ENTER” key, all points are deleted.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-14 C79000-G8976-C120 - 03
Additional Beans for Visualization

PropertyChange for Dynamic Display


None

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-15
Additional Beans for Visualization

B.2 Logical Components


The logical components are invisible components used to modify, read, or write
data.

B.2.1 Berechnung (calculation)

Using the Berechnung component, you can make simple math calculations.

Properties of Berechnung
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-13

Property Possible Values


Ausdruck (expression) Valid fomulas (see below)
Name Text

The component can interpret the following math symbols:


+ Addition,
– Subtraction,
* Multiplication,
/ Division,
% Modulo,
() Parentheses
Any variable name can be used in the expression. Valid expressions would be, for
example: ”a+b”, ”a * (b + c)”, ”(a % b) – c”
The individual variables are set using the PropertyChange mechanism. The
”Name” attribute of the PropertyChange event must match the variable name. The
calculation is made only when all variables have been set once. The result of the
calculation is then passed on in turn to other components using PropertyChange
event. The ”Name” attribute is then assigned the name of the calculation
component.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-16 C79000-G8976-C120 - 03
Additional Beans for Visualization

PropertyChange for Dynamic Display


The values of the individual variables are set be other components using
PropertyChange events. The ”Name” attribute of the event must match the variable
name.
If, foe example, a variable is set by an input field, the input field mist have the
name of the variable and be connected with the calculation component via
PropertyChange.
The values of the PropertyChange event are always converted to values of the
type double when this is possible.

Result via PropertyChange


The result of the calculation is passed on as a PropertyChange event to the
connected components as soon as all variables have been assigned values once.
Then, whenever a variable changes, a PropertyChange event is generated. The
”Name” attribute is set to the name of the ”Berechnung” (calculation) component.
The value of the event is transferred as a value of the type double.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-17
Additional Beans for Visualization

B.2.2 Logik (logic)

Using the Logik component, you can make simple logical calculations.

Properties of Logik
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-14

Property Possible Values


Ausdruck (expression) Valid fomulas (see below)
Name Text

The component can interpret the following logic symbols:


| OR,
& AND,
! NOT,
^ Exclusive OR,
() Parentheses
Any variable name can be used in the expression. Valid expressions would be, for
example: ”a | b”, ”a & (!b & c)”, ”(a & b) | c”
The individual variables are set using the PropertyChange mechanism. The
”Name” attribute of the PropertyChange event must match the variable name. The
calculation is made only when all variables have been set once. The result of the
calculation is then passed on in turn to other components using PropertyChange
event. The ”Name” attribute is then assigned the name of the calculation
component.

PropertyChange for Dynamic Display


The values of the individual variables are set be other components using
PropertyChange events. The ”Name” attribute of the event must match the variable
name.
If, foe example, a variable is set by an input field, the input field mist have the
name of the variable and be connected with the calculation component via
PropertyChange.
The values of the PropertyChange event are always converted to Boolean values
when this is possible.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-18 C79000-G8976-C120 - 03
Additional Beans for Visualization

Result via PropertyChange


The result of the calculation is passed on as a PropertyChange event to the
connected components as soon as all variables have been assigned values once.
Then, whenever a variable changes, a PropertyChange event is generated. The
”Name” attribute is set to the name of the ”Berechnung” (calculation) component.
The value of the event is transferred as a Boolean value.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-19
Additional Beans for Visualization

B.2.3 Konstante (constant)

The Konstante component stores a value that can be used later.

Properties of Konstante
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-15

Property Possible Values


Konstante (constant) Number of type double
Name Text

PropertyChange for Dynamic Display


The value of the constant is set by PropertyChangeEvent id it can be converted to
a number. If the value is Boolean, the component is triggered; in other words, it
sends a PropertyChange event itself to the connected components.

Result via PropertyChange


The content of the constant is transferred by PropertyChange event as a value of
the type double. The ”Name” attribute of the event is set to the name of the
component.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-20 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.3 Display Components

The display components display information of a wide variety of types.

B.3.1 Ein–/Ausgabefeld (input/output field)

The Ein–/Ausgabefeld component can be used to make formatted input and


output.

Properties of Ein–/Ausgabefeld
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-16

Property Possible Values


Modus (mode) Eingabe, Ausgabe, Ein–/Ausgabe (input,
output, input/output)
Textfarbe (text color) All Java colors
Hintergrundfarbe (background color) All Java colors
Wert (value) Depending on format (see below)
Schriftart (font) All Java fonts and font sizes
Name Text
Format see below

As default, the format corresponds to the Java class DecimalFormat from the
java.text package.
If a ’1’ character is found in the format string, the format is interpreted as binary
format. The number of ones (’1’) specifies the number of places in the display. A
preceding ’0’ means that leading zeros will be displayed.
If the ’f’ character is found in the format string, the format is interpreted as
hexadecimal format. The number of ’f’ characters specifies the number of places in
the display. A preceding ’0’ means that leading zeros will be displayed.
If the format is specified simply with ’abc’, the text is interpreted as a string; in
other word, practically unformatted.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-21
Additional Beans for Visualization

Examples:
Value: Format: Display:
––––––––––––––––––––––––––––––––––
100 ####.00 100.00
100 ####.## 100
100 #0000.00 0100.00
100 111111111 1100100
100 0111111111 001100100
100 ffff 64
abcd ####.##
abcd abc abcd
––––––––––––––––––––––––––––––––––––––
Note:
One special feature of the decimal format of Java is that a format string consisting
only of ’0’ characters (for example, 000.000), is rejected as being invalid. If the ’#’
character is included at the start or end, the format is valid (#000.000, 000.000#).

PropertyChange for Dynamic Display


If the output mode or input/output mode is set, the value sent to the component
using PropertyChange event is interpreted based on the set format and displayed
in the text field.
The input/output field sends a newly set value directly to the lined components
using PropertyChange event. This allows cascading of input/output fields.

Result via PropertyChange


If the Set button is clicked or the Enter key pressed with the input fields or
input/output fields displayed, the content of the text field is interpreted based on
the format and sent to the linked components using the PropertyChange event.
The ”Name” attribute of the event is given the name of the I/ field. The transferred
value is either of the type double (decimal/binary/hex) or of the type string (text)
depending on the set format.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-22 C79000-G8976-C120 - 03
Additional Beans for Visualization

B.3.2 Laufschrift (ticker text)

The Laufschrift component creates ticker texts.

Properties of Laufschrift
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-17

Property Possible Values


Rahmenbreite (frame width) >=0
Text Zeichen (characters)
Textfarbe (text color) All Java colors
Rahmenfarbe (frame color) All Java colors
Hintergrundfarbe (background color) All Java colors
Schriftart (font) All Java fonts and font sizes
Geschwindigkeit (speed) 0 – 100
Modus (mode) Ticker, label

PropertyChange for Dynamic Display


The value sent using PropertyChange event sets either the text of the ticker text (if
the type is string) or the speed of the ticker text (if the value is of the type integer
or double).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-23
Additional Beans for Visualization

B.3.3 Bildtabelle (image map)

Using the Bildtabelle (image map) component, you can display various types of
images.

Properties of Bildtabelle
The following properties can be set using the Properties dialog in the IDE (for
example VisualAge):

Table B-18

Property Possible Values


Bilder (pictures) see below 1)
Aktuelles Bild (current picture) All available pictures
Relativer Pfad (relative path)

1)
The parameters of the “Bilder” (images) property are set in a special dialog. This
dialog is displayed by clicking the ”Modify” button beside the Bilder property.

In this dialog, you can insert new images in the component with the ”New” button.
The image files must be of the type GIF or JPG! The ”Delete” button removes the
selected image from the table. The other two buttons allow you to reposition the
selected image within the table.
The “Aktuelles Bild” (current image) property specifies which image from the image
table is currently displayed.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-24 C79000-G8976-C120 - 03
Additional Beans for Visualization

If the component is used in an applet, the pictures can no longer be loaded during
runtime using their path.
During runtime, the images are therefore read using the URL. The URL depends
on the relative path parameter. The URL of the images is formed as follows:
CODE–BASE + relative path + image name
The relative path must be completed by ”/”.
If the relative path parameter starts with the ”http” string, it is interpreted as an
absolute path. The URL of the images is then formed as follows:
Relative path + image name
The relative path must be completed by ”/”.

PropertyChange for Dynamic Display


The “Aktuelles Bild” (current picture) property is set by the PropertyChange
mechanism, if the transferred value can be interpreted as a number.
-

Note
The properties to be configured for the in the Property editor for the components
described here (see table below) all have German names. You will find the
meaning in English in brackets beside the name.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 B-25
Additional Beans for Visualization

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


B-26 C79000-G8976-C120 - 03
Help on the S7 Applets C
This appendix explains how errors can occur when using the S7 applets.
If errors occur during operation, the Java console displays error messages (see
Sections 1.5 and 4.5).

All S7 Applets
S The name of the applet class, the CODEBASE parameter, or the ARCHIVE
parameter were not or incorrectly specified (check upper– /lowercase).
S The width and/or height of the applet was not specified or the value was too
high or low.
S The syntax of the parameter tag <PARAM NAME=”...” VALUE=”...”> is wrong.
S You have forgotten a parameter or written it incorrectly.
S The BACKGROUND parameter for the background color of the applet is
missing or is not in the valid range from 0x000000 to 0xFFFFFF.
S The user does not have rights to run the applet.
S The RACK and SLOT parameters for the rack number and the slot number do
not match the rack and/or slot in which the module is actually located.

Only S7StatusApplet and S7IdentApplet


S The addressed module is not a CPU / CP

S7GETApplet and S7StatusApplet Only


S No CYCLETIME parameter for the cycle time or is not an integer.

S7GETApplet and S7PUTApplet Only


S Symbol table not found
S A specified symbol was not found in the symbol table.
S The ANY pointer contains invalid values.
S The type of the specified parameter does not match the type expected (for
example, integer, floating–point, string).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 C-1
Help on the S7 Applets

S7GETApplet Only
S The format string has a syntax error (for example, an unknown formatting
character).
S The format string does not match the length of the data fetched from the CPU.
S The maximum and/or minimum value is not specified by the parameters
MINVAL and/or MAXVAL if an S7 bean is used.
S The value of the MAXVAL parameter is less than or equal to the value in the
MINVAL parameter.

S7PUTApplet Only
S The information in the SYMBOLNUM parameter and/or VARNUM does not
match the actual symbol specified or the ANY pointer.
S A specified symbol has the read–only attribute in the symbol table

S7StatusApplet Only
S The addressed module is not capable of supplying its module status.
S If you want to display the status of more than one module and the cycle time
selected is too short, you will often experience problems establishing the
connection.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C-2 C79000-G8976-C120 - 03
References D
/1/ SIMATIC NET CP Manual
Description of Handling the Device and Installation
SIEMENS AG

/2/ Information Technology in Automation Engineering


White Paper
SIEMENS AG

/3/ NCM S7 for Industrial Ethernet


Part of the Manual Package NCM S7 for Industrial Ethernet
SIEMENS AG

/4/ Programming Instructions for S7 Beans


SIEMENS AG
Can be downloaded from the Internet (see Appendix LEERER MERKER)

/5/ NCM S7 for Industrial Ethernet Primer


Part of the documentation package NCM S7 for Industrial Ethernet
SIEMENS AG

/6/ SIMATIC STEP 7 User Manual


Part of the STEP 7 documentation package STEP 7 Basic Knowledge
SIEMENS AG

/7/ SIMATIC Communication with SIMATIC


Manual
SIEMENS AG

/8/ SIMATIC STEP 7 Programming Manual


Part of the STEP 7 documentation package STEP 7 Basic Knowledge
SIEMENS AG

/9/ SIMATIC STEP 7 Documentation Package Reference Manual


SIEMENS AG

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 D-1
References

/10/ SIMATIC NET Industrial Twisted Pair Networks Manual


SIEMENS AG

/11/ Ethernet, IEEE 802.3


(ISO 8802–3)

/12/ SINEC CP 1413


Manuals for MS–DOS, Windows German
SIEMENS AG

/13/ SIMATIC S7
S7–300 Programmable Controller
Hardware and Installation
Manual
SIEMENS AG

/14/ SIMATIC NET Triaxial Networks for Industrial Ethernet Manual


SIEMENS AG

/15/ SIMATIC NET Ethernet Manual


SIEMENS AG

/16/ Lokale Netze –


Kommunikationsplattform der 90er Jahre
Andreas Zenk
Addison–Wesley
ISBN 3–89319–567–X

/17/ TCP/IP
Internet–Protokolle im professionellen Einsatz
Mathias Hein
International Thomson Publishing
ISBN 3–8266–400–4
ITP Online–Center: http://www.ora.de

/18/ RFC1006 (Request For Comment)

/19/ RFC793 (TCP)

/20/ RFC791 (IP)

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


D-2 C79000-G8976-C120 - 03
References

/21/ Berger, Hans


Automation with STEP 7 in STL

Order Numbers
The order numbers for the SIEMENS documentation listed above can be found in the
catalogs ”SIMATIC NET Industrial Communication, Catalog IK10” and ”SIMATIC
Programmable Controllers SIMATIC S7 / M7 / C7 – Components for Fully Integrated
Automation, Catalog ST70”.
You can obtain these catalogs and any other information you require from your
local SIEMENS branch and national subsidiary
The books marked with this symbol are on the Startup CD.

Further recommended reading on the topics Internet/Web, HTML, Java

/22/ Web–Publishing with HTML 4


Deborah S.Ray / Eric J.Ray
Sybex Verlag 1998

/23/ Durchblick im Netz


Vom PC–LAN zum Internet
Kauffels, F–J.
Internat. Thomson Publ., 1998
ISBN 3–8266–0413–X

/24/ Campione/ Walrat


The JavaTM Tutorial
Second Edition
Object–Oriented Programming for the Internet
ADDISON–WESLEY, 1998
ISBN 0–201–31007–4
In the meantime, there are numerous books available with which you can learn Java; we
recommend:

/25/ Java in 21 Days


by Laura Lemay and Charles L. Perkins
ISBN: 3827255783

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 D-3
References

/26/ Java in a Nutshell


by David Flanagan
ISBN: 3897211009

/27/ Java Examples in a Nutshell


by David Flanagan
ISBN: 3897211122
(for getting to know Java quickly and gaining programming experience)

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


D-4 C79000-G8976-C120 - 03
SIMATIC NET – Support and Training E
Customer Support, Technical Support

Open round the clock, worldwide:

Nuremberg
Johnson City

Singapore

SIMATIC Hotline

Worldwide (Nuremberg) Worldwide (Nuremberg)


Technical Support Technical Support
(FreeContact) (fee based, only with
SIMATIC Card)
Local time: Mon.-Fri. 7:00 to 17:00 Local time: Mon.-Fri. 0:00 to 24:00
Phone: +49 (180) 5050-222 Phone: +49 (911) 895-7777
Fax: +49 (180) 5050-223
Fax: +49 (911) 895-7001
E-Mail: techsupport@
GMT: +01:00
ad.siemens.de
GMT: +1:00
Europe / Africa (Nuremberg) America (Johnson City) Asia / Australia (Singapore)
Authorization Technical Support and Technical Support and
Authorization Authorization
Local time: Mon.-Fri. 7:00 to 17:00 Local time: Mon.-Fri. 8:00 to 19:00 Local time: Mon.-Fri. 8:30 to 17:30
Phone: +49 (911) 895-7200 Phone: +1 423 461-2522 Phone: +65 740-7000
Fax: +49 (911) 895-7201 Fax: +1 423 461-2289 Fax: +65 740-7001
E-Mail: authorization@ E-Mail: simatic.hotline@ E-Mail: simatic.hotline@
nbgm.siemens.de sea.siemens.com sae.siemens.com.sg
GMT: +1:00 GMT: –5:00 GMT: +8:00

The languages of the SIMATIC Hotlines are generally German and English, in addition, French, Italian and Spanish are
spoken on the authorization hotline.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 E-1
SIMATIC NET – Support and Training

Training Center
To help you become familiar with SIMATIC S7 programmable controllers, we offer
training courses. Please contact your regional training center or the central training
center in D 90327 Nuremberg.
Tel. 0911–895–3154
Infoline: Tel. 0180 523 5611 (48 Pfg./min), Fax. 0180 523 5612
Internet: http://www.ad.siemens.de/training
E–mail: Helga.bax@nbgm.siemens.de

SIMATIC Premium Hotline


(charged, only with
SIMATIC Card)
Time: Mo.-Fr. 0:00 to 24:00
Telephone:+49 (911) 895-7777
Fax: +49 (911) 895-7001

Technical Support Online Services


SIMATIC Customer Support provides you with a wide range of additional
information on SIMATIC products in the online services:
S You can obtain general up–to–date information as follows:
– on the Internet: address http://www.ad.siemens.de/net
– at fax polling no. 08765-93 02 77 95 00
S The latest product information and useful downloads:
– On the Internet: address http://www.ad.siemens.de/csi/net
– From the bulletin board system (BBS) in Nuremberg (SIMATIC Customer
Support Mailbox) at the number +49 (911) 895-7100.
To dial the mailbox, use a modem with up to V.34 (28.8 Kbaud), with the
following parameters: 8, N, 1, ANSI, or dial on ISDN (x.75, 64 Kbits).

Further Support
If you have further questions about SIMATIC NET products, contact your local
Siemens representative.
You will find the addresses:
S in our catalog IK PI
S on the Internet (http://www.ad.siemens.de)
-

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


E-2 C79000-G8976-C120 - 03
Glossary F
F.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-2
F.2 Industrial Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-6

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 F-1
Glossary

F.1 General

Bus segment
Part of a –> subnet. Subnets can consists of bus segments and connectivity
devices such as repeaters and bridges. Segments are transparent for addressing.

Client
A client is a device or, in general terms, an object that requests a service from a –>
server.

Configuration Data
Parameters that can be set and downloaded to the –> CP with the NCM S7
configuration tool and that determine how the CP functions.

CP
Communications processor. Module for communications tasks.

CSMA/CD
CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

FC (block)
STEP 7 logic block of the type ”function”.

Gateway
Intelligent interface device that interconnects different types of local area –>
networks at layer 7.

Frame
Message from one PROFIBUS/Ethernet node to another.

Frame header
A frame header consists of an identifier for the –> frame and the source and
destination address.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


F-2 C79000-G8976-C120 - 03
Glossary

Frame trailer
A frame trailer consists of a checksum and the end identifier of the –> frame.

Industrial Ethernet
A bus system complying with IEEE 802.3 (ISO 8802–2)

NCM S7 for Industrial Ethernet


Configuration software for configuration and diagnostics in conjunction with
Ethernet CPs.

NCM S7 for PROFIBUS


Configuration software for configuration and diagnostics in conjunction with
PROFIBUS CPs.

Network
A network consists of one or more interconnected –> subnets with any number of
–> nodes. Several networks can exist one beside the other.

PG mode
A mode in PROFIBUS/Ethernet in which the SIMATIC S7–CPU is programmed,
configured or checked via PROFIBUS/Ethernet.
This mode is handled by S7 functions.

Protocol
A set of rules governing data transmission. Using these rules, both the formats of
the messages and the data flow during transmission can be specified.

Process image
The process image is a special memory area on the programmable controller. At
the start of the cyclic program, the signal states of the input modules are
transferred to the input process image. At the end of the cyclic program, the output
process image is transferred to the output modules as a signal state.

Segment
Synonym for –> bus segment

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 F-3
Glossary

Server
A server is a device or generally an object that can provide certain services at the
request of a –> client.

Services
Services provided by a communication protocol.

SIMATIC NET
Siemens SIMATIC Network and Communication. Product name for –> networks
and network components from Siemens. (previously SINEC)

SIMATIC NET Ind. Ethernet


SIMATIC NET bus system for industrial applications based on Ethernet.
(previously SINEC H1)

SINEC
Previous product name for –> networks and network components from Siemens.
Now: SIMATIC NET

Station
A stations is identified by the following:
S a MAC address on Ethernet
S a PROFIBUS address on PROFIBUS

Subnet
A subnet is part of a –> network whose parameters (for example on –>
PROFIBUS) must be matched throughout the subnet. It includes the bus
components and all attached stations. Subnets can, for example, be connected
together by –> gateways to form a network.
A –> system consists of several subnets with unique –> subnet numbers. A
subnet consists of several –>nodes with unique –> PROFIBUS addresses or –>
MAC addresses (with Industrial Ethernet).

System
All the electrical equipment within a system. A system includes, among other
things, programmable logic controllers, devices for operation and monitoring, bus
systems, field devices, actuators, cabling.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


F-4 C79000-G8976-C120 - 03
Glossary

Transmission rate
According to DIN 44302, this is the number of binary decisions transmitted per
time unit. The unit is bps. The transmission rate used depends on a number of
conditions such as the end–to–end distance.

Transport layer
The transport layer is layer 4 in the ISO/OSI reference model for open
communication. The transport layer is responsible for reliable transmission of data
(raw information) from device to device. Transport connections are used for
transmission.

Transport interface
The transport interface of SIMATIC S5 means the access to the
connection–oriented services of the transport layer on the CP. The control program
sees the transport interface in the form of handling blocks (HDBs).

TSAP
Transport Service Access Point

Watchdog
A mechanism for monitoring operability of nodes.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 F-5
Glossary

F.2 Industrial Ethernet

API
Application Programming Interface: programming library.

Applet
–> Java applet

AWT
Abstract Windows Toolkit: A Java library containing the Java software components
for the GUI, for example Button, TextField, ...

Base address
Logical address of a module in S7 systems.
S PROFIBUS
The base PROFIBUS address is the address starting from which all
automatically calculated address within a project are assigned.
S Industrial Ethernet
The base MAC address is the address starting from which all automatically
calculated address within a project are assigned.

Bean
–> JavaBean

Composition Editor
The name of the editor for graphic programming in the Visual Age.

E–mail connection
An E–mail connection is a logical connection between an S7 CPU and an IT–CP. It
is essential for sending E–mails.

Firewall
Security device suitable for interconnecting a private network to a public network,
for example to the Internet, without anyone from the Internet obtaining access to
the private information of the private network without authority.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


F-6 C79000-G8976-C120 - 03
Glossary

FTP
File Transfer Protocol

HTML
Hyper Text Markup Language is the name of an intermediate file format that is
understood by all browsers and makes data communication easier.

HTML process control


Name of the technique allowing process information to be accessed using HTML
pages.

HTML page
A file created in HTML format that can be made available, for example on Web
servers and can be called in the intranet/Internet.

HTTP
Hyper Text Transfer Protocol

HTML tag
HTML tags identify structure elements of HTML documents; these documents
include for example titles, paragraphs, tables, or applet calls.

IDE
Integrated Development Environment: for example IBM Visual Age, Borland
JBuilder, ...

Information technology (IT)


General: This term refers to all tasks involved in information processing and
management. Specific: In SIMATIC NET, this term is used for products (generally
communications processors) that allow or support communication between
manufacturing/production facilities and other data processing systems via a
company intranet or via the Internet.

Internet protocol (IP)


Internet protocol, corresponds to layer 3 of the ISO 7–layer model.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 F-7
Glossary

IP address
IP: Internet Protocol. An IP address is used to address a node in a network.
Example: 192.168.10.104

ISO–on–TCP
Communication connection of the transport layer (layer 4 communication
complying with ISO) mapped to TCP.
Messages can be exchanged bidirectionally on an ISO–on–TCP connection. TCP
provides data stream sequence communication without segmenting data in
messages. ISO on the other hand is message–oriented. With ISO–on–TCP, this
mechanism is mapped on TCP. This is described in RFC1006 (Request For
Comment).
ISO–on–TCP connections all program/event–controlled communication on
Ethernet from SIMATIC S7 to
S SIMATIC S7 with an Ethernet CP
S SIMATIC S5 with an Ethernet CP
S PC/PG with an Ethernet CP
S any other suitable system

ISO transport connection


Communication connection of the transport layer (with CP/COM 143 previously
also known as an S5–S5 connection).
ISO transport connections allow program/event–controlled communication on
Industrial Ethernet form SIMATIC S7 to
S SIMATIC S7 with an Ethernet CP
S SIMATIC S5 with Ethernet CP (for example CP 143 or CP 1430)
S PC/PG with Ethernet CP (for example CP 1413)
S any suitable system using the ISO transport protocol (ISO 8073)
Blocks of data can be exchanged bidirectionally on an ISO transport connection.

JAR files
A file type containing the JavaBeans or Java classes in compressed form.

Java
Object–oriented programming language developed by the Sun computer company.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


F-8 C79000-G8976-C120 - 03
Glossary

Java applets
These are small Java applications that are transferred from Web servers to clients
where they are run (in a Web browser with Java capability).

JavaBean
A JavaBean (or simply “bean”) is a reusable software object with a standardized
interface that can be linked with other JavaBeans in Builder tools to create an
application (for example a Java applet). Ready–to–use S7 beans are available for
IT–CP.

JavaScript
An object-based scripting language enabling Web developers to incorporate
dynamic functionality in Web pages.

Java Virtual Machine (JVM)


–> SUN Java Virtual Machine (JVM)

MAC address
Address used to distinguish different stations attached to a common transmission
medium (Industrial Ethernet).

Medium Access Control (MAC)


Method for controlling access by a station to the common transmission medium
shared with other stations.

MIME
Multipurpose Internet Mail Extension

Node on Ind. Ethernet


A node is identified by a –> MAC address on –> Industrial Ethernet.

PING
Packet Internet Groper. This is a synonym for ICMP echo (Internet Control
Message Protocol).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 F-9
Glossary

Plugin compononent
A plugin is a program that extends the capability of the browser. It allows, for
example, the display of different file formats, in particular the representation of
multimedia elements.

Proxy server
A proxy server can increase the security in a network. Among other things, the
software can be used to check access or to deny access to particular pages or
documents as is also the case with the firewall. A proxy server can also serve as a
type of buffer so that web pages that have been called once do not always have to
be addressed again via the host. Waiting times can sometimes be greatly reduced.

RFC1006
–> ISO–on–TCP

S5–S5 connection
–> ISO transport connection

S7 applet
S7 applets are special Java applets that allow read and write access to an S7
station via the CP IT.

S7 beans
S7 beans are special JavaBeans supplied for the IT–CP in a class library. They
allow access to process data via IT–CP and display of the data in a Web browser.

S7BeansAPI
The S7BeansAPI is a software component library. It contains the S7 beans of the
IT–CP.

Sandbox
In the Web browser, Java applets run in the sandbox. This means that for security
reasons the Java applets cannot, for example, access the local file system and
cannot establish links to third parties (this is why the IT–CP from which the applies
were loaded can always be addressed but no other).

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


F-10 C79000-G8976-C120 - 03
Glossary

Startup
This is the name of a software package that can be obtained on CD–ROM or
downloaded from the Internet (as HTML pages), that is intended to help you to
become familiar with the IT–CP and the use of S7 applets.

Subnet mask
The subnet mask specifies which parts of an IP address are assigned to the
network number (–> ISO–on–TCP). The bits in the IP address whose
corresponding bits in the subnet mask are set to 1 are assigned to the network
number.

Subnet number
A system –> consists of several –> subnets with unique subnet numbers.

SUN Java Virtual Machine (JVM)


The Java Virtual Machine is the central element in SUN’s Java programming
environment. This component makes Java programs independent of a particular
platform.

TCP
Transport Control Protocol, corresponds to layer 4 of the ISO 7–layer model.

TCP/IP
TCP = Transmission Control Protocol; IP = Internet Protocol

UDP
User Datagram Protocol. Datagram service for simple, internetwork data transfer
with no confirmation.

URL (Uniform Resource Locator)


Identifies the address of a document in an intranet or on the Internet.

Web browser
Basic software for displaying multimedia offers of the World Wide Web (normally
simply : Web or WWW) on a PC, Unix workstation, Apple Macintosh, etc.

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 F-11
Glossary

Web server
Term for a computer in the network that provides services to other computers in
the Web at the request of a client (–> Web Browser).

Workbench
This is the name of the main application of Visual Age that manages all the
projects.
-

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


F-12 C79000-G8976-C120 - 03
A E
Access protection, 1-18 E-mail, 1-3, 2-2
Access rights, 3-3, 3-5 attachments, 2-9
Access to variables with symbols, 4-37 data length, 2-9
AOLpress, 1-6 sending, 2-8
Applet call, 4-10 test mail, 2-11
Applet instances, 4-9 testing, 2-11
Applets, 4-8 E-mail client, 2-2
See also S7 applets E-mail connection, 2-2, 2-6, 2-8
Assigning Access Rights, 4-39 configuring, 2-6
E-mail connections, configuring, 2-3
E-mail DB, 2-9
B Error messages, C-1
Establishing a network attachment, 1-5, 1-6
Block library, 3-27
Builder Tools, 5-2
F
C FC
(FTP) parameters for CP and connection
Configuration
assignment (input parameters), 3-40
”DNS Parameters” tab, 1-9
(FTP) status information (output
”Symbols” tab, 1-9
parameters), 3-42
”Users” tab, 1-9
AG_SEND/AG_LSEND, 2-8, 2-10
FTP connections, 3-22
call parameters, 2-10
network attachment, 1-9
for FTP, 3-27
printing, 1-12
FTP_CONNECT, 3-28
Configuring
FTP_DELETE, 3-37
E-mail connection, 2-6
FTP_QUIT, 3-39
mail server address, 2-2
FTP_RETRIEVE, 3-34
Configuring a network attachment, with STEP
FTP_STORE, 3-31
7, 1-9
File access, 3-3
Configuring access rights, 1-10
with FTP, 3-5
everybody, 1-10
File allocation table, 3-11
Configuring access to symbols, 4-37
File DB, 3-16
Connection endpoint, 2-6
header, 3-18
structure, 3-24
File management, 3-3
D File management and file access using FTP,
Data block, 2-8 3-1
Default sender name, 2-6 File system on the IT–CP, 3-3
DNS, 1-9 Firewall, 1-6
Domain Name Service, 1-9 FORMAT parameter, 4-32

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 Index-1
Format string, 4-24 Java Interpreter, 1-13, 1-14
Frames, 4-6 JavaScript, 4-6, 4-7
Front Page, 1-6 JavaBeans
FTP, 3-3, 4-40 additional for visualization, B-1
functions (FCs), 3-27 concept and possible applications, 5-1
FTP client, 3-20
FTP client function, 1-3, 3-2
FTP commands, 3-8 L
FTP connections, 3-22
LAD/FBD/STL editor, 2-8
FTP job sequence, 3-21
FTP server, 1-6, 3-7
FTP server function, 1-3
FTP server functionality, 3-2 M
FTP tools, 3-5 MAC address, 1-9
Mail server, 1-5, 2-4, 2-6
address, 2-5
G configuring, 2-5
operation, 2-4
Graphic display, 5-1
MS DOS prompt, 3-6
Graphic display of process variables, 5-1

N
H
NCM diagnostics, 2-11, 2-13
Home page, 1-20
NCM S7, 1-9, 2-6
HTML editor, 1-6, 4-7
Netscape Composer, 1-6
HTML forms, 4-6
Netscape Navigator, 1-5
HTML pages
Network connectivity, 1-9
creating your own, 4-2
Number of applet instances, 4-9
designing, 4-5, 4-6
linking, 4-6
number of applets, 4-9
testing and using, 4-40 O
HTML process control, 1-3 Online parameter assignment for testing, 4-14
HTML system pages, 1-17 Organizing files, 4-4
administration, 1-18 Original IT–CP file system, 3-4
status, 1-19
HTTP, 1-16
HW Config, 2-6 P
Parameter format, 4-24
Password, 3-5
I Password protection, 1-8
Internet technology, 1-2 Pictures, 4-6
Intranet, 1-3, 1-5, 1-16 Port, 1-6
IP address, 1-6, 1-9, 1-16, 2-6, 2-7 Printing the list of variables, 4-39
of the mail server, 2-6 Process visualization, 4-2
Properties dialog, 1-9, 2-6
Proxy server, 1-13, 1-14
J
Java Console, 1-15, 4-9, 4-11, 4-40
error messages, C-1 R
Java Development Kit, 1-5 Readme.htm, 3-4

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


Index-2 C79000-G8976-C120 - 03
Resources, of the IT-CP, 4-4 T
Tab
DNS Parameters, 1-9
S Symbols, 1-9
S7 Applets, 4-8 Users, 1-9
S7 applets, 1-3, 4-3 Tables, 4-6
graphic display, 5-1 TCP/IP, 1-4
parameter assignment tools, 4-13 Template, 4-6
HTML editor, 4-13 Test Mail, 2-13
parameter wizard, online parameter Test mail, 2-11
assignment, 4-14
S7 beans class library, 5-1, 5-3
S7BeansAPI, 5-1, 5-3 U
S7GetApplet, 4-20
Uniform Resource Locator , 1-16
S7IdentApplet, 4-15
URL, 1-16, 4-6
S7PutApplet, 4-30
S7StatusApplet, 4-17
Search order, 1-17
SEND/RECEIVE interface, 1-3, 2-2 W
Start page, 1-17, 1-20 Web browser, 1-16
STEP 7, 2-6, 2-8 settings, 1-13
HW Config, 1-9, 2-6 what is required?, 1-5
Subnet mask, 1-9, 1-16
SUN Java Virtual Machine, 1-5

SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT


C79000-G8976-C120 - 03 Index-3
SIMATIC NET IT-CP Instructions for the CP 343-1 IT and CP 443-1 IT
Index-4 C79000-G8976-C120 - 03

You might also like