S7 Ethernet Communication Server For Simatic S7-300: For Microsoft Windows and Intouch Applications
S7 Ethernet Communication Server For Simatic S7-300: For Microsoft Windows and Intouch Applications
S7 Ethernet Communication Server For Simatic S7-300: For Microsoft Windows and Intouch Applications
Communication Server
for SIMATIC S7-300
for Microsoft Windows
and InTouch Applications
User Manual
Ver 1.x Rev 1.0
DR 570 10
DR 570 11
KLINKMANN AUTOMATION
P.O. Box 38
FIN-00371 Helsinki Finland
Tel. int. + 358 9 5404940
Fax int. + 358 9 5413541
www.klinkmann.com
Klinkmann Automation S7Ethernet Server i
Table Of Contents
Overview......................................................................................................................... 1
Communication Protocols............................................................................................... 1
Accessing Remote Items via the Server......................................................................... 3
Installing the S7ETHERNET Server ............................................................................... 3
Installing the Server.................................................................................................... 3
Installing the I/O Server Infrastructure........................................................................ 5
Configuring the S7Ethernet Server................................................................................. 5
Server Settings Command ......................................................................................... 5
Topic Definition Command ......................................................................................... 7
Saving S7Ethernet Configuration File ........................................................................ 8
Configuration File Location......................................................................................... 9
Item Names .................................................................................................................... 10
Monitoring and Controlling Communication with a PLC ............................................. 17
Using the S7Ethernet Server with Suite Link and DDE Clients ...................................... 19
Using the S7ETHERNET Server with InTouch........................................................... 19
Defining the Access Names ................................................................................... 19
Defining the Tag names......................................................................................... 21
Monitoring the Status of Communication with InTouch.......................................... 23
Notes on Using Microsoft Excel.................................................................................. 23
Reading Values into Excel Spreadsheets .............................................................. 23
Writing Values to S7ETHERNET Points ................................................................ 23
Using the S7Ethernet Server with OPC Clients .............................................................. 24
Configuring DCOM ..................................................................................................... 25
Firewall................................................................................................................... 25
S7Ethernet OPC Server settings ........................................................................... 26
OPCEnum settings................................................................................................. 28
OPC Client side settings ........................................................................................ 29
Running S7ETHERNET OPC & DDE version as Windows Service ........................ 31
Using S7ETHERNET with OPCLink Server ............................................................... 31
OPCLink Topic Definition ....................................................................................... 32
Accessing S7ETHERNET Items via the OPCLink Server...................................... 32
Error messages .............................................................................................................. 33
Troubleshooting.............................................................................................................. 33
WIN.INI entries........................................................................................................... 33
Troubleshooting menu................................................................................................ 35
Internal Logger ........................................................................................................... 35
The main advantage of using S7Ethernet Server (supporting ISO over TCP protocol) if
compared with software using the S7 communication protocol (for example, with
Wonderware SIDirect DAServer), is the significant Ethernet communication speed
improvement for communication with Simatic CPU 317-2 PN/DP controllers (firmware
V2.5.0 and newer).
Any Microsoft Windows program that is capable of acting as a DDE, FastDDE, SuiteLink
or OPC Client may use the S7Ethernet Server.
There are two different S7Ethernet Server versions described in this manual:
- Server version (ordering number DR 570 10), supporting SuiteLink, FastDDE and
DDE protocols; this version hereafter is referred to as the Suite Link & DDE version.
- Server version (ordering number DR 570 11), supporting OPC and DDE protocols;
this version hereafter is referred to as the OPC & DDE version;
The separate installation package is supplied for each version of the Server. In both
cases, the name of Server executable file is S7ETHERNET.EXE. All further information
in this manual is same for all versions of the Server, with the exception of few points
where communication protocol specific features are explained.
Communication Protocols
Dynamic Data Exchange (DDE) is a communication protocol developed by Microsoft to
allow applications in the Windows environment to send/receive data and instructions
to/from each other. It implements a client-server relationship between two concurrently
running applications. The server application provides the data and accepts requests from
any other application interested in its data. Requesting applications are called clients.
Some applications such as Wonderware InTouch and Microsoft Excel can simultaneously
be both a client and a server.
Although Wonderware's FastDDE has extended the usefulness of DDE for the industry,
this extension is being pushed to its performance constraints in distributed environments.
The S7Ethernet Server Suite Link & DDE version supports the FastDDE Version 3 - an
extension to Wonderwares proprietary FastDDE Version 2. This extension supports the
transfer of Value Time Quality (VTQ) information. The original DDE and FastDDE Version
2 formats are still supported, providing full backward compatibility with older DDE clients.
FastDDE Version 3 works on Windows 9x systems as well as Windows NT systems.
NetDDE extends the standard Windows DDE functionality to include communication over
local area networks and through serial ports. Network extensions are available to allow
DDE links between applications running on different computers connected via networks
or modems. For example, NetDDE supports DDE between applications running on IBM
compatible computers connected via LAN or modem and DDE-aware applications
running on non-PC based platforms under operating environments such as VMS and
UNIX.
Value Time Quality (VTQ) places a time stamp and quality indicator on all data values
delivered to VTQ-aware clients.
Extensive diagnostics of the data throughput, server loading, computer resource
consumption, and network transport are made accessible through the Microsoft Windows
NT operating system Performance Monitor. This feature is critical for the scheme and
maintenance of distributed industrial networks.
Consistent high data volumes can be maintained between applications regardless if the
applications are on a single node or distributed over a large node count.
The network transport protocol is TCP/IP using Microsofts standard WinSock interface.
OPC (OLE for Process Control) is an open interface standard to provide data from a data
source and communicate the data to any client application in a common standard way.
The OPC is based on Microsoft OLE, COM and DCOM technologies and enables simple
and standardised data interchange between the industrial or office sector and the
production sector. From general point of view many aspects of OPC are similar to DDE,
but main difference is in the implementation by using Microsoft's COM (Component
Object Model) technology. It enables fast exchange with process automation data and
OPC open interface allows access to data from OPC Server in same standard way from
OPC client applications supplied by different developers.
For more information on the basics of OPC, please refer to the OPC Specification. The
OPC Data Access Custom Interface Specification is maintained by OPC Foundation, the
current specification is 2.05A dated June 2002 (3.00 dated March 2003).
The OPC support for S7Ethernet Server OPC & DDE version is implemented based on
FactorySoft OPC Server Development Toolkit and it conforms to OPC Data Access
Custom Interface Specification 2.04. The S7Ethernet Server OPC & DDE version is
tested for compliance and is compatible with OPC Foundation OPC Data Access
Compliance Test Tool.
The Suite Link, FastDDE (Version 3) and DDE support for S7Ethernet Server Suite Link
& DDE version is implemented by Wonderware I/O Server Toolkit ver. 7,2,1,6.
The FastDDE (Version 2) and DDE support for S7Ethernet Server OPC & DDE version
is implemented by Wonderware I/O Server Toolkit ver. 5.0 (008).
application name
The name of the Windows program (server) that will be accessing the data element. In
the case of data coming from or going to Siemens Simatic S7-300 PLC via this Server,
the application portion of the address is S7ETHERNET.
topic name
Meaningful names are configured in the Server to identify specific devices. These names
are then used as the topic name in all conversations to that device. For example, S7300.
Note! You can define multiple topic names for the same device (PLC) to poll different
items at different rates.
item name
A specific data element within the specified topic. For the S7ETHERNET Server, an item
is an individual data bit, byte, word, integer, string, etc., in the PLC. The term "point" is
used interchangeably with the term "item" in this User Manual. For more information on
item names, see the Item Names section later in this manual.
To install the S7Ethernet Server, run the 57010xxx.EXE or 57011xxx.EXE and proceed
as directed by the S7ETHERNET Server Setup program.
Note:
All MS Windows (both NT and 9x) applications using Microsofts shared DLLs (e.g.
MFC42.DLL and MSVCRT.DLL) must be closed before installing the S7ETHERNET
Server OPC & DDE version. Otherwise there can be problems with S7ETHERNET
Server registration as OPC server. If during the S7ETHERNET Server OPC & DDE
version installation some warning messages about shared DLLs are displayed, then it
is quite possible the S7ETHERNET Server registration as OPC server failed. In this
case after system reboot the S7ETHERNET Server registration as OPC server can be
done by starting the S7ETHERNET Server manually with special command line
parameter added: S7ETHERNETI /Regserver.
When installation is finished, the subdirectory specified as a folder where to install the
S7Ethernet Server files will contain the following files:
KLSERVER.DLL Dynamic Link Library necessary only for OPC & DDE version
of the Server.
WWDLG32.DLL Dynamic Link Library necessary only for OPC & DDE version
of the Server.
Notes:
1. The S7Ethernet Server Suite Link & DDE version is developed with Wonderware I/O
Server Toolkit (ver 7.2.1.6) and needs the Wonderware FS2000 Common
Components to be installed on computer where the S7Ethernet Server is running.
The Wonderware FS2000 Common Components are installed automatically when any
of Wonderware FS2000 Components (e.g. InTouch or some Wonderware I/O server)
is installed.
2. If S7Ethernet Server Suite Link & DDE version will run on PC where Wonderware
FS2000 Common Components are not installed then a special I/O Server
Infrastructure installation package can be obtained from Klinkmann Automation
(see Installing the I/O Server Infrastructure section below). This I/O Server
Infrastructure installation package contains the minimum set of software needed to
run the S7Ethernet Server Suite Link & DDE version and these infrastructure files
must be install prior to executing the S7Ethernet Server.
3. The HASP key is needed for full time running of S7Ethernet Server. The HASP Driver
setup is performed during the Server setup. Without HASP Driver installed and HASP
key plugged into PC parallel port, the S7Ethernet Server will run only 1 hour (with all
features enabled).
To install the I/O Server Infrastructure from the self-extracting archive, run the
IOServerInfrastructure.exe and proceed as directed by the I/O Server Infrastructure
Setup program.
To uninstall the I/O Server Infrastructure, start Control Panel, select Add/Remove
Programs and select the IO Server Infrastructure from the list of available software
products. Click on Add/Remove and proceed as directed by the UnInstallShield
program.
Note: The I/O Server Infrastructure installation will be rejected if Wonderware FS2000
Common Components are already installed on same computer.
Windows NT offers the capability of running applications even when a user is not logged
on to the system. This is valuable when systems must operate in an unattended mode.
Enabling this option and rebooting the system will cause the Server to run as a Windows
Notes:
1. The Start automatically as Windows NT Service feature can be activated only with
S7Ehernet Server Suite Link & DDE version. To start the S7Ehernet Server OPC &
DDE version as Windows NT Service, refer to Running S7Ethernet OPC & DDE
version as Windows NT Service section of this manual.
2. The Service Startup configuration can be changed by MS Windows NT Control
Panel/Services configuration dialogs. The Allow Service to Interact with Desktop
checkbox in Service dialog box must be checked (the Service dialog box can be
invoked by pressing the Startup button on Services dialog box when Service
S7Ethernet_IOServer is selected). If Allow Service to Interact with Desktop is not
selected then S7Ethernet Server full functionality is not ensured (e.g. the Server
configuration can not be changed, no message boxes will be displayed, etc.).
The following steps are taken to define the Topic attached to the PLC:
1. Invoke the Configure/Topic Definition The "Topic Definition" dialog box will
appear:
2. To modify an existing topic, select the topic name and click on Modify. To define a
new topic, click on New. The "S7Ehernet Topic Definition" dialog box will appear:
Note: If using InTouch the same Topic Name is to be entered in the "Add Access
Name" dialog box described in the Using the S7Ethernet Server with InTouch
section.
5. Enter the MPI Address of S7-300 PLC to be accessed. This address must match
with PLC address entered when configuring the PLC with Simatic STEP 7 software.
(Default value is 2.)
6. Set the Update Interval field to indicate the frequency the items/points on this topic
will be read (polled). Default value is 1000 milliseconds. The maximum performance
can be achieved by using the minimum value of 10 milliseconds in this case the
S7Ethernet Server will try to poll data as fast as possible.
7. Set the Reply Timeout field to indicate the amount of time (in seconds) the
Controller using the selected communication adapter-cable will be given to reply to
commands from the Server. Default value is 3 seconds.
When all entries have been made, click on OK to process the configuration for this topic.
Select Done in "Topic Definition" dialog box when configuration for all Topics has been
performed.
This dialog box displays the path where the Server is going to save the current
configuration file. The path may be changed if necessary. Also, the path can optionally be
recorded in the WIN.INI file by selecting the "Make this the default configuration file"
option. Doing so it will allow the S7Ethernet Server to find the configuration file
automatically each time it is started.
To start the Server from an application directory configuration file other than the default
configuration file a special switch (/d:) is used. For example, invoke the Start/Run
command and enter the following:
S7ETHERNET/d:c:\directoryname
Note: There is no limit to the number of configuration files that may be created, although
each must be in a separate directory.
Item Names
The S7Ethernet Server supports item/point names that are consistent with the point
naming used by Siemens S7-300 PLCs. The tables below list the item/point names
supported by the S7Ethernet Server:
Data Blocks
Data Format Items Suffix I/O Tag Range
Type
Bit D<B,I>d,Xx.y Discrete 0 or 1
String D<B,I>d,Sx,v Message String
D<B,I>d,STRINGx,v Message String
D<B,I>d,Bx Integer 0 to 255
Byte D<B,I>d,BYTEx Integer 0 to 255
DT Message 1990-1-1-0:00:00.000 to
2089-12-31-23:59:59.999
Byte Array D<B,I>d,Bx,v Message Hex ASCII String
D<B,I>d,BYTEx,v Message Hex ASCII String
Char D<B,I>d,CHARx Integer -128 to 127
DT Message 1990-1-1-0:00:00.000 to
2089-12-31-23:59:59.999
Char Array D<B,I>d,CHARx,v Message Hex ASCII String
Word D<B,I>d,Wn Integer 0 to 65535
D<B,I>d,WORDn Integer 0 to 65535
BCD Integer 0 to 9999
KT Message 0.0 to 999.3
S5T Message 0 ms to 2 h 46 m 30 s
TR Real 0.0 to 9990.0 (s)
D Message 1990-1-1 to 2168-12-31
Word Array D<B,I>d,Wn,v Message Hex ASCII String
D<B,I>d,WORDn,v Message Hex ASCII String
Integer D<B,I>d,INTn Integer -32768 to 32767
BCD Integer -999 to 999
D Message 1990-1-1 to 2168-12-31
Integer Array D<B,I>d,INTn,v Message Hex ASCII String
Double Word D<B,I>d,Dm Integer 0 to 2147483647
D<B,I>d,DWORDm Integer 0 to 2147483647
BCD Integer 0 to 99999999
TOD Message 0:00:00.000 to 23:59:59.999
T Message -24D_20H_31M_23S_648MS to
24D_20H_31M_23S_647MS
Double Word D<B,I>d,Dm,v Message Hex ASCII String
Array D<B,I>d,DWORDm,v Message Hex ASCII String
Double Integer D<B,I>d,DINTm Integer -2147483648 to 2147483647
BCD Integer -9999999 to 9999999
TOD Message 0:00:00.000 to 23:59:59.999
T Message -24D_20H_31M_23S_648MS to
24D_20H_31M_23S_647MS
Double Integer D<B,I>d,DINTm,v Message Hex ASCII String
Array
Real D<B,I>d,REALm Real 3.4e38
Real Array D<B,I>d,REALm,v Message Hex ASCII String
Notes:
1. All Data Blocks are Read/Write, d=165535, x=065535, n=065534,
m=065532, y=07, v=1131/type size - this size may vary.
2. The longest string InTouch can process is 131 bytes, so the following maximum length
of arrays (v) is supported:131 for String, 65 for Byte Array and Char Array, 32 for Word
Array and Integer Array and 16 for Double Word Array, Double Integer Array and Real
Array. Arrays are converted into HEX ASCII strings representing the big endian format of
the binary data.
3. The S7Ehernet Server will process a write (POKE) to a Data Block.
Examples:
DB123,W24 Word starting from address 24 in Data Block 123, I/O Type: Integer
DB23,DINT10BCD - Double Integer starting from address 10 in Data Block 23, value
interpreted as BCD, I/O Type: Integer
DI5,X3.0 - Bit 0 in byte with address 3 in Data Block 5, I/O Type: Discrete
DI6,BYTE5,10 - Byte Array with length 10 bytes starting from address 5 in Data Block 6,
I/O Type: Message
Flag Bytes (Merker)
Data Format Items Suffix I/O Tag Range
Type
Bit FXx.y Discrete 0 or 1
MXx.y Discrete 0 or 1
String FSx,v Message String
MSx,v Message String
FSTRINGx,v Message String
MSTRINGx,v Message String
Byte FBx Integer 0 to 255
MBx Integer 0 to 255
FBYTEx Integer 0 to 255
MBYTEx Integer 0 to 255
DT Message 1990-1-1-0:00:00.000 to
2089-12-31-23:59:59.999
Byte Array FBx,v Message Hex ASCII String
MBx,v Message Hex ASCII String
FBYTEx,v Message Hex ASCII String
MBYTEx,v Message Hex ASCII String
Char FCHARx Integer -128 to 127
MCHARx Integer -128 to 127
DT Message 1990-1-1-0:00:00.000 to
2089-12-31-23:59:59.999
Char Array FCHARx,v Message Hex ASCII String
MCHARx,v Message Hex ASCII String
Word FWn Integer 0 to 65535
MWn Integer 0 to 65535
FWORDn Integer 0 to 65535
MWORDn Integer 0 to 65535
BCD Integer 0 to 9999
KT Message 0.0 to 999.3
S5T Message 0 ms to 2 h 46 m 30 s
TR Real 1.0 to 9990.0 (s)
D Message 1990-1-1 to 2168-12-31
Notes:
1. All Flags are Read/Write, x=065535, n=065534, m=065532, y=07,
v=1131/type size - this size may vary.
2. The longest string InTouch can process is 131 bytes, so the following maximum length
of arrays (v) is supported:131 for String, 65 for Byte Array and Char Array, 32 for Word
Array and Integer Array and 16 for Double Word Array, Double Integer Array and Real
Array. Arrays are converted into HEX ASCII strings representing the big endian format of
the binary data.
3. The S7Ethernet Server will process a write (POKE) to a Flag Byte.
Examples:
FB12 - Byte with address 12, I/O Type: Integer
MDWORD60BCD - Double Word starting from address 60, value interpreted as BCD, I/O
Type: Integer
Notes:
1. All Inputs are Read Only, x=065535, n=065534, m=065532, y=07,
v=1131/type size - this size may vary.
2. The longest string InTouch can process is 131 bytes, so the following maximum length
of arrays (v) is supported:131 for String, 65 for Byte Array and Char Array, 32 for Word
Array and Integer Array and 16 for Double Word Array, Double Integer Array and Real
Array. Arrays are converted into HEX ASCII strings representing the big endian format of
the binary data.
3. The S7Ethernet Server will not process a write (POKE) to an Input Byte.
Examples:
ICHAR13 - Char with address 13, I/O Type: Integer
EDINT40TOD - Double Integer starting from address 40, value interpreted as TOD, I/O
Type: Message
I4.3 - Bit 3 in byte with address 4, I/O Type: Discrete
EREAL5,10 - Real Array with length 10 reals (40 bytes) starting from address 5, I/O
Type: Message
Notes:
1. All Outputs are Read/Write, x=065535, n=065534, m=065532, y=07,
v=1131/type size - this size may vary.
2. The longest string InTouch can process is 131 bytes, so the following maximum length
of arrays (v) is supported:131 for String, 65 for Byte Array and Char Array, 32 for Word
Array and Integer Array and 16 for Double Word Array, Double Integer Array and Real
Array. Arrays are converted into HEX ASCII strings representing the big endian format of
the binary data.
3. The S7Ehernet Server will process a write (POKE) to an Output Byte.
Examples:
OB20 - Byte with address 20, I/O Type: Integer
ASTRING30,10 - String starting from address 30, length 10 bytes, I/O Type: Message
OX13.4 - Bit 4 in byte with address 13, I/O Type: Discrete
AREAL10 - Real starting from address 10, I/O Type: Real
Important Note!
The S7-3xx PLCs have limitation (cannot be changed) of PDU (Protocol Data Unit) data
size 222 bytes - the number of bytes what can be read in single operation. This limitation
should be considered when creating applications which will use the S7Ethernet Server -
maximum performance can be achieved with less as possible number of PDUs used to
read consecutive data from PLC. For example, in case 666 consecutive bytes are read
from PLC then 3 PDUs are needed. In case 667 and more consecutive bytes are read
then 4th PDU is needed and performance will reduce.
STATUS
For each topic, there is a built-in discrete item that indicates the state of communication
with PLC. The discrete item (STATUS) is set to 0 when communication fails and set to 1
when communication is successful. The STATUS value is set to 0 after 3 consecutive
unsuccessful retries to communicate with this PLC.
From InTouch the state of communication may be read by defining an I/O Discrete
tagname and associating it with the topic configured for the PLC and using STATUS as
the item name.
From Excel, the status of the communication may be read by entering the following
formula in a cell:
=S7ETHERNET|topic!STATUS
where topic is the name of topic (e.g. plc01) configured for PLC.
RUN
The RUN item is a Discrete type Read Only item used to monitor the state of PLC
program: value 1 (ON) means PLC program is running and value 0 (OFF) means PLC
program is not running.
UPDATEINTERVAL
The UPDATEINTERVAL item is an Integer type Read/Write item used to access the
currently set Update Interval (see Topic Definition Command section). It indicates the
current requested update interval (in milliseconds). The value of this item can be read
through DDE, Suite Link or OPC. Client can poke new values to this item. The range of
valid values is from 10 to 2147483647 milliseconds. The value of zero indicates that no
items on this topic are updated. The write commands are still executed (new values
written to PLC) if UPDATEINTERVAL value is 0 (zero).
Note: By poking a value of zero to the UPDATEINTERVAL item, a client can stop all
update activities on the corresponding topic without having to deactivate the items.
MAXINTERVAL
The MAXINTERVAL item is an Integer type Read Only item used to access the
measured maximum update interval (in milliseconds) of all items for the corresponding
topic for the last completed poll cycle. The range of valid values is from 0 to 2147483647
milliseconds.
ITEMCOUNT
The ITEMCOUNT item is an Integer type Read Only item used to access the number of
active items in the corresponding topic. The range of valid values is from 0 to
2147483647.
ERRORCOUNT
The ERRORCOUNT item is an Integer type Read Only item used to access the number
of active items with errors in the corresponding topic. The range of valid values is from 0
to 2147483647.
ERRORITEMS
The ERRORITEMS item is an Integer type Read/Write Only (unique for each topic) used
to access the total number of items with invalid item names (these items are rejected by
Server). The ERRORITEMS value can be reset by writing 0 to this item. The range of
valid values is from 0 to 2147483647.
WRITECOUNT
The WRITECOUNT item is an Integer type Read Only item used to access the number of
write commands (messages) waiting for execution. The range of valid values is from 0 to
2147483647.
For example, in following way the WRITECOUNT item can be used to avoid the
increasing of memory occupied by not executed write commands:
- activate the hot link with WRITECOUNT item and start to monitor it;
- activate new write command (by poking new value) only if value of WRITECOUNT
becomes equal to 0, e.g. all previous write commands are executed and memory
occupied by them is freed.
SUSPEND
Special Read/Write Discrete Item SUSPEND may be used to control the communication
with a separate topic. If application changes SUSPEND value from 0 to 1 then
communication with topic is suspended. If SUSPEND value is changed back to 0 then
communication with this topic is resumed.
Note: If topic is suspended by setting SUSPEND value to 1, then Server rejects all new
write values to this topic, i.e. no new write messages are created after SUSPEND value
has changed from 0 to 1.
Click on Add. The "Add Access Name" Dialog Box will appear:
Note: If Add is selected, this dialog box will be blank when it initially appears. Data has
been entered here to illustrate the entries that are made.
The following fields are required entries when entering an Access Name Definition:
Access Name
In the Access Name box type the name you want InTouch to use to this Access Name.
(For simplicity, use the same name that you will use for the Topic Name here.)
Node Name
If the data resides in a network I/O Server, in the Node Name box, type the remote
node's name.
Application Name
In the Application Name box, type the actual program name for the I/O Server program
from which the data values will be acquired. In case the values are coming from the
S7Ethernet Server the S7ETHERNET is used. Do not enter the .exe extension portion
of the program name.
Topic Name
Enter the name defined for the topic in the S7ETHERNET Server to identify the topic the
S7Ethernet Server will be accessing.
The Topic Name is an application-specific sub-group of data elements. In the case of
data coming from S7Ethernet Server program, the topic name is the exact same name
configured for the topic in the S7Ethernet Server.
Note: This will usually be the same as the "Access Name", although, if desired, they may
be different. However, it must be the same name used when the topics were configured
in section Configuring the S7Ehernet Server.
Click OK to accept the new Access Name and close the Add Access Name dialog box.
The Access Names dialog box will reappear displaying the new Access Name selected
in the list.
Select the tag type by clicking on the Type: button. The "Tag Types" dialog box will
appear:
To access S7ETHERNET items, the type must be I/O Discrete, I/O Integer, I/O Real or
I/O Message. Select the Tag type.
The "Details" dialog box for the tag name will appear:
Select the Access name for S7Ethernet Server by clicking on the Access Name:
button. The "Access Names" dialog box will appear:
Select the appropriate Access Name and click on Close. (If the Access Name has not
been defined as previously described, click on Add and define the Access Name now.)
The "Details" dialog box will appear displaying the selected Access Name:
For integers and reals fill in the Min EU, Max EU, Min Raw and Max Raw fields. These
fields control the range of values that will be accepted from the Server and how the
values are scaled. If no scaling is desired, Min EU should be equal to Min Raw and Max
EU equal to Max Raw.
Enter the S7Ethernet item name to be associated with this tagname in the Item: field in
the "Details" box:
Where applicable, the Use Tagname as Item Name option may be selected to
automatically enter the tag name in this field. Note: The tag name can only be used if it
follows the conventions listed in the Item Names section.
Once all entries have been made, click on the Save button (in the top dialog box) to
accept the new tag name. To define additional tagnames click on the New button. To
return to the WindowMaker main screen, select Close.
The status of communication between the Server and InTouch can be read into Excel by
entering the following DDE reference formula in a cell on a spreadsheet (in following
examples S7300 is the Topic Name configured for S7ETHERNET Server):
=view|DDEStatus!S7300
or
=view|IOStatus!S7300
= S7ETHERNET|topic!item
Sometimes, Excel requires the topic and/or item to be surrounded by apostrophes.
In the formula, topic must be replaced with one of the valid topic names defined during
the Server configuration process. Replace item with one of the valid item names
described in the Item Names section.
Note: Refer to the Microsoft Excel manual for complete details on entering Remote
Reference formulas for cells.
channel=INITIATE("S7ETHERNET ","topicname")
=POKE(channel,"itemname", Data_Reference)
=TERMINATE (channel)
=RETURN()
channel=INITIATE("S7ETHERNET ","topicname")
Opens a channel to a specific topic name (defined in the Server) in an application with
name S7ETHERNET (the executable name less the .EXE) and assigns the number of
that opened channel to channel.
Note: By using the channel=INITIATE statement the word channel must be used in
the =POKE statement instead of the actual cell reference. The "applicationname"
and "topicname" portions of the formula must be enclosed in quotation marks.
=POKE(channel,"itemname", Data_Reference)
POKEs the value contained in the Data_Reference to the specified item name (actual
location in the Siemens PLC) via the channel number returned by the previously
executed INITIATE function. Data_Reference is the row/column ID of the cell containing
the data value. For "itemname", use some of the valid item names described in the Item
Names section.
=TERMINATE(channel)
Closes the channel at the end of the macro. Some applications have a limited number of
channels. Therefore they should be closed when finished. Channel is the channel
number returned by the previously executed INITIATE function.
=RETURN()
Marks the end of the macro.
The following is an example of Excel macro used to poke value from cell B2 to topic
S7300 item DB123,W24:
PokeMacro -Ctrl a
=INITIATE("S7ETHERNET ","S7300")
=POKE(A2,"DB123,W24",B2)
=ON.TIME(NOW()+0.01,"TerminateDDEChannel")
=RETURN()
TerminateDDEChannel
=TERMINATE(A2)
=RETURN()
Note: Refer to the Microsoft Excel manual for complete details on entering Remote
Reference formulas for cells.
There are following general steps needed to access an OPC item from S7Ethernet
Server:
1. Run OPC Client application and select the S7Ethernet OPC and DDE Server from
the list of available OPC Servers. If S7Ethernet Server currently is not running, it will
start automatically.
2. Create a new group (or topic if Wonderware OPCLink application is used).
3. If OPC Client supports the validating of items, validate the item before adding it.
4. Add the item. Depending on OPC Client it can be done in several different ways, for
example:
a) By entering separately the access path to topic name (valid topic name
configured in S7Ethernet Topic definition) and separately the item name.
b) By entering the full path to item name in the format TopicName.ItemName
where TopicName is the valid topic name configured in S7Ethernet Topic
definition.
c) By browsing the server address space.
By default the S7Ethernet Server is installed and used as a local OPC Server - both OPC
Server and OPC Client reside on same computer. The S7Ethernet Server can run also as
a remote OPC Server - in this case OPC Server and OPC Client are located on separate
computers. Accessing the remote OPC Server is same as for local OPC Server, but
some DCOM (Distributed COM) configuration is required before accessing the remote
OPC Server. The DCOM configuration must be done both on OPC Server and OPC
Client computers.
Configuring DCOM
To access S7Ethernet Server as a remote OPC Server, it is necessary to do some
changes in default security settings selected for the OPC Servers and Clients
computers. The following Windows XP SP2 based explanation describes the necessary
settings to be done for XP SP2 firewall, for OPC Server and for OPC Client computers.
Firewall
When setting up the OPC Server/Client, it is recommended initially to switch the firewall
off. After the necessary configuration is done, the firewall should be restarted and the
DCOM port added to the exception list by selecting Add Port... in firewall Exceptions
pane and adding TCP port 135 as it is needed to initiate DCOM communications:
As well by selecting the Add Program..., all necessary OPC Server and OPC Client
programs should be added to the exception list.
1. At first, it is recommended to create a local group (i.e. OPCUSERS) that contains a list
of all the users who will have permission to access the S7Ethernet OPC server.
2. Start dcomcnfg.exe from Windows XP Start-Run line and select the S7Ethernet OPC
& DDE Server from the list of DCOM entries:
3. Right click on S7Ethernet OPC & DDE Server and select the Poperties item from the
pull down menu that appears. In the window that appears select the General tab and
make sure the Authentication Level field is set to Connect:
4. Select the Security tab and customize the Launch and Activation and Access
permissions by adding the user group with user who will have permission to access the
S7Ethernet OPC server. Give all permissions to that group:
5. Now the configuration of OPC Server is completed close the dcomcnfg program and
restart the S7Ethernet OPC Server to put new settings into effect.
OPCEnum settings
OPCEnum (OPC Enumeration Service) is OPC standard component that allows remote
OPC Client to browse the local machine to identify OPC Servers that are installed on it.
Select the Security tab and customize the Launch and Activation and Access
permissions by adding the user group OPCUSERS same way like for S7Ethernet OPC &
DDE Server. Give all permissions to that group.
1. Start dcomcnfg.exe from Windows XP Start-Run line, navigate to and right click on My
Computer and select Poperties item from the pull down menu that appears. In the
window that appears select the Default Properties tab and make sure the settings there
are filled like as shown below:
2. Select the Com Security tab and edit the Default settings for Access Permissions by
adding (if not yet added) ANONYMOUS LOGON and giving it all access permissions. Do
the same also for Edit Limits:
3. Edit the Default settings for Launch and Activation Permissions by adding (if not yet
added) ANONYMOUS LOGON and giving it all all access permissions. Do the same also
for Edit Limits.
Note!
In case the Edit Limits selections are not available (grayed) that would mean the DCOM
Security Options for some reason have Security Setting other than Not defined. To
correct that: select Control Panel/ Administrative Tools/Local Security Policy and select
Local Policies/Security Options in Local Security Settings dialog box; select, right click
and invoke Properties for DCOM: Machine Access Restrictions... and DCOM: Machine
Launch Restrictions... and change their Security Setting to Not defined.
4. Now the configuration of OPC Client side is is completed close the dcomcnfg
program and restart the OPC Client.
S7ETHERNET /Service
After this the S7ETHERNET OPC & DDE Server Service will be installed with Startup
type Manual. The Service Startup configuration can be changed by MS Windows XP
Control Panel/Administrative Tools/Services configuration. The Allow service to interact
with desktop checkbox in Log On tab must be checked (the Log On tab can be
invoked from Poperties item from the pull down menu that appears when right clicking on
S7ETHERNET OPC & DDE Server Service). If Allow service to interact with desktop
is not selected then S7ETHERNET Server full functionality is not ensured (e.g. the Server
configuration can not be changed, no message boxes will be displayed, etc.).
To uninstall S7ETHERNET OPC & DDE Server Service, at first the Service must be
stopped by Control Panel/ Administrative Tools/Services/Stop and then S7ETHERNET
Server must be started manually with command line parameter "/DelService":
S7ETHERNET /DelService
After this the S7ETHERNET Server OPC & DDE version will be still registered and
accessible to OPC Clients.
Please refer to Wonderware OPCLink Server and OPC Browser Users Guide for
details how to install, start and use the OPCLink Server. The following information in this
section covers only the most important points about using OPC & DDE version of
S7ETHERNET Server with OPCLink Server.
Topic Name
Enter a unique name (e.g. Controller1) for the PLC in this field. If using InTouch then
same Topic Name is to be entered in the "Add Access Name" dialog box when defining
the Access Names for OPCLink Server in InTouch WindowMaker.
OPC Path
Enter the name of the OPC path (e.g. S7300.) used by this topic. This OPC path is the
first part of a full OPC item name string common to all items that will be used in this topic.
The available OPC paths for S7ETHERNET Server can be obtained by clicking on
Browse button (this allows to view the S7ETHERNET Servers exposed address space).
Update Interval
Enter the frequency (in milliseconds) that the server will acquire data for the items/points
associated with this topic. If 0 (zero) is entered here, OPCLink will not gather data from
S7ETHERNET Server.
Browse
Clicking on this button initiates the browsing through exposed address space of
S7ETHERNET Server. The starting addresses of each available data area and names of
pre-defined (additional) items will appear on Browse OPC items: window in alphabetical
order.
application name
The name of the Windows program (server) that will be accessing the data element. In
the case of data coming from or going to S7ETHERNET Server OPC & DDE version,
the application portion of the address is OPCLINK.
topic name
Meaningful names are configured to identify specific devices (PLCs). These names are
then used as the topic name in all conversations to that device (PLC). This must be same
name as Topic Name entered in the OPCLink Topic Definition dialog box, for example,
Controller1.
Note! You can define multiple topic names for the same PLC to poll different points at
different rates.
item name
A specific data element within the specified topic. The OPCLink Server item syntax
follows the following rules. The item names must start with:
d discrete value
i integer value
r real value
m message (string)
The item name added to the OPC path of the topic (without the heading type letter) must
give a fully qualified OPC item name for the S7ETHERNET Server. Some examples of
possible item names acceptable by OPCLink Server/ S7ETHERNET Server connection:
Error messages
The messages about errors detected by the Server are displayed on the Wonderware
Logger or S7ETHERNET Internal Logger main window and saved to log file. Some of
most often errors are:
Troubleshooting
WIN.INI entries
The first time you run the S7ETHERNET Server configuration, most of the items in the
following list will automatically appear in the WIN.INI file, located in the MS Windows
system directory (e.g. C:\WINNT). It is an ASCII file and can be altered manually if you
wish with any text editor, e.g., MS Windows Notepad (do not use a program that formats
text, such as MS Word or Write unless the file is saved as a DOS text). The following is a
typical entry for the S7ETHERNET Server:
[S7ETHERNET]
WinIconic=0
WinFullScreen=0
WinTop=112
WinLeft=0
WinWidth=200
WinHeight=168
ProtocolTimer=10
ConfigurationFile=C:\S7ETHERNET\
ShowSend=0
ShowReceive=0
ShowErrors=1
There are following additional WIN.INI entries available for S7ETHERNET Server:
The default values (they are used if WIN.INI file does not contain these entries) are
SlowPollRetries equal to 3 and SlowPollInterval equal to 60 seconds.
For example, the following entries can be used to specify that slow poll mode 2 minutes
will start after 5 consecutive unsuccessful retries:
SlowPollRetries =5
SlowPollInterval=120
If all topics connected to same adapter-cable are in slow poll mode then after 5 full slow
poll cycles (all topics are at least 5 times polled) the connection to this adapter-cable is
closed and then reopened again.
ShowRejectedWrites
The ShowRejectedWrites entry is used to enable the logging of rejected write
messages. This option can be useful when communication with a separate topic (PLC) is
suspended by SUSPEND item (see Item Names section) and the Server rejects each
write to this topic (PLC). If ShowRejectedWrites=1 then information about each rejected
write value is reported to WWLogger or to S7ETHERNET Internal Logger. If
ShowRejectedWrites=0 (default) then Server rejects each write to suspended topic(s)
without logging any information.
Troubleshooting menu
The following debugging choices are appended to the Servers System Menu (the menu
that appears when you click on the Server icon in the upper left hand corner of the
Server's window):
All debug information (except Dump Screen) is displayed through the Wonderware
Logger or S7ETHERNET Internal Logger depending on Show Logger option state and
settings on the S7ETHERNET Internal Logger Disk Options dialog box - see Internal
Logger section below.
Note: If you check Show Send and/or Show Receive debug output grows very fast and
it is possible that computer can become very slow.
Internal Logger
Internal Logger is available only for OPC & DDE version of S7ETHERNET Server. To
enable the S7ETHERNET Internal Logger, check the Show Logger option at the
S7ETHERNET Server System Menu (see Troubleshooting menu section above) - this
command can be used to start/stop Internal Logger. The Internal Logger window looks
like following:
To save Internal Logger information to file, select Options/Disk Options from Internal
Logger main menu the Disk Options dialog box will appear:
Log to File
If checked then Internal Logger information will be saved to Internal Logger File. The
S7ETHERNET Internal Logger file name is created in the following format:
S7Ehernet_YYYYMMDD.logn
Directory
Enter the path where to keep the Internal Logger File.
Options/Font
To configure the font used by Internal Logger, select Options/Font from Internal Logger
main menu - the Font dialog box will appear:
KLINKMANN AUTOMATION
S7ETHERNET Communication Server
Revision History