Basic Wonderware Industrial Application Server Connection to TOP Server OPC Servers

Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
The purpose of this paper is to demonstrate how to make a basic connection to the TOP
Server with Wonderware’s Industrial Application Server (“App Server” or “Application Server”
for short). There are a number of different ways Application Server can connect to I/O tags.
This basic example uses an Application Integration (AI) Object connecting to a SuiteLink
Device Integration (DI) Object which connects to the TOP Server. The TOP Server in this
example is using the Simulation Driver, but the same steps are used to connect to devices in
the 70+ drivers available for the TOP Server. The information provided here is not a
substitute for your Application Server documentation. We are covering how to do this in order
to show a complete connection, not to provide comprehensive training on how to build
Application Server projects.
1) Configuring the TOP Server
Open the OPC Server from the Windows Start menu as shown below.
When the TOP Server opens you will see the User-Interface below. For more information on
configuring the TOP Server see the Quick Start Guide at the link below:
http://www.toolboxopc.com/Support/Quick_Start_Guide/quick_start_guide.html
Tags don’t have to be entered into the OPC Server as done in this example. Dynamic tags
can be added from within AI Objects as long as a Channel and Device are configured first in
TOP Server. The use of dynamic tags is covered at the end of this document.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-1-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
The Simdemo project, shown above, will open the first time you start the TOP Server. If you
need to open this project go to File|Open or click on the
Icon and browse to
Drive:\Program Files\Software Toolbox\TOP Server\Projects and select Simdemo.opf. Any
file you create will be saved to this location by default also and always ends with the “.opf”
extension.
The Simdemo project has a number of Channels and Devices configured
as show to the left. A TOP Server configuration requires a minimum of
one channel and one device configured. Each channel represents a
single network connection or thread of communication. When using an
Ethernet connection it is normally best to create only one device under each channel, so that
each device has its own connection.
Configuring Tags is done by highlighting the device you created and then right clicking under
the Tag Name column as shown below. The simdemo project has tags already created.
After right clicking, the Tag Properties dialog below opens.
The Name can be any meaningful
name and the Address is the
address in the PLC. You can
select the data type to use as well
as the Read/Write access. The
Scan rate is not used with OPC
connections. When using a
SuiteLink connection as
demonstrated in this example, it is
best to control scan rate in the TOP
Server Alias map for a particular
Topic as shown later in this
document.
Once you are done configuring your tags you are ready to connect with Application Server.
2) Configuring Application Server
This example starts with the ArchestrA IDE open using a new Galaxy. Refer to your
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-2-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Wonderware documentation on how to start a new Application Server project.
Our Galaxy is called SWTB_1 as seen in the Deployment
View to the left. For the purposes of this example we will
use only the Deployment View.
To start a new project we start with the System Object
under the Template Toolbox as shown to the right.
Highlight the $WinPlatform template object.
Drag and drop the $WinPlatform template object under the
Galaxy in the Deployment View as shown to the left. This
example will use the default names, but you can name
these objects as needed for your project.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-3-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
The AppEngine is the next System Object we need to
create for this project. Drag and drop the $AppEngine
template object under the Unassigned Host folder to
create your AppEngine_001 object as shown to the left.
The final System Object required is the Area Object. Drag
and drop the $Area template System Object to the
Unassigned Host folder under the Deployment View to
create the Area_001 object as shown to the right.
Refer to your Wonderware documentation for a better
understanding of how these logical objects work and how
to best name them for your system.
The AppEngine_001 and Area_001 can now be assigned
under the WinPlatform_001 object as shown here. There
is no configuration of these objects required for this
example.
Now that our System Objects are created and in place we can configure our DI or Device
Integration object.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-4-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
We start by selecting our template object from the
Template Toolbox. The $DDESuiteLinkClient object
template is selected because this example demonstrates a
SuiteLink to TOP Server connection
Drag and drop the $DDESuiteLinkClient template object
to the Unassigned Host folder in the Deployment View as
shown to the right to create our DDESuiteLinkClient_001
DI Object.
Open the DDESuiteLinkClient_001 object and the object
properties will appear to the right in IDE as show below
Click on the Server Node button as shown below.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-5-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
The Browse Node dialog will open and you should
highlight the Node you will be using then click OK.
Once the Server node is selected type, servermain, into the Server name field to tell the DI
Object to connect to the TOP Server.
Next click on the Topic tab as shown below
Click on the blue + icon to the right, as shown above and then enter in the TOP Server Topic
name that will be used. Once the topic is entered click on the
DI object.
icon to save and close the
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-6-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Topics can be found in the TOP Server under the Edit|Alias
map menu as show to the left.
More information on how to use Topics in the TOP Server can
be found by reading the paper:
Understanding TOP Server scan rate settings as they
affect applications using Wonderware InTouch
The Paper can be found at the link below:
http://www.toolboxopc.com/Support/More_Downloads/Using_a
nd_Setting_TOPServer_ScanRates.pdf
The Topic used in this example is
highlighted in the TOP Server
Alias Map to the right. You can
create your own alias names or
topics in the Alias map. More
information about adding Alias
names can be found in the TOP
Server help file and the document
noted above.
If you double click on the highlighted
Alias name the Alias dialog to the
left will open. You can add a new
name as well as control the polling
rate by changing the Scan rate
override. If this is left as 0 the scan
rate in each individual tag’s
properties is used or if dynamic tags
are used, the 100ms default is used.
To change this default just change
the Scan rate override to the polling value you need.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-7-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
We return now to the Application Server. Once the DI
object is saved you can assign the DI object by moving it
under the AppEngine_001 object as shown to the right.
The final object needed in order to connect to the TOP
Server is the $Integer Application Template. We are
using this object because the tag in the TOP Server we
will be connecting to in this example is an Integer. See
your Wonderware documentation for more information on
Application Objects.
Move the $Integer template Application Object under the
Unassigned Host folder as shown to the right to create the
Integer_001 Application Object.
Open the Integer_001 Application Object properties as shown below
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-8-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
You can enter the full path and tag name in the PV input source. In this case
Channel_0_User_Defined_Ramp or if your not sure what it is you can browse for one of the
DI object Attributes and change the last part of the name to the tag name as shown next.
Click on the attribute browser button as shown above under the I/O section of the Integer AI
Object. The Attribute Bowser as shown below will open.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
-9-
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Select the DDESuiteLinkClient_001 DI Object we created as shown above. The list of all
Attributes for this object will be shown if the “Show all attributes box” is checked as it is above.
Highlight one of the Attributes which points to the Topic we created earlier in this document –
Channel_0_User_Defined_Ramp. Click OK. If you had created Attributes in the DI Object
that pointed to Tags in the TOP Server or PLC addresses these tags would be in this list and
you could select them at this point as an alternative method, but is outside the scope of this
basic example.
Once the Attribute browser is closed highlight the text after the Topic in the PV input source
field as shown above. Make sure you don’t include the period or dot as this is needed as a
separator.
Now type in the name of the tag – “Ramp1” as shown above. The text in the PV input source
should now be – Channel_0_User_Defined_Ramp.Ramp1 and we are ready to save and
close the object. Click on the
icon to save the Integer_001 Application Object.
Once the object is closed, assign the Integer_001 AI
Object by moving it under the Area we created earlier as
shown to the left.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
- 10 -
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Now that all our required objects are configured and
assigned we are ready to deploy the objects and see
data! Right click on the WinPlatform_001 object and
choose Deploy as shown to the right.
The Deploy screen shown below will open. The options used for this example are shown. If
you prefer not to Cascade Deploy
you will need to Deploy the
different objects one at a time. It
is recommended that you deploy
the WinPlatform Object followed
by the Application Engine then
the Area then the DI object and
last the AI objects if you use the
single item deployment method.
Click OK to start deployment.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
- 11 -
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Once the Deploy screen
shows the deployment is
100% complete as shown
to the left, click Close
Now we are ready to view
our data.
3) Viewing Data
Click on the Object menu of the ArchestrA IDE as
shown to the right and select: View in Object
Viewer.
When the Object Viewer opens you will open the
tree view to the Integer_001 Applications Object
we created as shown to the left.
The list of attributes for the
Integer_001 object will be shown to
the right. Highlight the
PV.Input.Value attribute as shown to
the right.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
- 12 -
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Right click on the attribute and select Add to Watch as shown
to the left.
The Watch window will now show the value of our tag changing as shown below. This shows
the successful deployment
of an Application Object
connecting to the TOP
Server. We are now done with the example. You can connect to this tag with InTouch or
InSQL by browsing the Galaxy for the above tag. See you Wonderware Documentation on
how to connect InSQL or InTouch to tags in your Application Server Galaxy.
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
- 13 -
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Dynamic Tags
Dynamic tag addresses can be used with the TOP Server instead of adding tag in the TOP
Server. In the example here we added
the tag name from the TOP Server to
the Topic name as created in the DI
Object as shown to the right.
To make this a dynamic tag we would put in a valid device address for the driver we are
using. With the Simulator driver, used in the example, we would use K0001 for example. The
text in the PV input source would then read Channel_0_User_Defined_Ramp.K0001 instead
of the Ramp1 tag used in the example. In cases when the data type you want to read from a
PLC memory address is not the default memory type shown under the Addressing section of
the specific TOP Server driver help file you are using, you will need to add the data type
information to the end of the text. For example if you wanted to read the K0001 tag as a Float
or Real instead of the default Word data type you would use the following test in the PV input
source field:
Channel_0_User_Defined_Ramp.K0001@float
The “@float” tells the server that the address K0001 should be read as a float.
The information below will show you a few specific examples and list the different possible
data types that can be used after the @ sign. Remember to check the driver help file under
Addressing of the specific driver you are using as you may not need to add this additional
information.
Dynamic Tag Syntax:
TOPIC.PLCAddress@Datatype
Examples:
Modbus address 40001 read as a float from Device1 under Channel1 in the TOP Server
Channel1_Device1.40001@float
AB PLC5 address N7:0 read as a short or signed 16-bit value from a device called PLC5
under a channel called ENet in the TOP Server
ENet_PLC5.N7:0@short
Data Types Description
TOP Server
Boolean
Description
Single bit
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
- 14 -
Basic Wonderware Industrial Application Server
Connection to TOP Server OPC Servers
Word
Short
DWord
Long
BCD
LBCD
Float
String
Unsigned 16 bit value
Signed 16 bit value
Unsigned 32 bit
Signed 32 bit value
Two byte packed BCD
Four byte packed BCD
32 bit floating point value.
ASCII characters
© Copyright Software Toolbox Inc. 2002-2006, All Rights Reserved Worldwide.
All trademarks are property of their respective owners.
- 15 -