You are on page 1of 38

Users Manual

OPC EasyServer
Users Manual

This document applies to the following product:

OPC EasyServer from version V18.0.2 on

1999 - 2004 by Festo AG & Co. KG. All rights reserved. Distribution and/or reproduction of this document or parts thereof in any form is permitted solely with the written permission of Festo. The technical data contained herein have been provided solely for informational purposes and are not legally binding. Subject to change, technical or otherwise.

Users Manual

Contents

Overview

3 Installation ..................................................................................................................................4 Package Installation ....................................................................................................................4

Editor

4 Introduction.................................................................................................................................4 Menu reference ........................................................................................................................... 5 Screens ....................................................................................................................................... 6 Toolbar ......................................................................................................................... 6 Statusbar......................................................................................................................6 Project Pane ................................................................................................................. 6 Tags Pane (Namespace) ............................................................................................... 6 Identity Pane ................................................................................................................ 7 History Pane ................................................................................................................. 7 Plugin Pane .................................................................................................................. 7 Options........................................................................................................................................ 7 Dialoges ...................................................................................................................................... 8 Init (startup) action dialog ............................................................................................ 8 Define Plugin Module dialog......................................................................................... 8 Define Project Identity .................................................................................................. 9 Plugin Details dialog..................................................................................................... 9 Project Statistics dialog ................................................................................................ 9 Project Summary dialog.............................................................................................. 10 Find dialog.................................................................................................................. 10 Namespace Object Editor ........................................................................................... 10 Open Registered Project dialog .................................................................................. 10 Register Server (DCOM).............................................................................................. 10 Project ....................................................................................................................................... 11 New project - Manual Creation.................................................................................... 11 New project - Cloning.................................................................................................. 11 New project - Importing .............................................................................................. 12 Register a project ....................................................................................................... 12 Unregister project....................................................................................................... 12 Addin Modules .......................................................................................................................... 12 Using Addin modules.................................................................................................. 13 Text File Export/Import ...............................................................................................14 Comma Separated (CSV) Text File Export/Import........................................................14 Festo FST Project Import.............................................................................................14

Server

14 Configuration............................................................................................................................. 15 Plugin Modules.......................................................................................................................... 15 Festo EasyIP Protocol ................................................................................................................ 16 About EasyIP Communication..................................................................................... 17 PLC Station Resource ................................................................................................. 17 Data Type Resource.................................................................................................... 18 Tag ............................................................................................................................. 19 Diagnostics Tag .......................................................................................................... 20 Add Multiple Tags....................................................................................................... 20 Festo Serial (CI) Protocol ........................................................................................................... 21 About Serial (CI) Communication................................................................................ 21 PLC Station Resource ................................................................................................. 22 Data Type Resource.................................................................................................... 23 Device Tag ..................................................................................................................24 Information tag...........................................................................................................24 Add Multiple Tags....................................................................................................... 25

OPC EasyServer

Users Manual

Festo CI Protocol via Modem ..................................................................................................... 26 Technical description.................................................................................................. 26 PLC Station Resource ................................................................................................. 28 Data Type Resource.................................................................................................... 29 Tag ............................................................................................................................. 30 Information tag........................................................................................................... 30 Festo VipWin SCADA.................................................................................................................. 32 Address Space Organization....................................................................................... 32 Runtime Behavior....................................................................................................... 32 Information vs. Online tags......................................................................................... 33 VipWin SCADA Resource............................................................................................. 33 VipWin SCADA Information/Online Resource.............................................................. 33 VipWin SCADA Online Tag .......................................................................................... 34 VipWin SCADA Information Tag .................................................................................. 34 Simulation................................................................................................................................. 34 Administrator Test Client 34 36

OPC EasyServer

Users Manual

Overview
OPC EasyServer is an OPC Data Access Custom Interface server with a corresponding editor and a set of plugin and addin modules. Server (part of the Suite) is compliant with OPC Data Access Custom Interface specification 1.0a and 2.x. Server becomes a valid OPC server only when it loads a valid project. Editor is a generic editor that is used to create a project. Project completely defines the server i.e. it defines its address space, behavior etc. Plugin Module gives the functionality to the server. Basically, plugin module knows how to obtain data from a specific device. These data are then delivered to the server. Plugin modules are encapsulated in a DLL that is loaded both by the Editor and the Server. Addin modules are basically export/import modules and are used exclusively by the Editor. Administrator is a separate utility to check the consistency (on the local machine) of the installed OPC EasyServer, plugin and addin modules. In addition, Administrator also displays all registered OPC Servers on the local machines. Test Client is a utility that is used to test OPC EasyServer. This is an OPC Client that enables the user to select an OPC Server, connect to it, add items and view item values, quality etc. Modules that are part of OPC EasyServer are interconnected according to the following picture:

OPC EasyServer Agent

OPC EasyServer Test Client

OPC EasyServer Server

OPC EasyServer Plugin Module

Project File Windows Registry OPC EasyServer Editor OPC EasyServer Addin Module

OPC EasyServer Administrat or

OPC EasyServer

Users Manual

Installation
Usually, installation starts automatically on inserting the CD. To start installation manually, start SETUP.EXE in the root directory . Installation program will guide you to gather all data for a successful OPC EasyServer installation. When installation is finished, you have to enter the license number from the sticker of the CD cover in Editor, menu Help / Register.

Only with a valid license number, OPC EasyServer runs with full functionality. Without licensing, OPC EasyServer installation can be used as a demo version.

Package Installation
OPC EasyServer version 1.8.00 introduced package files. Package file is a special, compressed file that contains files that can be installed on the computer and within an installation folder of OPC EasyServer. Package files are used to: Install new or updated plugin modules 1. Install new or updated addin modules Package files have an extension .pak. Using package files is easy because all important information is automatically detected and displayed by the Editor. Note: Before installing package files, be sure to verify that it does not have a read-only attribute. This may cause problems when installing it.

Editor
Introduction
Main purpose of the Editor is to create/modify a project. Considering that correctly defined project corresponds to a single OPC server, Editor can also be defined as a tool that creates/modifies the OPC servers. Editor can only work with projects associated with one of the supported plugin modules. Editor is generic. It is actually a shell whose appearance and functionality is defined by the plugin module associated with the project loaded in the Editor. To see how to create or modify a project, visit one of the following topics: Manually create new project Create new project using wizard Create new project by cloning an existing one Create new project using import To see how to register or unregister a project, visit one of the following topics: Register project Unregister project
4 OPC EasyServer

Users Manual

Menu reference
File New Session Open Project Save Save As Export Import Edit Insert Object Delete Object Object Properties Select Object Editor Find Find Results View Namespace Identity Plugin History Toolbar Statusbar Properties Hints Project Project Identity Define Plugin Plugin Configuration Plugin Details Project Summary Project Statistics Register Project Unregister Project Tools Customize Options Server Location Integrity Check Administration Help Contents Register About Displays online help Register product Displays about dialog Displays global options dialog Define OPC EasyServer location Perform integrity check on a local machine Starts Administrator application Displays dialog with project identity Displays dialog to define a plugin module Activates a plugin module configuration dialog (valid only if plugin module supports configuration) Displays plugin module details Displays project summary dialog Displays project statistics dialog Register currently active project Unregister currently active project Alt+0 Alt+1 Alt+2 Alt+9 Displays namespace pane Displays project identity pane Displays plugin information pane Displays history pane Show or hide toolbar Show or hide statusbar Displays floating/docking window with object properties Show floating window with context sensitive hints Ctrl+F F3 Ins Del Alt+Enter Insert a resource or tag object Delete currently selected resource or tag object Show currently selected resource or tag properties Defines the method for editing resource or tag properties. Activate find Displays results of find operation Ctrl+N Ctrl+O Ctrl+S Displays "What do you want to do?" dialog Opens an existing project Save an active project Save active project under different name Export project using addin module Import project using addin module

OPC EasyServer

Users Manual

Screens
OPC EasyServer Editor is a standard single document interface application. Main screen is splitted into different panes. On the left side is the project pane. Project pane is the main pane that contains the complete definiton of the project. Depending on the selection in the project pane, right side pane may contain different content. Available contents are: Identity pane Plugin pane History pane Tags pane Status bar of the main screen contains various information about the current project. Below the menu is the toolbar with buttons for fast access to many editor features.

Toolbar
Toolbar displays shortcut buttons to various actions within the Editor. Place a mouse pointer above the button to see a hint describing the purpose of the button.

Statusbar
Statusbar displays various information about the status of the Editor and currently loaded project file. Most important information are: Animated green arrow indicates that the plugin module is loaded and running. Light blue box indicates that there is a new message in the history pane. If a mouse pointer is placed above the box, Editor displays a hint message describing the purpose of the box.

Project Pane
Project pane contains a tree that contains shortcuts to various information contained in the currently loaded project file. By

selecting an item in the tree, right side pane displays different information.

Tags Pane (Namespace)

Tags pane contains a list of tags associated with a resource selected in the project pane.

OPC EasyServer

Users Manual

Identity Pane
This pane displays the complete identity of the currently loaded project. This identity determines the complete behavior of the OPC server. Project identity consists of the following information: Plugin module that knows how to obtain data Registration information published to OPC clients Without complete project identity, it is not possible to register a project as a valid OPC server.

History Pane
History pane contains a list of actions performed by the editor and various information from the editor to the user. Typical content of the history pane is the following: Editor has opened a project file Information if the product is licensed or not. Information about registration of the project file Etc.

Plugin Pane
This pane displays a complete documentation of the plugin module associated with the currently loaded project. Plugin module documentation is displayed as a plain text and contains the following information: Version information Complete address space structure General information These information are given for better understanding of the plugin module.

Options
This dialog shows Editor configuration. Editor configuration is global and valid for all projects (configuration is kept in the Windows registry database). Default project location Determines a directory that will be used as a default location for loading and saving projects. This field may be empty. If this field is empty, Editor will use current directory. Goto namespace view after loading the plugin module If this option is checked, Editor will automatically switch to namespace view after loading the plugin module. Prompt user for registration after completing project identity Project can be register only if (1) it is saved as a file on disk, (2) it has a valid plugin module, (3) it has a valid project identity and (4) it is not already registered. If this options is checked, Editor will ask the user to register the project once all previously mentioned conditions are satisfied. Automatically load last active project on startup If this option is checked, Editor will load the last active project. If this option is not checked, Editor will display the initial "What do you want to do?" dialog.

OPC EasyServer

Users Manual

Dialoges

Init (startup) action dialog


When Editor is started (or when a new session is activated), editor will display a "What do you want to do?" dialog. This dialog offers several options for starting your work: Create a new project Create a new project using wizard Open an existing project Clone an existing project Open last project Open registered project Clone last project Note: It`s strongly recommended to use the Wizard for creating new projects!

Define Plugin Module dialog


Each project must be associated with a plugin module. Without the plugin module, it is impossible to define the project namespace and register the project as a valid OPC server.

OPC EasyServer

Users Manual

This dialog shows a list of registered plugin modules. Select a desired plugin module and click Ok button. If you are not certain which plugin module is behind its ID, select the plugin module and click "Details" button. This button displays a separate dialog that shows plugin module details. This dialog is not available if any of the following conditions are satisfied: Current project is already registered as a valid OPC server. Namespace of the current project contains one or more objects (resources and/or tags). Related topics: Define Project Identity Plugin details

Define Project Identity


In order to register the project as a valid OPC server, user must define all project identity fields. These fields are: Company name Project name Project version By combining these fields, Editor creates all necessary strings for project registration. Globally Unique Identifier (GUID) necessary for the project is automatically assigned by the Editor. Related topics: Define Plugin Module

Plugin Details dialog


This dialog shows details for the plugin module. In order to obtain this information, editor temporarily loads a plugin module. Related topics: Define Plugin Module

Project Statistics dialog


This dialog offers a short statistical overview of the project namespace. Following information are displayed: List of all resources Number of tags and resources within each parent resource Total number of tags and resources in the project When an item in a list is selected, Show button will close the dialog and activate the selected resource in the project view of the Editor. Project view

OPC EasyServer

Users Manual

Project Summary dialog


Each project has a summary information collection. These information offer an easy way to describe the project and determine project history (creation and last modification date). Following information are stored in the project summary: Title Subject Author

Find dialog
Find dialog offers a fast and easy way to search for resources and tags in the project namespace. The results of the find operation are displayed in a separate window. User can show or hide this window. In addition, it is possible to accumulate results of multiple find operations. Context menu of the find results window offers a possibility to jump directly to a selected tag or resource. To activate find dialog, press Ctrl+F. To show or hide (toggle) find result window, press F3.

Namespace Object Editor


Most of the plugin modules have their own integrated object (resource/tag) editor. These editors have an advantage over a default (built in the editor) object editor because they are customized for a specific type of resources / tags supported by the plugin module. In case the plugin module does not have an object editor, Editor offers its own generic editor. This editor displays properties of the selected resource/tag in a grid like dialog. Use modue or keyboard to select an property and press F2 to edit the property.

Open Registered Project dialog


This dialog lists all projects that are currently registered on a local machine as valid OPC servers. There is no difference between a registered and unregistered project - project structure and contents is exactly the same. However, there is a difference in Editor behavior. Editor and registered project In this case, Editor prevents the user to modify any of the server related information. This includes project identity and defined plugin module. These modifications are prevented in order to maintain overall system integrity. Editor and project that is not registered In this case, user can modify any of the project settings including project identity and defined plugin module. Of course, user can always open a registered project, then unregister it and work with the project as if it has never been registered. This is possible because unregistered projects are removed from the system registry.

Register Server (DCOM)


OPC EasyServer fully supports activation by remote clients (via local network). However, this requires additional settings of the local network, network server and computer on which OPC EasyServer is registered. First of all, in order to allow user on remote computer to activate OPC EasyServer, computer must be configured to support Distributed COM (DCOM). To verify that Distributed COM is enabled, start dcomcnfg.exe from Run menu. If any message boxes are displayed, click No. Then go to Default Properties tab. First option defines whether Distributed COM is enabled. Note that this application looks differently on different operating systems (previous description is for Windows 2000 Professional). Alternative method to check Distributed COM is to open registry editor (regedit) and goto key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole and check the value EnableDCOM. If it is set to Y, Distributed COM is enabled. When registering OPC EasyServer, Editor offers 3 possibilities related to the method of starting OPC EasyServer when it is activated by a request from OPC Clients on remote computers. The methods are: Launching User This is a default mechanism offered by Windows operating system. However, it is not default in OPC EasyServer editor. There are several reasons.

10

OPC EasyServer

Users Manual

First, each client request to start an OPC EasyServer will create a new instance of OPC EasyServer. This will present fundamental problems if OPC EasyServer uses hardware resources on the computer (such as serial communication) because only the first instance will succeed in opening hardware resource. All other instances will fail. In addition, various Windows technology (such as VBA) may fail to work properly. Second, every instance of OPC EasyServer is created within the context of an invisible Windows station. As a result, user logged on to the computer will not be aware that OPC EasyServer is running. In addition, any messages displayed by OPC EasyServer will be invisible. There is one advantage of this mechanism user does not have to be logged on to the computer in order to start OPC EasyServer. Interactive User This is a default mechanism offered by the OPC EasyServer editor. When a remote client requests OPC EasyServer activation, it is activated within a context of the currently logged in user. This means that OPC EasyServer behaves exactly as if it has been started by the locally logged user. Any messages displayed by OPC EasyServer are visible. However, this method will fail if there is no user logged in. Specific User Account When a specific user account is used, it is necessary to define a specific user name that will be used to start the OPC EasyServer. This means that Windows operating system will create a specified user account and start the OPC EasyServer within this account. To specify a user name, always specify machine name and user name. For example, MYSERVER\DAVE defines the computer MYSERVER and user name DAVE. Before actually starting OPC EasyServer as a result of client request coming from a remote computer, operating system will first check if the remote user has authority to start the server. This means that user that is trying to start OPC EasyServer must be defined in such a way that Windows on the computer where OPC EasyServer is running must be able to authenticate the user rights. Note: that this discussion relates only to OPC EasyServer activation by client on remote computers!

Project

New project - Manual Creation


When you manually create a project, all parameters and actions have to be performed manually. In order to manually create an project, follow these steps: Define a plugin module Define project identity Define namespace for the project (resources and tags) Save the project file Register the project After completing these steps, you have a valid Server that can be started and used by any OPC compliant client. New project - Using Wizard The easiest way to create a project is to use a wizard. Wizard will guide you through all the steps for creating a new project. The only action that is performed outside of the wizard is to create an address space (namespace) of the project.

New project - Cloning


When cloning a project, Editor will perform the following actions: Create a new project that uses the same plugin module as the one that is being cloned. The cloned project is saved in a file whose name and location user has to define before cloning starts. Content of the project that is being cloned is copied to a cloned project.

OPC EasyServer

11

Users Manual

After cloning is successfully completed, new project needs only an identity before it can be registered and used as a valid OPC server.

New project - Importing


New project can be created by importing a project that has been previously exported using any of the supported addin modules. See a documentation for addin modules for further information.

Register a project
Registering a project means to store information about the project and server in the Windows registry. Once the project is registered, it is available to any OPC compliant client. In order to register a project, project must satisfy the following conditions: Project must be stored in a disk file Project must have a plugin module defined Project must have a project identity Location of the Server must be defined Technically, it is not necessary for the project to have a namespace defined. However, project without the namespace is not useful because it cannot accept any item from the client. Editor will prevent a user to modify any of the key information (project identity or file name) for a registered project. Namespace can be changed.

Unregister project
When a project is unregistered, all information about the project are removed from the Windows registry. This project is no longer visible and usable by the OPC clients.

Addin Modules
Editor can dynamically load an addin module that contains an export and/or import functionality. Using addin modules allows a user to easily perform the following tasks: Export current namespace and plugin identity. Create a new project by importing namespace (plugin module is automatically loaded). Add imported namespace to an existing project.

Using addin modules is simple but offers a lot of advantages. For example, user can define a project and a simple namespace (like a template). By exporting the project using any of the addin modules that support export functionality, user may complete the namespace outside of the Editor. Once completed, user can import the namespace and continue to work on the project. To find out how to install and use addin module(s) from within the Editor, go to the following topic: Installing addin modules Using addin modules

12

OPC EasyServer

Users Manual

Editor currently supports the following addin modules: Single text file Text file is in user friendly format and is mostly used for text editing with a standard ASCII text editor (like NotePad or similar). Both export and import are supported. Comma separated (CSV) text file Comma separated text file is directly supported by Microsoft Excel. Both export and import are supported. When exporting, description file (extension .csd) is created and a set of CSV files where each file corresponds to a single resource/tag level. Festo FST Allocation file The easiest way to create a project that uses variables imported from the FESTO FST allocation file (.BEL file). Only import is supported. VipWin Variables import Import VipWin variables from a dBase file created with VipWin Editor (export variables). Valid till VipWin V5.50! Go to the link above to see detailed description.

Using Addin modules


Addin modules are seamlessly integrated in the Editor. When the Editor is started, addin modules are not loaded -- each addin module is loaded on demand and automatically unloaded when it is no longer needed. Addin module may support both the export and import functionality or just one of these. Which functionality is supported depends on the addin module. For example, text addin module supports both export and import while FESTO FST addin module supports only import. Exporting Export is available only if the namespace of the currently loaded project contains at least one resource/tag. Considering that resources/tags may be defined only if plugin module is defined and loaded, it is possible to use export if the following conditions are satisfied: Plugin module is defined and successfully loaded. Namespace contains at least one resource and/or tag. In order to execute the export, follow these steps: Select \File\Export menu option in the Editor. Select the addin module to use for export from a list of addin modules. Once you select the addin module to use for export, Editor will load a selected addin module and execute the export. When the export is finished, Editor will show a status of the export operation in its output window. Importing Import is available at any time. There are two possible scenarios in which import operation is executed: Editor does not have a valid project. In this case, Editor will display a list of plugin modules supported by the imported file or addin module and, once the plugin module is selected, will create a new project with the selected plugin module and a namespace that is coming from the imported file. Editor has a valid project. As before, Editor will display a list of plugin modules supported by the imported file or addin module but will also display the currently loaded plugin module. If the selected plugin module is the same as the currently loaded plugin module, Editor will enable the option to add the imported file to a current project. Otherwise (selected plugin module is different from the currently loaded plugin module), it is possible only to create a new project. If the imported namespace is added to a current project, each resource/tag coming from the addin module is subject to validation by the plugin module. It is possible that the plugin module will reject resource(s) and/or tag(s).

OPC EasyServer

13

Users Manual

If the import operation is completed successfully, Editor will have a valid project that can be saved and used for later work.

Text File Export/Import


This addin module implements the import / export of the project from / to simple and user-friendly text file. This text file is suitable for editting using a plain ascii text editor. Once the modifications are completed, user can import the text file into the Editor. Note that complete project is exported to or imported from a single text file. Text addin module supports any plugin module ie. it is possible to use it for any project.

Comma Separated (CSV) Text File Export/Import


This addin module supports the export of the project to a set of .csv files or import the project from the .csv files. Note that .csv files are automatically recognized by the Microsoft Excell. Besides creating a set of 1 or more .csv files, special file with the extension .csd is also created. This file contains a list of .csv files that are part of the single export. When importing project from a .csv files, select the .csd file. Special .csd file should not be modified because it contains important information about the project plugin module and a list of .csv files that contain the project. Text CSV addin module supportes any plugin module ie. it is possible to use export/import for any project.

Festo FST Project Import


Addin module for the FST project import allows a user to import the allocation file (extension .bel) from the FST project into the Editor and to automatically either create a new project or to add new tags to an existing project. In order to use this addin module, simply select the FST allocation file on a disk. Addin module will automatically import the content of this file and display statistics about the variables defined in the allocation file. If you accept the variables, this addin module will automatically import then into the Editor. General principles of using the addin module to import the project are explained in Using Addin modules. Note that it is not possible to export the project into the FST allocation file. This addin module supports the following plugin modules: Festo Serial FST plugin module Festo EasyIP plugin module

Server
OPC EasyServer is a full implementation of the OPC Data Access Custom Interface specification 1.0a and 2.4. All required interfaces are supported. In addition, browsing server address space is supported. Public groups are not supported. Contrary to usual implementation of OPC Servers, OPC EasyServer does not work as an OPC server if started as a standalone executable. This is due to an architecture of the OPC EasyServer. It will, however, run as an OPC server if a valid project file is supplied. The reason is the following: OPC server identity is defined in the project. Complete address space of the OPC server is defined in the project. Project contains an identity of the plugin module that knows how to obtain tag values.

14

OPC EasyServer

Users Manual

OPC Client

OPC EasyServer

OPC EasyServer Plugin Module Communication

OPC Interface Project File

Complete responsibility for registering a valid OPC server is contained within the Editor. When a valid project is created, Editor will register it within the registry. After registering the OPC EasyServer it will behave exactly like a standard OPC Server. Besides OPC Server functionality, OPC EasyServer also supports monitoring of its execution using Agent technology. OPC EasyServer support remote activation by clients running on other machines in the network. However, remote activation needs additional settings and a correct network installation. Note: PC EasyServer supports manual registration/unregistration of valid OPC EasyServer project files using the following command line syntax: esrvr2 <project_name> /register to register or esrvr2 <project_name> /unregister to unregister the project.

Configuration
Valid server consists of a server executable and a project. In order to register the project as a valid OPC server, Editor needs to know the location of the server executable. This dialog is a place where this is defined. Server location is global and valid for every project. It is necessary to define it only once (unless the location is afterwards modified in which case it has to be updated using this dialog). By default, server location is defined as part of the installation procedure. Copying server to another location has no consequences for already registered projects (unless server is deleted from the previous location). In case server has been moved from one location to another, it is necessary to open all registered projects, then unregister them and at last, register them once again. This action will update the Server location in Windows registry. To verify the consistency of registered OPC EasyServer projects, use OPC EasyServer Administrator.

Plugin Modules
Purpose of the plugin module is to implement communication and obtain data from a single device or a network of devices. Plugin module knows how to deliver these data to the server. When used by the Editor, plugin module knows how to deliver its address space to the Editor in order to allow the user to define OPC server address space. Note: PlugIn module can only be defined once for a project and not be exchanged later on!

OPC EasyServer

15

Users Manual

Following plugin modules are defined: Ethernet communication Festo EasyIP Protocol for IPC/FST Implementation of the EasyIP protocol to a network of IPC controllers running FST kernel. Festo EasyIP Protocol for IPC/MWT Implementation of the EasyIP protocol to a network of IPC controllers running ProconOS (IEC-1131) kernel. Serial communication Festo Serial (Test) Protocol Implementation of the serial communication to various Festo controllers (FPC, IPC, etc). Modem FST Implementation of the modem (dial-up) communication to various Festo controllers (FPC, IPC, etc) Local (no communication) Festo VipWin SCADA Simulation Simple simulation OPC server. Local Windows NT/2000 Machine Information Enables clients to obtain various machine specific information (CPU/memory usage, CPU load, etc).

Festo EasyIP Protocol


Festo EasyIP Protocol support communication to a maximum of 255 Festo IPC/FEC devices using a standard TCP/IP protocol over Ethernet network. Plugin module (OPC EasyServer) for EasyIP protocol has two flavors: Standard plugin modules that support only FST operands. This plugin module is delivered only for compatibility with older projects. Plugin module is encapsulated in a file called EasyIP.Dll. Identity of this plugin module from the perspective of OPC EasyServer Editor is <EasyOPC.FstEasyIp.1>. Extended plugin module with many new features such as (a) support for strings, (b) full diagnostics support, (c) creation of multiple tags from within the editor etc. New projects should always use this version of plugin module. This plugin module is encapsulated in a file called EasyIpS.Dll. Identity of this plugin module from the perspective of OPC EasyServer Editor is <EasyOPC.FstEasyIpString.1>. EasyIP plugin module supports the following PLC types: IPC / FEC (FST)

16

OPC EasyServer

Users Manual

IPC / FEC (MWT) Note that TCP/IP driver must be installed on IPC/FEC device. FST TCP/IP driver must have a version number 1.10 or higher. Plugin module supports the following PLC operands: Flag words (with bit values) in range 0 9999. Inputs and Outputs (with bit values) in range 0 255. Registers (bit values are not supported) in range 0 255. Strings (supported only by extended plugin module). Note that strings are available only if FST String driver is installed on IPC/FEC device. In addition, extended plugin module supports diagnostic tags. These tags are not related to the connected PLC but to diagnostic information about the plugin module internals. For information about the actual EasyIP communication, click here. See also: PLC Station resource, Data type resource, Tags, Diagnostics Tags, Adding Multiple Tags

About EasyIP Communication


This topis discusses the issues related to the communication using EasyIP protocol. Its goal is to offer information about the performance of the EasyIP protocol and thus performance of the plugin module. First, some information about the EasyIP protocol: 1. EasyIP protocol is based on UDP (connectionless datagram protocol). As a result of this fact, end points in the communication (computer with EasyIP plugin module and PLC with TCP/IP driver) do not have any guarantie that the packet sent from one side has reached the other side. The only way to guarantie packet delivery is to rely on a response or answer packet. However, using UDP achieves much better performance. EasyIP protocol defines that each packet may contain operands only within a single defined operand group. For example, it is not possible to build a packet that contains both flag word and register values. EasyIP protocol has a limited size of the packet i.e. each packet may contain a maximum of 256 values. Only a single string value may be transferred within a single EasyIP packet.

2. 3. 4.

Plugin module is designed to optimize the communication in order to achieve the best available performance. Following optimizations are implemented: 1. 2. 3. 4. 5. 6. Complete FST address space is separated in ranges. Each range corresponds to a single EasyIP packet. Only ranges that contain items are requested from the PLC. Only a required subrange within a range is requested from the PLC. After fetching all operand values, plugin module requests string values one by one. Bit values are not fetched separatelly (not possible in EasyIP protocol). Their values are extracted from fetched word values. Bit commands are implemented with a single packet that contains bit modify operation.

As an example, lett us assume that we have an OPC EasyServer project with the following items: (a) flag words from 50 to 60, (b) flag words from 300 to 330, (c) registers from 200 to 205 and (d) a total of 3 strings. In this case, a total of 6 request packets must be sent to the PLC in order to fetch the values of all operands. These packets are: Packet to obtain flag words from 50 to 60. Packet to obtain flag words from 300 to 330. Packet to obtain registers from 200 to 205. A total of 3 packets to obtain the values of 3 strings.

In order to increase performance, it is advisable to organize the operands in the FST application in such a way as to minimize the number of holes i.e. blocks of operands which are not used in the FST application.

PLC Station Resource


PLC station resource corresponds to the PLC. It identifies the PLC type and communication parameters. Project may contain one or more station resources. Maximum number of station resources in a single project is limited by the EasyIP communication protocol and is 255. If multiple PLC station resources are defined, each station must have a different name and a TCP/IP address.

OPC EasyServer

17

Users Manual

PLC station resource parameters are: PLC station resource is identified with a user-defined name. This name must be defined and must not have a dot (.) character inside. Plugin module automatically converts station resource name to capital letters and prevents space characters which are automatically converted to underline characters. TCP/IP address defines the IP address of the PLC station. This address is defined in the FST/MWT project. Each PLC station must have a unique IP address. IP address is identified with a string in the form <xxx.xxx.xxx.xxx>. Note that plugin module supports only fixed IP addressing i.e. each PLC must have a statically defined IP address. Scan time (in milliseconds) defines the frequency of communication. Scan time cannot be less then 10 ms. Reasonable scan time is 100 ms or higher. Scan time is a period between 2 consecutive EasyIP protocol packets sent to the PLC. This is very important because it determines the update speed of variables (items) within the OPC Client (or SCADA). To achieve faster variable update rate, scan time must be decreased. However, this will increase network traffic but, more importantly, it will increase the load on PLC CPU. Suggested value for scan time is in range 100 to 250 ms. Actual value can be determined by experiments. Number of retries determines how many consecutive communication errors must happen before a PLC is declared as unreachable and all items associated with this PLC are declared as bad. By default, this value is 0 which means that first detected communication error will set the quality of all items (associated with the PLC) to bad. Valid values are between 0 and 10. However, values greater then 5 should not be used. To explain the communication and station parameters, let us assume that we have a project with a single PLC station whose scan time is set to 250 ms and number of retries is set to 1. Every 250 ms, plugin module will send an EasyIP packet to the PLC and expect an answer. If there is a timeout in communication i.e. answer has not been received, plugin module assumes that PLC is unavailable. However, before notifying OPC Client by setting the quality of all values to bad, plugin module will try to send another packet (because number of retries is 1). If the answer for this packet is received, PLC is treated as available and communication continues normally. However, if there is a timeout once again, plugin module will then set the quality of all items associated with this PLC to bad (excluding diagnostic items whose quality is always good). Plugin module continues to send packets to the PLC. When the answer is received, plugin module will treat the PLC as available and set the quality of all associated items to good. Therefore, time delay between loss of communication and the change of items quality to bad is a proportional to both scan time and number of retries. See also: Data type resource, Tags

Data Type Resource


This topic refers to EasyIP FST plugin module. EasyIP MWT plugin module supports only one data type (memory word). Data type resource defines a logical group that contains zero, one or more tags associated with a single operand type on the selected PLC. For example, data type resource of type FLAGWORD contains tags that represent flag words on the connected controller. PLC station resource may contain one or more data type resources. Tags can be created only within a data type resource. Data type resource contains a user defined name and an identifier that indicates the type of operands contained within the resource. Name must be specified and must be unique -- it is not allowed to have 2 data type resources with the same name. It is not possible to have multiple data type resources with the same identifier i.e. associated with the same type of operand.

Following data type resources are supported:


18 OPC EasyServer

Users Manual

FLAGWORD Flag word operands in the range 0 to 9999. Flag words may be defined as either 16-bit values or 1-bit values. It is possible to read and write flag words values. REGISTER Register operands in the range 0 to 255. Registers are always 16-bit values. It is possible to read and write register values. INPUT Input operands in the range 0 to 255. Inputs may be defined as either 16-bit values or 1-bit values. It is possible only to read input values. OUTPUT Output operands in the range 0 to 255. Outputs may be defined as either 16-bit values or 1-bit values. It is possible to read and write output values. STRING String operands are associated with strings kept within a string driver on the target PLC. There is no limit to the number of strings because it is defined within the FST application. It is possible to both read and write strings. DIAGNOSTICS Diagnostic tags are not related to the PLC. They offer various information about the internals of the plugin module. For example, there are diagnostic tags to indicate communication status, number of sent and received EasyIP packets etc. Diagnostic tags are read only. User may define any number of supported data type resources within a PLC station resource (depends on the application). See also: PLC Station Resource, Tags

Tag
Tag represents a logical entity that corresponds to a single operand on the PLC. Tag has a value that is updated based on a response from the PLC on a request for operand values. Server constantly communicates with the PLC (communication scan time is defined in the PLC station resource configuration -- scan time) in order to refresh tag values. Every tag must belong to a single data type resource. Each tag is identified with a name that must be unique among all tags within a data type resource. Tag name must not have a dot (.) in its name. Tag type defines whether the tag corresponds to a 16-bit value, single (1) bit value or a string value. Only FLAGWORD, INPUT and OUTPUT data type resources may have tags corresponding to 1-bit values. Bit values are not supported by the EasyIP/MWT plugin module. Offset defines the location on the PLC where the value of the tag can be obtained. It is not allowed to have 2 tags with a different name but the same offset. Valid values for offset depend on data type resource. For example, FLAGWORD tags may have offset in the range 0 ... 9999 while all other tags may have offset in the range 0 ... 255. Tag offset for EasyIP/MWT plugin module are in the range 0...2047. If the tag corresponds to a string operand, offset is actually an index of the string within a string driver. Bit defines the bit index within a 16-bit value on specified offset where the value of a 1-bit tag can be obtained. This field is available only for bit tag types. Valid bit value is within 0 and 15 inclusive. Access right defines whether the tag value is read-only or read/write from the perspective of the client. Tags within an INPUT data type resource must be read-only. Notes about tag name: If the tag name is constructed in the following manner [text][numeric] then editor will automatically parse the name and assign numeric to tag offset. See also: Data type resource, Diagnostics Tags, Adding Multiple Tags

OPC EasyServer

19

Users Manual

Diagnostics Tag
Diagnostics tags are a new feature added to the extended EasyIP plugin module (extended plugin module supports FST strings). Diagnostics tags are not related to the PLC and offer various information about the communication status and actions related to the PLC. Following diagnostics tags are supported: STATUS (boolean variable) - Communication status. It is equal to 1 if the communication to the PLC is running properly. It is set to 0 if PLC is not available for any reason. TX_COUNT (double word or 32 bit variable) Number of EasyIP communicatin packets sent to the PLC. This number should be continuously increasing independent of the communication status. RX_COUNT (double word or 32 bit variable) Number of EasyIP communication packets received from the PLC. This number should be continuously increasing if the communication is running properly. If the PLC is unavailable, this number is frozen i.e. it is not changing. ERRORS (double word or 32 bit variable) Total number of communication errors. When the PLC is not available, this number should be increasing. LAST_ERROR (string) Contains a string representation of the time when the last communication error has been detected. Time is defined in the following format: d.m.y H:M:S where d.m.y is a date, month and year while H:M:S is an hour, minute and second. CMD_COUNT (double word or 32 bit variable) Total number of commands sent to the PLC. Independent of the communication status, quality of all diagnostics tags is always good. Diagnostics tags are optional. See also: Tag, Add Multiple Tags

Add Multiple Tags


Besides adding a single tag to the OPC EasyServer address space, plugin module also supports adding multiple tags. However, there are some limitations: Within a single operation, multiple tags can be added only within a single data type resource. If adding multiple tags to diagnostics data type resource, all diagnostics tags are added immediatelly. Dialog for configuring addition of multiple tags is available when a mouse is positioned on a data type resource (within namespace view in OPC EasyServer Editor) and a right mouse button is clicked. In order to configure addition of multiple tags, following information must be defined: Name prefix is a string that is at the beginning of generated tags. Starting and ending offset defines the offset (within FST address space) of the generated tags. If adding string tags is configured, offset is actually an index of the strings within an FST string driver. Type determines whether the generated tags are word or bit operands. Note that register FST operands do not support bit type. When adding string tags, type is automatically set to string. Starting and ending bit index is valid only if adding bit operands. Valid value is between 0 and 15 inclusive. Note that if starting and ending offset or bit index are reversed (ending is smaller then starting), plugin module will automatically reverse their value. Based on the information within this dialog, plugin module will build a unique name for the generated tags according to the following scheme: Tag of word/string: NamePrefix_Offset Tag of bit type: NamePrefix_Offset_BitIndex In order to generate tags corresponding to a range of bit operands within a single word operand, specify the starting and ending offset as the same value. See also: Tag

20

OPC EasyServer

Users Manual

Festo Serial (CI) Protocol


Festo Serial (CI) protocol allows communication between a single PC and a single controller running FST kernel. Using serial protocol, PC may obtain (and modify) any type of operand supported by the FST kernel. There are 2 version of the plugin module. First version exists for compatibility reasons. Seconds version (new) introduces support for String operands. Note that string operands are supported only if PLC has a correctly installed FST string driver. Plugin properties (as visible in the Windows Explorer and from the perspective of OPC EasyServer Editor) are: Old version (existing for compatibility reasons) that do not support strings: Plugin module file name is: SerialFst.dll Plugin identity is: EasyOPC.FstSerial.1 Plugin name is: Serial FST Protocol (Festo) New version that supports strings: Plugin module file name is: SerialFstS.dll Plugin identity is: EasyOPC.FstSerialString.1 Plugin name is: Serial with Strings FST Protocol (Festo) Plugin module supports the following PLC types (note that string operands are supported only on IPC/FEC): FPC 405 / 202 / 101B IPC / FEC (single and block mode) SF3 Radio Modem Supported PLC operands are: Flag words (with bit values) Inputs and Outputs (with bit values) Registers Counter, Counter preset, Counter status Timer, Timer preset, Timer status Strings Server optimizes the serial communication in order to reduce the traffic over serial line and increase performance. Bit values are not requested separately - they are extracted from fetched 16-bit values. This means that 16 1-bit values belonging to a single 16-bit value are updated as a result of a request for a single 16-bit value. Server supports only a single serial port and a connection to a single PLC over that port. However, it is possible to use multiple Servers and establish communication to multiple PLCs over different serial ports. Client is notified on changes in tag values only after all tags are internally updated. This ensures data consistency and integrity because client gets all tag values at the same time (internally Server executes one or more communication cycles to obtain these values). See also: About CI Communication, PLC Station resource, Data type resource, Tags, Information tags, Adding Multiple Tags

About Serial (CI) Communication


This topis discusses the issues related to the communication using serial (CI) protocol. First, some information about the serial (CI) protocol: 5. 6. Serial protocol supports single record and block record mode. However, not all controllers support both modes. Strings cannot be mixed with regular operands in a single communication packet.

OPC EasyServer

21

Users Manual

Considering the inherent capabilities of the communication protocol, plugin module implements the communication according to the following rules: 1. 2. All items added to the plugin module (from the OPC Client via OPC EasyServer) are placed in an internal list so that word (16-bit variables) start from the beginning and string variables are added to the end of the list. Plugin module first fetches the values of all word (16-bit) operands. Plugin module uses single record or block record mode depending on the configured PLC type. 1. 2. 3. 4. Plugin module requests from the controller only values of 16-bit operands. It will never ask a value of a bit operand from the controller. Values of bit operands are extracted from the corresponding 16-bit values. If string variables are defined, plugin module then fetches all strings one by one. If one or more items are added to the plugin module or deleted from the plugin module, plugin module resets its internal state to start from the beginning of the internal list.

In order to obtain the values of all defined items (within a plugin module), plugin module must send 1 or more communication packets to the controller. A set of communication packets that must be sent to the controller in order to obtain the values of all defined items is called a session. Plugin module (and thus OPC EasyServer) will notify the client about the new values only when a complete session is finished. At any moment of time, a command may be send to modify the operand or string value. Command may be sent within a session (i.e. before a session is finished). However, command will not be sent in a time frame in which plugin module expects an answer from the controller.

PLC Station Resource


PLC station resource identifies the PLC type and communication parameters. Because the communication is serial (RS232), only a single PLC station resource is allowed. However, this does not prevent the user to communicate to 2 or more PLCs at the same time using multiple identical (but differently configured) OPC servers via multiple serial communication ports. PLC station resource is identified with a user-defined name. This name must not have a dot (.) character inside. Name is not optional - it must be defined. Serial port identifies the communication port to which the PLC is connected using a serial cable. Supported communication ports are COM1 to COM4 (COM8 in new version of the plugin module). Editor does not check whether the specified communication port is actually available so user can define any port (even the one occupied by some other device -- for example, mouse or modem). However, if the communication port could not be opened in runtime, specific information tag will indicate this state. Serial speed defines the baudrate used for communication to PLC. Supported serial speeds are 1200 - 19200 bits per second. Scan time (in milliseconds) defines the frequency of communication. Scan time cannot be less then 10 ms. Reasonable scan time is 100 ms or more. Scan time corresponds to a a ccommunication inactivity period that is activated when all defined operands are fetched from the PLC. PLC type defines the actual controller. It is important to set the PLC type correctly because different PLC types have slight differencies in protocol implementation. Following PLC types are supported: FPC 405 Supports block mode and multiple CPU boards. FPC 202 Does not support block mode. Single CPU board. FPC 101B Does not support block mode. Single CPU board. IPC FEC SR Does not support block mode. Supports remote operands. IPC FEC BR Supports block mode. Supports multiple operands. SF 3 Supports block mode. Single CPU board. Radio Modem Does not support block mode. Multiple slave stations. This type of controller supports only flag word operand types. Block mode offers much faster communication rate because multiple operands can be specified in a single packet sent to the PLC.

22

OPC EasyServer

Users Manual

See also: About Communication, Data type resource, Tags, Information tags

Data Type Resource


See also: PLC Station Resource, Tags, Information Tags Data type resource defines a logical group that contains zero, one or more tags associated with a single operand type on the selected controller. For example, data type resource of type FLAGWORD contains tags that represent flag words on the connected controller. PLC station resource may contain one or more data type resources. Tags can be created only within a data type resource. Data type resource contains a user defined name and an identifier that indicates the type of operands contained within the resource. Name must be specified and must be unique -- it is not allowed to have 2 data type resources with the same name. By default, editor assigns the name of the identifier to the name of the resource. It is not possible to have multiple data type resources with the same identifier. Important: Since the identifier determines the type of tags within this resource (for example, only string tags are allowed within a data type resource with identifier STRING), it is not allowed to change an identifier if data type resource contains one or more already defined tags.

Following data type resources are supported: FLAGWORD Flag words in the range 0 to 9999. Flag words may be defined as either 16-bit values or 1-bit values. It is possible to read and write flag words values. REGISTER Registers in the range 0 to 255. Registers are always 16-bit values. It is possible to read and write register values. INPUT Inputs in the range 0 to 255. Inputs may be defined as either 16-bit values or 1-bit values. It is possible only to read input values. OUTPUT Outputs in the range 0 to 255. Outputs may be defined as either 16-bit values or 1-bit values. It is possible to read and write output values. COUNTER Counters in the range 0 to 255. Counters are always 16-bit values. It is possible to read and write counter values. COUNTER_PRESET Counter preset in the range 0 to 255. Counter preset values are always 16-bit values. It is possible to read and write counter preset values. COUNTER_STATUS Counter status in the range 0 to 255. Counter status values are always 16-bit values. It is possible to read and write counter status values. TIMER Timers in the range 0 to 255. Timers are always 16-bit values. It is possible to read and write timer values.

OPC EasyServer

23

Users Manual

TIMER_PRESET Timer preset in the range 0 to 255. Timer preset values are always 16-bit values. It is possible to read and write timer preset values. TIMER_STATUS Timer status in the range 0 to 255. Timer status values are always 16-bit values. It is possible to read and write timer status values. STRING Strings are supported only for IPC/FEC plc type defined within a Station Resource. INFO Special type dedicated to various information to the client. It is not related to a connected controller. User may define any number of supported data type resources within a PLC station resource (depends on the application).

Device Tag
Tag represents a logical entity that corresponds to a single operand on the PLC. Tag has a value that is updated based on a response from the PLC on a request for operand values. Server constantly communicates with the PLC (communication period is defined in the PLC station resource configuration -- scan time) in order to refresh tag values. Every tag must belong to a single data type resource. Each tag is identified with a name that must be unique among all tags within any data type resource. Tag name must not have a dot (.) in its name. Tag type defines whether the tag corresponds to a string value, 16-bit value or a single (1) bit value. Only FLAGWORD, INPUT and OUTPUT data type resources may have tags corresponding to 1-bit values. Offset defines the location on the PLC where the value of the tag can be obtained. It is not allowed to have 2 tags with a different name but the same offset. Valid values for offset depend on data type resource. For example, FLAGWORD tags may have offset in the range 0 ... 9999 while all other tags may have offset in the range 0 ... 255. If tag type is string, offset is actually a string index within the FST string driver. Bit defines the bit index within a 16-bit value on specified offset where the value of a 1-bit tag can be obtained. This field is available only for bit tag types. CPU, Remote or Slave defines additional CPU card, remote (fieldbus) module or slave module for FPC 405, IPC, SF3 or Radio Modem PLC types respectively. For all other PLC types, this field is not valid. The value entered in the field (if different from 0) will be used when building a command string sent to the PLC. Access right defines whether the tag value is read-only or read/write from the perspective of the client. Tags within an INPUT data type resource must be read-only. Notes about tag name: If the tag name is constructed in the following manner [text][numeric1]_[numeric2] then editor will automatically parse the name and assign numeric1 to tag offset and numeric2 to bit index. If numeric2 is not present, only tag offset is assigned. If numeric2 is present, editor will also automatically select tag type to be a 1-bit value. This feature greatly increases the speed of tag creation. See also: Data type resource, Information tags, Adding Multiple Tags

Information tag
See also: Data type resource, Tags Information tags are special types of tags that are neither related to the PLC nor are exchanged via the serial line. Instead, information tags are used to provide the client with the information about the internal state of the Server. Information tags are read-only. It is not possible to set the value of the information tag from the client. Value of any information tag is always valid. Information tags may be defined only within an INFO data type resource. Following information tags are supported:

24

OPC EasyServer

Users Manual

RUNNING Indicates whether the Server is initialized properly. Initial value of this tag is 0. If the specified serial port (defined in PLC station resource) is opened, the value of this tag goes to 1 and is not changed any longer. CONNECTED Indicates whether the Server is actually connected to the PLC or not. If the value of this tag is 1 then the communication is running properly. If it is 0 then there is an error in communication (possibly disconnected serial cable or the PLC is not working). This tag may be associated with an alarm in the SCADA. COMM_SPEED Static information about the baud rate used in communication with the PLC. This baud rate is specified in the configuration of the PLC station resource. COMM_PORT Static information indicating the serial port over which the communication is running. Possible values are 1 ... 4(8) indicating COM1 to COM4 (COM8) respectively. CYCLES_TO_COMPLETE Indicates the number of communication cycles needed to obtain the values of all defined tags. This value is tightly connected with the specified PLC type and dynamically changes based on the number of tags created in the Server. For example, assume that the PLC type is IPC-FEC BR (block mode communication to IPC/FEC controller) and that there are 100 tags defined (all are 16 bit values). In this case, number of cycles needed to obtain all tag values is app. 2 because within each cycle, Server is capable of obtaining multiple tag values. If the PLC type is set to IPC-FEC SR (single operand at a time), then number of cycles should is 100. ERROR_COUNT If the communication is not running properly -- PLC is not responding due to any number of reasons (disconnected cable, PLC not running etc) -- this tag indicates the number of times PLC has not responded to an initialization request. The value of this tag is accumulated over time ie. once the communication is established, the value of this tag is not set to 0 but stays the same. TX_PACKET_COUNT Total number of communication packets transmitted to the PLC. Single communication packet may be an initialization string, request for variables or commands to set the value(s). The value of this tag is accumulated over time. RX_PACKET_COUNT Total number of communication packets received from the PLC. Single communication packet may be response to initialization string, response to request for variables or response to commands. The value of this tag is accumulated over time. TX_BYTE_COUNT Total number of bytes transmitted to the PLC. RX_BYTE_COUNT Total number of bytes received from the PLC. User may defined any number of information tags (or none of them). In general, it is good to use them in order to verify that the communication is running properly. Some of the information tags may be also used as alarms in the SCADA (like CONNECTED, RUNNING etc).

Add Multiple Tags


Besides adding a single tag to the OPC EasyServer address space, plugin module also supports adding multiple tags. However, there are some limitations: Within a single operation, multiple tags can be added only within a single data type resource. If adding multiple tags to information data type resource, all information tags are added immediatelly. Dialog for configuring addition of multiple tags is available when a mouse is positioned on a data type resource (within namespace view in OPC EasyServer Editor) and a right mouse button is clicked.

OPC EasyServer

25

Users Manual

In order to configure addition of multiple tags, following information must be defined: Name prefix is a string that is at the beginning of generated tags. Starting and ending offset defines the offset (within FST address space) of the generated tags. If adding string tags is configured, offset is actually an index of the strings within an FST string driver. Type determines whether the generated tags are word or bit operands. Note that register FST operands do not support bit type. When adding string tags, type is automatically set to string. Starting and ending bit index is valid only if adding bit operands. Valid value is between 0 and 15 inclusive. Note that if starting and ending offset or bit index are reversed (ending is smaller then starting), plugin module will automatically reverse their value. Based on the information within this dialog, plugin module will build a unique name for the generated tags according to the following scheme: Tag of word/string: NamePrefix_Offset Tag of bit type: NamePrefix_Offset_BitIndex In order to generate tags corresponding to a range of bit operands within a single word operand, specify the starting and ending offset as the same value. See also: Tag

Festo CI Protocol via Modem


This plugin module enables an OPC compliant client to establish a modem connection to a single remote Festo IPC/FEC device and exchange data using a standard Festo CI protocol. You can find information about the technical points here. Supported PLC operands are: Flag words (with bit values) Inputs and Outputs (with bit values) Registers Counter, Counter preset, Counter status Timer, Timer preset, Timer status Server optimizes the serial communication in order to reduce the traffic over serial line and increase performance. Bit values are not requested separately - they are deduced from 16-bit values. This means that 16 1-bit values belonging to a single 16-bit value are updated as a result of a request for a single 16-bit value. Server supports only a single serial port and a connection to a single PLC over that port. However, it is possible to use multiple Servers and establish communication to multiple PLCs over different serial ports. Client is notified on changes in tag values only after all tags are internally updated. This ensures data consistency and integrity because client gets all tag values at the same time (internally Server executes one or more communication cycles to obtain these values). See also: PLC Station resource, Data type resource, Tags, Information tags

Technical description
This page contains information about the setup of the modem and internals of the plugin module. About modem setup Because this plugin module uses a Windows OS TAPI services for communication with a modem, it is very important that modem device (and consequently TAPI support) is correctly installed in Control Panel!

26

OPC EasyServer

Users Manual

To correctly configure the modem attached to the remote PLC device, set the following modem parameters: Set auto answer mode (2 rings) Disable DTR handling Save configuration Fix communication speed to 9600 bps (not required) Consult modem documentation for AT Hayes commands to set the parameters correctly. Please, verify that both modems are configured properly by trying to establish a modem connection using a HyperTerminal application that is located in Start menu, Programs then Accessories. If the connection to a remote device cannot be obtained from HyperTerminal, then try to eliminate the problem by modifying the modem setup (bot local and remote). Dialing remote PLC device When started for the first time, plugin module will initiate a call after 1 minute. This enables the client to initially get the operand values from the remote PLC device much sooner then the defined call period (which may be defined to 60 minutes or more). After the first modem communication session, plugin module waits for a defined period before the next call. However, next can be manually initiated by sending any command to the remote PLC device (command is a request to modify the operand value). In this case, plugin module will freeze the timer that calculates the time to next call and proceed with dialing. After the manually requested modem connection is terminated, plugin module will continue the count down for the next call from the value that was frozen before the manuall modem connection was initiated. For example, assume that period between 2 calls is set to 60 minutes. Then, assume that 15 minutes after the previous modem connection was terminated, client sends a command to modify some flag word. Plugin module will immediatelly begin to establish a modem connection. After this connection is terminated, plugin module has another 45 minutes before the next regular call. Terminating modem communication (hangup) Once a modem connection is established, it cannot be manually terminated. When plugin module detects that the connection to remote PLC device is established, it starts an inactivity timer. Each time a packet (with any contents) is sent to the remote PLC device, this timer is restarted. If there are no packets sent to the remote PLC device for a predefined amount of time (defined in remote PLC station properties), plugin module will automatically terminate the connection. For example, assume that modem connection is established and that inactivity period is set to 2 minutes. Let's assume that it takes 3 minutes to obtain the values of all operands from the remote PLC device. After the 3 minutes have expired, plugin module will no longer restart the inactivity timer and will wait for 2 minutes before terminating the connection. If 15 seconds before this 2 minute period expires, client sends a command to the remote PLC device, plugin module will automatically restart the inactivity timer and wait another 2 minutes before terminating the connection. About modem communication session Once the modem connection is established, plugin module does not make any difference why the modem connection was established (regular call or call as a result of the command). Upon detecting that the connection is established, plugin module executes the following steps: Send initialization command to remote PLC device (Ctrl+T) and wait for answer. If there are any commands waiting to send to the remote PLC device, plugin module send them in a single or multiple packets and waits for an answer after each packet. Requests values of all defined operands in a single or multiple packets and waits for the answer after each packet. Finish of the communication session by waiting for the inactivity timer to terminate the modem connection. If there is a timeout (while waiting for an answer), plugin module goes to error state. Once in error state, it is not possible to recover communication during the active modem communication session. After entering the finish state, plugin module will no longer communicate with the remote PLC device. However, plugin module will check if there are any commands sent from the client to the remote PLC device. If there are commands, plugin module will execute all previously defined steps excluding the first step (initialization commands) ie. it will send all commands and then request values of all defined operands.

OPC EasyServer

27

Users Manual

PLC Station Resource


See also: Data type resource, Tags, Information tags See also technical description for information about the internals of the plugin module. PLC station resource identifies the PLC type and communication parameters. Because the communication is using a modem connection, only a single PLC station resource is allowed. However, this does not prevent the user to communicate to 2 or more PLCs at the same time using multiple identical (but differently configured) OPC servers via multiple modems connected to the PC. PLC station resource is identified with a user-defined name. This name must not have a dot (.) character inside. Name is not optional - it must be defined. PLC type defines the actual controller. It is important to set the PLC type correctly because different PLC types have slight differencies in protocol implementation. Following PLC types are supported: IPC FEC SR IPC FEC BR Block mode offers much faster communication rate because multiple operands can be specified in a single packet sent to the PLC. Modem device combo box lists all modem capable TAPI devices installed on the local PC. Select the one that will be used to communicate with a remote PLC station. If no modem capable TAPI devices are found on the local PC, it will not be possible to accept the selections in this dialog box (OK button will be disabled). On the right side of the combo box is an "Edit" button. Clicking on this button activates a standard operating system dialog box that allows the configuration of the selected modem device. Note that modem should be configured for 8 data bits, No parity, 1 Stop bit and a port speed of 9600 bps. Do not activate any terminal options or operator assisted dialing because this will display a console window that requires a user action to continue the connection establishment process. Make sure that Flow Control protocol is set to None. This plugin module does not verify the validity of the modem configuration. It is the responsibility of the user to correctly setup the modem. Current location combo box lists all configured locations you are dialing from. Location contains dialing rules such as tone/pulse dialing etc. At least one location must be defined in the Control Panel modem configuration for this plugin to work properly. As before, if there are no locations, it will not be possible to accept the selections in this dialog box (OK button will be disabled). On the right side of the combo box is an "Edit" button. Clicking on this button activates a standard operation system dialog box that allows the configuration of the selected location. The only required setting in the location is a dialing mode (pulse or tone). However, make sure that all other location settings are valid. This plugin module does not verify the validity of the location configuration. Incorrectly configured locaion may result in various problems (cannot establish modem connection etc). Phone number field defines the number to dial in order to establish a modem connection to a remote PLC device. Phone number should be entered in a localized form (for example, it is not required to enter international code and area code if the remote PLC device and a PC are within the same area). As an example, let's assume that the PC is connected to a phone number +381(21)443-419 and that the remote PLC device has the phone number +381(21)555-666. In this case, phone number field should have a text 555666 because both phone numbers are in the same area. If, however, phone number of the remote PLC device is +381(11)222-333, then phone number field should have a text 011 222333. Finally, if the remote PLC device has the phone number +43(1)91075329 then phone number field should have a text +43 1 91075329. Note that '+' sign requires the correct setting of the country / region you are dialing from (this is configured in current location dialog box). Call every field defines the ammount of time in minutes (period) between the termination of the active connection and starting of the next connection. It is not possible to define a period that is less then 1 minute. No matter what period is defined, Server will establish the first modem connection 1 minute after it is started. This allows a client to collect initial values from the remote PLC device much sooner that the configured period (which may be set to 60 minutes ro more).

28

OPC EasyServer

Users Manual

Inactivity period defines the ammount of time in minutes that the communication line is in inactive state (no communication) before automatic termination of the active connection. Note that on every sent packet over the established modem connection, plugin module resets the internal inactivity timer. As an example, let's assume that "call every" field defines the period of 5 minutes and "inactivity period" field defines 2 minutes. Plugin module will establish a modem connection to a remote PLC device and start inactivity timer. Each time a packet is sent to the remote PLC device, plugin module resets the inactivity timer. However, after collection the values of all operands, plugin module will stop communication. After inactivity timeout of 2 minutes, plugin module will automatically hangup (terminate) the connection and wait another 5 minutes before the next dial.

Data Type Resource


See also: PLC Station Resource, Tags, Information Tags Data type resource defines a logical group that contains zero, one or more tags associated with a single operand type on the remote PLC device. For example, data type resource of type FLAGWORD contains tags that represent flag words on the connected controller. PLC station resource may contain one or more data type resources. Tags can be created only within a data type resource. Data type resource contains a user defined name and an identifier that indicates the type of operands contained within the resource. Name must be specified and must be unique -- it is not allowed to have 2 data type resources with the same name. By default, editor assigns the name of the identifier to the name of the resource. It is not possible to have multiple data type resources with the same identifier. Following data type resources are supported: FLAGWORD Flag words in the range 0 to 9999. Flag words may be defined as either 16-bit values or 1-bit values. It is possible to read and write flag words values. REGISTER Registers in the range 0 to 255. Registers are always 16-bit values. It is possible to read and write register values. INPUT Inputs in the range 0 to 255. Inputs may be defined as either 16-bit values or 1-bit values. It is possible only to read input values. OUTPUT Outputs in the range 0 to 255. Outputs may be defined as either 16-bit values or 1-bit values. It is possible to read and write output values. COUNTER Counters in the range 0 to 255. Counters are always 16-bit values. It is possible to read and write counter values. COUNTER_PRESET Counter preset in the range 0 to 255. Counter preset values are always 16-bit values. It is possible to read and write counter preset values. COUNTER_STATUS Counter status in the range 0 to 255. Counter status values are always 16-bit values. It is possible to read and write counter status values. TIMER Timers in the range 0 to 255. Timers are always 16-bit values. It is possible to read and write timer values. TIMER_PRESET Timer preset in the range 0 to 255. Timer preset values are always 16-bit values. It is possible to read and write timer preset values. TIMER_STATUS Timer status in the range 0 to 255. Timer status values are always 16-bit values. It is possible to read and write timer status values.

OPC EasyServer

29

Users Manual

INFO Special type dedicated to various information to the client. It is not related to a connected controller. User may define any number of supported data type resources within a PLC station resource (depends on the application).

Tag
See also: Data type resource, Information tags Tag represents a logical entity that corresponds to a single operand on the PLC. Tag has a value that is updated based on a response from the PLC on a request for operand values. Every tag must belong to a single data type resource. Each tag is identified with a name that must be unique among all tags within any data type resource. Tag name must not have a dot (.) in its name. Tag type defines whether the tag corresponds to a 16-bit value or a single (1) bit value. Only FLAGWORD, INPUT and OUTPUT data type resources may have tags corresponding to a 1-bit values. Offset defines the location on the PLC where the value of the tag can be obtained. It is not allowed to have 2 tags with a different name but the same offset. Valid values for offset depend on data type resource. For example, FLAGWORD tags may have offset in the range 0 ... 9999 while all other tags may have offset in the range 0 ... 255. Bit defines the bit index within a 16-bit value on specified offset where the value of a 1-bit tag can be obtained. This field is available only for bit tag types. Access right defines whether the tag value is read-only or read/write from the perspective of the client. Tags within an INPUT data type resource must be read-only. Notes about tag name: If the tag name is constructed in the following manner [text][numeric1]_[numeric2] then editor will automatically parse the name and assign numeric1 to tag offset and numeric2 to bit index. If numeric2 is not present, only tag offset is assigned. If numeric2 is present, editor will also automatically select tag type to be a 1-bit value. This feature greatly increases the speed of tag creation.

Information tag
See also: Data type resource, Tags See also technical description for information about the internals of the plugin module. Information tags are special types of tags that are neither related to the PLC nor are exchanged via the serial line. Instead, information tags are used to provide the client with the information about the internal state of the Server. Information tags are read-only. It is not possible to set the value of the information tag from the client. Value of any information tag is always valid. Information tags may be defined only within an INFO data type resource. Following information tags are supported: MODEM_PHONE_NUMBER String value that shows a phone number that is dialed in order to establish a connection to a remote PLC device. MODEM_STATUS Numerical value that indicates the current state of the plugin module regarding the modem communication. Valid values are: 0 = idle (not connected) state, 1 = dialing remote PLC station, 2 = connected to remote PLC station and 5 = there was an error with modem. MODEM_STATUS_TEXT String value that shows a text description of the MODEM_STATUS numerical value. MODEM_CONNECTED_COUNT Numerical value that shows a total number of successfully established and completed modem communication sessions. This value is not persistent ie. it has a value of 0 when the Server is started. MODEM_CONNECT_FAILED_COUNT

30

OPC EasyServer

Users Manual

Numerical values that shows a total number of times that Server tried to establish a modem communication but failed. Possible reasons are: remote modem is not turned on or has a failure, invalid setup of the remote modem, etc. MODEM_CONNECT_BROKEN_COUNT Numerical values that shows a total number of times that Server has successfully established a modem communication but it was prematurely terminated. Most often the reason for this is a bad phone line quality. MODEM_CONNECTED_TIME Numerical value that shows a total time in minutes of all the modem communication sessions since the Server was started. MODEM_CONNECT_IN Numerical value that shows the time until the start of the next dial. This value is displayed in minutes but when the time to next dial drops below one minute, this values is displayed in seconds. If the dial is executed as a result of the command sent to the remote PLC device, this value is frozen until the current modem connection is terminated. Then it continues its count-down. MODEM_CONNECT_IN Numerical value that shows the time until the end of the current modem connection. This value is displayed in minutes but when the time drops below one minute, this values is displayed in seconds. If during an active modem connection, plugin module sends a packet to the remote PLC device, this value is reset to an inactivity value defined in the PLC station resource properties. CYCLES_TO_COMPLETE Indicates the number of communication cycles needed to obtain the values of all defined tags. This value is tightly connected with the specified PLC type and dynamically changes based on the number of tags created in the Server. For example, assume that the PLC type is IPC-FEC BR (block mode communication to IPC/FEC controller) and that there are 100 tags defined (all are 16 bit values). In this case, number of cycles needed to obtain all tag values is app. 2 because within each cycle, Server is capable of obtaining multiple tag values. If the PLC type is set to IPC-FEC SR (single operand at a time), then number of cycles should is 100. ERROR_COUNT If the communication is not running properly -- PLC is not responding due to any number of reasons (disconnected cable, PLC not running etc) -- this tag indicates the number of times PLC has not responded to an initialization request. The value of this tag is accumulated over time ie. once the communication is established, the value of this tag is not set to 0 but stays the same. TX_PACKET_COUNT Total number of communication packets transmitted to the PLC. Single communication packet may be an initialization string, request for variables or commands to set the value(s). The value of this tag is accumulated over time. RX_PACKET_COUNT Total number of communication packets received from the PLC. Single communication packet may be response to initialization string, response to request for variables or response to commands. The value of this tag is accumulated over time. TX_BYTE_COUNT Total number of bytes transmitted to the PLC. RX_BYTE_COUNT Total number of bytes received from the PLC. User may defined any number of information tags (or none of them). In general, it is good to use them in order to verify that the communication is running properly. Some of the information tags may be also used as alarms in the SCADA (like CONNECTED, RUNNING etc).

OPC EasyServer

31

Users Manual

Festo VipWin SCADA


Plugin Module for Festo VipWin SCADA enables any OPC compliant client to connect to a running VipWin SCADA (only on local machine) and obtain data directly from the SCADA. This communication (between the server and VipWin SCADA) is established using a Microsoft COM technology. Festo VipWin plugin module enforces some limitations: Server cannot start the VipWin SCADA ie. it must be started by the user or by some other techniques. Project is tightly related to the VipWin SCADA project. To learn more about the Festo VipWin SCADA plugin, check the following pages: Plugin module address space description Informational vs. online tags Runtime behaviour

Address Space Organization


Festo VipWin SCADA plugin module has an address space organized in a hierarchy with a single root node. Single root node corresponds to a VipWin SCADA application. Considering that it is not possible to start multiple instances of VipWin SCADA on a machine, plugin module allows only a single root node. Root node does not have tags. Root node corresponds to a resource on level 1. Root node may contain child nodes (child node corresponds to a resource on level 2). Maximum 2 resources on level 2 are allowed: Information and Online. Each resource may have tags.
ViPWiN SCADA resource Information resource Information tag ... Information tag ... Online resource Online tag ... Online tag ...

Runtime Behavior
Runtime behavior of the Festo VipWin SCADA plugin module is totaly flexible and covers all possible situations (note that Server is using a Festo VipWin plugin module so any references to Server implies the Festo VipWin plugin module): Server is started before the Festo VipWin SCADA is started. Considering that connection to VipWin SCADA cannot be established, all SCADA related items will have bad quality. Information items defined in Editor will have a correct value and good quality. After starting the VipWin SCADA, plugin module will establish a connection, enumerate VipWin variables and math them with all defined online items. Festo VipWin SCADA is stopped while the Server is running. If the VipWin SCADA is stopped while the Server (and plugin module) is running, plugin module will detect this situation and automatically set the quality of all VipWin SCADA related items (online items and information items whose value is obtained from the VipWin SCADA) to bad. Due to the technology used to communicate between the plugin module and the VipWin SCADA, it is possible that plugin module will detect that VipWin SCADA is stopped after some time. In order to fully understand the runtime behavior of the VipWin SCADA plugin module, it is necessary to explain the technique to obtain item values.

32

OPC EasyServer

Users Manual

When the project is created, plugin module matches the name of each online tag with the name of the VipWin SCADA variable. After the connection to a running VipWin SCADA is established, plugin module will enumerate all variables defined in the current VipWin SCADA project. All this is performed only once. Now, plugin module collects values only for items that are associated with an existing VipWin SCADA variable. All other items (associated with VipWin SCADA variables that do not exist in the list of enumerated variables) will have a bad quality.

Information vs. Online tags


Festo VipWin SCADA plugin module supports 2 different types of tags: Information tags Online tags Information tags There are 2 types of information tags: (1) tags that are collected from the running instance of the VipWin SCADA and (2) tags that are not connected to the VipWin SCADA at all but are predefined in Editor when the project is created. First type of tags offer different information that are global to a running instance of the VipWin SCADA and do not change over time. It covers the following information: Project name - name of the project file. Project path - location where the project is stored on local disk. VipWin version - version of the VipWin SCADA that is currently running. Second type of tags is intended to show which VipWin SCADA version and project is used to create the project. This information is important because project may be created with a project name XXX and the running instance of VipWin SCADA is actually using project name YYY. The value of these tags is optional and (if used) must be defined while the project is created -- server will only deliver the value of these tags to the client during startup. Online tags Online tags are actual VipWin SCADA variables. Plugin module will enumerate all variables in the running instance of the VipWin SCADA and connect them with client defined items based on project tags. For matched pairs (project tag and VipWin SCADA variable), plugin module will collect values and deliver them to the client.

VipWin SCADA Resource


This dialog defines the VipWin SCADA resource. Only one resource of this type is allowed in the project. Name is a user defined name for the resource. Scan time (in milliseconds) determines how often will the plugin module request values of VipWin SCADA variables from the running instance of the VipWin SCADA. This value should be reasonable to reduce the load of the CPU. Scan time greater then 100 ms offer good performance. If the VipWin SCADA is running, Collect button is enabled. If this button is clicked, plugin module will collect the current WiPWiN project name, project path and version and populate the fields "Project", "Location" and "Version". Otherwise (VipWin SCADA is not running), these fields will have a string value "N/A" and "Collect" button is disabled. It is a good practise to define these fields because they offer a validation check in runtime: Is the VipWin SCADA project used to define the Server equal to the project in the running VipWin SCADA? Related topics: Information/Online resource, Runtime behavior

VipWin SCADA Information/Online Resource


This dialog defines the resource that will actually contain tags. Related topics: SCADA resource, Information vs. Online tags

OPC EasyServer

33

Users Manual

VipWin SCADA Online Tag


This dialog defines an online tag. If the VipWin SCADA runtime is running, plugin module will automatically fill the list control with all VipWin SCADA online variables and will also display the name of the VipWin project, its location and the version of the VipWin that is running. In order to define the online tag, it is enough to double click on a VipWin online variable in a list control. Plugin module will automatically copy the VipWin online variable to a Scada tag field and, also automatically, create a valid tag name that will be displayed in the Name field. Based on the type of the selected VipWin online variable, plugin module will also select a correct type for the tag. This type is displayed in the Type combo box. If the VipWin SCADA is not running, user has to manually type in a VipWin SCADA online variable name in the Scada tag field, select a correct type in the Type combo box and define a tag name in the Name field. Valid tag name must not contain a dot (.) character. If the tag name is created automatically, plugin module will replace any dot character found in the VipWin SCADA online variable with an underscore (_) character. Related topics: Information/Online resource, Runtime behavior

VipWin SCADA Information Tag


This dialog defines an information tag. PROJECT_NAME tag will result in an item whose value is a string that corresponds to a VipWin SCADA project that is currently active. PROJECT_PATH tag will result in an item whose value is a string that corresponds to a directory where currently active VipWin SCADA project is located. SCADA_VERSION tag will result in an item whose value is a string that corresponds to a version of the running VipWin SCADA. CONFIGURED_PROJECT_NAME, CONFIGURED_PROJECT_PATH and CONFIGURED_SCADA_VERSION tags will result in items whose value is defined in SCADA Resource dialog box. These items always have a good quality and are mostly used to verify whether the VipWin SCADA project used to create the Server is the same as the currently running VipWin SCADA project. Related topics: SCADA resource, Information/Online resource, Runtime behavior

Simulation
Simulation plugin module is intended to testing Editor and/or Server. It offers the possibility to create a project with tags that are automatically modified (in runtime) based on criterias associated with each tag. Simulation plugin module does not have a user interface for tag editting. It relies on the built-in tag editor in the Editor.

Administrator
OPC EasyServer Administrator is a utility used to view and verify the consistency of OPC EasyServer installation on the local machine. Upon startup, Administrator scans the local machine and displays the following information: All registered plugin modules All registered addin modules All registered OPC EasyServer servers All other OPC Servers

34

OPC EasyServer

Users Manual

Besides scanning the machine, OPC EasyServer checks the internal consistency of the Windows registry by checking whether all necessary and required components are properly registered. While checking the registered components listed above, Administrator will also check if each component exists in the registered location on the local machine. If any component is invalid (as a result of a missing file), it will be marked with a red icon in the tree view of the Administrator. When an item in the tree is selected, right side of the Administrator displays detailed information about this item. Action button displays a popup menu with the following options: Invalid items may be unregistered to clean up the Windows registry of the unnecessary clatter. Editor may be launched to edit the project. Test client may be launched to start and connect to a selected OPC Server. If Administrator detects that the license has expired, addinitional menu option is visible to register the OPC EasyServer. Administrator may also scan a complete hard disk in order to find all OPC EasyServer projects that are not registered in Windows registry. However, this is an expensive operation that takes a significant amount of time.

OPC EasyServer

35

Users Manual

Test Client
Test Client is a utility that implements OPC Client functionality. It is used to test installed OPC servers. Test Client has the following functionality: Display all registered OPC Servers on a local machine or on any other machine in the network. Connect to a selected OPC Server (both on local machine and on network). Add items to the OPC Server Display all items with their value, type, quality and last update time. Display information about the OPC server.

Test Client supports a connection to a single OPC Server at a time. Connecting to an OPC Server (menu Server / Connect)

Online display and editing /menu Online / Add [all] tag)

36

OPC EasyServer

You might also like