0% found this document useful (0 votes)
101 views

Figur 1: OPC Can Be Used To Conveniently Access S7, S5 and Other Controllers

The document discusses how Excel and Visual Basic can be used to easily process data from S7 controllers using OPC (OLE for Process Control) as an interface standard. It describes an OPC client gateway in the form of ActiveX controls that provide OPC client functionality, allowing Excel and Visual Basic to access process data from S7 and other PLCs via OPC servers without programming. This combines the benefits of low-cost Excel/Visual Basic applications with the OPC standard for automating data exchange between software applications.

Uploaded by

Said Asseffa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Figur 1: OPC Can Be Used To Conveniently Access S7, S5 and Other Controllers

The document discusses how Excel and Visual Basic can be used to easily process data from S7 controllers using OPC (OLE for Process Control) as an interface standard. It describes an OPC client gateway in the form of ActiveX controls that provide OPC client functionality, allowing Excel and Visual Basic to access process data from S7 and other PLCs via OPC servers without programming. This combines the benefits of low-cost Excel/Visual Basic applications with the OPC standard for automating data exchange between software applications.

Uploaded by

Said Asseffa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Manufacturing & machine automation

Easily process S7 data using Excel and


Visual Basic
Dipl.-Ing. Jürgen Lange studied electrical engineering
at Munich University of Technology. He has worked in
the Industrial Automation division of Softing AG, Haar,
since 1986 and has been responsible for the OPC
business segment since 1996.
E-mail: [email protected]

As the PC has made inroads in the field of automation, the professional use of
programs such as Excel and Visual Basic has become more and more popular. This
is because these programs are familiar and easy to use, they offer powerful analysis
and reporting tools, and the costs are low since no runtime fees are required for the
distribution of finished applications. The strong trend towards using OPC technology
in automation projects has also been motivated by issues such as ease of use and
cost savings. These days, visualization and data acquisition programs and other
software applications primarily use the OPC interface to access data in controllers
such as the Simatic S5, S7 or WinAC (Figur 1).

Figur 1: OPC can be used to conveniently access S7, S5 and other controllers.
OPC client data can be read and written quickly and conveniently via an OPC server
interface. The HMI and SCADA products which are currently commercially available,
such as WinCC, InTouch and iFix, have been equipped with an OPC client interface
for several years. Only programs like Excel and Visual Basic require an add-on in
order to be used as an OPC client.
Convenient and powerful standard
OPC, which stands for "Openness, Productivity and Collaboration", is an interface
standard from the OPC Foundation. OPC was originally defined as a uniform solution
to the recurrent task of connecting PC-based applications—particularly SCADA and
HMI systems—to process peripherals. The newly founded OPC Task Force met for
the first time in May 1995. In December of the same year, the first draft specification
of Data Access 1.0 was published. Today, OPC has developed into a worldwide
standard for the exchange of data and information between software components.
With over 7,500 OPC products and millions of installations in a variety of industries,
the OPC initiative can be considered a complete success. OPC is no longer merely a
substitute for proprietary communication drivers for connecting SCADA systems and
visualization programs to process peripherals. Process control systems, PC-based
controllers, MES and even ERP systems are now inconceivable without an OPC
interface. The OPC interface is not just used to transfer process data or individual
parameters. Instead, entire ERP documents, parameter sets, control sequences,
video signals or drive programs can be transported via OPC.

Easy access to S7 and S5 controllers


The advantages of OPC are also benefiting the field of industrial automation.
Practically all commercially available SCADA systems, process control systems and
PC-based controllers now offer an open OPC client interface for access to any OPC
server. Data is now generally exchanged with the process environment (I/O devices,
measurement devices, controllers, etc.) via OPC servers. The S7/S5 OPC server
from Softing AG [1], for example, provides quick, convenient access to process data
in S7-200, S7-300, S7-400 and WinAC controllers, in C7 and M7 devices, and in S5,
Pilz and Vipa controllers (Figur 2).

Figur 2: The S7/S5 OPC server is flexible enough for a variety of uses.
The variables are consistently addressed using Step7 semantics. Every OPC-
compliant client application can read and write all input/output data, data blocks,
flags, timers and counters in the S7 controllers. Up to 256 controllers can be
accessed at the same time. The control program does not need to be adapted for
communication with the OPC server. No detailed knowledge of the specific PLC
program is necessary either. Ethernet, Profibus or serial communication – with or
without a modem – can be used for accessing the controllers. CPs from various
manufacturers, as well as gateways and NetLink Pro from Softing, are supported for
Ethernet communication (Figur 3).

Figur 3: NetLink Pro makes it possible for the S7/S5 OPC server to access up to 16 S7 controllers at
the same time.
The intelligent grouping of read and write tasks optimizes data throughput.
Configuration can be carried out quickly by importing symbolic names from Step7
projects or Excel files. Existing projects can be exported from process visualization or
process control systems to Excel, where they can be copied, easily structured, and
then conveniently uploaded to the OPC server. The OPC server also offers an alias
functionality. This makes it possible to give the OPC items descriptive names. It
takes less than 30 seconds to install the OPC server, and the computer does not
need to be restarted afterwards. The convenient configurator quickly sets up all
connections.

Remote diagnosis via integrated Web server


The OPC server includes a Web server for diagnostics and displaying process
values. A Web browser can quickly display a controller's operational status and data,
either locally or on remote computers. The Web server can also be used to activate
traces, request status information or open the German and English online help over
the Internet under password protection. Process data can also be requested via
placeholder variables in the HTML of the server's own Web site to create a simple
Web-based visualization (Figur 4). During operations, the communication lines are
continually monitored to guarantee secure data transmission.
Figur 4: Visualization and remote diagnosis via an integrated Web server.

Safety through redundancy


For safety-relevant projects, the OPC server supports the use of two redundant
Ethernet lines. To this end, two Ethernet connections are defined – a primary one
and a secondary one – which can be used to communicate with a PLC. By default,
the OPC server communicates with the PLC using the primary connection. The
secondary connection is monitored to detect connection failures. If the primary
connection fails, the OPC server will automatically use the secondary connection for
communication. The secondary connection takes over communication within one
OPC cycle. When the primary connection is re-established, the OPC server
automatically switches back to this connection. The secondary connection can also
be connected to a second PLC in standby mode. This makes it possible to realize
line and device redundancy and to carry out safety-relevant projects.

OPC gateway
ActiveX-enabled programs such as Excel and Visual Basic are increasingly being
used for data acquisition, analysis and visualization in small-scale automation
projects. There are no runtime fees involved with the use of such solutions. Other
advantages include the variety of ActiveX components which support diverse
arithmetic and graphical functionalities and are easy to integrate. In order to take
advantage of the benefits of these programs and OPC technology at the same time,
the functionality of an OPC client must be realized as an ActiveX component. This
can be achieved with Softing's OPC Client Controls. They can be used to create a
powerful Data Access client in Excel, Visual Basic or any ActiveX container program
(Figur 5). The OPC Client Controls consist of two ActiveX controls: the OPC DA
DataControl and the OPC DA Tree View Control. The OPC DA DataControl handles
data acquisition, the establishment of the connection to a local or remote OPC Data
Access server, the management of data points (OPC items) and the specification of
data exchange parameters, such as the update rate, deadband, etc. The DA
DataControl automatically displays the values of individual OPC items. Two other
important features of the control are connection monitoring and the timeout feature.
The adjustable timeout specifies the time it should take to establish a connection to
the OPC server. Connection monitoring makes it possible to program an OPC
application so that it behaves in a controlled fashion in exceptional situations, such
as the loss of the network connection, a server crash, etc. The second ActiveX
control, the OPC DA Tree View Control, is a convenient tool for browsing the
namespace of an OPC Data Access server. The namespace appears on the screen
in the form of a tree. The control also offers a number of options for filtering by name,
data type or access rights. Users can choose how the namespace is represented.
The text, image and color of each object in the namespace can be individually
specified, along with the order of the objects in the tree. Tool tips show additional
information for each object in the namespace while browsing.

Figur 5: The OPC Client Controls allow process data to be visualized without programming.
Summary
Programs such as Excel and Visual Basic are becoming increasingly popular in the
field of automation. It therefore makes sense to employ these programs in
combination with OPC technology, the worldwide standard for visualizing and
processing control data. OPC client functionality in the form of an ActiveX component
can be used as a gateway between OPC servers and Excel, Visual Basic or other
ActiveX-enabled programs. Users gain twice the cost advantage here: Excel and
Visual Basic applications do not require runtime licenses, and OPC ActiveX
components and OPC servers cut the amount of programming needed.

Literature
[1] Softing AG, Haar: www.softing.com/opc

You might also like