Documente Academic
Documente Profesional
Documente Cultură
Demonstration
Warranty, Liability and Support
mandatory liability for injury of life, body or health. The above provisions
does not imply a change in the burden of proof to your detriment.
Copyright © Siemens AG 2005 All rights reserved
The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. They do not
represent customer-specific solutions. They are only intended to provide
support for typical applications. You are responsible for ensuring that the
described products are used correctly. These Application Examples do not
relieve you of the responsibility in safely and professionally using, installing,
operating and servicing equipment. By using this application example you
accept that Siemens is not liable for any damages except for those
specified in the above liability clause. We reserve the right to make
changes to these Application Examples at any time without prior notice. If
there are any deviations between the recommendations provided in this
application example and other Siemens publications – e.g. Catalogs – the
contents of the other documents have priority.
For questions about this document please use the following e-mail address:
mailto:csweb@ad.siemens.de
Foreword
Objectives of the application
Exchanging process data between logic controllers and computers via OPC
is a core element of automation technology.
The application on hand shows a possible procedure for independently
generating individual OPC clients using the programming language Visual
Basic .NET by Microsoft.
A visualization of a mixed process is hereby realized in Visual Basic .NET.
The programming paradigm ".NET“ by Microsoft is used here.
Delimitation
This application does not contain a complete description
• of network safety aspects (encoded communication via SSL, application
of firewalls, using VPNs)
• of the .NET framework,
• of the OPC specification as well as
• deeper level ASP.NET mechanisms
Therefore, basic knowledge in the area of object oriented programming is
required. Further knowledge in UML (Unified Modelling Language) is an
advantage.
Table of Contents
Table of Contents ......................................................................................................... 6
Introduction................................................................................................................... 7
1 Document on Hand .................................................................................... 7
Setup and Operation of the Application ..................................................................... 8
2 Installation and Commissioning............................................................... 8
2.1 Setup of the hardware.................................................................................. 8
2.2 Installation of the standard software .......................................................... 11
2.3 Installation of the application software ....................................................... 13
2.4 Configuration of the Internet Information Services ..................................... 15
2.5 Configuring the access protection.............................................................. 17
2.6 SIMATIC side configuration of the stations ................................................ 22
21402169_OPC_XML-DA_Demonstration_DOKU_V10_e.doc
Introduction
1 Document on Hand
This document is the setup and operating instruction for the application
"OPC Client for XML-DA interface of the SIMATIC NET OPC Server".
The documents Introduction and Extension describe the basic setup of
the application and the employed function components, as well as their
interaction within this application.
The document on hand only discusses setup and operation of the example
application.
21402169_OPC_XML-DA_Demonstration_DOKU_V10_e.doc
Copyright © Siemens AG 2005 All rights reserved
Note The setup guidelines for SIMATIC S7 must generally be followed. Please
see /4/.
Bus cabling
For the demonstration of this application, the controller (S7 station), the
head-end station (Rack-PC) and the visualization station (PG/PC) must be
connected to a joint Ethernet network.
Proceed by connecting the Ethernet connections of the individual stations
to a hub via the standard Ethernet line (device for inter-connecting several
Ethernet stations).
Note When using the IP addresses, used in this example, for individual
stations, no adjustment needs to be made at the STEP 7 example project
later on.
Table 2-2
No. Instructions
1. Open the properties dialog of the LAN connection used by you via:
Start Æ Settings Æ Network Æ right mouse-click on LAN
Connection Æ Local Area Connection Properties
No. Instructions
2. In the list you select the entry
Internet
Protocol(TCP/IP) and
press the Properties
button
Note
If the Internet
Protocol(TCP/IP) entry is
not contained in the list, it must
be added with Install...
21402169_OPC_XML-DA_Demonstration_DOKU_V10_e.doc
Copyright © Siemens AG 2005 All rights reserved
4. For visualization station and head-end you enter two different IP addresses,
which only differ in the far right digit, e.g. “10.0.0.1“ for the visualization
station and “10.0.0.2“ for the head-end.
Please ensure, that the IP addresses selected by you are unique in the
connected network, and that the addresses are located in the same subnet.
5. Please enter the same sub-net mask for both stations, e.g. “255.255.255.0“
6. Confirm the opened dialogs with OK.
Note If "Microsoft .NET Framework 1.1" was already installed before the
installation of IIS (Framework is listed in the "Software" dialog box of the
system controller, e.g. due to an installation of the SIMATIC NET
software V6.2), please proceed as follows:
1. Open the DOS prompt by selecting: Start Æ Run Æ enter „cmd“ Æ OK
2. Enter
"%systemroot%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis –i" and
press the Return key.
3. Reboot the PC.
Retrieve...
Copyright © Siemens AG 2005 All rights reserved
Note
If .NET-Framework has not been installed yet, the
setup program will notify you of this and offer a link
where you can download .NET-Framework from the
internet.
following chapter).
where you can download .NET-Framework from the
Copyright © Siemens AG 2005 All rights reserved
internet.
The Internet Information Services (IIS) offer some specific functions for
access to web services. IIS is thus installed on the PC, on which the OPC
server is running – also i.e. the head-end.
Configuring the web service for the access to the OPC XML-DA interface
To enable access from applications to the SIMATIC NET OPC server via
OPC XML-DA, the Internet Information Services (IIS) must be set
accordingly. The table below explains how you can configure the IIS for this
access option.
For access protection the default settings initially remain unchanged. The
security settings are made in the next section.
Table 2-7
No. Instructions Note
21402169_OPC_XML-DA_Demonstration_DOKU_V10_e.doc
program.
Copyright © Siemens AG 2005 All rights reserved
General notes
Using this application requires access to the HTTP service of the internet
information services. The access is normally blocked by the integrated
Windows XP Firewall (or another firewall installed on the PC). Release this
service in your firewall or switch the firewall off.
permits the users "OPC client" and "ASPNET" to The ASP.NET application
access the XML-DA interface of the OPC server. accesses the OPC server
Instead of [PC Name] you enter the computer name of with the name "ASPNET".
the head-end (see Start Æ Settings Æ
Control Panel Æ System Æ Computer name).
<authorization>
<allow users="[PC Name]\OPC-Client,
[PC Name]\ASPNET"/>
<deny users="*"/>
</authorization>
5. Save the file and close it with the Editor.
4. Replace "Head-end" with the computer name of your Computer name: see Start Æ
head-end station. Settings Æ Control Panel Æ
Ensure, that the user used here has actually been System Æ (Computer name).
created.
5. Save the file and close it with the Editor.
Note
Copyright © Siemens AG 2005 All rights reserved
Table 2-14
No. Instructions Note
1. Start the SIMATIC manager.
2. Open the extracted STEP 7 project “315_OPC” in the
SIMATIC Manager.
3. Open the context menu of the PG/PC object in the
STEP 7 project via the right mouse button.
4. Select: PLC Æ Assign PG/PC.
5. If your PG/PC has several Ethernet interfaces, you
select the correct interface in the Properties-PG/PC
dialog and press the Assign button and then close
the dialog with OK.
Note
Please ensure, that the mode switch of the CP 343-1
has been set to "RUN".
2. In order to search the CP in the network, you click the The search for Ethernet
Browse... button. stations is started
automatically and may take
some time.
3. From the list you select the entry with the device type
S7-300 CP and confirm your selection with OK.
configuration.
4. If an error should occur here,
Compile and save the entire configuration with the
it must be removed prior to
button. Select the selection box Compile and check
loading.
everything.
5. Select head-end and S7 station, and load the
configuration with the button.
Confirm the queries with OK.
Note For testing the OPC connection to the controller, the OPC Scout can be
used (included in the delivery scope of the SIMATIC NET PC software).
User interface
Copyright © Siemens AG 2005 All rights reserved
The following figure shows the user interface of Window application. The
elements are described below.
Figure 3-1
Note Please ensure that the user, under which you are currently logged on at
the head-end or visualization station, has access to the XML-DA web
service of the SIMATIC NET OPC server. See 2.5 Configuring the access
protection
2. For connecting with the OPC server and starting the If the login box appears, you
visualization press the button. enter a user which has
21402169_OPC_XML-DA_Demonstration_DOKU_V10_e.doc
3. When starting the visualization and S7 program for the If the mixing process was
first time, you must first start the simulated mixing started successfully, the
process (the Stop process is red). Start process button
Press the Start process button. turns green.
4. Enter any setpoint values into the input fields and press
the Write setpoint values button.
5. Press the Read values button in order to read the The RX/TX diode of the CP
process values directly from the controller. indicates that the Read
request goes directly to the
controller.
User interface
The following figure shows the user interface of ASP.NET application. The
elements are described below.
Figure 3-2
21402169_OPC_XML-DA_Demonstration_DOKU_V10_e.doc
Copyright © Siemens AG 2005 All rights reserved
Note Please ensure, that the user under which you have just logged on at the
head-end or the visualization station, is member of the "Users" group.
See 2.5 Configuring the access protection
"http://localhost/OPCXMLDANetClient/mainform.aspx"
Copyright © Siemens AG 2005 All rights reserved
3. Enter any setpoint values into the input fields and press During the page refresh a
the Write setpoints button. write job for setpoint values
can be triggered.
4. Status information and errors are displayed at the
bottom edge of the page (e.g. limits of setpoint values
exceeded or communication problems).
4 Literature
4.1 Bibliographic References
Hans Berger
Copyright © Siemens AG 2005 All rights reserved