Modbus/TCP OPC Server: Technical Description
Modbus/TCP OPC Server: Technical Description
Manual
Technical description
Version 1.1.0
ii • General
Technical Support
Phone: +49 (0) 571/8 87 – 5 55
Fax: +49 (0) 571/8 87 – 85 55
E-Mail: [email protected]
Every conceivable measure has been taken to ensure the correctness and com-
pleteness of this documentation. However, as errors can never be fully ex-
cluded we would appreciate any information or ideas at any time.
E-Mail: [email protected]
We wish to point out that the software and hardware terms as well as the
trademarks of companies used and/or mentioned in the present manual are
generally trademark or patent protected.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Table of Contents • iii
TABLE OF CONTENTS
6 DCOM Configuration.............................................................................. 29
7 Index.......................................................................................................... 30
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Important Comments • 5
Legal Principles
1 Important Comments
To ensure fast installation and start-up of the units described in this manual,
we strongly recommend that the following information and explanations are
carefully read and abided by.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
6 • Important Comments
Symbols
1.2 Symbols
Danger
Always abide by this information to protect persons from injury.
Warning
Always abide by this information to prevent damage to the device.
Attention
Marginal conditions must always be observed to ensure smooth operation.
Note
Routines or advice for efficient use of the device and software optimization.
More information
References on additional literature, manuals, data sheets and INTERNET
pages
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Important Comments • 7
Font Conventions
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
8 • Important Comments
Scope of Validity
1.6 Abbreviations
AI Analog Input
AO Analog Output
DI Digital Input
DO Digital Output
I/O Input/Output
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP OPC Server • 9
General
The WAGO Modbus/TCP OPC server allows easy and convenient access to
Modbus/TCP Ethernet devices. Simple configuration of the OPC server shor-
tens the time needed for training and start-up.
2.3 Installation
For the operation of the WAGO OPC server Modbus/TCP the following com-
ponents must be installed depending on the used operating system on your
computer:
2.3.1 Windows 95
If the following components are not yet installed on your computer, install
these before you start the setup for the WAGO OPC server Modbus/TCP.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
10 • Modbus/TCP OPC Server
Installation
Step 1:
Step 2:
2.3.2 Windows 98
The support for Distributed COM (DCOM98) is component of Windows 98.
Microsoft Corporation provides an update to the version 1.3 in the internet.
The distribution of this update is not permitted in accordance with the license
conditions (EULA) of Microsoft Corporation. You will find the current
DCOM98 version on the Microsoft homepage at:
http://www.microsoft.com/com/resources/downloads.asp
2.3.3 Windows ME
The support for Distributed COM (DCOM) is component of Windows ME.
Please install following program to configure DCOM:
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 11
Functionality
3 Modbus/TCP Konfigurator
3.1 Functionality
The Modbus/TCP Configurator is part of the WAGO Modbus/TCP OPC Ser-
ver delivery.
The configurator has a surface for generating or changing the OPC Server's
configuration information. This information is stored in an XML file. The only
connection between the OPC Server application and the configurator applica-
tion is this configuration file.
The OPC Server reads the configuration information from the XML file du-
ring starting.
The physical structure of the system (existing devices) and the process values
which can be reached with OPC are configured.
The configurator is structured in the same way as the Windows Explorer. The
window of the configuration application consists of two parts. The left part
contains the Modbus/TCP devices of the system in tree topology . In the right
part, the process values (tags) possible with OPC which belong to the device
currently selected in the device tree are listed.
You can reach all functions of the configurator via the main menu and its
submenus. Via the respective menus, devices and process values can be ente-
red in the configuration, deleted from it or modified. The content of the "Edit"
menu is also offered as a popup menu if you click the right mouse button.
The properties of the devices and process values can be entered or changed by
means of dialogs.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
12 • Modbus/TCP Konfigurator
Device Tree
The network object has no parameters and is automatically generated with the
menu command "File - New". The name of the network object is "network" by
default and cannot be changed.
The devices are organized according to their device names. The individual de-
vices with the corresponding process values in the tree structure can be copied
or deleted. If new devices are added with "Edit - Insert Device", device names
are assigned automatically. These names must be unique within the network.
In the list of values, the value name, the Modbus/TCP address, the data type
and a description of the value are shown. The values belong to the device se-
lected in the device tree. They are listed with their names in ascending alpha-
betical order.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 13
The Menu Bar
3.4.1.1 New
With the command "New", a new configuration is created. All existing confi-
guration data will be deleted.
3.4.1.2 Open
By selecting this command, you will open a mask by means of which you can
select and load existing configuration files. The configuration files are stored
with the file extension .xml.
3.4.1.3 Save
By selecting this command, you can save changes in the configuration file.
If you select this command, you can save a new configuration or an existing
configuration with a new name. The default file extension is .xml.
If you select this command, you can define the actual loaded file as the OPC
configuration file.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
14 • Modbus/TCP Konfigurator
The Menu Bar
3.4.1.6 Quit
3.4.2.1 Cut
If you select this command, you will delete the selected part of the configura-
tion (device or process value) and store it in the clipboard.
3.4.2.2 Copy
By choosing this command, you will copy the selected part of the configurati-
on to the clipboard.
3.4.2.3 Paste
By choosing this command, you will transfer the copied part of the configura-
tion from the clipboard to the selected position.
If this command is selected, a new device is added to the network. The Device
dialog is automatically started with the default data of the new device. Adding
the device is not possible if the network object has not been selected.
If this command is selected, a new value is added for the device chosen in the
device tree and the Value dialog for this value is opened. This menu item is
only available if a device has been selected.
3.4.2.6 Delete
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 15
The Menu Bar
3.4.2.7 Properties
3.4.3.1 Toolbar
If you select this command, the toolbar of the configurator will be displayed.
If you select this command, the status bar of the configurator will be dis-
played.
3.4.3.3 Split
3.4.4.1 Language
If you select this command, a submenu is displayed in which you can switch
between the different languages for the Modbus/TCP Configurator (German
and English).
Please note that this switchover only becomes effective after a configurator re-
start.
3.4.5.1 Contents
If you select this command, the online help of the Modbus/TCP Configurator
is started.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
16 • Modbus/TCP Konfigurator
Input-Dialogs
3.4.5.2 Info
3.5 Input-Dialogs
3.5.1 Device Dialog
If an entry is highlighted in the device tree and the Properties menu is selected,
Return is pressed or the entry is double-clicked, the modal Device dialog is
opened.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 17
Input-Dialogs
The name must be unique among the devices. If a new device is generated, a
unique default name is determined automatically.
The default name is composed as follows: <serial number>_device.
Since the characters '/' and '#' are used in the namespace of the OPC Servers,
they may not be used in the device name.
The port number by which the OPC Server accesses the Modbus/TCP device.
Default: 502
3.5.1.5 Description
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
18 • Modbus/TCP Konfigurator
Input-Dialogs
The minimum scan rate defines the time interval for the duration of which a
value is regarded as current by the OPC Server. If there is a read request for a
value within this interval, the value is not read by the device. The value within
the cache of the OPC Server is supplied to the OPC Client as the current value.
With this parameter, the load on the Modbus/TCP devices and on the Ethernet
can be controlled. The higher this value, the lower the load.
The request timeout is the maximum time permitted for a complete I/O opera-
tion (transmission of the request + reception of the response) with the device.
If an I/O operation takes longer than the request timeout, it is aborted after the
timeout.
Default setting is 10 seconds. This ensures that the OPC Server waits at most
10 seconds till the I/O operation is finished.
The connect retry period determines the time period within the attempt of
establishing a connection with the device is repeated. The IP connection with a
device is established when the OPC Server is started. If this attempt is not suc-
cessful, the OPC Server tries to establish a connection cyclically after the con-
nect retry period is over.
The default setting contains no information. Thus, the OPC Server uses a con-
nect retry period of 3 minutes.
The maximum ammount of unneccesary read data within one read operation.
This number defines the percentage of unneccesary data within the total read
data.
The default setting is 100 percent. The OPC Server creates a Modbus/TCP te-
legramm for each Modbus/TCP I/O area (DI, DO, AI, AO). With one telegram
a maximum area of 125 addresses could be read.
The output addresses of tag, will be adapted to the output address area of
WAGO couplers (over 0x200). To an output address less than 0x200 the con-
figurator adds 0x200.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 19
Input-Dialogs
In a separate area of the Process Value dialog, you will find the following
buttons: Next, Previous, New and Clone.
By means of these buttons, the list of values can be walked through when the
dialog is open. Changes of a value's parameters are performed by clicking the-
se buttons. When the Cancel button of the dialog is clicked, only the alteration
process for the value currently displayed in the dialog is aborted.
The name must be unique among the process values. If a process value is ge-
nerated, a unique default name is determined automatically. This default name
is composed as follows: <serial number>_value.
Since the characters '/' and '#' are used in the namespace of the OPC Servers,
they may not be used in the process value name.
Modbus/TCP Commands:
The Modbus/TCP table of a value is determined by the first digit of the value
address.
The table selected for a process value determines the Modbus/TCP command
by means of which the value is read or written.
For the "Exception Status" table, the address is set to 0 and cannot be changed
since there is only one exception status per device.
The following data types can be selected: Bit, Byte, Word, DWord, Char,
Short, Long and Real.
For values from the Modbus/TCP tables 0 or 1, the data type is always bit.
The exception status always has the data type byte.
The values from tables 3 and 4 have a data type which is not bit.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 21
Input-Dialogs
The following table describes mapping of the OPC data types to the Modbus
data.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
22 • Modbus/TCP Konfigurator
Connection State
The connection state returns TRUE (-1) if the connection to the OPC-Server is
established and FALSE (0) if the connection is interrupted.
The connection state can be used practically only with TCP protocol. Using
the connection state with UDP protocol returns always TRUE, since UDP
protocol has no connections.
Depending on the used client program the connection state will be detected
automatically or has to be configured manually
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Modbus/TCP Konfigurator • 23
Connection State
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
24 • Modbus/TCP Konfigurator
Connection State
After this the connection state is shown in the list of values by the entry <de-
vicename>#50000.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Files and Registry • 25
Names and IDs
File Description
MBTOPC.exe Executable of the Modbus/TCP OPC server
MBT.dll Modbus/TCP Communication-DLL
ConfigModbus.exe Configuration tool of the Modbus/TCP OPC server
ConfigModbusDEU.dll Language dependent components of the configuration tool
in German
ConfigModbusE.chm English online help for the configuration tool
ConfigModbusD.chm German online help for the configuration tool
OPCENUM.exe OPC Server Enumerator
OPCCOMN_PS.dll OPC Common Interfaces Proxy
OPCPROXY.dll OPC Data Access Interfaces Proxy
During the installation the general OPC files and the Modbus/TCP OPC server
are registered.
The settings for the server are stored under the following Registry path:
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
26 • Files and Registry
Registry entries
4.2.1 Configuration
The entry with the path of the configuration file to be used is carried out by the
configuration tool (menu file -- set OPC Configuration).
4.2.2 Trace
The Modbus/TCP OPC server supports writing traces into a tracefile.
For each level the user can select the trace groups to be written to the file.The
following table describes the trace groups of the Modbus/TCP OPC server.
The fault traces are set by default of the OPC server, the information traces are
not set.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
Files and Registry • 27
Registry entries
4.2.3 Optimization
The optimization flags permit to turn off certain parts of the optimization by
configuration.
Flag Description
0x00000001 If this flag is set, the Scanrate optimization is switched on
0x00000002 If this flag is set, the Read optimization is switched on
0x00000004 If this flag is set, the Write optimization is switched on
The optimization of the read commands uses an array. The size of this array
determines the maximum number of the Modbus/TCP addresses read in one
call. The size also determines the maximum time which the OPC server can
use for the optimization of the read commands (the bigger, the longer).
4.2.4 Threads
The number of connection establishment threads determines how many con-
nection establishments can be attempted at the same time.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
28 • System requirements
Operating system
5 System requirements
5.1 Operating system
The OPC server supports the operating systems Windows NT 4.0 (starting
from SP5), Windows 2000, Windows 95, Windows 98 and Windows ME.
5.2 DCOM
With Windows 95 systems the DCOM support must be installed subsequently
(DCOM95 V1.3). The necessary file "DCOM95.exe" is on the CD ROM in
the directory "[LW]:\Redist\Dcom".
For Windows 95, Windows 98 and Windows ME systems the DCOM configu-
ration tool DCOMCNFG must be installed. The necessary file "dcm95cfg.exe"
is on the CD ROM in the directory "[LW]:\Redist\Dcom".
5.4 MSXML
The configuration file contains the configuration information in XML format.
For reading and writing the XML information the DOM part of the MSXML
Parser is used (Microsoft.XMLDOM). This is installed by the Setup program
of the OPC server.
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
DCOM Configuration • 29
MSXML
6 DCOM Configuration
The DCOM configuration on OPC client and OPC server computers can cause
problems at the setup of OPC installations.
The DCOM configuration settings can be changed with the DCOM configura-
tion tool DCOMCNFG.
It has to be guaranteed also in the DCOM configuration, that for the respective
OPC client user the access to the OPC server is permitted. This is made easier,
if client and server computer are in the same domain.
The identity the OPC servers runs with should be set to a firm account (do-
main user).
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server
30 • Index
7 Index
Names and IDs .............................................................................25
A New..............................................................................................13
M U
Manually Configuration of the Connection State ......................... 24 Unneccesary Data Read in Percent...............................................18
Minimum Scan Rate in Milliseconds ........................................... 18
Modbus/TCP Address .................................................................. 19 V
Modbus/TCP Konfigurator .......................................................... 11
Modbus/TCP OPC Server .............................................................. 9 Value Dialog ................................................................................19
MSXML....................................................................................... 28
W
N
WAGO Output Calculation ..........................................................18
Name of the Process Value .......................................................... 19 Windows Socket V2.0..................................................................28
WAGO-I/O-SYSTEM 759
Modbus/TCP OPC server