Вы находитесь на странице: 1из 19

KEPServerEX Client

Connectivity Guide

For Wonderwares Intouch



















KTSM-00006
v. 1.03




Copyright 2001, Kepware Technologies

KEPWARE END USER LICENSE AGREEMENT AND LIMITED WARRANTY

The software accompanying this license agreement (the Software) is the property of Kepware Inc, and is protected by
United States and International Copyright laws and International treaty provisions. No ownership rights are granted by this
Agreement or possession of the Software. Therefore, you must treat the Licensed Software like any other copyrighted
material (e.g., a book or musical recording), except that you may make a single copy for backup or archival purposes.
Your rights and obligations in its use are described as follows:

1. You may use and display this software on a single computer.
2. You may make one copy of the software for archival purposes or you may copy the software onto your hard disk and
hold the original for archival purposes.
3. You may not modify or attempt to reverse engineer the software, or make any attempt to change or even examinethe
source code of the software.
4. You may transfer the software to another computer using the utilities provided. However, the software must be used
on only a single computer at one time.
5. You may not give or distribute copies of the software or written materials associated with the software to others.
6. You may not sub-license, sell, or lease the software to any person or business.

Return Policy
The original licensee of the software can return it within sixty (60) days of purchase. Please call us for a Return Material
Authorization Number.

Limited Warranty
Kepware does not warrant that the Software will be error free, that it will satisfy your planned applications or that all
defects in the Software can be corrected. If Kepware provides information or assistance regarding the use of the Software
or otherwise, Kepware is not assuming the role of engineering consultant. Kepware disclaims responsibility for any errors
or omissions arising in connection with engineering in which its Software or such information or assistance is used.

The foregoing is the sole and exclusive warranty offered by Kepware.
Kepware disclaims all other warranties, express or implied, including but not limited to the implied warranties of
merchantability and fitness for a particular purpose, with regard to the licensed software and all accompanying materials.

In no event shall Kepware be liable for incidental or consequential damages, including lost profit, lost savings, lost
opportunities, or other incidental or consequential damages arising out of the use or inability to use the licensed software,
even if Kepware has been advised of the possibility of such damages.

Kepware's entire liability shall be, at Kepware's option, either (a) return of the price paid for the Software (or component),
or (b) repair or replacement of the Software (or component) that does not meet Kepware's Limited Warranty and which is
returned to Kepware within the warranty period. This shall be the sole and exclusive obligation of Kepware and your sole
and exclusive remedy with respect to any such failure. The Limited Warranty is void if failure of the Software (or
component) has resulted fromaccident, abuse or misapplication.

Support
Kepware provides unlimited e-mail support for all Software whether a demo or registered license. Kepware will provide a
total of two hours free phone support for all registered Software after paying the applicable license fees. Kepware will
provide unlimited phone support so long as you have paid Kepware any applicable maintenance or support fees and subject
to the terms of those agreements. All corrections and maintenance releases will be made available through Kepware's
Internet site. All major product releases of the Software are subject to upgrade fees. At no time will on-site support be
provided without advance payment to Kepware for a minimumof two days on-site engineering support services, plus all
expenses.

Trademarks
Microsoft

and Microsoft Excel

are registered trademarks, Windows is a trademark of Microsoft Corporation.



32 Bit KEPServerEX Connectivity Guide
Kepware Technologies
P.O. Box 579
Portland, Maine 04112
Sales: (207) 775-1660 x208
Technical Support: (207) 775-1660 x211
Fax: (207) 775-1799
E-mail: sales@kepware.comor
technical.support@kepware.com
www.Kepware.com

2 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies i
Table of Contents
INTRODUCTION TO KEPSERVEREX..................................................................................... 1
ACCESSING KEPSERVEREX.................................................................................................... 1
USING KEPSERVEREX DRIVERS...................................................................................................2
WONDERWARES INTOUCH AS A FASTDDE OR SUITELINK CLIENT............... 3
CONNECT TO KEPSERVEREX WITH FASTDDEOR SUITELINK...............................................3
Verify FastDDE/SuiteLink Support in the Server ..................................................................... 3
Add an Alias (DDE Topic)........................................................................................................ 4
Create an InTouch project..................................................................................................... 5
Add Access Name Links to your Project..............................................................................6
Add Tags to the Tagname Dictionary...................................................................................9
Create a Window to Show the Device Values......................................................................... 10
Add and Animate a Text Object.........................................................................................11
CHECK THE CONNECTION TO THE SERVER AND VIEW DATA.......................................................13
KEPWARES OPC QUICKCLIENT AS AN OPC CLIENT .................................................. 15



Copyright 2001, Kepware Technologies Introduction to KEPServerEX 1
Introduction to KEPServerEX
KEPServerEX is a 32 bit windows application that provides a means of bringing data and
information from a wide range of industrial devices and systems into client applications on your
windows PC. KEPServerEX falls under the category of a "Server" application. It is very common
to hear the term "client/server application" in use across many software disciplines and business
segments. In the industrial market, it has usually come to mean the sharing of manufacturing or
production data between a variety of applications ranging from human machine interface software
and data historians, to large MES and ERP applications.
Regardless of the business segment served, client/server applications have one thing in common: a
standardized method of sharing data. In the industrial segment, many client/server technologies
have been developed over the last ten years. Initially, some of these technologies were proprietary.
In many cases these proprietary client/server architectures were in wide use but remained
unavailable to third party applications. Early in the development of windows, Microsoft provided
a generic client/server technology called DDE or Dynamic Data Exchange. DDE did provide a
basic architecture that would allow many windows applications from a wide range of vendors to
share data, but there was one problem. DDE was not designed for the industrial market. It lacked
much of the speed and robustness desired in an industrial setting. However, this did not stop DDE
from becoming a dominant client/server architecture, largely due to its availability in most
windows applications. In time, variations on Microsoft's DDE were developed by some of the
leading vendors in the market. These variations addressed some of the speed and reliability issues
of DDE but many people in the industrial segment agreed that a better system needed to be
developed.
With the advent of 32 bit Operating Systems, and the use of Ethernet to provide communications
between devices, there was a need for quicker and cleaner data transfer between software
applications. This is where OPC saw its birth into the industry.
OPC (OLE for Process and Control) servers provide a standardized method of allowing multiple
industrial applications to share data in a quick and robust manner. The OPC server provided in
this package has been designed to meet the demanding requirements found in the industrial
environment.
This OPC server has been designed as a two-part program. The primary component provides all
of the OPC and DDE connectivity as well as the user interface functions. The second part is
comprised of plug-in communications drivers. This two-part design allows you to add multiple
communications options to your SCADA application while utilizing a single OPC server product
thus reducing your learning curve as your project grows.
OPC technology reflects the move from closed proprietary solutions to open architectures that
provide more cost-effective solutions based on established standards.
Accessing KEPServerEX
A Windows based client application must be used to view data from the KEPServerEX
application. In this section we will cover the basics of connecting a number of common OPC
clients to KEPServerEX. While we cannot possibly cover every client application that exists, we
believe that after reviewing this document you should be able to deal with most client
applications.

The intention of this section is to show connectivity to KEPServerEX. It is assumed that you have
already either configured your KEPServerEX application by selecting the appropriate driver and
settings or you have run the Simulator demo (Simdemo.opf) which is included with
KEPServerEX. For simplicity, the Simdemo project will be used for all examples contained in
this section.

Before beginning any of the examples, start the KEPServerEX application by selecting it from
your Start Menu or from its desktop icon. Once the server is loaded, use the File|Open command
to load the Simdemo project. The KEPServerEX application is always active once you have
opened an existing project or configured at least one channel and device in a new project. After
you have selected a project, in this case the Simdemo project, KEPServerEX will automatically
load this project when an OPC client application invokes KEPServerEXs OPC server component.

Users have always had the ability to create what we refer to as user defined tags in their
KEPServerEX application. Prior to OPC, defined tags gave a DDE application designer the
ability to create a label for device data. Assume register 1000 contained the value of parts made,
without defined tags a DDE application would have directly accessed register 1000. Using
defined tags a label can be created like PartsMade. Now the DDE application could access the
data via this new label, removing the machine level knowledge from the client application and
keeping it at the server level where it belongs. This label, while useful for DDE is a necessity for
OPC clients. For OPC clients, defined tags take on a greater role. Like the DDE example, defined
tags allow you to create labels for your device data and keep the configuration of those tags in the
server. OPC clients have a major advantage over DDE clients. OPC clients can browse the
defined tags you create in your KEPServerEX application, which allows you to simply point and
click on a tag to add it to your OPC client project.
OPC Tag Browsing allows
you to see a list of the
defined tags you have
created in your
KEPServerEX application,
directly within your OPC
client application.

For more information on defined tags see the Designing a Project section of the KEPServerEX
help file, which can be accessed from the Help/Contents menu selection of the KEPServerEX
application.

Using KEPServerEX Drivers
Part of the innovative design of Kepwares OPC/DDE Server Technology is the separation of the
Hardware Protocol Driver from the Server Technology. This separation allows the user to use one
or more drivers in the server at the same time. Each driver has its own help file which provides
information on devices supported, communications parameters, cabling, addressing, and error
messages.

The driver help file should contain all of the information you will need to connect your device to
the PC so that the we can talk to it. If you do not connect to the device be sure to check the error
messages and look up their meaning in the help file.


2 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 3

Wonderwares InTouch as a
FastDDE or SuiteLink Client
Connect to KEPServerEX with FastDDE or
SuiteLink
Wonderware provides several ways to connect to third party servers like KEPServerEX. At the
core of all Wonderware connectivity is FastDDE and SuiteLink. FastDDE and SuiteLink allow
Wonderware applications such as InTouch to receive data from servers like KEPServerEX. The
following steps will show you how to create FastDDE and SuiteLink connections to
KEPServerEX. For our example we used InTouch V7.1 and KEPServerEX V4.40.154.
Verify FastDDE/SuiteLink Support in the Server
1. Start up the KEPServerEX Simdemo.opf project.



2. It is important to make certain that the server properly detected that you have
Wonderware installed and that it enabled FastDDE and SuiteLink support. You can do
this by selecting Tools|Options from the server main menu.
3. If Wonderware was properly initialized on your PC and the server detects it, you should
see the FastDDE/SuiteLink tab in the Options dialog box. If the tab exists then click on it.



4. Verify that Enable FastDDE/SuiteLink connections to the server is checked. The client
update rate is set to 100msec by default and can be changed at any time.
5. Click OK to close the Options dialog.
Add an Alias (DDE Topic)
DDE connections consist of three components, an Application name, a Topic, and an Item. When
connecting to KEPServerEX via Fastdde or Suitelink the Application name will always be
Servermain. This name is automatically defined in the server and cannot be changed for
Fastdde/Suitelink connections. There are two ways to reference the Topic component. The first
way is via a Topic reference of _ddedata. If you would like more info on this method please
refer to the How Do I section of the KEPServerEX main help file. The preferred method to
reference the DDE Topic is using the Alias Map feature of the server. The Alias Map is a special
feature that simplifies the use of server data in DDE applications. Additionally, the Alias Map
provides a mechanism for backwards compatibility with legacy Kepserver V3 applications. In
this example we will merely explain how to create or use an Alias, if you would like more
information please refer to the KEPServerEX main help file.
You cannot use
dynamic tags with
tag groups. See the
KEPServerEX help
file for an
explanation of
Dynamic and Static
tags.

If you are upgrading from a legacy Kepserver V3 project, simply select a file type of .kdp from the
server File|Open menu option and then save your project into the new .opf format. When you do
this, Alias references will be created automatically. To view these alias references select Edit|Alias
Map from the server main menu.

In the two examples below you will see aliases made to ensure backwards compatibility and you
will see the aliases that the server automatically creates for a project. You will notice that in
KEPServerEX the automatic alias is a combination of the channel and device name. The server
will modify these automatic aliases whenever you make changes to the Channel or Device name.
For a detailed explanation on creating aliases see Designing a KEPServerEX Project in the
KEPServerEX help file.

4 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 5

Alias map of imported legacy Kepserver V3 project
file. Notice that the Alias name is the same as the
device name.


Example of imported project after it has been re-
opened. Notice that the server automatically creates
an Alias composed of the channel and device name.

6. In this example we are using the sample KEPServerEX project called Simdemo.opf, so
you will not need to create an alias.

If you wish to learn how to create aliases for your device and group folders, then go to Designing
a KEPServerEX Project in the Server Help file.
Create an InTouch project
Now we need to create an InTouch Application Project. The InTouch project will act as the DDE
client to the KEPServerEX. If you are using the Simdemo.opf server project it will return
simulated data to InTouch. If you are using one of the more than 50 actual device drivers in the
server, the server will use the device driver to poll the PLC or device and return the data to the
DDE client.
1. Start the InTouch Application Manager and then create a new project by selecting
File|New from the main menu.



2. In the Create New Application dialog box enter a Name for your new Intouch project.
You may also enter a Description if you wish. Once your are done, click Finish to
continue and start InTouch WindowMaker.


Add Access Name Links to your Project
Now that we have a new application we need to link it to Kepwares server.

6 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 7
1. For multiple server devices, remember to create a separate Access Name for each Device
in your KEPServerEX project. In this example we will create a single Access Name,
which will be linked to the first Device in the KEPServerEX project (Device_1). To do
this select Special|Access Names in the WindowMaker main menu.
See the InTouch Users
Guide and Reference
Manuals for details on
creating and using
Access Names in
applications.



2. Click on Add to add a new Access Name.



If we were connecting
to a remote PC then
we would enter its
Name in Node Name.
3. Enter a unique Access Name, we made ours KEPServerEX_FS. The Application Name
will always be Servermain. The Topic Name will be the alias that we created for the
first device Device_1. Leave the Node Name blank.
4. This will be a DDE connection so we will select that protocol option.
5. We will select Advise only active items. See the InTouch Users manual for an
explanation of the two Advise options.



6. Click OK to add the access name. For our example we will also add an access name for a
SuiteLink connection.
7. For SuiteLink connections to other PCs you should enter a Node Name which will be the
name of the PC that is running the server project you wish to connect to, otherwise leave
it blank.



8. Once you have added all of the Access Names click Close to return to your project.



8 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 9
Add Tags to the Tagname Dictionary
Now that we have created the links to the server we can add tags to the Tagname Dictionary.



1. Select Special|Tagname Dictionary from the WindowMaker main menu.



2. In the Tagname Dictionary click on New to add a new tag.
3. Because we started adding tags while we were on an internal tag the new tag form opens
with a tag type of Memory Integer. We will be using an Integer as well so click on Type
and select I/O Integer from the list.
4. Next click on Access Name to select where the data for this tag will be coming from.
We chose KEPServerEX_FS for this tag.
See the InTouch Users
Guide and Reference
Manuals for details on
creating and using
Tags in applications.
5. Enter a Tagname for the tag, we entered KEPServerEX_INT1 for this tag.
6. For the Item field at the bottom left of the tag property window, we used a reference of
Tag_1. This tag had been pre-defined in the server Simdemo project and is called a User
Defined tag. In the server the data type is defined as Short which is a signed 16-bit
integer.
7. Click on Save to accept the new tag. At this point you can go to the next section and
display data if you wish.



8. Next we are going to add a second tag. This is an example of a dynamic tag.
9. The new tag will have a Tagname of KEPServerEX_INT4_Dynamic and the item will be
R200, which is a valid address within the server. We assigned this one to our SuiteLink
node, Access Name KEPServerEX_SL.


If you would like more info on Dynamic and User-Defined tags, please
refer to the Designing a KEPServerEX Project (Step5) of the server
main help file.
10. Once you have added your tags click Close to close the Tagname Dictionary.
See the InTouch Users
Guide and Reference
Manuals for details on
creating windows in
applications.
Create a Window to Show the Device Values
Now we need to display our data in our project.
1. In the WindowMakeer main menu click on New|Window to add a new window to the
project.
10 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 11


2. Give your window a name that will be displayed on the Title Bar, if checked, and click
OK to accept the properties.


Add and Animate a Text Object
Now we need to add a text object to show the value of one of our tags.
3. On the WindowMaker Toolbar select the Text icon.

4. Click on the object window and create a data object by entering the maximum number of
0 digits that the item data will display.


5. Double click on the new text object to add an animation link to it.
6. For the purposes of our demo we are selecting Analog User Input under Touch Links.



7. Clicking the Analog button will also check the use box and open the animation properties
dialog for it.



8. Enter the Tagname to display, we chose to use Tag KEPServerEX_INT1.

12 Copyright 2001, Kepware Technologies

Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 13


9. Click OK to exit.

Check the Connection to the Server and View Data
1. To view active data, click on runtime in the upper right corner of WindowMaker. You
should now see data ramping in the WindowViewer as well as an active client and items
on the Connection Status Bar at the lower right edge of the KEPServerEX project
window.



2. If you do not see a ramping value, compare the configuration steps in this documentation
to your project to verify that everything is configured correctly. Check the server
Connection Status Bar to confirm that your InTouch application is connecting to the
server, and then look in the Event window in the bottom of the server application view to
check for error messages. If you have questions, please refer to the Support section of
www.kepware.com for technical support assistance.












14 Copyright 2001, Kepware Technologies








































Copyright 2001, Kepware Technologies Wonderwares InTouchas a FastDDEor SuiteLinkClient 15
Using Kepwares OPC Quick Client
Kepware provides an OPC client application for testing purposes with each installation of KEPServerEX. For
more information on Kepwares OPC Quick Client, please see the OPC Quick Client help file.

Вам также может понравиться