Siemens TCP Ip Ethernet Manual
Siemens TCP Ip Ethernet Manual
Siemens TCP Ip Ethernet Manual
Table of Contents
Siemens TCP/ IP Ethernet Driver 1
Table of Contents 2
Overview 6
Setup 6
Channel Properties — General 7
Channel Properties — Ethernet Communications 8
Channel Properties — Write Optimizations 8
Channel Properties — Advanced 9
Device Properties — General 10
Operating Mode 10
Device Properties — Scan Mode 11
Device Properties — Timing 11
Device Properties — Auto-Demotion 13
Device Properties — Tag Generation 13
Device Properties — Communications Parameters 15
Device Properties — S7 Communication Parameters 16
Device Properties — Addressing Options 18
Device Properties — Tag Import 19
Device Properties — Redundancy 20
Configuration API — Siemens TCP/IP Ethernet Example 21
Enumerations 22
Device Model Enumerations 23
Optimizing Communications 24
Address Descriptions 26
Internal Tags 30
www. ptc.com
3 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 4
| Address = '<address>'.
Unable to write to address on device. Time of Day string contains a syntax error. Expected 'hh:m-
m:ss.hhh' format. | Address = '<address>', Time of Day string = '<string>'. 59
Error Codes 60
Index 104
www. ptc.com
5 Siem en s TCP/IP Eth ern et Driver
CONTENTS
Overview
What is the Siemens TCP/IP Ethernet Driver?
Set up
How do I configure a channel and device for use with this driver?
Tip: For S7 1200 and 1500 PLC support, consider the Siemens S7 Plus Ethernet Driver.
www. ptc.com
Siemens TCP/IP Ethernet Driver 6
Overview
The Siemens TCP/IP Ethernet Driver provides a reliable way to connect Siemens TCP/IP Ethernet devices to
OPC client applications, including HMI, SCADA, Historian, MES, ERP, and countless custom applications. It is
intended for use with Siemens S7-200, 300, 400, 1200, and 1500 PLCs. There are two options for com-
munications:
l Industrial Ethernet TCP/IP interface communication processor (CP). The protocol used is S7 Mes-
saging on Industrial Ethernet (ISO 8073 Class 0) over TCP/IP as defined in RFC1006.
l Hilscher's NetLink adapter. Only an MPI port is required. The NetLink adapter does not support the
S7-200 model.
The driver requires no special libraries or hardware. A standard Ethernet card is all that is needed.
Set up
Supported Devices
S7-200 via CP243
S7-300 via CP343
S7-400 via CP443
S7-1200*
S7-1500*
S7-300 via NetLink
S7-400 via NetLink
www. ptc.com
7 Siem en s TCP/IP Eth ern et Driver
Identification
N am e: User-defined identity of this channel. In each server project, each channel name must be unique.
Although names can be up to 256 characters, some client applications have a limited display window when
browsing the OPC server's tag space. The channel name is part of the OPC browser information. The prop-
erty is required for creating a channel.
For information on reserved characters, refer to "How To... Properly Name a Channel, Device, Tag, and Tag
Group" in the server help.
Driver: Selected protocol / driver for this channel. This property specifies the device driver that was selected
during channel creation. It is a disabled setting in the channel properties. The property is required for cre-
ating a channel.
N ote: With the server's online full-time operation, these properties can be changed at any time. This
includes changing the channel name to prevent clients from registering data with the server. If a client has
already acquired an item from the server before the channel name is changed, the items are unaffected. If,
after the channel name has been changed, the client application releases the item and attempts to re-
acquire using the old channel name, the item is not accepted. With this in mind, changes to the properties
should not be made once a large client application has been developed. Utilize the User Manager to prevent
operators from changing properties and restrict access rights to server features.
Diagnostics
Diagnostics Capture: When enabled, this option makes the channel's diagnostic information available to
OPC applications. Because the server's diagnostic features require a minimal amount of overhead pro-
cessing, it is recommended that they be utilized when needed and disabled when not. The default is dis-
abled.
N ote: This property is not available if the driver does not support diagnostics.
For more information, refer to "Communication Diagnostics" and "Statistics Tags" in the server help.
www. ptc.com
Siemens TCP/IP Ethernet Driver 8
Ethernet Settings
N etwork Adapter: Specify the network adapter to bind. When left blank or Default is selected, the oper-
ating system selects the default adapter.
Write Optimizations
Optim ization Method: Controls how write data is passed to the underlying communications driver. The
options are:
l Write All Values for All Tags: This option forces the server to attempt to write every value to the
controller. In this mode, the server continues to gather write requests and add them to the server's
internal write queue. The server processes the write queue and attempts to empty it by writing data
to the device as quickly as possible. This mode ensures that everything written from the client applic-
ations is sent to the target device. This mode should be selected if the write operation order or the
write item's content must uniquely be seen at the target device.
l Write Only Latest Value for N on-Boolean Tags: Many consecutive writes to the same value can
accumulate in the write queue due to the time required to actually send the data to the device. If the
server updates a write value that has already been placed in the write queue, far fewer writes are
needed to reach the same final output value. In this way, no extra writes accumulate in the server's
queue. When the user stops moving the slide switch, the value in the device is at the correct value at
virtually the same time. As the mode states, any value that is not a Boolean value is updated in the
server's internal write queue and sent to the device at the next possible opportunity. This can greatly
improve the application performance.
N ote: This option does not attempt to optimize writes to Boolean values. It allows users to optimize
the operation of HMI data without causing problems with Boolean operations, such as a momentary
push button.
l Write Only Latest Value for All Tags: This option takes the theory behind the second optimization
mode and applies it to all tags. It is especially useful if the application only needs to send the latest
www. ptc.com
9 Siem en s TCP/IP Eth ern et Driver
value to the device. This mode optimizes all writes by updating the tags currently in the write queue
before they are sent. This is the default mode.
Duty Cycle: is used to control the ratio of write to read operations. The ratio is always based on one read for
every one to ten writes. The duty cycle is set to ten by default, meaning that ten writes occur for each read
operation. Although the application is performing a large number of continuous writes, it must be ensured
that read data is still given time to process. A setting of one results in one read operation for every write
operation. If there are no write operations to perform, reads are processed continuously. This allows optim-
ization for applications with continuous writes versus a more balanced back and forth data flow.
N ote: It is recommended that the application be characterized for compatibility with the write optimization
enhancements before being used in a production environment.
N on-N orm alized Float Handling: A non-normalized value is defined as Infinity, Not-a-Number (NaN), or as
a Denormalized Number. The default is Replace with Zero. Drivers that have native float handling may
default to Unmodified. Non-normalized float handling allows users to specify how a driver handles non-nor-
malized IEEE-754 floating point data. Descriptions of the options are as follows:
l Replace with Zero: This option allows a driver to replace non-normalized IEEE-754 floating point val-
ues with zero before being transferred to clients.
l Unm odified: This option allows a driver to transfer IEEE-754 denormalized, normalized, non-num-
ber, and infinity values to clients without any conversion or changes.
N ote: This property is disabled if the driver does not support floating-point values or if it only supports the
option that is displayed. According to the channel's float normalization setting, only real-time driver tags
(such as values and arrays) are subject to float normalization. For example, EFM data is not affected by this
setting.
For more information on the floating-point values, refer to "How To ... Work with Non-Normalized Floating-
Point Values" in the server help.
Inter-Device Delay: Specify the amount of time the communications channel waits to send new requests to
the next device after data is received from the current device on the same channel. Zero (0) disables the
delay.
N ote: This property is not available for all drivers, models, and dependent settings.
www. ptc.com
Siemens TCP/IP Ethernet Driver 10
Identification
Channel Assignm ent: User-defined name of the channel to which this device currently belongs.
ID: the unique identity of the device for communication with the driver. The device ID is formatted as
YYY.YYY.YYY.YYY, where YYY designates the device's IP address. Each YYY byte should be in the range of 0 to
255. If the device supports host name resolution, the device ID may also be specified as a standard
UNC/DNS name.
Operating M ode
Data Collection: This property controls the device's active state. Although device communications are
enabled by default, this property can be used to disable a physical device. Communications are not attemp-
ted when a device is disabled. From a client standpoint, the data is marked as invalid and write operations
are not accepted. This property can be changed at any time through this property or the device system tags.
Sim ulated: Place the device into or out of Simulation Mode. In this mode, the driver does not attempt to
communicate with the physical device, but the server continues to return valid OPC data. Simulated stops
physical communications with the device, but allows OPC data to be returned to the OPC client as valid data.
While in Simulation Mode, the server treats all device data as reflective: whatever is written to the simulated
device is read back and each OPC item is treated individually. The item's memory map is based on the group
Update Rate. The data is not saved if the server removes the item (such as when the server is reinitialized).
The default is No.
www. ptc.com
11 Siem en s TCP/IP Eth ern et Driver
N otes:
1. This System tag (_Simulated) is read only and cannot be written to for runtime protection. The System
tag allows this property to be monitored from the client.
2. In Simulation mode, the item's memory map is based on client update rate(s) (Group Update Rate for
OPC clients or Scan Rate for native and DDE interfaces). This means that two clients that reference
the same item with different update rates return different data.
Simulation Mode is for test and simulation purposes only. It should never be used in a production envir-
onment.
Scan Mode: Specify how tags in the device are scanned for updates sent to subscribing clients. Descriptions
of the options are:
l Respect Client-Specified Scan Rate: This mode uses the scan rate requested by the client.
l Request Data N o Faster than Scan Rate: This mode specifies the value set as the maximum scan
rate. The valid range is 10 to 99999990 milliseconds. The default is 1000 milliseconds.
N ote: When the server has an active client and items for the device and the scan rate value is
increased, the changes take effect immediately. When the scan rate value is decreased, the changes
do not take effect until all client applications have been disconnected.
l Request All Data at Scan Rate: This mode forces tags to be scanned at the specified rate for sub-
scribed clients. The valid range is 10 to 99999990 milliseconds. The default is 1000 milliseconds.
l Do N ot Scan, Dem and Poll Only: This mode does not periodically poll tags that belong to the
device nor perform a read to get an item's initial value once it becomes active. It is the OPC client's
responsibility to poll for updates, either by writing to the _DemandPoll tag or by issuing explicit device
reads for individual items. For more information, refer to "Device Demand Poll" in server help.
l Respect Tag-Specified Scan Rate: This mode forces static tags to be scanned at the rate specified
in their static configuration tag properties. Dynamic tags are scanned at the client-specified scan
rate.
Initial Updates from Cache: When enabled, this option allows the server to provide the first updates for
newly activated tag references from stored (cached) data. Cache updates can only be provided when the
new item reference shares the same address, scan rate, data type, client access, and scaling properties. A
device read is used for the initial update for the first client reference only. The default is disabled; any time a
client activates a tag reference the server attempts to read the initial value from the device.
www. ptc.com
Siemens TCP/IP Ethernet Driver 12
influence how many errors or timeouts a communications driver encounters. Timing properties are specific
to each configured device.
Communications Timeouts
Connect Tim eout: This property (which is used primarily by Ethernet based drivers) controls the amount of
time required to establish a socket connection to a remote device. The device's connection time often takes
longer than normal communications requests to that same device. The valid range is 1 to 30 seconds. The
default is typically 3 seconds, but can vary depending on the driver's specific nature. If this setting is not sup-
ported by the driver, it is disabled.
N ote: Due to the nature of UDP connections, the connection timeout setting is not applicable when com-
municating via UDP.
Request Tim eout: Specify an interval used by all drivers to determine how long the driver waits for a
response from the target device to complete. The valid range is 50 to 9,999,999 milliseconds (167.6667
minutes). The default is usually 1000 milliseconds, but can vary depending on the driver. The default timeout
for most serial drivers is based on a baud rate of 9600 baud or better. When using a driver at lower baud
rates, increase the timeout to compensate for the increased time required to acquire data.
Attem pts Before Tim eout: Specify how many times the driver issues a communications request before con-
sidering the request to have failed and the device to be in error. The valid range is 1 to 10. The default is typ-
ically 3, but can vary depending on the driver's specific nature. The number of attempts configured for an
application depends largely on the communications environment. This property applies to both connection
attempts and request attempts.
Timing
Inter-Request Delay: Specify how long the driver waits before sending the next request to the target
device. It overrides the normal polling frequency of tags associated with the device, as well as one-time
reads and writes. This delay can be useful when dealing with devices with slow turnaround times and in
cases where network load is a concern. Configuring a delay for a device affects communications with all
other devices on the channel. It is recommended that users separate any device that requires an inter-
request delay to a separate channel if possible. Other communications properties (such as communication
serialization) can extend this delay. The valid range is 0 to 300,000 milliseconds; however, some drivers may
limit the maximum value due to a function of their particular design. The default is 0, which indicates no
delay between requests with the target device.
N ote: Not all drivers support Inter-Request Delay. This setting does not appear if it is not available.
www. ptc.com
13 Siem en s TCP/IP Eth ern et Driver
Dem ote on Failure: When enabled, the device is automatically taken off-scan until it is responding again.
Tip: Determine when a device is off-scan by monitoring its demoted state using the _AutoDemoted sys-
tem tag.
Tim eouts to Dem ote: Specify how many successive cycles of request timeouts and retries occur before the
device is placed off-scan. The valid range is 1 to 30 successive failures. The default is 3.
Dem otion Period: Indicate how long the device should be placed off-scan when the timeouts value is
reached. During this period, no read requests are sent to the device and all data associated with the read
requests are set to bad quality. When this period expires, the driver places the device on-scan and allows for
another attempt at communications. The valid range is 100 to 3600000 milliseconds. The default is 10000
milliseconds.
Discard Requests when Dem oted: Select whether or not write requests should be attempted during the
off-scan period. Disable to always send write requests regardless of the demotion period. Enable to discard
writes; the server automatically fails any write request received from a client and does not post a message
to the Event Log.
Not all devices and drivers support full automatic tag database generation and not all support the same data
types. Consult the data types descriptions or the supported data type lists for each driver for specifics.
If the target device supports its own local tag database, the driver reads the device's tag information and
uses the data to generate tags within the server. If the device does not natively support named tags, the
driver creates a list of tags based on driver-specific information. An example of these two conditions is as fol-
lows:
1. If a data acquisition system supports its own local tag database, the communications driver uses the
tag names found in the device to build the server's tags.
www. ptc.com
Siemens TCP/IP Ethernet Driver 14
2. If an Ethernet I/O system supports detection of its own available I/O module types, the com-
munications driver automatically generates tags in the server that are based on the types of I/O mod-
ules plugged into the Ethernet I/O rack.
N ote: Automatic tag database generation's mode of operation is completely configurable. For more inform-
ation, refer to the property descriptions below.
On Property Change: If the device supports automatic tag generation when certain properties change, the
On Property Change option is shown. It is set to Yes by default, but it can be set to N o to control over when
tag generation is performed. In this case, the Create tags action must be manually invoked to perform tag
generation.
On Device Startup: Specify when OPC tags are automatically generated. Descriptions of the options are as
follows:
l Do N ot Generate on Startup: This option prevents the driver from adding any OPC tags to the tag
space of the server. This is the default setting.
l Always Generate on Startup: This option causes the driver to evaluate the device for tag inform-
ation. It also adds tags to the tag space of the server every time the server is launched.
l Generate on First Startup: This option causes the driver to evaluate the target device for tag
information the first time the project is run. It also adds any OPC tags to the server tag space as
needed.
N ote: When the option to automatically generate OPC tags is selected, any tags that are added to the
server's tag space must be saved with the project. Users can configure the project to automatically save
from the Tools | Options menu.
On Duplicate Tag: When automatic tag database generation is enabled, the server needs to know what to
do with the tags that it may have previously added or with tags that have been added or modified after the
communications driver since their original creation. This setting controls how the server handles OPC tags
that were automatically generated and currently exist in the project. It also prevents automatically gen-
erated tags from accumulating in the server.
For example, if a user changes the I/O modules in the rack with the server configured to Always Generate
on Startup, new tags would be added to the server every time the communications driver detected a new
I/O module. If the old tags were not removed, many unused tags could accumulate in the server's tag space.
The options are:
l Delete on Create: This option deletes any tags that were previously added to the tag space before
any new tags are added. This is the default setting.
l Overwrite as N ecessary: This option instructs the server to only remove the tags that the com-
munications driver is replacing with new tags. Any tags that are not being overwritten remain in the
server's tag space.
www. ptc.com
15 Siem en s TCP/IP Eth ern et Driver
l Do not Overwrite: This option prevents the server from removing any tags that were previously gen-
erated or already existed in the server. The communications driver can only add tags that are com-
pletely new.
l Do not Overwrite, Log Error: This option has the same effect as the prior option, and also posts an
error message to the server's Event Log when a tag overwrite would have occurred.
N ote: Removing OPC tags affects tags that have been automatically generated by the com-
munications driver as well as any tags that have been added using names that match generated tags.
Users should avoid adding tags to the server using names that may match tags that are automatically
generated by the driver.
Parent Group: This property keeps automatically generated tags from mixing with tags that have been
entered manually by specifying a group to be used for automatically generated tags. The name of the group
can be up to 256 characters. This parent group provides a root branch to which all automatically generated
tags are added.
Allow Autom atically Generated Subgroups: This property controls whether the server automatically cre-
ates subgroups for the automatically generated tags. This is the default setting. If disabled, the server gen-
erates the device's tags in a flat list without any grouping. In the server project, the resulting tags are named
with the address value. For example, the tag names are not retained during the generation process.
N ote: If, as the server is generating tags, a tag is assigned the same name as an existing tag, the system
automatically increments to the next highest number so that the tag name is not duplicated. For example, if
the generation process creates a tag named "AI22" that already exists, it creates the tag as "AI23" instead.
Create: Initiates the creation of automatically generated OPC tags. If the device's configuration has been
modified, Create tags forces the driver to reevaluate the device for possible tag changes. Its ability to be
accessed from the System tags allows a client application to initiate tag database creation.
N ote: Create tags is disabled if the Configuration edits a project offline.
Port N um ber: This parameter specifies the port number that the remote CP is configured to use. The
default setting for TCP/IP is 102 (TSAP). The default setting for NetLink is 1099.
N ote: It is recommended that the default port be used for most applications, where the server and the PLC
exist on the same network. For an application using the Internet through firewalls and advanced routers, the
port number can be changed to allow these operations to occur. In most cases, however, the PLC only
accepts a connection on port 102/1099 and may require router forwarding.
MPI ID: This parameter is for NetLink only, and is configured for the port in which the NetLink adapter is con-
nected. It does not apply to models utilizing the TCP/IP CPs (such as S7-300 and S7-400). A maximum of two
connections or devices via TCP are possible when using the NetLink adapter.
www. ptc.com
Siemens TCP/IP Ethernet Driver 16
S7 Communication Parameters
Maxim um PDU Size: This parameter establishes the maximum Protocol Data Unit (PDU) size that will be
requested from the device. The actual PDU used for communication depends on what the device supports.
Typically, the driver and device negotiate the highest supported PDU size. However, this parameter can
force a lower PDU size than would normally be negotiated.
N ote: To observe the PDU value negotiated with the device, use the _CurrentPDUSize internal tag (See
Internal Tags).
S7-200
S7-200 enables communication with S7-200 devices on an Ethernet network. There are two options:
N ote: Configured connections are recommended because they free the PG port for Micro/WIN and also
provide flexibility to make multiple concurrent connections.
Local TSAP
Link Type TSAP Value (hex)
PG 4B57 ('KW')
A remote (client) TSAP configured in Micro/WIN's Ethernet wizard.
Configured
If Micro/WIN remote TSAP=xx.yy* , set local TSAP to xxyy.
Remote TSAP
Link Type TSAP Value (hex)
PG 4B57 ('KW')
A local (server) TSAP configured in Micro/WIN's Ethernet wizard.
Configured
If Micro/WIN remote TSAP=xx.yy* , set local TSAP to xxyy.
www. ptc.com
17 Siem en s TCP/IP Eth ern et Driver
* TSAP as displayed in Micro/WIN's Ethernet wizard. When accessed from V memory, the value may be in
decimal form. For example, if TSAP is 10.00, the V memory value is 1000 hex or 4096 decimal. The values
entered for Local TSAP must be in hexadecimal notation; in this example, the value 1000 would be entered.
For information on using the CP243-1 module, refer to How to Configure S7-200 Connections in
Micro/ WIN.
Link Type: Defines the communication connection between the driver and the CP. The type of link chosen
determines the number of simultaneous requests allowed. The greater the number of simultaneous
requests, the greater the data throughput. Each device connection is allowed one outstanding request. To
achieve multiple simultaneous requests, multiple connections must be configured. This is achieved by defin-
ing the device multiple times in the server (identical device properties). The devices can be defined within
the same channel or under separate channels.
For more information, refer to Optimizing Communication.
Channel.Device=1 CP connection
There are three types of links: PC (applications), OP (operator panel), and PG (programming device).
OP and PG are usually reserved, but can be used if all PC connections are taken.
Type S7-300 CPU 314, 315 S7-400 CPU 412, 413 S7-400 CPU 414 S7-400 CPU 416
PC 2 14 30 62
OP 1 1 1 1
PG 1 1 1 1
Exam ple
Given an S7-400 CPU 412 device, 14 simultaneous requests can be achieved by defining 14 identical
devices in the server with all configured for Link Type PC. In addition to the PC connections, two more
devices can be configured for Link Type OP and PG. This provides 16 connections overall.
Connection resources are shared amongst applications communicating with the CP. If another
application such as STEP 7 is configured to use Industrial Ethernet over TCP/IP, at least one PG/PC con-
nection must be left open for that application.
For information on increasing the number of PG, OP, and PC type connections, refer to How to Con-
figure S7-300/ 400 Connections in STEP 7.
CPU Rack: The number of the rack in which the CPU of interest resides.
CPU Slot: The number of the slot in the rack in which the CPU of interest resides.
For information on how to read or write the rack number or slot number using an internal tag, refer to
Internal Tags.
www. ptc.com
Siemens TCP/IP Ethernet Driver 18
Byte Order : establishes the order for 16-bit and 32-bit values. Options include Big Endian (S7 Default) or
Little Endian, explained below.
Big Endian
DWord 1
- - - - - - - - 1- 1- 1- 1- 1- 1- - - 2- 2- 2- 2- 1- 1- 1- 1- 3- 3- 2- 2- 2- 2- 2- 2-
7 6 5 4 3 2 1 0 5 4 3 2 1 0 9 8 3 2 1 0 9 8 7 6 1 0 9 8 7 6 5 4
Word 1 Word 3
- - - - - - - - 1- 1- 1- 1- 1- 1- - - 7 6 5 4 3 2 1 0 1- 1- 1- 1- 1- 1- 9 8
7 6 5 4 3 2 1 0 5 4 3 2 1 0 9 8 5 4 3 2 1 0
Byt e 1 Byt e 2 Byt e 3 Byt e 4
- - - - - - - - 7 6 5 4 3 2 - - 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0 1 0
Bits
N ote: Big Endian uses bytes ordered from highest to lowest. The bit order is never changed.
Little Endian
DWord 1
3- 3- 2- 2- 2- 2- 2- 2- 2- 2- 2- 2- 1- 1- 1- 1- 1- 1- 1- 1- 1- 1- - - - - - - - - - -
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
Word 3 Word 1
1- 1- 1- 1- 1- 1- 9 8 7 6 5 4 3 2 1 0 1- 1- 1- 1- 1- 1- - - - - - - - - - -
5 4 3 2 1 0 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
Byt e 4 Byt e 3 Byt e 2 Byt e 1
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 - - - - - - - - - -
1 0 7 6 5 4 3 2 1 0
Bits
www. ptc.com
19 Siem en s TCP/IP Eth ern et Driver
N ote: Little Endian uses bytes ordered from lowest to highest. The bit order is never changed.
Tag Im port Type: Select "Step 7 Project File" from the drop-down menu.
STEP 7 Project (* .S7P): Locate and select the desired STEP 7 project file (* .S7P) from which to import tags.
N ote: The desired STEP 7 project file (* .S7P) must be located in the Step 7 project directory to import
tags.
Program Path: Specify the PLC program within the project for which tags should be generated. The pro-
gram path format is "Station Name\CPU Name\Program Name" and the program path selection drop-down
list can be populated with stations that have single or multiple CPUs. When a station with multiple CPUs is
found, each CPU associated with the station has a CPU ID designator formatted as " @ ID x" appended to the
CPU name portion of program path.
For example: A SIMATIC 400 controller with two 400 CPUs would have two entries:
N ote: Tag import for the Siemens S7-300 and S7-400 devices have been qualified for use with projects cre-
ated from Siemens Simatic STEP 7 versions 5.3, 5.4, and 5.5.
Im portant: Tag import for the Siemens TCP/IP Ethernet Driver supports tag names and comments in the
native character set as specified by the Windows code page in the Siemens STEP 7 project's language file. A
missing, altered, corrupt, or incorrect Siemens STEP 7 language file may cause tag names and comments to
import incorrectly. Utilizing the STEP 7 language-neutral option (which allows text to be entered in a different
www. ptc.com
Siemens TCP/IP Ethernet Driver 20
character set than what is used in the STEP 7 language file) may also cause tag names and comments to
import incorrectly. The STEP 7 language file can be located in the Global sub-directory of the STEP 7 project
root. Automatic tag generation may result in the display of incorrect characters if the necessary language
packs are not installed on the system.
The TIA Portal Exporter can export tags from a Siemens TIA Portal project into the server. This utility opens a
project, and allows the selection of program blocks, tag tables, or individual tags for export. Tags are expor-
ted into a format which can be consumed by the Siemens TCP/IP Ethernet Driver Automatic Tag Generation
process.
When Siemens TCP/IP Ethernet Driver is installed, the application installer for TIA Portal Exporter is saved in
the Server's "Utilities" folder. Copy the installer to a computer that has Siemens TIA Portal and the Openness
API installed. Run the installer and refer to the instructions in the Help documentation to create a * .TPE
export file.
Tag Im port Type: Select "TIA Portal Exporter file" from the drop-down menu.
TIA Portal Exporter file (* .TPE): Locate and select the desired TIA Portal Exporter file (* .TPE) from which to
import tags.
www. ptc.com
21 Siem en s TCP/IP Eth ern et Driver
Channel Definitions
Endpoint (GET):
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Siemens%20TCP%2FIP%20Ethernet/channels
Device Definitions
Endpoint (GET):
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Siemens%20TCP%2FIP%20Ethernet/devices
Endpoint (POST):
https://<hostname_or_ip>:<port>/config/v1/project/channels
Body:
{
"common.ALLTYPES_NAME": "MyChannel",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Siemens TCP/IP Ethernet"
}
Endpoint (POST):
https://<hostname_or_ip>:<port>/config/v1/project/channels/MyChannel/devices
Body:
{
"common.ALLTYPES_NAME": "MyDevice",
"servermain.DEVICE_ID_STRING": "<IP Address>",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Siemens TCP/IP Ethernet",
"servermain.DEVICE_MODEL": <model enumeration>
}
Tip: The above minimum required properties are adequate to define a NetLink device as well.
See Also: Device Properties and Device Model Enumerations.
Endpoint (POST):
www. ptc.com
Siemens TCP/IP Ethernet Driver 22
https://<hostname_or_ip>:<-
port>/config/v1/project/channels/MyChannel/devices/MyDevice/tags
Body:
[
{
"common.ALLTYPES_NAME": "MyTag1",
"servermain.TAG_ADDRESS": "DB1,INT00"
}
{
"common.ALLTYPES_NAME": "MyTag2",
"servermain.TAG_ADDRESS": "DB1,INT01"
}
]
See server and driver-specific help for more information on configuring projects over the Configuration API.
For example, to view the property definitions for a device named “MyDevice” under a channel named
“MyChannel”, the GET request would be sent to:
https://<hostname_or_ip>:<-
port>/config/v1/project/channels/MyChannel/devices/MyDevice/?content=property defin-
itions
Property definitions are also available for other objects such as channels or tags.
Alternatively, if enabled in the settings for the Configuration API, the channel and device property definitions
for the driver can be viewed at:
https://<hostname_or_ip>:<port>/config/v1/doc/drivers/<drivername>/Channels
https://<hostname_or_ip>:<port>/config/v1/doc/drivers/<drivername>/Devices
{
"Default": -1,
"String": 0,
"Boolean": 1,
"Char": 2,
"Byte": 3,
"Short": 4,
"Word": 5,
"Long": 6,
"DWord": 7,
"Float": 8,
www. ptc.com
23 Siem en s TCP/IP Eth ern et Driver
"Double": 9,
"BCD": 10,
"LBCD": 11,
"Date": 12,
"LLong": 13,
"QWord": 14,
"String Array": 20,
"Boolean Array": 21,
"Char Array": 22,
"Byte Array": 23,
"Short Array": 24,
"Word Array": 25,
"Long Array": 26,
"DWord Array": 27,
"Float Array": 28,
"Double Array": 29,
"BCD Array": 30,
"LBCD Array": 31,
"Date Array": 32,
"LLong Array": 33,
" QWord Array": 34
}
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Siemens%20TCP%2FIP%20Ethernet/Channels
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Siemens%20TCP%2FIP%20Ethernet/Devices
www. ptc.com
Siemens TCP/IP Ethernet Driver 24
This server refers to communications protocols like Siemens TCP/IP Ethernet as a channel. Each channel
defined in the application represents a separate path of execution in the server. Once a channel has been
defined, a series of devices can then be defined under that channel. Each of these devices represents a
single Siemens TCP/IP Ethernet controller from which data will be collected. Although this approach to defin-
ing the application provides a high level of performance, it does not take full advantage of the Siemens
TCP/IP Ethernet Driver or the network. An example of how the application may appear when configured
using a single channel is shown below.
Each device is defined under a single channel. In this configuration, the driver must
move from one device to the next as quickly as possible to gather information at an
effective rate. As more devices are added or more information is requested from a
single device, the overall update rate begins to suffer.
If the Siemens TCP/IP Ethernet Driver could only define one channel, the example above would be the only
option available; however, the driver can define up to 1024 channels. Using multiple channels distributes the
data collection workload by simultaneously issuing multiple requests to the network. An example of how the
same application may appear when configured using multiple channels is shown below.
Each device can be defined under its own channel. In this configuration, a single path
of execution is dedicated to the task of gathering data from each device.
The performance will improve even if the application has more than 1024 devices.
While 1024 or fewer devices may be ideal, the application will still benefit from addi-
tional channels. Although spreading the device load across all channels will cause the
server to move from device to device again, it can now do so with far less devices to
process on a single channel.
Although the maximum number of channels is 1024, the device ultimately determines the number of
allowed connections. This constraint comes from the fact that some devices cannot support so many con-
nections. For these devices, the maximum number of channels defined should equal the maximum number
of connections allowed. For devices that support more connections, the maximum of 1024 channels should
be defined, with devices spread evenly over these channels.
For more information on device connections, refer to Device Properties.
www. ptc.com
25 Siem en s TCP/IP Eth ern et Driver
Word
bit 0 is the low bit
bit 15 is the high bit
Signed 16-bit value
DWord
bit 0 is the low bit
bit 31 is the high bit
Signed 32-bit value
Float
The driver interprets two consecutive registers as a floating-point value by making the
second register the high word and the first register the low word.
Date 64-bit floating-point value
String Null-terminated ASCII string*
www. ptc.com
Siemens TCP/IP Ethernet Driver 26
www. ptc.com
27 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 28
N otes:
1. All offsets for memory types I, Q, M, S, and SM represent a byte starting location within the specified
memory type.
2. Use caution when modifying Word, Short, DWord, and Long types. For I, Q, and F, each address starts
at a byte offset within the device. Therefore, Words MW0 and MW1 overlap at byte 1. Writing to MW0
will also modify the value held in MW1. Similarly, DWord, and Long types can also overlap. It is recom-
mended that these memory types be used so that overlapping does not occur. For example, DWord
MD0, MD4, MD8, and so on can be used to prevent overlapping bytes.
3. The total number of bytes being requested cannot exceed the data portion of the negotiated PDU
size. For example, for a 960-byte PDU size, the largest single array that may be read or written is 932
bytes. If arrays exceed the negotiated PDU size, they may fail to be read or written.
Arrays
All memory types/subtypes with the exception of those marked with an asterisk support arrays. The valid syn-
tax for declaring an array is as follows:
<address>[rows][cols]
<address>.rows.cols
<address>,rows,cols
<address>_rows_cols
N otes:
2. For Word, Short, and BCD arrays, the base address + (rows * cols * 2) cannot exceed 65536. Keep in
mind that the elements of the array are words, located on a word boundary. For example, IW0[4]
would return IW0, IW2, IW4, and IW6.
3. For Float, DWord, Long, and Long BCD arrays, the base address + (rows * cols * 4) cannot exceed
65536. Keep in mind that the elements of the array are DWord, located on a DWord boundary. For
example, ID0[4] will return ID0, ID4, ID8, and ID12.
4. For all arrays, the total number of bytes requested cannot exceed the data portion of the negotiated
PDU size. For example, for a 960-byte PDU size, the largest single array that may be read or written
is 932 bytes. If arrays exceed the negotiated PDU size, they may fail to be read or written.
www. ptc.com
29 Siem en s TCP/IP Eth ern et Driver
N ote: The offset for an atomic type tag in a data block is denoted by the column "Address" in Step 7, as
shown above. This offset is denoted by the column "Offset" in the Siemens TIA Portal programming envir-
onment.
Third-Party Support
For users familiar with third-party applications, limited addressing support is available.
Legacy Support
Legacy S7-300/ 400 It em Synt ax
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
Third-Party Support
For users familiar with third-party applications, limited addressing support is available.
Legacy Support
Legacy S7-300/ 400 It em Synt ax
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
Third-Party Support
For users familiar with third-party applications, limited addressing support is available.
Legacy Support
Legacy S7-300/ 400 It em Synt ax
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
www. ptc.com
Siemens TCP/IP Ethernet Driver 30
Third-Party Support
For users familiar with third-party applications, limited addressing support is available.
Legacy Support
Legacy S7-300/ 400 It em Synt ax
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
Third-Part y Support
For users familiar with third-party applications, limited addressing support is available.
Legacy Support
Legacy S7-300/ 400 It em Synt ax
All brand and product names are trademarks, registered trademarks, or service marks of their respective holders
Third-Part y Support
For users familiar with third-party applications, limited addressing support is available.
Legacy Support
Legacy S7-300/ 400 It em Synt ax
All brand and product names are trademarks, registered trademarks, or service marks of their respective holders
N ote: The tags listed in the following table are valid for the S7-300, S7-400, S7-1200, and S7-1500 device
models. The default data types are shown in bold.
www. ptc.com
31 Siem en s TCP/IP Eth ern et Driver
Device Dat a
Descript ion Range Access
Address Type
Number of the rack in which the CPU of interest resides.
Byte,
_RACK On changing this device property, the connection with the 0-7 Read/Write
Short
CPU is re-established.
_SLOT Number of the slot in which the CPU of interest resides. 2-31 Byte, Read/Write
On changing this device property, the connection with the Short
CPU is re-established.
_Cur- Subsequent to connection, this tag shows the size of the 240, Word Read
rentPDUSize Protocol Data Unit which has been negotiated with the 480,
device. Prior to connection it shows the maximum con- 960
figured PDU value.
DB M emory Type
DB<num>,<S7 data type><address>
DB<num>,<S7 data type><address><.bit>
DB<num>,<S7 data type><address><.string length>*
DB<num>,<S7 data type><address><[row][col]>
* Applies to S7 data types that support string. String length can vary from 0<n<= 932, with the exception of
S7 data type string (which can vary from 0<n<= 254 for a PDU size of 480 and above, 0<n<= 210 for a PDU
size below 480).
M emory Types
M emory Type Descript ion Address Range Dat a Type Access
I
Inputs Read/Write
E
Q
Outputs Read/Write
A
Dependent on S7 Data Type
PI
Peripheral Inputs Read Only
PE
PQ
Peripheral Outputs Read/Write
PA
www. ptc.com
Siemens TCP/IP Ethernet Driver 32
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Timers and Counters. The
default data types are shown in bold.
S7
Dat a
Dat a Descript ion Address Range
Type
Type
B0-B65535
BYTE0-BYTE65535
Byte,
B0.b-B65535.b
Char
BYTE0.b-
BYTE65535.b
B .b is Bit Number 0-
Unsigned Byte Boolean
Byte 7
B0.n-B65535.n
BYTE0.n-
String*
BYTE65535.n
.n is string length.
0 < n <= 932.
C0-C65535
CHAR0-
CHAR65535
Byte,
C0.b-C65535.b Char
CHAR0.b-
CHAR65535.b
C
Signed Byte .b is Bit Number 0- Boolean
Char
7
C0.n-C65535.n
CHAR0.n- String*
CHAR65535.n
.n is string length.
0<n<= 932.
DWord,
D Unsigned D0-D65532
Long,
DWORD Double Word DWORD0-
LBCD,
www. ptc.com
33 Siem en s TCP/IP Eth ern et Driver
S7
Dat a
Dat a Descript ion Address Range
Type
Type
DWORD65532
Float
D0.b-D65532.b
DWORD0.b-
DWORD65532.b
Boolean
.b is Bit Number 0-
31
S7 Date
Read/Write
DI0-DI65532
DWord,
DINT0-DINT65532
Long,
LBCD,
DI Signed DI0.b-DI65532.b
Float
DINT Double Word DINT0.b-
DINT65532.b
.b is Bit Number 0-
Boolean
31
S7 Date_And_Time
String,
DT Displayed as string format "m/d/y h:mm:ss <AM/PM>" with DT0-DT65528
Date
range "1/1/1990 0:00:00 AM" to "12/31/2089 23:59:59 PM".
Read Only.
I0-I65534 Word,
INT0-INT65534 Short,
I BCD
Signed Word
INT I0.b-I65534.b
INT0.b-INT65534.b
.b is Bit Number 0- Boolean
www. ptc.com
Siemens TCP/IP Ethernet Driver 34
S7
Dat a
Dat a Descript ion Address Range
Type
Type
15
REAL IEEE Float REAL0-REAL65532 Float
STRING0.n-
STRING65532.n
.n is string length
0<n< 254 (PDU
size of 480 and
String S7 String above) String
0<n< 210 (PDU
size below 480)
0<n< 245 (Netlink
S7300 and Netlink
S7400 Models)
S7 TIME.
T T0-T65532
Displayed as string format "+/-ddD_hhH_mmM_ssS_hhhMS" String
TIME TIME0-TIME65532
with range "-24D_20H_31M_23S_648MS" to "24D_20H_31M_
23S_647MS.
Read/Write.
S7 Time_Of_Day.
Read/Write.
W0-W65534
WORD0-
Word,
WORD65534
Short,
W BCD
Unsigned Word W0.b-W65534.b
Word
WORD0.b-
WORD65534.b
Boolean
.b is Bit Number 0-
15
X0.b-X65534.b
X Bit .b is Bit Number 0- Boolean
15
* These are raw strings that differ in structure and usage from the STEP 7 string data type.
Use caution when modifying Word, Short, DWord, and Long type as each address starts at a byte offset
within the device. Therefore, Words MW0 and MW1 overlap at byte 1. Writing to MW0 will also modify the
www. ptc.com
35 Siem en s TCP/IP Eth ern et Driver
value held in MW1. Similarly, DWord, and Long types can also overlap. It is recommended that these
memory types be used so that overlapping does not occur. For example, DWord MD0, MD4, MD8, and so on
can be used to prevent overlapping bytes.
String Support
Raw Strings
For an address DBx,By.n @ string, string values read and written are stored at byte offset y.
String Support
The string subtype follows the STEP 7 string data type definition. The syntax for the string S7 data type is
STRINGy.n where y is the Byte offset, and n is the maximum string length. If n is not specified, the maximum
string length will be 254 characters when PDU size is >= 480, otherwise it will be 210. String values read and
written are stored at byte offset y+2 in data block x. The actual string length gets updated with every write
based on the string length of the string being written.
1. String strings are NULL padded. If the maximum string length is 10 and 3 characters are written, char-
acters 4-10 are set to NULL.
2. If a PDU of 240 is negotiated, STEP 7 strings with a length greater than 222 may fail to be read and
strings with a length greater than 212 may fail to be written.
Hex Strings
The HEXSTRING subtype is specific to the Siemens TCP/IP Ethernet Driver. The syntax for the HEXSTRING
subtype is HEXSTRINGy.n, where y is the byte offset and n is the length. The n value must be specified in the
range of 1 through 932. String is the only valid data type for a HEXSTRING tag.
The value assigned to a HEXSTRING must be an even number of characters. There is no padding, so the
entire string must be specified. For example, tag HexStr defined as DB1,STRING0.10 uses 10 bytes of stor-
age and has a display length of 20. To assign a value, the string must be 20 characters long and contain only
valid hexadecimal characters. An example valid hex string for this tag is “56657273696f6E353137”.
Array Support
The [rows][cols] notation is appended to an address to specify an array (such as MW0[2][5]). If no rows are
specified, row count of 1 is assumed. Boolean arrays and string arrays are not supported.
www. ptc.com
Siemens TCP/IP Ethernet Driver 36
For Word, Short, and BCD arrays, the base address + (rows * cols * 2) cannot exceed 65536. Keep in mind
that the elements of the array are words, located on a word boundary. For example, IW0[4] would return
IW0, IW2, IW4, and IW6.
For Float, DWord, Long, and Long BCD arrays, the base address + (rows * cols * 4) cannot exceed 65536.
Keep in mind that the elements of the array are DWord, located on a DWord boundary. For example, ID0[4]
will return ID0, ID4, ID8, ID12.
For all arrays, the total number of bytes requested cannot exceed the data portion of the negotiated PDU
size. For example, for a 960-byte PDU size, the largest single array that may be read or written is 932 bytes.
If arrays exceed the negotiated PDU size, they may fail to be read or written.
Timers
The Siemens TCP/IP Ethernet Driver automatically scales T values based on the Siemens S5 time format.
Timer data is stored as a Word in the PLC but scaled to a DWord in the driver. The value returned will
already be scaled using the appropriate Siemens time base. As a result, the values are always returned as a
count of milliseconds. When writing to T memory, the Siemens time base will also be applied. To assign a
value to a timer in the controller, write the desired value as a count of milliseconds to the appropriate timer.
Counters
The value returned for C memory will automatically be converted to a BCD value.
Examples
S7 Dat a Type Dat a Type Input Flags Dat a Blocks
IB0 MB0 DB1,B0
Byte
IBYTE0 MBYTE0 DB1,BYTE0
www. ptc.com
37 Siem en s TCP/IP Eth ern et Driver
N ote: The offset for an atomic type tag in a data block is denoted by the column "Address" in Step 7, as
shown above. This offset is denoted by the column "Offset" in the Siemens TIA Portal programming envir-
onment.
www. ptc.com
Siemens TCP/IP Ethernet Driver 38
www. ptc.com
39 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 40
Alternates
DB1D0.b-DBND65534.b
1-N is Block Number Boolean Read/Write
.b is Bit Number 0-15
DB1-N:KL0-KL65535
Byte, Char, String* * Read/Write
1-N is Block Number
Alternates
DB1DL0-DBNDL65535
Byte, Char, String* * Read/Write
1-N is Block Number
DB1-N:KR0-KR65534
Byte, Char, String* * Read/Write
1-N is Block Number
DB1DR0-DBNDR65534
Byte, Char, String* * Read/Write
1-N is Block Number
Data Block Unsigned DB1-N:KH0-KH65534
Word, Short, BCD Read/Write
Word 1-N is Block Number
DB1-N:KF0-KF65534
Word, Short, BCD Read/Write
1-N is Block Number
Alternates
DB1DW0-DBNDW65534
Word, Short, BCD Read/Write
1-N is Block Number
www. ptc.com
41 Siem en s TCP/IP Eth ern et Driver
Alternates
DB1DD0-DB1DD65532
Read/Write
1-N is Block Number DWord, Long, LBCD,
Float
DB1-N:KG0-KG65532
Data Block Float Float Read/Write
1-N is Block Number
DB1-N:BCD0-BCD65534
Data Block BCD Word, Short, BCD Read/Write
1-N is Block Number
Data Block S5 Timer as DB1-N:KT0-KT65534
DWord, Long Read/Write
DB 1-N is Block Number
Data Block S5 Counter DB1-N:KC0-KC65534
Word, Short Read/Write
as DB 1-N is Block Number
DB1S0.n-DB1S65535.n*
Data Block String* * *
.n is string length String Read/Write
0<n<= 932
DB1STRING0.n-DB1STRING65535.n*
.n is string length
0<n<= 254 (PDU size of 480 and above)
Data Block String* * * String Read/Write
0<n<= 210 (PDU size below 480)
0<n<= 254 (Netlink S7300 and Netlink
S7400 Models)
Timer Current Val-
T0-T65535* DWord, Long Read/Write
ues* * * *
Counter Current Val-
C0-C65535* Word, Short Read/Write
ues* * * * *
Counter Current Val-
Z0-Z65535* Word, Short Read/Write
ues* * * * *
* These memory types/subtypes do not support arrays.
* * Byte memory types (like MB) support Strings. The syntax for strings is <address>.<length> where 0 <
length <=932.
* * * For more information, refer to Data Block Strings.
* * * * For more information, refer to Tim ers.
* * * * * For more information, refer to Counters.
N otes:
1. All offsets for memory types I, Q, and F represent a byte starting location within the specified memory
type.
www. ptc.com
Siemens TCP/IP Ethernet Driver 42
2. Use caution when modifying Word, Short, DWord, and Long types. For I, Q, and F each address starts
at a byte offset within the device. Therefore, Words FW0 and FW1 overlap at byte 1. Writing to FW0
will also modify the value held in FW1. Similarly, DWord, and Long types can also overlap. It is recom-
mended that these memory types be used so that overlapping does not occur. For example, DWord,
FD0, FD4, FD8 and so on can be used to prevent overlapping bytes.
S Subtype
The syntax for the S subtype is DBxSy.n where x is the data block, y is the byte offset, and n is the maximum
String length. String values read and written are stored at byte offset y in data block x.
S Strings are null terminated. If the maximum string length is 10 and 3 characters are written, the fourth
character is set to NULL, while characters 5-10 are left untouched.
N ote: For raw strings the total number of bytes requested cannot exceed the data portion of the nego-
tiated PDU size. If raw strings exceed the negotiated PDU size, they may fail to be read or written.
String Subtype
The String subtype follows the STEP 7 String data type definition. The syntax for the String subtype is
DBx.STRINGy.n, where x is the data block, y is the Byte offset, and n is the maximum String length. If n is not
specified, the maximum String length will be 254 characters when PDU size is >= 480, otherwise it will be
210. String values read and written are stored at Byte offset y+2 in data block x. The first two bytes contain
the maximum string length (n) and the actual string length. The actual string length gets updated with every
write based on the string length of the string being written.
1. String Strings are NULL padded. If the maximum string length is 10 and 3 characters are written, char-
acters 4-10 are set to NULL.
2. If a PDU of 240 is negotiated, STEP 7 strings with a length greater than 222 may fail to be read and
strings with a length greater than 212 may fail to be written.
Hex Strings
The HEXSTRING subtype is specific to the Siemens TCP/IP Ethernet Driver. The syntax for the HEXSTRING
subtype is HEXSTRINGy.n, where y is the byte offset and n is the length. The n value must be specified in the
range of 1 through 932. String is the only valid data type for a HEXSTRING tag.
The value assigned to a HEXSTRING must be an even number of characters. There is no padding, so the
entire string must be specified. For example, tag HexStr defined as DB1,STRING0.10 uses 10 bytes of stor-
age and has a display length of 20. To assign a value, the string must be 20 characters long and contain only
valid hexadecimal characters. An example valid hex string for this tag is “56657273696f6E353137”.
www. ptc.com
43 Siem en s TCP/IP Eth ern et Driver
N ote: For HEXSTRINGs, the total number of bytes requested cannot exceed the data portion of the nego-
tiated PDU size. If raw strings exceed the negotiated PDU size, they may fail to be read or written.
Arrays
All memory types/subtypes with the exception of those marked with an asterisk support arrays. The syntax
below are valid for declaring an array. If no rows are specified, a row count of 1 is assumed.
<address>[rows][cols]
<address>.rows.cols
<address>,rows,cols
<address>_rows_cols
For Word, Short, BCD and "KT" arrays, the base address + (rows * cols * 2) cannot exceed 65536. Keep in
mind that the elements of the array are words, located on a word boundary. For example, IW0[4] would
return IW0, IW2, IW4, and IW6. "KT" subtypes fall into the 16-bit category because the data stored in the PLC
is contained within a Word. For more information, refer to Tim ers.
For Float, DWord, Long, and Long BCD arrays (excluding "KT" subtypes), the base address + (rows * cols * 4)
cannot exceed 65536. Keep in mind that the elements of the array are DWord, located on a DWord bound-
ary. For example, ID0[4] will return ID0, ID4, ID8, ID12.
For all arrays, the total number of bytes being requested cannot exceed the data portion of the negotiated
PDU size. For example, for a 960-byte PDU size, the largest single array that may be read or written is 932
bytes. If arrays exceed the negotiated PDU size, they may fail to be read or written.
Value 8 9 A B C
Byt e 0 1 2 3 4
Exam ple 1
DB1:KH0=0x89
DB1:KL0=0x8
DB1:KR0=0x9
DB1DBB0=0x8
Exam ple 2
DB1:KH1=0x9A
DB1:KL1=0x9
DB1:KR1=0xA
DB1DBB1=0x9
Timers
The Siemens TCP/IP Ethernet Driver automatically scales T and KT values based on the Siemens S5 time
format. Timer data is stored as a Word in the PLC but scaled to a DWord in the driver. The value returned for
either a T or KT memory type will already be scaled using the appropriate Siemens time base. As a result,
the values are always returned as a count of milliseconds. When writing to T or KT memory types, the
www. ptc.com
Siemens TCP/IP Ethernet Driver 44
Siemens time base will also be applied. To assign a value to a timer in the controller, write the desired value
as a count of milliseconds to the appropriate timer.
Counters
The value returned for either C or KC memory type will automatically be converted to a BCD value. DB1:KH0
@ BCD=DB1:KC0 @ Word.
Exam ples
N ote: The offset for an atomic type tag in a data block is denoted by the column "Address" in Step 7, as
shown above. This offset is denoted by the column "Offset" in the Siemens TIA Portal programming envir-
onment.
www. ptc.com
45 Siem en s TCP/IP Eth ern et Driver
Possible Cause:
1. An unexpected frame was received. The response code may be incorrect.
Possible Solution:
Cable noise may cause distortion in the frame, resulting in erroneous data or dropped frames. Verify the
cabling between the PC and the PLC device.
See Also:
1. Error Matrix
2. Error Codes
Possible Cause:
An RFC1006 (ISO over TCP/IP) error occurred. This is the portion of the packet that encapsulates the S7 Mes-
saging packet.
Possible Solution:
Follow guidance from the rest of the error message or contact Technical Support.
Note:
No protocol or data access errors can occur for this operation.
See Also:
1. Error Matrix
2. Error Codes
www. ptc.com
Siemens TCP/IP Ethernet Driver 46
Reason = 'Device ret urned prot ocol error'. Error class = <class>, Error code
= <error>.
Error Type:
Warning
Possible Cause:
1. An S7 Messaging error occurred. This can occur if a portion is malformed or contains incorrect
packet lengths.
2. The tag is too large to be read or written with the currently negotiated PDU.
Possible Solution:
1. Follow guidance from the rest of the error message or contact Technical Support.
2. Adjust the size of the tag, or check the Maximum PDU Size device property.
See Also:
1. Error Matrix
2. Error Codes
Reason = 'Device ret urned dat a access error'. Error code = <error>.
Error Type:
Warning
Possible Cause:
A requested address may be out of range or referenced incorrectly.
Possible Solution:
1. Verify the range is correct and correctly referenced.
2. Follow guidance from the rest of the error message or contact Technical Support.
See Also:
1. Error Matrix
2. Error Codes
Possible Cause:
www. ptc.com
47 Siem en s TCP/IP Eth ern et Driver
3. The response from the device took longer to receive than the amount of time specified in the
"Request Timeout" device setting.
Possible Solution:
1. Verify the cabling between the PC and the PLC device.
2. Verify the IP address for the named device matches the actual device.
3. Decrease the tag group scan rate to reduce the load on the PLC CPU.
4. Increase the values for properties: Request Timeout, Scan Cycle Load from Communication, and/or
Scan Cycle Monitoring Time.
See Also:
Error Matrix
Possible Cause:
Process could not complete.
Possible Solution:
Follow guidance from the rest of the error message or retry the process.
See Also:
Error Matrix
Possible Cause:
An error was returned from the PLC or NetLink adapter.
Possible Solution:
1. If error code is 0x11, an incorrect MPI ID may be set. Determine the MPI ID through which com-
munications are occurring and enter it in the MPI ID device property field.
2. If error code is 0x87, the requested data may be out of range for the device. Verify the device
address limits and correct the tag references.
www. ptc.com
Siemens TCP/IP Ethernet Driver 48
See Also:
1. Error Matrix
2. Error Codes
Possible Cause:
1. The named device may have been assigned an incorrect IP address.
2. Communication with the host failed. Connection may have been lost, a port conflict occurred, or
some communication parameter is not valid.
Possible Solution:
1. Verify the IP address given to the named device matches that of the actual device.
2. Verify or correct connections, port number, MPI ID, and other communication parameters.
Possible Cause:
The Unicode character conversion failed.
Possible Solution:
Verify that the Step 7 language file is present and reflects a character set that can display the Step 7 tag and
comment strings.
Possible Cause:
1. The computer is not configured with support for the specified Windows code page specified.
Possible Solution:
www. ptc.com
49 Siem en s TCP/IP Eth ern et Driver
1. Install any language packs necessary for displaying the Windows code page character set.
2. Try again on a computer that supports the Windows code page specified.
Note:
When Language file was not found the value of required code page will be: 0.
Possible Cause:
The Step 7 language file is altered or corrupt.
Possible Solution:
Verify that the Step 7 project is not corrupt and can be opened in Simatic Step 7.
Possible Cause:
The operating system has insufficient memory to read the Step 7 language file.
Possible Solution:
Ensure that the system resources are adequate for all applications running on the computer.
Possible Cause:
1. The Step 7 language file is altered or corrupt.
Possible Solution:
1. Verify that the Step 7 project is not corrupt and can be opened in Simatic Step 7.
www. ptc.com
Siemens TCP/IP Ethernet Driver 50
Tag generat ion failure. | Dat a block nam e = '<block nam e>', dat a block
num ber = <block num ber>.
Error Type:
Warning
Possible Cause:
An unexpected data type or other issue occurred during the parsing of the Step 7 project for the specified
data block.
Possible Solution:
Compare the tags that were automatically generated with those in the project for the specified data block to
determine which tag caused the incomplete generation. Correct issues with the block and retry.
See Also:
Error Codes
Possible Cause:
While parsing the data blocks of the Step 7 project for automatic tag generation, an array variable was
encountered that exceeds the internal block size. Although all individual array element tags generate as
expected, the array tag itself is generated with a dimension that allows it to fit within the block size.
Possible Solution:
To use array tags and not the individual array element tags, determine the address where the array tag
ends, then manually generate another tag to address the remainder of the array. For example, if data block
1 begins with an array of 250 REAL, there would be 250 array element tags with addresses DB1,REAL0;
DB1,REAL4;... DB1, REAL992; DB1,REAL996. Because the size of the array exceeds the maximum data pay-
load of 932 bytes, the array tag would only be created with 233 dimensions (DB1,REAL0[233]). The array tag
does not provide the client with the data for the last 17 elements. If the client wants to use array tags and not
the individual array element tags, another tag with the address "DB1,REAL932[17]" must be created. This
warning message only occurs for tags of the first element of the complex type array during automatic tag
generation for arrays of complex types (such as structures, user-defined types, function blocks, or system
function blocks).
Tag not creat ed because arrays are not support ed wit h specified dat a
t ype. | Tag nam e = '<nam e>', group nam e = '<nam e>', dat a t ype = '<t ype>'.
Error Type:
Warning
Possible Cause:
www. ptc.com
51 Siem en s TCP/IP Eth ern et Driver
1. A tag address that has been specified dynamically has been assigned an invalid data type.
2. While parsing the data blocks of the Step 7 project for automatic tag generation, an array variable
was encountered with a data type for which the driver does not support arrays.
Possible Solution:
1. Modify the requested data type in the client application.
2. The client must access the data using the array element tags that were generated. Variables with the
Step 7 data types of DATE, DATE_AND_TIME, STRING, TIME, and TIME_OF_DAY generate tags with the
string data type (for which arrays are not supported). During automatic tag generation for arrays of
complex types (such as structures, user-defined types, function blocks, or system function blocks),
this warning message only occurs for tags of the first element of the complex type array.
Possible Cause:
1. An RFC1006 error (ISO over TCP/IP) occurred. This is the portion of the packet that encapsulates the
S7 Messaging packet.
Possible Solution:
1. Cable noise may cause distortion in the frame, resulting in erroneous data or dropped frames. Verify
the cabling between the PC and the PLC device.
2. Reduce network traffic or increase the Request Timeout and/or Fail After Attempt count.
3. Decrease the tag group Scan Rate to reduce the load on the PLC CPU.
4. Increase the values for properties: Scan Cycle Load from Communication and Scan Cycle Monitoring
Time.
See Also:
Error Matrix
Possible Cause:
www. ptc.com
Siemens TCP/IP Ethernet Driver 52
1. An S7 Messaging error occurred. This will occur if this portion is malformed or contains incorrect
packet lengths.
2. An RFC1006 error (ISO over TCP/IP) occurred. This is the portion of the packet that encapsulates the
S7 Messaging packet.
Possible Solution:
1. Cable noise may cause distortion in the frame, resulting in erroneous data. It may also cause
dropped frames. Verify the cabling between the PC and the PLC device.
2. Reduce network traffic. If this error occurs frequently, increase the Request Timeout and/or Fail After
attempt count.
3. If this error occurs frequently, decrease the tag group scan rate to reduce the work load on the PLC's
CPU.
4. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
See Also:
Error Matrix
Possible Cause:
1. A data access error occurred. The requested address may be out of range or referenced incorrectly.
4. An attempt was made to read an array larger than the PDU size negotiated with the device.
Possible Solution:
1. Verify and correct the address range.
5. Verify the device's address limits and correct the tag references causing the error.
www. ptc.com
53 Siem en s TCP/IP Eth ern et Driver
See Also:
Error Matrix
Unable t o read from address on device. Tag deact ivat ed. | Address =
'<address>',
Error Type:
Warning
Possible Cause:
1. A data access error occurred. The requested address may be out of range or referenced incorrectly.
5. If the tag address references a TOD data type, the DWORD value may be larger than the number of
milliseconds in a day. For example, 86400000.
7. If the error code=0x87, users may be accessing data out of range in the device.
Possible Solution:
1. Verify and correct the address range.
5. Reduce network traffic or increase the Request Timeout and/or Fail After attempt count.
6. Decrease the tag group scan rate to reduce the workload on the PLC CPU.
7. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
8. Change the value in the device to a valid DWORD that can be converted to a time that is less than or
equal to 23:59:59.999.
9. Determine the MPI ID in use for communications and re-enter it in the MPI ID Device Property field.
10. Verify the device's address limits and correct the tag references causing the error.
See Also:
Error Matrix
Unable t o read dat a from device. | Dat a block = '<block>', block st art =
<address>, block size = <size>,
Error Type:
www. ptc.com
Siemens TCP/IP Ethernet Driver 54
Warning
Possible Cause:
1. A TCP/IP error occurred. A portion is malformed or contains incorrect packet lengths.
3. If the tag address references a TOD data type, the DWORD value may be larger than the number of
milliseconds in a day. For example, 86400000.
5. Cable noise may cause distortion in the frame, resulting in erroneous data or dropped frames. Verify
the cabling between the PC and the PLC device.
7. If the error code=0x87, users may be accessing data out of range in the device.
Possible Solution:
1. Verify and correct the address range.
5. Reduce network traffic or increase the Request Timeout and/or Fail After attempt count.
6. Decrease the tag group scan rate to reduce the workload on the PLC CPU.
7. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
8. Change the value in the device to a valid DWORD that can be converted to a time that is less than or
equal to 23:59:59.999.
9. Determine the MPI ID in use for communications and re-enter it in the MPI ID Device Property field.
10. Verify the device's address limits and correct the tag references causing the error.
See Also:
Error Matrix
Unable t o read dat a from device. Block deact ivat ed. | Dat a block =
'<block>', block st art = <address>, block size = <size>,
Error Type:
Warning
Possible Cause:
1. A TCP/IP error occurred. A portion is malformed or contains incorrect packet lengths.
www. ptc.com
55 Siem en s TCP/IP Eth ern et Driver
3. If the tag address references a TOD data type, the DWORD value may be larger than the number of
milliseconds in a day. For example, 86400000.
5. Cable noise may cause distortion in the frame, resulting in erroneous data or dropped frames. Verify
the cabling between the PC and the PLC device.
7. If the error code=0x87, users may be accessing data out of range in the device.
Possible Solution:
1. Verify and correct the address range.
5. Reduce network traffic or increase the Request Timeout and/or Fail After attempt count.
6. Decrease the tag group scan rate to reduce the workload on the PLC CPU.
7. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
8. Change the value in the device to a valid DWORD that can be converted to a time that is less than or
equal to 23:59:59.999.
9. Determine the MPI ID in use for communications and re-enter it in the MPI ID Device Property field.
10. Verify the device's address limits and correct the tag references causing the error.
See Also:
Error Matrix
Unable t o read dat a from device. | M em ory t ype = '<t ype>', block st art =
<address>, block size = <size> (byt es),
Error Type:
Warning
Possible Cause:
1. An S7 Messaging error occurred. A portion is malformed or contains incorrect packet lengths.
3. If the tag address references a TOD data type, the DWORD value may be larger than the number of
milliseconds in a day. For example, 86400000.
www. ptc.com
Siemens TCP/IP Ethernet Driver 56
5. Cable noise may cause distortion in the frame, resulting in erroneous data or dropped frames. Verify
the cabling between the PC and the PLC device.
7. If the error code=0x87, users may be accessing data out of range in the device.
Possible Solution:
1. Verify and correct the address range.
5. Reduce network traffic or increase the Request Timeout and/or Fail After attempt count.
6. Decrease the tag group scan rate to reduce the workload on the PLC CPU.
7. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
8. Change the value in the device to a valid DWORD that can be converted to a time that is less than or
equal to 23:59:59.999.
9. Determine the MPI ID in use for communications and re-enter it in the MPI ID Device Property field.
10. Verify the device's address limits and correct the tag references causing the error.
See Also:
Error Matrix
Unable t o read dat a from device. Block deact ivat ed. | M em ory t ype =
'<t ype>', block st art = <address>, block size = <size> (byt es),
Error Type:
Warning
Possible Cause:
1. An S7 Messaging error occurred. A portion is malformed or contains incorrect packet lengths.
3. If the tag address references a TOD data type, the DWORD value may be larger than the number of
milliseconds in a day. For example, 86400000.
5. Cable noise may cause distortion in the frame, resulting in erroneous data or dropped frames. Verify
the cabling between the PC and the PLC device.
7. If the error code=0x87, users may be accessing data out of range in the device.
www. ptc.com
57 Siem en s TCP/IP Eth ern et Driver
Possible Solution:
1. Verify and correct the address range.
5. Reduce network traffic or increase the Request Timeout and/or Fail After attempt count.
6. Decrease the tag group scan rate to reduce the workload on the PLC CPU.
7. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
8. Change the value in the device to a valid DWORD that can be converted to a time that is less than or
equal to 23:59:59.999.
9. Determine the MPI ID in use for communications and re-enter it in the MPI ID Device Property field.
10. Verify the device's address limits and correct the tag references causing the error.
See Also:
Error Matrix
Possible Cause:
1. The connection between the device and the host PC is broken.
4. An attempt was made to write to an array larger than the PDU size negotiated with the device.
Possible Solution:
1. Verify the cabling between the PC and the PLC device.
2. Verify the IP address given to the named device matches that of the actual device.
3. Decrease the tag group scan rate to reduce the work load on the PLC CPU.
4. Increase the Scan Cycle Load from Communication and Scan Cycle Monitoring Time.
See Also:
Error Matrix
www. ptc.com
Siemens TCP/IP Ethernet Driver 58
Possible Cause:
The tag and hexstring length do not match. The syntax for the HEXSTRING subtype is HEXSTRINGy.n, where y
is the byte offset and n is the length. The n value must be specified in the range of 1 through 932. String is
the only valid data type for a HEXSTRING tag. The value assigned to a HEXSTRING must be an even number
of characters. There is no padding, so the entire string must be specified. For example, tag HexStr defined
as DB1,STRING0.10 uses 10 bytes of storage and has a display length of 20. To assign a value, the string
must be 20 characters long and contain only valid hexadecimal characters.
Possible Solution:
Correct the mismatch between the tag and hexstring length.
Possible Cause:
The hexstring format is invalid. The syntax for the HEXSTRING subtype is HEXSTRINGy.n, where y is the byte
offset and n is the length. The n value must be specified in the range of 1 through 932. String is the only valid
data type for a HEXSTRING tag. To assign a value, the string must be 20 characters long and contain only
valid hexadecimal characters.
Possible Solution:
Correct the format and syntax of the hexstring.
Possible Cause:
The hexstring length contains on odd number of characters, which is not valid.
Possible Solution:
Correct the hexstring to contain an even number of hexadecimal characters.
www. ptc.com
59 Siem en s TCP/IP Eth ern et Driver
Unable t o writ e t o address on device. Tim e of Day st ring cont ains a syn-
t ax error. Expect ed 'hh:m m :ss.hhh' form at . | Address = '<address>', Tim e
of Day st ring = '<st ring>'.
Error Type:
Warning
Possible Cause:
The string written is not in the correct hh:mm:ss.hhh format.
Possible Solution:
Format the string as hh:mm:ss.hhh and retry.
www. ptc.com
Siemens TCP/IP Ethernet Driver 60
Error Codes
NetLink Errors
Error Code Source Descript ion
0x00 Service could be executed without an error
0x01 Remote Station Timeout from remote station
0x02 Remote Station Resource unavailable
Requested function of Siemens client is not activated within the
0x03 Remote Station
remote station
0x11 Remote Station No response of the remote station
0x12 Network Siemens client not into the logical token ring
0x14 Host Resource of the local FDL controller not available or not sufficient
0x15 Host The specified msg.data_cnt parameter is invalid
Timeout. The requested message was accepted but no indication
0x30 Remote Station
was sent back by the remote station
0x39 Remote Station Sequence fault, internal state machine error
Specified offset address out of limits or unknown in the remote sta-
0x85 Host
tion
0x86 Device Wrong PDU coding in the MPI response of the remote station
Specified length to write or to read results in an access outside of lim-
0x87 Host
its
Transport Errors
Error Code Descript ion
0x00 Error reason not specified
0x01 Invalid parameter code
0x02 Invalid TPDU type
0x03 Invalid parameter value
Protocol Errors
Error Class Descript ion
0x00 No error
0x81 Error in the application ID of the request
0x82 Error in the object definition (e.g. bad data type)
0x83 No resources available
0x84 Error in the structure of the service request
0x85 Error in the communication equipment
0x87 Access error
0xD2 OVS error
0xD4 Diagnostic error
0xD6 Protection system error
www. ptc.com
61 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 62
{
"common.ALLTYPES_NAME": "MyChannel",
"common.ALLTYPES_DESCRIPTION": "",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Siemens TCP/IP Ethernet",
"servermain.CHANNEL_DIAGNOSTICS_CAPTURE": false,
"servermain.CHANNEL_UNIQUE_ID": 2799355699,
"servermain.CHANNEL_ETHERNET_COMMUNICATIONS_NETWORK_ADAPTER_STRING": "",
"servermain.CHANNEL_WRITE_OPTIMIZATIONS_METHOD": 2,
"servermain.CHANNEL_WRITE_OPTIMIZATIONS_DUTY_CYCLE": 10,
"servermain.CHANNEL_NON_NORMALIZED_FLOATING_POINT_HANDLING": 0
}
{
"common.ALLTYPES_NAME": "MyDevice",
"common.ALLTYPES_DESCRIPTION": "",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Siemens TCP/IP Ethernet",
"servermain.DEVICE_MODEL": 4,
"servermain.DEVICE_UNIQUE_ID": 3569401335,
"servermain.DEVICE_CHANNEL_ASSIGNMENT": "Siemens",
"servermain.DEVICE_ID_FORMAT": 0,
"servermain.DEVICE_ID_STRING": "10.10.114.61",
"servermain.DEVICE_ID_HEXADECIMAL": 0,
"servermain.DEVICE_ID_DECIMAL": 0,
"servermain.DEVICE_ID_OCTAL": 0,
"servermain.DEVICE_DATA_COLLECTION": true,
"servermain.DEVICE_SIMULATED": false,
"servermain.DEVICE_SCAN_MODE": 0,
"servermain.DEVICE_SCAN_MODE_RATE_MS": 1000,
"servermain.DEVICE_SCAN_MODE_PROVIDE_INITIAL_UPDATES_FROM_CACHE": false,
"servermain.DEVICE_CONNECTION_TIMEOUT_SECONDS": 3,
"servermain.DEVICE_REQUEST_TIMEOUT_MILLISECONDS": 2000,
"servermain.DEVICE_RETRY_ATTEMPTS": 2,
"servermain.DEVICE_INTER_REQUEST_DELAY_MILLISECONDS": 0,
"servermain.DEVICE_AUTO_DEMOTION_ENABLE_ON_COMMUNICATIONS_FAILURES": false,
"servermain.DEVICE_AUTO_DEMOTION_DEMOTE_AFTER_SUCCESSIVE_TIMEOUTS": 3,
"servermain.DEVICE_AUTO_DEMOTION_PERIOD_MS": 10000,
"servermain.DEVICE_AUTO_DEMOTION_DISCARD_WRITES": false,
"servermain.DEVICE_TAG_GENERATION_ON_STARTUP": 0,
"servermain.DEVICE_TAG_GENERATION_DUPLICATE_HANDLING": 0,
"servermain.DEVICE_TAG_GENERATION_GROUP": "",
"servermain.DEVICE_TAG_GENERATION_ALLOW_SUB_GROUPS": true,
"siemens_tcpip_ethernet.DEVICE_COMMUNICATIONS_PORT_NUMBER": 102,
"siemens_tcpip_ethernet.DEVICE_COMMUNICATIONS_MPI_ID": 0,
"siemens_tcpip_ethernet.DEVICE_S7_COMMUNICATIONS_MAX_PDU": 960,
"siemens_tcpip_ethernet.DEVICE_S7_COMMUNICATIONS_200_LOCAL_TSAP": 19799,
"siemens_tcpip_ethernet.DEVICE_S7_COMMUNICATIONS_200_REMOTE_TSAP": 19799,
www. ptc.com
63 Siem en s TCP/IP Eth ern et Driver
"siemens_tcpip_ethernet.DEVICE_S7_COMMUNICATIONS_300_400_1200_1500_LINK_TYPE": 3,
"siemens_tcpip_ethernet.DEVICE_S7_COMMUNICATIONS_CPU_RACK": 0,
"siemens_tcpip_ethernet.DEVICE_S7_COMMUNICATIONS_CPU_SLOT": 1,
"siemens_tcpip_ethernet.DEVICE_ADDRESSING_BYTE_ORDER": 0,
"siemens_tcpip_ethernet.DEVICE_TAG_IMPORT_TYPE": 1,
"siemens_tcpip_ethernet.DEVICE_TAG_IMPORT_CODE_PAGE": 4294967295,
"siemens_tcpip_ethernet.DEVICE_TAG_IMPORT_STEP_7_PROJECT_FILE": "",
"siemens_tcpip_ethernet.DEVICE_TAG_IMPORT_PROGRAM_PATH": "",
"siemens_tcpip_ethernet.DEVICE_TAG_IMPORT_TIA_EXPORT_FILE": ""
}
{
"common.ALLTYPES_NAME": "MyTag",
"common.ALLTYPES_DESCRIPTION": "",
"servermain.TAG_ADDRESS": "DB1,W0.00",
"servermain.TAG_DATA_TYPE": 1,
"servermain.TAG_READ_WRITE_ACCESS": 1,
"servermain.TAG_SCAN_RATE_MILLISECONDS": 100,
"servermain.TAG_AUTOGENERATED": false,
"servermain.TAG_SCALING_TYPE": 0,
"servermain.TAG_SCALING_RAW_LOW": 0,
"servermain.TAG_SCALING_RAW_HIGH": 1000,
"servermain.TAG_SCALING_SCALED_DATA_TYPE": 9,
"servermain.TAG_SCALING_SCALED_LOW": 0,
"servermain.TAG_SCALING_SCALED_HIGH": 1000,
"servermain.TAG_SCALING_CLAMP_LOW": false,
"servermain.TAG_SCALING_CLAMP_HIGH": false,
"servermain.TAG_SCALING_NEGATE_VALUE": false,
"servermain.TAG_SCALING_UNITS": ""
}
www. ptc.com
Siemens TCP/IP Ethernet Driver 64
N ote: The Micro/WIN software may require an upgrade before the Ethernet wizard is made available.
www. ptc.com
65 Siem en s TCP/IP Eth ern et Driver
N ote: The program must be compiled before the Ethernet wizard can execute. Correct any errors in the
program before continuing.
www. ptc.com
Siemens TCP/IP Ethernet Driver 66
N ote: While it is recommended that the Read Modules function be used, this does require that the PLC
be connected to the PC either serially or by Ethernet. In either case, the communications parameters for
Micro/ WIN must be properly set for the Read Modules operation to occur.
2. To view the results of Read Modules, select the Ethernet m odule. Click N ext.
www. ptc.com
67 Siem en s TCP/IP Eth ern et Driver
2. Select Auto Detect Com m unications to allow the module to automatically select either 10BaseT or
100BaseT. In rare cases where there may be a cable issue that does not allow the module to operate prop-
erly at 100BaseT, force the module to use 10BaseT. This will increase the modules' tolerance to a bad Eth-
ernet line.
www. ptc.com
Siemens TCP/IP Ethernet Driver 68
N ote: The number of connections selected determines how many simultaneous connections the PLC can
support. When intending to have only one OPC server talking to the PLC, set up only one connection. This will
ensure the best performance for the OPC server. When intending to have more than one active connection
to the PLC, use multiple connections. Keep in mind, however, that the performance of the module will be
impacted as each connection is used.
www. ptc.com
69 Siem en s TCP/IP Eth ern et Driver
2. From this standpoint, the CP243-1 is considered the Server (local) and the OPC Server Channel. The
device is considered the Client (Rem ote).
3. Enter a Rem ote TSAP or accept the default. This will be the Local TSAP in the OPC Server.
4. Optional: Accept all connection requests or limit to a particular remote machine. It is recommended that
Accept all connection requests be selected. If concerned about device security (or if intending to access
this device over the Internet) select a specific IP address. Users must ensure that the OPC server is running
on a PC that has a known and fixed IP address.
www. ptc.com
Siemens TCP/IP Ethernet Driver 70
www. ptc.com
71 Siem en s TCP/IP Eth ern et Driver
3. Enter a Rem ote TSAP or accept the default. This will be the Local TSAP in the OPC Server.
www. ptc.com
Siemens TCP/IP Ethernet Driver 72
www. ptc.com
73 Siem en s TCP/IP Eth ern et Driver
3. Enter a Rem ote TSAP or accept the default. This will be the Local TSAP in the OPC Server.
www. ptc.com
Siemens TCP/IP Ethernet Driver 74
www. ptc.com
75 Siem en s TCP/IP Eth ern et Driver
3. Enter a Rem ote TSAP or accept the default. This will be the Local TSAP in the OPC server.
www. ptc.com
Siemens TCP/IP Ethernet Driver 76
That completes the configuration of the four connections that were selected.
N ote: Notice that the Local TSAP in the Connection dialog was automatically advanced for each con-
nection. This TSAP number will need to be used in the OPC server setup when defining a device as the
remote TSAP number.
1. Set the Keep Alive Interval. The longer the interval, the longer the connection between the device and
the OPC server will exist during idle time. A long Keep Alive Interval may not be desirable if connections are
being shared (nonconcurrent). Each remote client will need to wait this amount of time before it will be able
to connect with the device once the last connected remote client is finished communications. The 30 second
default is suggested.
www. ptc.com
77 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 78
N ote: It is recommended that the Micro/WIN software pick this location for the application. If a CRC was
not generated for the configuration data, please take steps to ensure that no other aspect of the PLC pro-
gram will overwrite this area of memory.
2. To review what the Ethernet wizard produced, double-click ETH0_CTRL under the Program Block. All
TSAPs configured are listed for future reference. Remember, the Local TSAP below is the Rem ote TSAP in
the OPC server and the remote TSAP below is the Local TSAP in the OPC server.
www. ptc.com
79 Siem en s TCP/IP Eth ern et Driver
5. Now that the results of the Ethernet wizard have been confirmed, a connection can be made using the
OPC server.
1. From the Sim atic Manager, launch HW Config by double-clicking Hardware under the SIMATIC Station.
www. ptc.com
Siemens TCP/IP Ethernet Driver 80
2. If this is a new Simatic project, add the necessary modules to the Rack in HW Config. For the Siemens
TCP/IP Ethernet Driver to communicate with the CPU, there will need to be at least one Ethernet module cap-
able of S7 Com m unications. This may be built into the CPU.
www. ptc.com
81 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 82
5. To network this module, click N ew under Subnet. Next, select the network created and the click OK.
Configuring Connections
1. Right-click on the CPU module in the rack and select Object Properties.
www. ptc.com
83 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 84
3. Configure the desired number of PG/ OP and PC (S7 Com m unication) connections.
N ote: The maximum number of PC connections for the CPU equals the Maximum Number of Connection
Resources m inus the S7 Standard Communication resources m inus the OP Communication resources
m inus the PG Communication resources. Note that the Maximum Number of Connection Resources is
based on the CPU/version/firmware.
In the example shown above, there are six S7 communication (PC) connections available (12-4-1-1=6). Like-
wise, the number of PG and OP connections can be increased using the same concept.
If the Device returned protocol [Class=0x83, Code=0x04] error is encountered, increase the number of S7
Standard Communication connections, thereby decreasing the number of S7 Communication connections.
4. After the connections have been configured, click OK. Next, in the main HW Config window click Station |
Save and Com pile.
www. ptc.com
85 Siem en s TCP/IP Eth ern et Driver
How To Configure S7-1200 Connect ions wit h t he Tot ally Int egrat ed Aut o-
m at ion (TIA) Port al
To configure the S7-1200 for communications with the Siemens TCP/IP Ethernet Driver, an online connection
is required between the programming device and the target system. Users may have to configure the pro-
gramming device to talk to the target system. For more information, follow the instructions below.
N ote: For new Simatic projects, refer to the PLC's documentation for information on the default IP
address settings.
1. Start the TIA Portal. In the Portal View, click Create new project.
2. Next, select the Online & Diagnostics tab and then click Accessible Devices.
www. ptc.com
Siemens TCP/IP Ethernet Driver 86
3. Select the appropriate PG/PC interface. This will prompt the TIA to scan the network for the device.
4. Once the scan is complete, select the device and then click Show. This will invoke the Project View.
5. In the project tree, locate the IP address and then open Online & Diagnostics.
www. ptc.com
87 Siem en s TCP/IP Eth ern et Driver
9. Return to the Portal View and then select the Device & N etworks tab. Then, click Add new device.
10. Next, select the device's configuration and then click Add device. This will invoke the Project View,
where the device's hardware can be further configured.
www. ptc.com
Siemens TCP/IP Ethernet Driver 88
11. Once finished, view the project tree. Locate Program Blocks and PLC Tags and then configure the
addresses that will be used in the PLC project.
N ote: The device is now configured and can be placed in Run Mode for communications.
www. ptc.com
89 Siem en s TCP/IP Eth ern et Driver
3. In the General tab, select Protection. Then, ensure that Full access (no protection) is enabled.
N ote: At this time, the Siemens TCP/IP Ethernet Driver does not support the use of a password.
4. Next, check Perm it access with PUT/ GET com m unication from rem ote partner. Then, save the
settings.
5. In the server, create a new channel. In Device Driver, select Siem ens TCP/ IP Ethernet Driver from
the drop-down list. Continue through the channel wizard, specifying channel properties as needed.
Then, click Finish.
6. Next, create a new device. In Model, select S7-1500 from the Device Model drop-down list. Continue
through the device wizard, specifying device properties as needed. Then, click Finish.
N ote: The controller Protection settings are directly related to the device returning protocol error [Class-
s=0x81, Code=0x04]. If this error occurs, the controller's memory (such as the Simatic memory card) may
need to be reset. Once the controller's memory is reset, downloading the S7 project to the controller should
not prompt for a password.
www. ptc.com
Siemens TCP/IP Ethernet Driver 90
N ote: All brand and product names are trademarks, registered trademarks, or service marks of their
respective holders.
N ote: The offset for an atomic type tag in a data block is denoted by the column "Address" in Step 7, as
shown above. This offset is denoted by the column "Offset" in the Siemens TIA Portal programming envir-
onment.
Address Syntax
Input, Output, Peripheral, Flag Mem ory Types
<memory type><S7 data type><address>[<Data Type suffix>] [<Byte Switching suffix>]
<memory type><S7 data type><address>[<Data Type suffix>]<_row_col>
DB M emory Type
DB<num>.<S7 data type><address>[<Data Type suffix>][< Byte Switching suffix>]
DB<num>.<S7 data type><address>[<Data Type suffix>]<_row_col>
where <num> ranges from 1 to 65535.
See Also: Examples
M emory Types
M emory Type Descript ion Address Range Dat a Type Access
I
Inputs Read/Write
E
Q
Outputs Read/Write
A
Dependent on S7 Data Type
PI
Peripheral Inputs Read Only
PE
PQ
Peripheral Outputs Read/Write
PA
www. ptc.com
91 Siem en s TCP/IP Eth ern et Driver
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Timers and Counters. The
default data types are shown in bold. Suffixes are not required.
Byte Switching Suffixes can be used with all memory types except Timers and Counters (T, C, and Z) and Peri-
pheral Inputs and Outputs (PI, PE, PQ, and PA). For information on the various types of switching that depend
on the suffix and data type of the item, refer to the table below.
www. ptc.com
Siemens TCP/IP Ethernet Driver 92
Array Support
The <.array size> notation is appended to an address to specify an array (such as "MW0.10"). Boolean arrays
and string arrays are not supported.
Examples
S7 Dat a Type Dat a Type Input Flags Dat a Blocks
None Boolean I0.7 M0.7 ----
DBX Boolean ---- ---- DB1.DBX0.7
IB0 MB0 ----
Byte
---- ---- DB1.DBB0
B
DBB
IB0_2_5 MB0_2_5 ----
Array
---- ---- DB1.DBB0_2_5
IW0 MW0 ----
Word
---- ---- DB1.DBW0
W IW0_X1 MW0_X2 DB1.DBW0_X3
DBW
IW0_10 MW0_10 ----
Array
---- ---- DB1.DBW0_10
ID0 MD0 ----
DWord
---- ---- DB1.DBD0
ID0_X1 MD0_X2 DB1.DBD0_X3
D
ID0F MD0F DB1.DBD0F
DBD Float (F)
ID0F_X1 MD0F_X2 DB1.DBD0F_X3
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
www. ptc.com
93 Siem en s TCP/IP Eth ern et Driver
Address Syntax
Input, Output, Peripheral, Flag Mem ory Types
<memory type><S7 data type><address>[<suffix>]
<memory type><S7 data type><address><.string length>*
<memory type><S7 data type><address><.array size>[<suffix>]
DB M emory Type
DB<num>.<S7 data type><address>[<suffix>]
DB<num>.<S7 data type><address><.string length>*
DB<num>.<S7 data type><address><.array size>[<suffix>]
M emory Types
M emory Type Descript ion Address Range Dat a Type Access
I
Inputs Read/Write
E
Q
Outputs Read/Write
A
PI
Peripheral Inputs Read Only
PE Dependent on S7 Data Type
PQ
Peripheral Outputs Read/Write
PA
M
Flag Memory Read/Write
F
DB Data Blocks Read/Write
T Timers T0-T65535 DWord, Long Read/Write
C C0-C65535
Counters Word, Short Read/Write
Z Z0-Z65535
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Timers and Counters. Default
data types are shown in bold. A suffix is not required.
www. ptc.com
Siemens TCP/IP Ethernet Driver 94
Suffixes
Suffix Descript ion Dat a Type
Two-byte packed BCD for Word references
BCD
Value range is 0-9999
BCD
Four-byte packed BCD for DWord references
LBCD
Value range is 0-99999999
IEEE 32-bit IEEE floating point value Float
Char
KF Signed Short
Long
Array Support
The <.array size> notation is appended to an address to specify an array (such as MW0.10). Boolean arrays
and string arrays are not supported.
Examples
S7 Dat a Type Dat a Type Input Flags Dat a Blocks
X Boolean IX0.7 MX0.7 DB1.X0.7
www. ptc.com
95 Siem en s TCP/IP Eth ern et Driver
www. ptc.com
Siemens TCP/IP Ethernet Driver 96
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
Address Syntax
Input, Output, Peripheral, Flag Mem ory Types
<memory type><S7 data type><address>
<memory type><S7 data type><address><.string length>
<memory type><S7 data type><address><,array size>
DB M emory Type
DB<num>,<S7 data type><address>
DB<num>,<S7 data type><address><.string length>*
DB<num>,<S7 data type><address><,array size>
M emory Types
M emory Type Descript ion Address Range Dat a Type Access
I
Inputs Read/Write
E
Dependent on S7 Data Type
Q
Outputs Read/Write
A
www. ptc.com
97 Siem en s TCP/IP Eth ern et Driver
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Timers and Counters. The
default data types are shown in bold.
Array Support
The <.array size> notation is appended to an address to specify an array (such as MW0.10). Boolean arrays
and string arrays are not supported.
Examples
www. ptc.com
Siemens TCP/IP Ethernet Driver 98
Address Syntax
Input, Output, Peripheral, Flag Mem ory Types
<memory type><S7 data type><address>
www. ptc.com
99 Siem en s TCP/IP Eth ern et Driver
DB M emory Type
DB<num>.<S7 data type><address>
M emory Types
M emory Type Descript ion Address Range Dat a Type Access
I
Inputs Read/Write
E
Q
Outputs Read/Write
A
PI
Peripheral Inputs Read Only
PE Dependent on S7 Data Type
PQ
Peripheral Outputs Read/Write
PA
M
Flag Memory Read/Write
F
DB Data Blocks Read/Write
T Timers T0-T65535 DWord, Long Read/Write
C C0-C65535
Counters Word, Short Read/Write
Z Z0-Z65535
Counters
Tim ers
www. ptc.com
Siemens TCP/IP Ethernet Driver 100
For more information, refer to Standard S7-300/ 400/ 1200/ 1500 Item Syntax.
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Counters and Timers. The
default data types are shown in bold.
Examples
S7 Dat a Type Dat a Type Input Flags Dat a Blocks
None I0.7 M0.7 ----
Boolean
DBX ---- ---- DB1.DBX0.7
B IB0 MB0 ----
Byte
DBB ---- ---- DB1.DBB0
W IW0 MW0 ----
Word
DBW ---- ---- DB1.DBW0
D DWord ID0 MD0 ----
www. ptc.com
101 Siem en s TCP/IP Eth ern et Driver
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
N ote: The offset for an atomic type tag in a data block is denoted by the column "Address" in Step 7, as
shown above. This offset is denoted by the column "Offset" in the Siemens TIA Portal programming envir-
onment.
Address Syntax
Input, Output, Peripheral, Flag Mem ory Types
<memory type><S7 data type><address>:[<suffix>]
DB M emory Type
DB<num>.<S7 data type><address>:[<suffix>]
M emory Types
M emory Type Descript ion Address Range Dat a Type Access
I
Inputs Read/Write
E
Q
Outputs Read/Write
A
PI
Peripheral Inputs Read Only
PE Dependent on S7 Data Type
PQ
Peripheral Outputs Read/Write
PA
M
Flag Memory Read/Write
F
DB Data Blocks Read/Write
T Timers T0-T65535 DWord, Long Read/Write
C C0-C65535
Counters Word, Short Read/Write
Z Z0-Z65535
www. ptc.com
Siemens TCP/IP Ethernet Driver 102
S7 Data Types
The S7 data type is used to coerce the data type for a tag. It does not apply to Timers and Counters. The
default data types are shown in bold. Suffix is not required.
Suffixes
Suffix Descript ion Dat a Type
Byte Unsigned Byte Byte
Char Signed Byte Char
Word Unsigned Word Word
INT Signed Word Short
DWORD Unsigned DWord DWord
DINT Signed DWord Long
Two byte packed BCD for Word references
BCD
Value range is 0-9999
BCD
Four byte packed BCD for DWord references
LBCD
Value range is 0-99999999
REAL 32-bit IEEE floating point value Float
String S7 String String
Examples
www. ptc.com
103 Siem en s TCP/IP Eth ern et Driver
All brand and product names are trademarks, registered trademarks, or service marks of their respective hold-
ers.
www. ptc.com
Siemens TCP/IP Ethernet Driver 104
Index
A required code page is unavailable on this machine. Tag generation may fail or tag names and descrip-
tions may not appear as expected. | Required code page = <page>. 48
Address Descriptions 26
Address Syntax 31, 90, 93
Addressing Options 18
Allow Sub Groups 15
Appendix — Channel Properties 62
Appendix — Device Properties 62
Appendix — Tag Properties 63
Applicom Direct-Link Item Syntax 90
Array Support 35, 92, 94
Arrays 43
Attempts Before Timeout 12
Auto-Demotion 13
Auto-generated tag names and descriptions may not appear as expected due to string conversion
error. 48
BCD 25
Big Endian 18
Bits 18
Boolean 25
Byte 25
Byte Order 18
Byte Switching Suffix 91
Channel Assignment 10
Channel Properties — Advanced 9
Channel Properties — Ethernet Communications 8
Channel Properties — Write Optimizations 8
Char 25
www. ptc.com
105 Siem en s TCP/IP Eth ern et Driver
Communications Parameters 15
Communications Timeouts 12
Configured connection 16
Configuring Connections 68
Configuring Siemens Connections 64
Connect Timeout 12
Counters 36, 44, 93
CPU Rack 17
CPU Slot 17
Create 15
Created tag in group due to internal block size. | Tag address = '<address>', tag name = '<name>', group
name = '<name>'. 50
Error Codes 60
Ethernet Settings 8
www. ptc.com
Siemens TCP/IP Ethernet Driver 106
Ethernet Wizard 64
Event Log Messages 45
General 10
Generate 14
Help Contents 5
Hex Strings 35, 42
How To Configure S7-1200 Connections with the Totally Integrated Automation (TIA) Portal 85
How To Configure S7-1500 Connections 89
How To Configure S7-200 Connections in Micro/WIN 64
How To Configure S7-300/400 Connections in STEP 7 79
ID 10
INAT OPC Server TCPIPH1 Item Syntax 92
Initial Updates from Cache 11
Inputs 93
Inter-Device Delay 9
Internal Tags 30
LBCD 25
Legacy S7-300/400 Item Syntax 38
Link Type 17
Little Endian 18
www. ptc.com
107 Siem en s TCP/IP Eth ern et Driver
Local TSAP 16
Long 25
NetLink 15
NetLink adapter 15
NetLink Errors 60
NetLink: S7-300 Address Descriptions 30
NetLink: S7-400 Address Descriptions 30
Network Adapter 8
Non-Normalized Float Handling 9
On Device Startup 14
On Duplicate Tag 14
On Property Change 14
Operating Mode 10
Optimization Method 8
Optimizing Communications 24
Outputs 93
Overview 6
Overwrite 14
Parent Group 15
Peripheral Inputs 93
www. ptc.com
Siemens TCP/IP Ethernet Driver 108
Peripheral Outputs 93
PG connection 16
Port Number 15
Program Path 19
Protocol Errors 60
www. ptc.com
109 Siem en s TCP/IP Eth ern et Driver
STEP 7 79
Step 7 language file failed to open. | OS error = '<error>'. 49
STEP 7 Project 19-20
STEP 7 Tag Import 19
String 25
String Subtype 42
String Support 35
Suffixes 94
Supported Devices 6
Supported Models via Siemens STEP 7 19
Supported Models via Siemens TIA Portal 19
Supported NetLink Cables and Gateways 6
Syntax 90
Tag Generation 13
Tag generation failure. | Data block name = '<block name>', data block number = <block number>. 50
Tag Import 19
Tag Import Type 19-20
Tag not created because arrays are not supported with specified data type. | Tag name = '<name>',
group name = '<name>', data type = '<type>'. 50
Third-Party 90
TIA Portal 85
TIA Portal Tag Import 20
Timeouts to Demote 13
Timers 36, 43, 93
Timing 11
Transport Errors 60
TSAP 17
www. ptc.com
Siemens TCP/IP Ethernet Driver 110
(bytes), 55
Unable to read data from device. Block deactivated. | Data block = '<block>', block start = <address>,
block size = <size>, 54
Unable to read data from device. Block deactivated. | Memory type = '<type>', block start = <address>,
block size = <size> (bytes), 56
Unable to read from address on device. | Address = '<address>', 52
Unable to read from address on device. Tag deactivated. | Address = '<address>', 53
Unable to write to address on device. | Address = '<address>', 57
Unable to write to address on device. HEXSTRING contains a non-hexadecimal character. | Address =
'<address>'. 58
Unable to write to address on device. HEXSTRING length is different from tag length. | Address =
'<address>', HEXSTRING length = <length> (bytes), tag length = <length> (bytes). 58
Unable to write to address on device. HEXSTRING length must be an even number of characters. |
Address = '<address>'. 58
Unable to write to address on device. Time of Day string contains a syntax error. Expected 'hh
mm
ss.h h h ' form at. | Ad d ress = '<ad d ress>', Tim e of Day strin g = '<strin g>'. 59
Unmodified 9
Word 25
Write All Values for All Tags 8
Write Only Latest Value for All Tags 9
Write Only Latest Value for Non-Boolean Tags 8
www. ptc.com