Modbus Ethernet Manual
Modbus Ethernet Manual
Modbus Ethernet Manual
Table of Contents
M odbus TCP/ IP Ethernet Driver 1
Table of Contents 2
Overview 6
Setup 7
Channel Properties — General 8
Tag Counts 8
Channel Properties — Ethernet Communications 9
Channel Properties — Write Optimizations 9
Channel Properties — Advanced 10
Channel Properties — Communication Serialization 11
Channel Properties — Ethernet 12
Device Properties — General 13
Device Properties — Scan Mode 14
Device Properties — Timing 15
Device Properties — Auto-Demotion 16
Device Properties — Tag Generation 17
Device Properties — Variable Import Settings 19
Device Properties — Unsolicited 19
Modbus Client & Modbus Server Considerations 20
Device Properties — Error Handling 21
Device Properties — Ethernet 21
Device Properties — Settings 22
Device Properties — Block Sizes 25
Device Properties — Redundancy 26
Configuration API — Modbus TCP/IP Ethernet Example 27
Enumerations 28
Device Model Enumerations 29
Optimizing Communications 32
Address Descriptions 34
www. ptc.com
3 M od b u s TCP/IP Eth ern et Driver
TSX Quantum 39
TSX Premium 42
CEG Addressing 45
Fluenta Addressing 45
Instromet Addressing 45
Mailbox Addressing 45
Modbus Addressing 46
Roxar Addressing 49
Statistics Items 50
www. ptc.com
Modbus TCP/IP Ethernet Driver 4
Imported tag name is invalid and has been changed. | Tag name = '<tag>', Changed tag name =
'<tag>'. 58
A tag could not be imported because the data type is not supported. | Tag name = '<tag>', Unsup-
ported data type = '<type>'. 58
Unable to write to address, device responded with exception. | Address = '<address>', Exception
= <code>. 58
Ethernet Manager started. 59
Ethernet Manager stopped. 59
Importing tag database. | Source file = '<filename>'. 59
A client application has changed the CEG extension via system tag _CEGExtension. | Extension =
'<extension>'. 59
Starting unsolicited communication. | Protocol = '<name>', Port = <number>. 59
Created memory for Modbus server device. | Modbus server device ID = <device>. 59
All channels are subscribed to a virtual network or all devices are listening to remote addresses,
stopping unsolicited communication. 59
Channel is in a virtual network, all devices reverted to use one socket per device. 60
Cannot change device ID from Modbus client mode to server mode with a client connected. 60
Cannot change device ID from Modbus server mode to client mode with a client connected. 60
Modbus server mode not allowed when the channel is in a virtual network. The device ID cannot
contain a loop-back or local IP address. 60
Mailbox model not allowed when the channel is in a virtual network. 60
Index 64
www. ptc.com
5 M od b u s TCP/IP Eth ern et Driver
CONTENTS
Overview
What is the Modbus TCP/IP Ethernet Driver?
Set up
How do I configure a channel and device for use with this driver?
www. ptc.com
Modbus TCP/IP Ethernet Driver 6
Overview
The Modbus TCP/IP Ethernet Driver provides a reliable way to connect Modbus Ethernet devices to client
applications; including HMI, SCADA, Historian, MES, ERP, and countless custom applications. Users must
install TCP/IP properly to use this driver. For more information on setup, refer to the Windows documentation.
N ote: The driver posts messages when a failure occurs during operation.
Applicom
This model supports Applicom addressing syntax for Generic Modbus, TSX Premium, and TSX Quantum
devices.
CEG
This model supports the extended block size of CEG devices.
Fluenta
This model supports the non-standard Modbus mapping of the Fluenta FGM 100/130 Flow Computer.
Instromet
This model supports the non-standard Modbus mapping of Instromet devices.
M ailbox
This model affects the way unsolicited requests are handled. By defining a mailbox device, the driver does
not act like a PLC on the network. Instead, it acts as a storage area for every mailbox device that is defined.
When the driver receives an unsolicited command, the driver detects the IP address the message came
from and places the data in the storage area allocated for the device. If the message comes from a device
with an IP address that has not been defined as a mailbox device, the message is not processed. Any client
application that reads or writes to this type of device reads or writes to the storage area in the driver and not
the physical device.
For information on sending unsolicited requests to the Modbus TCP/IP Ethernet Driver, consult the Modicon
Documentation on the MSTR instruction.
N ote: Modbus Mailbox does not support function code 22 (0x16). Only 0x10 (Holding Reg Write Multiple)
and 0x6 (Holding Reg Write Single) are supported. Users can write to a single bit by disabling Holding
Register Bit Writes in the device properties. This forces it to use the Read/Modify/Write sequence instead of
directly writing to the bit. Only the client Modbus device (not the Mailbox) has to change its setting to get this
to work.
Mailbox Client Privileges for Mailbox Device Model
M odbus Client
Most projects are configured to function as a Modbus client. In this mode, the driver accesses a physical
device (such as the TSX Quantum or any other Modbus Open Ethernet compatible device).
www. ptc.com
7 M od b u s TCP/IP Eth ern et Driver
The device ID for a Modbus server device is specified as YYY.YYY.YYY.YYY.XXX. The YYYcan either be the loop-
back address or the local IP address of the PC that is running the driver. The XXXdesignates the Modbus
server's Station ID and can be in the range 0 to 255.
Multiple Modbus server devices can have the same Station ID. In this scenario, all the devices that share the
Station ID point to one common simulated device. If the remote Modbus client requests data from a Modbus
server device (Station ID) that does not exist, the response contains data from station 0. Once a Modbus
server device is created in the project, that Modbus server is enabled and stays enabled until the server is
shut down. Changing the Station ID enables a new Modbus server device that stays enabled until the server
is shut down.
Addresses 1 to 65536 are implemented for output coils, input coils, internal registers, and holding registers.
In Unsolicited Mode, the driver responds to any valid request to read or write these values from external
devices (Function Codes [decimal] 01, 02, 03, 04, 05, 06, 15, and 16). Furthermore, loopback (also known as
Function code 08, sub code 00) has been implemented in this driver. These locations can be accessed locally
by the host PC as tags assigned to the Modbus server device.
N ote: Write-only access is not allowed for unsolicited devices.
Roxar
This model supports the non-standard Modbus mapping of the Roxar RFM Water Cut meter.
See Also: Device Model Enumerations and Device Properties.
Set up
Tip: Channel-level settings apply to all devices that have been configured on this channel.
N ote: The Modbus TCP/IP Ethernet Driver requires Winsock V1.1 or higher.
Communication Serialization
The Modbus TCP/IP Ethernet Driver supports Communication Serialization, which specifies whether data
transmissions should be limited to one channel at a time.
For more information, refer to Communication Serialization.
N otes:
l When Channel Serialization is enabled, Unsolicited communications and the Max Sockets per
Device property is disabled. Mailbox Model is unavailable for Channel Serialization.
l Not all properties are available and applicable for all models.
See Also: Configuring a device with Configuration API commands, API Example with Modbus
www. ptc.com
Modbus TCP/IP Ethernet Driver 8
Identification
N am e: Specify the 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
property 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: Specify the protocol / driver for this channel. This property specifies the device driver that was selec-
ted 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. Changes to the properties should not be made
once a large client application has been developed. Utilize proper user role and privilege management to
prevent operators from changing properties or accessing 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.
Tag Counts
www. ptc.com
9 M od b u s TCP/IP Eth ern et Driver
Static Tags: Provides the total number of defined static tags at this level (device or channel). This inform-
ation can be helpful in troubleshooting and load balancing.
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
www. ptc.com
Modbus TCP/IP Ethernet Driver 10
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
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
11 M od b u s TCP/IP Eth ern et Driver
The term "virtual network" describes a collection of channels and associated devices that use the same
pipeline for communications. For example, the pipeline of an Ethernet radio is the client radio. All channels
using the same client radio associate with the same virtual network. Channels are allowed to communicate
each in turn, in a "round-robin" manner. By default, a channel can process one transaction before handing
communications off to another channel. A transaction can include one or more tags. If the controlling chan-
nel contains a device that is not responding to a request, the channel cannot release control until the trans-
action times out. This results in data update delays for the other channels in the virtual network.
Channel-Level Settings
Virtual N etwork: Specify the channel's mode of communication serialization. Options include None and Net-
work 1 - Network 500. The default is None. Descriptions of the options are as follows:
Transactions per Cycle: Specify the number of single blocked/non-blocked read/write transactions that can
occur on the channel. When a channel is given the opportunity to communicate, this is the number of trans-
actions attempted. The valid range is 1 to 99. The default is 1.
Global Settings
N etwork Mode: This property is used to control how channel communication is delegated. In Load Bal-
anced mode, each channel is given the opportunity to communicate in turn, one at a time. In Priority mode,
channels are given the opportunity to communicate according to the following rules (highest to lowest pri-
ority):
2. Channels with pending explicit reads (through internal plug-ins or external client interfaces) are pri-
oritized based on the read's priority.
The default is Load Balanced and affects all virtual networks and channels.
Devices that rely on unsolicited responses should not be placed in a virtual network. In situations where
communications must be serialized, it is recommended that Auto-Demotion be enabled.
www. ptc.com
Modbus TCP/IP Ethernet Driver 12
Due to differences in the way that drivers read and write data (such as in single, blocked, or non-blocked
transactions); the application's Transactions per cycle property may need to be adjusted. When doing so,
consider the following factors:
Socket Usage
Socket Utilization: Specify if the driver should share a single socket across all devices on this channel or
use multiple sockets to communicate with devices. In some cases, it is undesirable for the driver to maintain
a connection if the device has a limited number of connections available. The target device usually has lim-
ited ports available for connections. If the driver is using a port, no other system may access the target
device. This parameter is useful in these cases. The ability to put the driver into single-socket mode is import-
ant when using the driver to communicate with a Modbus-Ethernet-to-Modbus-RTU bridge product. Most of
these products allow connecting multiple RS-485 serial-based devices to a single Modbus-Ethernet-to-Mod-
bus-RTU bridge.
l One or More Sockets per Device: Specifies that the driver uses one or more socket for each device
on the network and maintains that socket as an active connection. This is the default setting and beha-
vior. Because the driver does not re-establish a connection each time it reads or writes data to a
given device, connection overhead is reduced and performance may be improved when compared
with One Socket per Channel. This setting is recommended if a gateway device is handling a num-
ber of serial devices.
N ote: Gateways (and devices) typically limit the number of simultaneous connections to protect
against communications conflicts. Avoid exceeding these limits. If these limits are exceeded, the
driver posts failure-to-connect messages.
l One Socket per Channel (Shared): Specifies the driver communicates with all devices through the
same shared socket. This alternative configuration to share a single socket requires that each con-
nection be opened and closed as the socket is re-used for each device within the channel. Selecting
this option may require additional tuning to achieve optimum performance.
Max Sockets per Device: Specifies the maximum number of sockets available to the device. The default is
1.
www. ptc.com
13 M od b u s TCP/IP Eth ern et Driver
N otes: When more than one socket is configured, the driver may achieve significantly better performance
for read and write operations. This is because of the following behavior:
l The driver, when more than one socket is configured, spreads the data to read or write to a target
device across all of the available sockets in use with the target device. Reads or write operations are
then issued simultaneously to the device across all sockets.
l Device response messages may be received by the driver at the same time. The device’s responses
are processed sequentially by the single thread at the channel-level; however, this processing of data
at the channel-level can occur very fast (within tens of milliseconds) and therefore, when the Max
Sockets per Device setting is configured to use more than one socket, a significant performance
improvement can be achieved.
Unsolicited Settings
When the Modbus TCP/IP Ethernet Driver is in client mode, it has the ability to accept unsolicited requests.
The driver starts a listening thread for unsolicited data once the driver is loaded by the OPC server. This
thread is global to all channels configured in the OPC server. For example, if an OPC server project has three
channels defined and either setting is changed in one channel, that same change made is made to the other
two channels. The listening thread is restarted once the change is applied. The Event Log will post an event
for the restart.
Port: Specifies the port number that the driver uses when listening for unsolicited requests. The valid range
is 0 to 65535. The default is 502.
IP Protocol: Specifies the protocol that the driver uses when listening for unsolicited request. Options
include User Datagram Protocol (UDP) or Transfer Control Protocol (TCP/IP). The default is TCP/IP.
Identification
Channel Assignm ent: User-defined name of the channel to which this device currently belongs.
www. ptc.com
Modbus TCP/IP Ethernet Driver 14
ID: Specify the device IP address along with a Modbus Bridge Index on the Ethernet network. Device IDs are
specified as <HOST>.XXX, where HOST is a standard UNC/DNS name or an IP address. The XXXdesignates the
Modbus Bridge Index of the device and can be in the range of 0 to 255. If no bridge is used, the index should
be set to 0. Depending on the model and device ID, a device could be configured to act as an unsolicited or
Modbus client device.
For more information on unsolicited mode, refer to Modbus Unsolicited or Server Mode.
Exam ples
1. When requesting data from a Modicon TSX Quantum device with IP address 205.167.7.19, the device
ID should be entered as 205.167.7.19.0.
2. When requesting data from a Modbus Plus device connected to bridge index 5 of a Modbus Ethernet
Bridge with an IP address of 205.167.7.50, the device ID should be entered as 205.167.7.50.5.
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: This option places the device into 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.
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.
See Also: Configuring a device with Configuration API commands, API Example with Modbus
www. ptc.com
15 M od b u s TCP/IP Eth ern et Driver
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.
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.
www. ptc.com
Modbus TCP/IP Ethernet Driver 16
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 9999 milliseconds (167 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.
Dem ote on Failure: When enabled, the device is automatically taken off-scan until it is responding again.
www. ptc.com
17 M od b u s TCP/IP Eth ern et Driver
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.
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
www. ptc.com
Modbus TCP/IP Ethernet Driver 18
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.
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-
www. ptc.com
19 M od b u s TCP/IP Eth ern et Driver
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.
For more information on CSV files for Modbus Drivers, refer to Creating CSV Files for Modbus Drivers.
Variable Im port File: This parameter specifies the exact location of the variable import file that the driver
should use when the Automatic Tag Database Generation feature is enabled.
Include Descriptions: When enabled, this option imports tag descriptions (if present in file).
For more information on configuring the Automatic Tag Database Generation feature (and how to create a
variable import file), refer to Automatic Tag Database Generation.
OPC Quality
OPC Quality Bad until Write: Controls the initial OPC quality of tags attached to this driver. When dis-
abled, all tags have an initial value of 0 and an OPC quality of Good. This is the default condition. When
enabled, all tags have an initial value of 0 and an OPC quality of Bad. The tag's quality remains Bad until all
coils or registers referenced by the tag have been written to by a Modbus client or a client application. For
www. ptc.com
Modbus TCP/IP Ethernet Driver 20
example, a tag with address 400001 and data type DWord references two holding registers: 400001 and
400002. This tag does not show Good quality until both holding registers have been written.
N ote: If the device is not in unsolicited mode, this option is grayed out.
Com m unications Tim eout: Sets the amount of time, in seconds, the driver waits for an incoming request
before setting the device's tag quality to Bad. After the timeout has occurred, the only way to reset the
timeout and allow all the tags to be processed normally is to re-establish communications with the remote
client or disable the communications timeout by setting it to 0. When enabled, the valid range is 1 to 64,800
seconds (18 hours).
N otes:
1. If an incoming request comes for a server device (station ID) that does not exist, the request is dir-
ected to station 0. In this case, the timeout for a server device with station ID 0 does not occur even if
it does not explicitly receive any remote communications for the timeout period.
2. Unsolicited devices require the model to be Modbus and the device ID to be IP_Address.yyy, where IP_
Address can be the local IP address of the PC running the driver. For example, 127.xxx.xxx.xxx, where
xxx=0-255, and yyy (station ID)=0-255.
3. When the first unsolicited request for a server device is received, the Event Log displays the following
informational message: "<date>__<time>__<level>__<source>__<event>". For example, "2/4/2011__
4:53:10 PM__Information__Modbus TCP/IP Ethernet__Created Memory for server Device <server Num-
ber>".
4. For this driver, the terms server and unsolicited are used interchangeably.
l It is not recommended that a Mailbox device and a Modbus device be on the same machine. Because
a client only gets data from one of these devices at a time; it is uncertain from which it gets data.
l It is recommended that client and server devices be placed on separate channels in the server pro-
ject for optimal server device tag processing.
l When an OPC client is connected, the device ID can only be changed if it does not result in change of
mode (client to server or server to client) of the device. The mode is changed by changing the loop-
back or local IP address to a different IP address and vice versa. The loopback address and the local
IP address (of the PC running the driver) indicates server (unsolicited) mode and any other IP address
indicates client mode of the device. When no OPC client is connected, the mode can be changed in
any manner (such as client to client, client to server, server to server, or server to client).
N ote: Any address in the format 127.xxx.xxx.xxx, where xxx is in the range 0-255 is loopback
address.
l The Data Encoding group settings must be the same in client and server devices. For example, when
a device configured as a Modbus client is communicating with the device setup as a Modbus server.
l The server project as a whole allows a maximum of 255 server devices, one for each unique server
ID. The same server ID cannot be used across multiple channels.
l The server sees ANY loopback address (127.x.x.x), or localhost IP as a reference back to itself and cre-
ates shared memory space unique to the server ID. The same ID in multiple channels is the same
server device using the same register memory.
www. ptc.com
21 M od b u s TCP/IP Eth ern et Driver
l If the same server ID must be used more than once in a project, choose tag address ranges that do
not coincide with other instances of the same server device IDs. Multiple channels / devices using the
same tag address range in the same server ID experience cross-talk and data corruption.
l For this driver, the terms server and unsolicited are used interchangeably.
Deactivate Tags on Illegal Address: Choose Enable for the driver to stop polling for a block of data if the
device returns Modbus exception code 2 (illegal address) or 3 (illegal data, such as number of points) in
response to a read of that block. Choose Disable for the driver to continue polling the data block despite
errors. The default is enabled.
Port: Specifies the port number that the remote device is configured to use. The valid range is 0 to 65535.
The default is 502. This port number is used when making solicited requests to a device.
If the port system tag is used, the port number setting is changed. For more information, refer to Driver Sys-
tem Tag Addresses.
IP Protocol: Specifies whether the driver should connect to the remote device using the User Datagram Pro-
tocol (UDP) or Transfer Control Protocol (TCP/IP). The client and server settings must match. For example, if
the server's IP protocol setting is TCP/IP, then the client's IP protocol setting for that device must also be
TCP/IP.
N ote: This driver requires Winsock V1.1 or higher.
www. ptc.com
Modbus TCP/IP Ethernet Driver 22
Close Socket on Tim eout: Specifies whether the driver should close a TCP socket connection if the device
does not respond within the timeout. When enabled, the default, the driver closes the socket connection on
timeout. When disabled, the driver continues to use the same TCP socket until an error is received, the phys-
ical device closes the socket, or the driver is shutdown.
N ote: The Modbus TCP/IP Ethernet Driver closes the socket connection on a socket error.
Data Access
Zero-Based Addressing: If the address-numbering convention for the device starts at one as opposed to
zero, the value can be specified when defining the device parameters. By default, user-entered addresses
have one subtracted when frames are constructed to communicate with a Modbus device. If the device does
not follow this convention, choose disable. The default behavior follows the convention of Modicon PLCs.
Zero-Based Bit Addressing: Within registers, memory types that allow bits within Words can be referenced
as Booleans. The addressing notation is <address>.<bit>, where <bit> represents the bit number within the
Word. This option provides two ways of addressing a bit within a given Word; zero- or one-based. Zero-based
means that the first bit begins at 0 (range=0-15); one-based means that the first bit begins at 1 (range=1-
16).
Holding Register Bit Writes: When writing to a bit location within a holding register, the driver should only
modify the bit of interest. Some devices support a special command to manipulate a single bit within a
register (function code hex 0x16 or decimal 22). If the device does not support this feature, the driver must
perform a Read / Modify / Write operation to ensure that only the single bit is changed. When enabled, the
driver uses function code 0x16, regardless of this setting for single register writes. When disabled, the driver
uses function code 0x06 or 0x10, depending on the selection for Modbus Function 06 for single register
writes. The default is disabled.
N ote: When Modbus byte order is disabled, the byte order of the masks sent in the command is Intel byte
order.
Modbus Function 06: This driver supports Modbus protocol functions to write holding register data to the
target device. In most cases, the driver switches between functions 06 and 16 based on the number of
registers being written. When writing a single 16-bit register, the driver generally uses Modbus function 06.
When writing a 32-bit value into two registers, the driver uses Modbus function 16. For the standard Modicon
PLC, the use of either of these functions is not a problem. There are, however, a large number of third-party
devices using the Modbus protocol and many support only Modbus function 16 to write to holding registers.
www. ptc.com
23 M od b u s TCP/IP Eth ern et Driver
This selection is enabled by default, allowing the driver to switch between 06 and 16 as needed. If a device
requires all writes to use only Modbus function 16, disable this selection.
N ote: For bit within word writes, the Holding Register Bit Mask property takes precedence over this option.
If Holding Register Bit Mask is enabled, function code 0x16 is used regardless of this property. If not enabled,
either function code 0x06 or 0x10 is used for bit within word writes.
Modbus Function 05: This driver supports Modbus protocol functions to write output coil data to the target
device. In most cases, the driver switches between these two functions based on the number of coils being
written. When writing a single coil, the driver uses Modbus function 05. When writing an array of coils, the
driver uses Modbus function 15. For the standard Modicon PLC, the use of these functions is not a problem.
There are, however, many third-party devices that use the Modbus protocol and many only support the use
of Modbus function 15 to write to output coils regardless of the number of coils. This selection is enabled by
default, allowing the driver to switch between 05 and 15 as needed. If a device requires all writes to use only
Modbus function 15, disable this selection.
CEG Extension: The Modbus driver can communicate with CEG devices that support extended block sizes or
Modbus devices configured with the CEG model. This property is only available for the CEG model. The
default is enabled, indicating the device is a CEG device with extended block sizes. Disabled indicates the
device does not support the extended block sizes.
N ote: This property can be modified when an active OPC client connection exists. In this situation, dis-
abling the option causes the block size ranges to change. If any of the block size properties exceed the max-
imum value, they are automatically adjusted to the new maximum value.
Mailbox Client Privileges: The Modbus driver can communicate with Mailbox clients with the following
options:
l Mem ory Map Read Only: Client applications can only read from a mailbox memory map.
l Mem ory Map Read-Write: Client applications can read and write to the mailbox memory map.
l Device Write-Mem ory Map Read: Client applications can only write to a device; reads are from the
memory map.
Data Encoding
Modbus Byte Order: sets the data encoding of each register / 16-bit value. The byte order for can be
changed from the default Modbus byte ordering to Intel byte ordering using this selection. The default is
enabled, which is the normal setting for Modbus-compatible devices. If the device uses Intel byte ordering,
disable this property to read Intel-formatted data.
First Word Low: sets the data encoding of 32-bit values and the double word of 64-bit values. Two con-
secutive registers' addresses in a Modbus device are used for 32-bit data types. The driver can read the first
word as the low or the high word of the 32-bit value based on this option. The default is enabled, first word
low, to follow the convention of the Modicon Modsoft programming software.
First DWord Low: sets the data encoding of 64-bit values. Four consecutive registers' addresses in a Mod-
bus device are used for 64-bit data types. The driver can read the first DWord as the low or the high DWord
of the 64-bit value. The default is enabled, first DWord low, to follow the default convention of 32-bit data
types.
Modicon Bit Order: when enabled, the driver reverses the bit order on reads and writes to registers to fol-
low the convention of the Modicon Modsoft programming software. For example, a write to address
www. ptc.com
Modbus TCP/IP Ethernet Driver 24
40001.0/1 affects bit 15/16 in the device when this option is enabled. This option is disabled (disabled) by
default.
For the following example, the 1st through 16th bit signifies either 0-15 bits or 1-16 bits, depending on the
driver using zero-based or one-based bit addressing within registers.
MSB = Most Significant Bit
LSB = Least Significant Bit
Treat Longs as Decim als: when enabled, the driver encodes and decodes double-precision unsigned Long
and DWord data types as values that range from 0 to 99999999. This format specifies that each word rep-
resents a value between 0 and 9999. Values read above the specified range are not clamped, but the beha-
vior is undefined. All read values are decoded using the formula [Read Value] = HighWord * 10000 +
LowWord. Written values greater than 99999999 are clamped to the maximum value. All written values are
encoded using the formula Raw Data = [Written Value]/10000 + [Written Value] % 10000.
Tips on Settings
Dat a Types M odbus Byt e Order First Word Low First DWord Low
Word, Short, BCD Applicable N/A N/A
Float, DWord, Long, LBCD Applicable Applicable N/A
Double Applicable Applicable Applicable
If needed, use the following information and the device's documentation to determine the correct settings of
the data encoding options.
The default settings are acceptable for the majority of Modbus devices.
Dat a Encoding
Dat a Encoding
Opt ion
Modbus Byte High Byte (15..8) Low Byte (7..0)
Order
Modbus Byte
Low Byte (7..0) High Byte (15..8)
Order
High Word (31..16) Low Word (15..0)
First Word Low High Word (63..48) of Double Word in Low Word (47..32) of Double Word in 64-
64-bit data types bit data types
Low Word (15..0) High Word (31..16)
First Word Low Low Word (47..32) of Double Word in 64- High Word (63..48) of Double Word in
bit data types 64-bit data types
www. ptc.com
25 M od b u s TCP/IP Eth ern et Driver
Dat a Encoding
Dat a Encoding
Opt ion
First DWord Low High Double Word (63..32) Low Double Word (31..0)
First DWord Low Low Double Word (31..0) High Double Word (63..32)
Coils
Output Coils: Specifies the output block size in bits. Coils can be read from 8 to 2000 points (bits) at a time.
The default is 32.
Input Coils: Specifies the input block size in bits. Coils can be read from 8 to 2000 points (bits) at a time. The
default is 32.
Registers
Internal Registers: Specifies the internal register block size in bits. From 1 to 120 standard 16-bit Modbus
registers can be read at a time. The default is 32.
Holding Registers: Specifies the holding register block size in bits. From 1 to 120 standard 16-bit Modbus
registers can be read at a time. The default is 32.
Blocks
Block Read Strings: Enables group / block reads of string tags, which are normally read individually. String
tags are grouped together depending on the selected block size. Block reads can only be performed for Mod-
bus model string tags.
N otes:
1. The Instromet, Roxar, and Fluenta models (which support 32-bit and 64-bit registers) require special
consideration. The Modbus protocol constrains the block size to be no larger than 256 bytes. This
translates to a maximum of block size of 64 32-bit registers or 32 64-bit registers for these models.
www. ptc.com
Modbus TCP/IP Ethernet Driver 26
2. The CEG model supports coil block sizes between 8 and 8000 in multiples of 8 and register block
sizes between 1 and 500. This model must only be used with CEG devices.
3. A bad address in block error can occur if the register block sizes are set above 120 and a 32- or 64-
bit data type is used for any tag. To prevent this, decrease the block size value to 120.
4. Some devices may not support block read operations at the default size. Smaller Modicon PLCs and
non-Modicon devices may not support the maximum data transfer lengths supported by the Mod-
bus Ethernet network.
5. Some devices may contain non-contiguous addresses. In this case, and the driver attempts to read
a block of data that encompasses undefined memory, the request may be rejected.
www. ptc.com
27 M od b u s TCP/IP Eth ern et Driver
Channel Definitions
Endpoint (GET):
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Modbus%20TCP%2FIP%20Ethernet/channels
Device Definitions
Endpoint (GET):
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Modbus%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": "Modbus 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>.<Modbus ID>",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Modbus TCP/IP Ethernet",
"servermain.DEVICE_MODEL": <model enumeration>
}
where <IP Address>.<Modbus ID> is the device's IP address and Modbus ID, such as 192.160.0.1.0.
Device ID Update
Update the Device ID using a “PUT” command from a REST client.
The Endpoint example below references the “demo-project.json” project configuration with “ModbusTCPIP”
channel name and “ModbusDevice” device name.
www. ptc.com
Modbus TCP/IP Ethernet Driver 28
Endpoint (PUT):
https://<hostname_or_ip>:<-
port>/config/v1/project/channels/ModbusTCPIP/devices/ModbusDevice
Body:
{
"project_id": <project_ID_from_GET>,
"servermain.DEVICE_ID_STRING": "<IP Address>.<Modbus ID>"
}
Endpoint (POST):
https://<hostname_or_ip>:<-
port>/config/v1/project/channels/MyChannel/devices/MyDevice/tags
Body:
[
{
"common.ALLTYPES_NAME": "MyTag1",
"servermain.TAG_ADDRESS": "40001"
}
{
"common.ALLTYPES_NAME": "MyTag2",
"servermain.TAG_ADDRESS": "40002"
}
]
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:
www. ptc.com
29 M od b u s TCP/IP Eth ern et Driver
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,
"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/Modbus%20TCP%2FIP%20Ethernet/Channels
https://<hostname_or_ip>:<-
port>/config/v1/doc/drivers/Modbus%20TCP%2FIP%20Ethernet/Devices
www. ptc.com
Modbus TCP/IP Ethernet Driver 30
www. ptc.com
31 M od b u s TCP/IP Eth ern et Driver
Although it is sometimes possible to query a device for the information needed to build a tag database, this
driver must use a Variable Im port File instead. Variable import files can be generated using device pro-
gramming applications, such as Concept and ProWORX. The import file must be in semicolon-delimited .txt
format, which is the default export file format of the Concept device programming application.
For specific information on creating the variable import file, consult Technical Note Creating CSV Files for Mod-
bus Drivers.
[Record Type] ; [Variable Name] ; [Data Type] ; [Address] ; [Set Value] ; [Comment] where:
l Record Type: This is a flag used in the Concept software, which is another way to import tags. It can
be N or E: both flags are treated the same.
l Variable N am e: This is the name of the Static Tag in the server. It can be up to 256 characters in
length.
l Data Type: This is the tag's data type. Supported data types are as follows:
l BOOL
l DINT
l INT
l REAL (32-bit Float)
l UDINT
l UINT
l WORD
l BYTE
l TIME (treated as a DWord)
l STRING
l Address: This is the tag's Modbus address. It can be up to 16 characters in length.
l Set Value: This is ignored and should be kept blank.
l Com m ent: This is the description of the tag in the server. It can be up to 255 characters in length.
Examples
l N;Amps;WORD;40001;;Current in
l N;Volts;WORD;40003;;Volts in
l N;Temperature;REAL;40068;;Tank temp
www. ptc.com
Modbus TCP/IP Ethernet Driver 32
The server refers to communications protocols like Modbus 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 must then be defined under that channel. Each of these devices represents a single Mod-
bus controller from which data is collected. While this approach to defining the application provides a high
level of performance, it doesn't take full advantage of the 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 Modbus Ethernet channel. In this con-
figuration, 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 suf-
fer.
If the Modbus TCP/IP Ethernet Driver could only define one single channel, then the example above would be
the only option available; however, the driver can define up to 1024 channels. Using multiple channels dis-
tributes 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 to improve performance
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. If the
application has 1024 or fewer devices, it can be optimized in this manner.
The performance improves even if the application has more devices. While fewer
devices may be ideal, the application still benefits from additional channels.
Although by spreading the device load across all channels causes the server to
move from device to device again, it can do so with far less devices to process on a
single channel.
Block Size
Block size can affect the performance of the Modbus TCP/IP Ethernet Driver. The block size parameter is
available on each device, defined under the Block Size settings for device properties. The block size refers to
the number of registers or bits that may be requested from a device at one time. The driver's performance
can be refined by configuring the block size to 1 to 120 registers and 8 to 2000 bits.
Tips:
l Additional performance gain can be realized by enabling the Close Socket on Tim eout property.
l Additional performance gain can also be realized by adjusting timeouts and timing properties.
For more information, refer to the Ethernet properties, Communication Timeouts, and Timing.
www. ptc.com
33 M od b u s TCP/IP Eth ern et Driver
Value range is 0-9999. Behavior is undefined for values beyond this range.
LBCD Four-byte packed BCD
Value range is 0-99999999. Behavior is undefined for values beyond this range.
Null-terminated ASCII string
String
Supported on Modbus Model, includes Hi-Lo Lo-Hi byte order selection.
64-bit floating point value
Double*
The driver interprets four consecutive registers as a double precision value by making
the last two registers the high DWord and the first two registers the low DWord.
Double If register 40001 is specified as a double, bit 0 of register 40001 would be bit 0 of the 64-
Example bit data type and bit 15 of register 40004 would be bit 63 of the 64-bit data type.
Float* 32-bit floating point value
The driver interprets two consecutive registers as a single precision value by making the
last register the high word and the first register the low word.
Float Example If register 40001 is specified as a float, bit 0 of register 40001 would be bit 0 of the 32-bit
data type and bit 15 of register 40002 would be bit 31 of the 32-bit data type.
* The descriptions assume the default; that is, first DWord low data handling of 64-bit data types and first
word low data handling of 32-bit data types.
www. ptc.com
Modbus TCP/IP Ethernet Driver 34
Applicom Addressing
CEG Addressing
Fluent a Addressing
Inst romet Addressing
M ailbox Addressing
M odbus Addressing
Roxar Addressing
Internal Tags
Tag Descript ion Dat a Access
Type
Port The Port system tag allows a client application to read and write the Port Word, Read/Write
Number setting. Writes to this tag cause the driver to disconnect from Short,
the device and attempt to reconnect to the specified port. DWord,
Long
N otes:
l The device port setting is not used by the driver for server communications.
l For this driver, the terms server and unsolicited are used interchangeably.
l Changes to this tag modifies the project, which causes the server to prompt to save the project on
shutdown.
System Tags
Tag Descript ion Dat a Access
Type
_CEGExtension This tag is only used for CEG model devices. It allows Boolean Read/Write
the CEG extension device property to be changed
from a client application.
_InputCoilBlockSize This tag allows the Input Coils block size property to be DWord Read/Write
changed from a client application.
_OutputCoilBlockSize This tag allows the Output Coils block size property to DWord Read/Write
be changed from a client application.
_Intern- This tag allows the Internal Registers block size prop- DWord Read/Write
alRegisterBlockSize erty to be changed from a client application.
_Hold- This tag allows the Holding Registers block size prop- DWord Read/Write
ingRegisterBlockSize erty to be changed from a client application.
N ote: Changes to these tags modify the project, which causes the server to prompt to save the project on
shutdown.
www. ptc.com
35 M od b u s TCP/IP Eth ern et Driver
Generic M odbus
TSX Premium
TSX Quant um
Output Coils
Address Range Dat a Type Access Funct ion Code
Bxxxxx 0-65535 Boolean Read / Write 01, 05, 15
Array Support
Arrays are supported for the output coil addresses. The syntax for declaring an array is as follows:
Bxxxxx_cols with assumed row count of 1.
Bxxxxx_rows_cols.
www. ptc.com
Modbus TCP/IP Ethernet Driver 36
The base address+(rows* cols) cannot exceed 65535. The total number of coils being requested cannot
exceed the output coil block size that was specified for this device.
Input Coils
Address Range Dat a Type Access Funct ion Code
BIxxxxx 0-65535 Boolean Read Only 02
Array Support
Arrays are supported for the input coil addresses. The syntax for declaring an array is as follows:
BIxxxxx_cols with assumed row count of 1.
BIxxxxx_rows_cols.
The base address+(rows* cols) cannot exceed 65535. The total number of coils being requested cannot
exceed the input coil block size that was specified for the device.
Internal Registers
The default data types are shown in bold.
Arrays are supported for internal register locations for all data types except for Boolean and strings.
Funct ion
Address Range Dat a Type Access
Code
Word, Short, BCD
0-65535
Float, DWord, Long, Read
WIxxxxx 0-65534 04
LBCD Only
0-65532
Double
xxxxx=0-65535 Read
WIxxxxx.bb Boolean 04
bb=0/1-15/16* Only
xxxxx=0-65535 Read
WIxxxxx:Xbb Boolean 04
bb=0/1-15/16* Only
Read
DIxxxxx 0-65534 DWord 04
Only
Read
FIxxxxx 0-65534 Float 04
Only
Read
WIxxxxx_S 0-65535 Short 04
Only
Read
WIxxxxx_B 0-65535 BCD 04
Only
Read
WIxxxxx_A* * 0-65535 String 04
Only
Word, Short, BCD
0-65535 Read
WIxxxxx_X<1, 2, 3>* * * Float, DWord, Long, 04
0-65534 Only
LBCD
Read
DIxxxxx_S 0-65534 Long 04
Only
www. ptc.com
37 M od b u s TCP/IP Eth ern et Driver
Funct ion
Address Range Dat a Type Access
Code
Read
DIxxxxx_B 0-65534 LBCD 04
Only
Read
DIxxxxx_X<1, 2, 3>* * * 0-65534 DWord 04
Only
Read
FIxxxxx_X<1, 2, 3>* * * 0-65534 Float 04
Only
xxxxx=0-65535
M_WIxxxxx_n(H)
n is string length Read
String with HiLo Byte Order (H String 04
range is 1 to 120 Only
optional)
words
xxxxx=0-65535
M_WIxxxxx_nL n is string length Read
String 04
String with LoHi Byte Order range is 1 to 120 Only
words
Array Support
Arrays are supported for the internal register addresses. The syntax for declaring an array is as follows:
WIxxxxx_cols with assumed row count of 1.
WIxxxxx_rows_cols.
For Word, Short, and BCD arrays, the base address+(rows* cols) cannot exceed 65535.
For Float, DWord, Long, and Long BCD arrays, the base address+(rows* cols* 2) cannot exceed 65534.
For all arrays, the total number of registers being requested cannot exceed the internal register block size
that was specified for the device.
Holding Registers
The default data types are shown in bold.
Arrays are supported for holding register locations for all data types except for Boolean and strings.
Funct ion
Address Range Dat a Type Access
Code
Word, Short, BCD
0-65535
Float, DWord, Long, Read /
Wxxxxx 0-65534 03, 06, 16
LBCD Write
0-65532
Double
xxxxx=0-65535 Read /
Wxxxxx.bb Boolean 03, 06, 16, 22
bb=0/1-15/16* Write
xxxxx=0-65535 Read /
Wxxxxx:Xbb Boolean 03, 06, 16, 22
bb=0/1-15/16* Write
www. ptc.com
Modbus TCP/IP Ethernet Driver 38
Funct ion
Address Range Dat a Type Access
Code
Read /
Dxxxxx 0-65534 DWord 03, 06, 16
Write
Read /
Fxxxxx 0-65534 Float 03, 06, 16
Write
Read /
Wxxxxx_S 0-65535 Short 03, 06, 16
Write
Read /
Wxxxxx_B 0-65535 BCD 03, 06, 16
Write
Read
Wxxxxx_A* * 0-65535 String 03, 16
Only
Word, Short, BCD
0-65535 Read /
Wxxxxx_X<1, 2, 3>* * * Float, DWord, Long, 03, 06, 16
0-65534 Write
LBCD
Read /
Dxxxxx_S 0-65534 Long 03, 06, 16
Write
Read /
Dxxxxx_B 0-65534 LBCD 03, 06, 16
Write
Read /
Dxxxxx_X<1, 2, 3>* * * 0-65534 DWord 03, 06, 16
Write
Read /
Fxxxxx_X<1, 2, 3>* * * 0-65534 Float 03, 06, 16
Write
xxxxx=0-65535
M_Wxxxxx_n(H)
n is string length Read /
String with HiLo Byte Order (H String 03, 16
range is 1 to 120 Write
optional)
words
xxxxx=0-65535
M_Wxxxxx_nL n is string length Read /
String 03, 16
String with LoHi Byte Order range is 1 to 120 Write
words
Array Support
Arrays are supported for the holding register addresses. The syntax for declaring an array using decimal
addressing is as follows.
Wxxxxx_cols with assumed row count of 1.
Wxxxxx_rows_cols.
For Word, Short, and BCD arrays, the base address+(rows* cols) cannot exceed 65535.
For Float, DWord, Long, and Long BCD arrays; the base address+(rows* cols* 2) cannot exceed 65534.
For all arrays, the total number of registers being requested cannot exceed the holding register block size
that was specified for the device.
String Support
www. ptc.com
39 M od b u s TCP/IP Eth ern et Driver
The Applicom model supports reading and writing holding register memory as an ASCII string. When using
holding registers for string data, each register contains two bytes of ASCII data. The length of the string can
be from 1 to 120 words. For more information on performing a block read on string tags, refer to Block
Sizes.
N ote: String length may be limited by the maximum size of the write request allowed by the device. If the
error message "Unable to write to address <address> on device<device>: Device responded with exception
code 3" is received in the server event window, the device does not support the string length. To fix this,
shorten the string to a supported length.
Byte Switching Suffixes can only be used with internal registers and holding registers. For information on the
various types of switching that depend on the suffix and data type of the item, refer to the table below.
TSX Quant um
All Function Codes are displayed in decimal. For more information, refer to Function Codes Description.
Output Coils
Address Range Dat a Type Access Funct ion Code
0xxxxx 1-65536 Boolean Read/Write 01, 05, 15
Array Support
Arrays are supported for the output coil addresses. The syntax for declaring an array is as follows:
0xxxxx_cols with assumed row count of 1.
0xxxxx_rows_cols.
The base address+(rows* cols) cannot exceed 65536. The total number of coils being requested cannot
exceed the output coil block size that was specified for the device.
Input Coils
Address Range Dat a Type Access Funct ion Code
1xxxxx 1-65536 Boolean Read Only 02
Array Support
Arrays are supported for the input coil addresses. The syntax for declaring an array is as follows:
1xxxxx_cols with assumed row count of 1.
1xxxxx_rows_cols.
www. ptc.com
Modbus TCP/IP Ethernet Driver 40
The base address+(rows* cols) cannot exceed 65536. The total number of coils being requested cannot
exceed the input coil block size that was specified for the device.
Internal Registers
The default data types are shown in bold.
Arrays are supported for internal register locations for all data types except for Boolean and strings.
Funct ion
Address Range Dat a Type Access
Code
Word, Short, BCD
1-65536
Float, DWord, Long,
3xxxxx 1-65535 Read Only 04
LBCD
1-65533
Double
xxxxx=1-65536
3xxxxx.bb Boolean Read Only 04
bb=0/1-15/16*
xxxxx=0-65535
3xxxxx:Xbb Boolean Read Only 04
bb=0/1-15/16*
D3xxxxx 1-65535 DWord Read Only 04
F3xxxxx 1-65535 Float Read Only 04
3xxxxx_S 1-65536 Short Read Only 04
3xxxxx_B 1-65536 BCD Read Only 04
3xxxxx_A* * 1-65536 String Read Only 04
Word, Short, BCD
1-65536
3xxxxx_X<1, 2, 3>* * * Float, DWord, Long, Read Only 04
1-65535
LBCD
D3xxxxx_S 1-65535 Long Read Only 04
D3xxxxx_B 1-65535 LBCD Read Only 04
D3xxxxx_X<1, 2, 3>* * * 1-65535 DWord Read Only 04
F3xxxxx_X<1, 2, 3>* * * 1-65535 Float Read Only 04
xxxxx=1-65536
M_3xxxxx_n(H)
n is string length
String with HiLo Byte Order (H String Read Only 04
range is 1 to 120
optional)
words
xxxxx=1-65536
M_3xxxxx_nL n is string length
String Read Only 04
String with LoHi Byte Order range is 1 to 120
words
Array Support
www. ptc.com
41 M od b u s TCP/IP Eth ern et Driver
Arrays are supported for the internal register addresses. The syntax for declaring an array is as follows:
3xxxxx_cols with assumed row count of 1.
3xxxxx_rows_cols.
For Word, Short, and BCD arrays, the base address+(rows* cols) cannot exceed 65536.
For Float, DWord, Long, and Long BCD arrays, the base address+(rows* cols* 2) cannot exceed 65535.
For all arrays, the total number of registers being requested cannot exceed the internal register block size
that was specified for the device.
Holding Registers
The default data types are shown in bold.
Arrays are supported for holding register locations for all data types except for Boolean and strings.
Funct ion
Address Range Dat a Type Access
Code
Word, Short, BCD
1-65536
Float, DWord, Long,
4xxxxx 1-65535 Read/Write 03, 06, 16
LBCD
1-65533
Double
xxxxx=1-65536
4xxxxx.bb Boolean Read/Write 03, 06, 16, 22
bb=0/1-15/16*
xxxxx=0-65535
4xxxxx:Xbb Boolean Read/Write 03, 06, 16, 22
bb=0/1-15/16*
D4xxxxx 1-65535 DWord Read/Write 03, 06, 16
F4xxxxx 1-65535 Float Read/Write 03, 06, 16
4xxxxx_S 1-65536 Short Read/Write 03, 06, 16
4xxxxx_B 1-65536 BCD Read/Write 03, 06, 16
4xxxxx_A* * 1-65536 String Read Only 03, 16
Word, Short, BCD
1-65536
4xxxxx_X<1, 2, 3>* * * Float, DWord, Long, Read/Write 03, 06, 16
1-65535
LBCD
D4xxxxx_S 1-65535 Long Read/Write 03, 06, 16
D4xxxxx_B 1-65535 LBCD Read/Write 03, 06, 16
D4xxxxx_X<1, 2, 3>* * * 1-65535 DWord Read/Write 03, 06, 16
F4xxxxx_X<1, 2, 3>* * * 1-65535 Float Read/Write 03, 06, 16
xxxxx=1-65536
M_4xxxxx_n(H)
n is string length
String with HiLo Byte Order (H String Read/Write 03, 16
range is 1 to 120
optional)
words
xxxxx=1-65536
M_4xxxxx_nL n is string length
String Read/Write 03, 16
String with LoHi Byte Order range is 1 to 120
words
www. ptc.com
Modbus TCP/IP Ethernet Driver 42
Array Support
Arrays are supported for the holding register addresses. The syntax for declaring an array using decimal
addressing is as follows.
For Word, Short, and BCD arrays, the base address+(rows* cols) cannot exceed 65536.
For Float, DWord, Long, and Long BCD arrays, the base address+(rows* cols* 2) cannot exceed 65535.
For all arrays, the total number of registers being requested cannot exceed the holding register block size
that was specified for the device.
String Support
The Applicom model supports reading and writing holding register memory as an ASCII string. When using
holding registers for string data, each register contains two bytes of ASCII data. The length of the string can
be from 1 to 120 words.
For information on performing a block read on string tags, refer to Block Sizes.
N ote: String length may be limited by the maximum size of the write request allowed by the device. If the
error message "Unable to write to address <address> on device <device>: Device responded with exception
code 3" is received in the server event window, the device does not support the string length. To fix this,
shorten the string to a supported length.
Byte Switching Suffixes can only be used with internal registers and holding registers. For information on the
various types of switching that depend on the suffix and data type of the item, refer to the table below.
Output Coils
Address Range Dat a Type Access Funct ion Code
%MXxxxxx 0-65535 Boolean Read/Write 01, 05, 15
%Mxxxxx 0-65535 Boolean Read/Write 01, 05, 15
www. ptc.com
43 M od b u s TCP/IP Eth ern et Driver
Array Support
Arrays are supported for the output coil addresses. The syntax for declaring an array is as follows:
%MXxxxxx_cols with assumed row count of 1.
%MXxxxxx_rows_cols.
The base address+(rows* cols) cannot exceed 65535. The total number of coils being requested cannot
exceed the output coil block size that was specified for the device.
Holding Registers
The default data types are shown in bold.
Arrays are supported for holding register locations for all data types except for Boolean and strings.
Funct ion
Address Range Dat a Type Access
Code
Word, Short, BCD
0-65535
Float, DWord, Long,
%MWxxxxx 0-65534 Read/Write 03, 06, 16
LBCD
0-65532
Double
xxxxx=0-65535
%MWxxxxx.bb Boolean Read/Write 03, 06, 16, 22
bb=0/1-15/16*
xxxxx=0-65535
%MWxxxxx:Xbb Boolean Read/Write 03, 06, 16, 22
bb=0/1-15/16*
%DWxxxxx
0-65534 DWord Read/Write 03, 06, 16
or %MDxxxxx
%FWxxxxx
0-65534 Float Read/Write 03, 06, 16
or %MFxxxxx
%MWxxxxx_S 0-65535 Short Read/Write 03, 06, 16
%MWxxxxx_B 0-65535 BCD Read/Write 03, 06, 16
%MWxxxxx_A* * 0-65535 String Read Only 03, 16
Word, Short, BCD
0-65535
%MWxxxxx_X<1, 2, 3>* * * Float, DWord, Long, Read/Write 03, 06, 16
0-65534
LBCD
%DWxxxxx_S 0-65534 Long Read/Write 03, 06, 16
%DWxxxxx_B 0-65534 LBCD Read/Write 03, 06, 16
%DWxxxxx_X<1, 2, 3>* * *
0-65534 DWord Read/Write 03, 06, 16
or %MDxxxxx_X<1, 2, 3>* * *
%FWxxxxx_X<1, 2, 3>* * *
0-65534 Float Read/Write 03, 06, 16
or %MFxxxxx_X<1, 2, 3>* * *
xxxxx=0-65535
M_%MWxxxxx_n(H)
n is string length
String with HiLo String Read/Write 03, 16
range is 1 to 120
Byte Order (H optional)
words
M_%MWxxxxx_nL xxxxx=0-65535 String Read/Write 03, 16
www. ptc.com
Modbus TCP/IP Ethernet Driver 44
Funct ion
Address Range Dat a Type Access
Code
n is string length
String with LoHi Byte Order range is 1 to 120
words
Array Support
Arrays are supported for the holding register addresses. The syntax for declaring an array using decimal
addressing is as follows:
%MWxxxxx_cols with assumed row count of 1.
%MWxxxxx_rows_cols.
For Word, Short, and BCD arrays, the base address+(rows* cols) cannot exceed 65535.
For Float, DWord, Long, and Long BCD arrays, the base address+(rows* cols* 2) cannot exceed 65534.
For all arrays, the total number of registers being requested cannot exceed the holding register block size
that was specified for the device.
String Support
The Applicom model supports reading and writing holding register memory as an ASCII string. When using
holding registers for string data, each register contains two bytes of ASCII data. The length of the string can
be from 1 to 120 words. For more information on performing block read on string tags, refer to Block Sizes.
N ote: String length may be limited by the maximum size of the write request allowed by the device. If the
error message "Unable to write to address <address> on device<device>: Device responded with exception
code 3" is received in the server event window, the device does not support the string length. To fix this,
shorten the string to a supported length.
Byte Switching Suffixes can only be used with internal registers and holding registers. 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
45 M od b u s TCP/IP Eth ern et Driver
CEG Addressing
Addressing for the CEG device model is the same as that for the Modbus device model.
Fluent a Addressing
The default data types are shown in bold.
M ailbox Addressing
The default data types are shown in bold.
Decim al Addressing
Address Range Dat a Type Access
4xxxxx 1-65536 Word, Short, BCD Read/Write
xxxxx=1-65536
4xxxxx.bb Boolean Read/Write
bb=0-15
4xxxxx 1-65535 Float, DWord, Long, LBCD Read/Write
Hexadecim al Addressing
www. ptc.com
Modbus TCP/IP Ethernet Driver 46
N ote: Modbus Mailbox does not support function code 22 (0x16). Only 0x10 (Holding Reg Write Multiple)
and 0x6 (Holding Reg Write Single) are supported. It is possible to write to a single bit by turning off Holding
Register Bit Mask in device properties under the settings tab. This forces it to use the Read/Modify/Write
sequence instead of directly writing to the bit. Only the client Modbus device (not the Mailbox) has to change
its setting to get this to work.
Arrays
Arrays are also supported for the holding register addresses. The syntax for declaring an array (using
decimal addressing) is as follows:
For Word, Short and BCD arrays, the base address+(rows* cols) cannot exceed 65536.
For Float, DWord, Long and Long BCD arrays, the base address+(rows* cols* 2) cannot exceed 65535.
For all arrays, the total number of registers being requested cannot exceed the holding register block size
that was specified for this device.
M odbus Addressing
For this driver, the terms server and unsolicited are used interchangeably.
www. ptc.com
47 M od b u s TCP/IP Eth ern et Driver
The Function Codes are displayed in decimal. For more information, refer to Function Codes Description.
www. ptc.com
Modbus TCP/IP Ethernet Driver 48
Address
Range Dat a Type Access*
Type
Packed Coils
The Packed Coil address type allows access to multiple consecutive coils as an analog value. This feature is
available for both input coils and output coils when in polled mode only. It is not available to devices that are
configured to access the unsolicited memory map or that are in mailbox mode. The decimal syntax is
0xxxxx# nn, where:
* For server devices, Read Only locations are Read/Write.
* * .Bit is string length, range 2 to 240 bytes.
Packed Coils
The Packed Coil address type allows access to multiple consecutive coils as an analog value. This feature is
available for both input coils and output coils when in polled mode only. It is not available to devices that are
configured to access the unsolicited memory map or that are in mailbox mode. The decimal syntax is
0xxxxx# nn, where:
N otes:
1. The only valid data type is Word. Output coils have read/write access, whereas input coils have read-
only access. In decimal addressing, output coils support Function Codes 01 and 15, whereas input
coils support Function Code 02.
2. The bit order is such that the start address is the Least Significant Bit (LSB) of analog value.
Write-Only Access
All read / write addresses may be set as write only by prefixing a "W" to the address such as "W40001",
which prevents the driver from reading the register at the specified address. Any attempts by the client to
read a write-only tag results in obtaining the last successful write value to the specified address. If no suc-
cessful writes have occurred, then the client receives 0 / NULL for numeric / string values for an initial value.
www. ptc.com
49 M od b u s TCP/IP Eth ern et Driver
Caution: Setting the write-only tags client access privileges to read only causes writes to these tags to fail
and the client to always receive 0 / NULL for numeric / string values.
M ailbox M ode
Only holding registers are supported in mailbox mode. When read from a client, the data is read locally from
a cache, not from a physical device. When written to from a client, the data is written to both the local cache
and the physical device as determined by the device ID routing path.
N ote: The Double data type is not supported.
String Support
The Modbus model supports reading and writing holding register memory as an ASCII string. When using
holding registers for string data, each register contains two bytes of ASCII data. The order of the ASCII data
within a given register can be selected when the string is defined. The length of the string can be from 2 to
240 bytes and is entered in place of a bit number. The length must be entered as an even number. Append-
ing either an "H" or "L" to the address specifies the byte order.
For more information on performing block reads on string tags for the Modbus model, refer to Block Sizes.
Exam ples
1. To address a string starting at 40200 with a length of 100 bytes and HiLo byte order, enter
"40200.100H".
2. To address a string starting at 40500 with a length of 78 bytes and LoHi byte order, enter
"40500.78L".
N ote: String length may be limited by the maximum size of the write request allowed by the device. If the
error message "Unable to write to address <address> on device<device>: Device responded with exception
code 3" is received in the server event window, the device did not like the length of the string. If possible, try
shortening the string.
Array Support
Arrays are supported both for internal and holding register locations (including all data types except
Boolean and String) and for input and output coils (Boolean data types). There are two ways to address an
array. The following examples apply to holding registers:
4xxxx [rows] [cols]
4xxxx [cols] with assumed row count of one.
For Word, Short, and BCD arrays; the base address + (rows * cols) cannot exceed 65536. For Float, DWord,
Long, and Long BCD arrays; the base address + (rows * cols * 2) cannot exceed 65535. For all arrays, the
total number of registers being requested cannot exceed the holding register block size that was specified
for this device.
Roxar Addressing
The default data types are shown in bold.
www. ptc.com
Modbus TCP/IP Ethernet Driver 50
St at ist ics It em s
Statistical items use data collected through additional diagnostics information, which is not collected by
default. To use statistical items, Communication Diagnostics must be enabled. To enable Communication
Diagnostics, right-click on the channel in the project view and click Properties | Enable Diagnostics. Altern-
atively, double-click on the channel and select Enable Diagnostics.
N ote: Statistics at the channel level are the sum of those same items at the device level.
www. ptc.com
51 M od b u s TCP/IP Eth ern et Driver
* The _RespBadChecksum statistic is not implemented; packet checksums are handled by the TCP protocol.
Statistical items are not updated in simulation mode (see device general properties).
www. ptc.com
Modbus TCP/IP Ethernet Driver 52
* The _RespBadChecksum statistic is not implemented; packet checksums are handled by the TCP protocol.
N ote: Statistical items are not updated in simulation mode (see device general properties).
www. ptc.com
53 M od b u s TCP/IP Eth ern et Driver
Possible Cause:
The driver was not able to create a listen socket for unsolicited communications.
Possible Solution:
Verify that the port defined at the channel level is not being used by another application on the system.
Note:
For this driver, the terms Modbus server and unsolicited are used interchangeably.
Possible Cause:
1. A device with the specified IP address attempted to send a mailbox message to the server. The mes-
sage did not pass validation because there is no device with that IP configured in the Mailbox Project.
2. A device with the specified IP address attempted to send a mailbox message to the server. The mes-
sage did not pass validation because, although a device is configured, there are no clients requesting
data from it.
Possible Solution:
For the server to accept mailbox messages, the specified device IP must be configured in the project. At
least one data item from the device must be requested by a client.
www. ptc.com
Modbus TCP/IP Ethernet Driver 54
Possible Cause:
An unsupported request was received from the specified device IP. The format of the request was invalid
and not within Modbus specification.
Possible Solution:
Verify that the devices configured to send Mailbox data are sending valid requests.
Possible Cause:
1. A device with the specified IP address attempted to send a mailbox message to the server. The mes-
sage did not pass validation because there is no device with that IP configured in the Mailbox Project.
2. A device with the specified IP address attempted to send a mailbox message to the server. The mes-
sage did not pass validation because, although a device is configured, there are no clients requesting
data from it.
Possible Solution:
For the server to accept mailbox messages, the specified device IP must be configured in the project. At
least one data item from the device must be requested by a client.
Possible Cause:
The server was unable to establish a TCP/IP socket connection to the specified device, but will continue to
attempt connection.
Possible Solution:
1. Verify that the device is online.
2. Verify that the device IP is within the subnet of the IP to which the server is bound. Verify that a valid
gateway is available that allows a connection to the other network.
www. ptc.com
55 M od b u s TCP/IP Eth ern et Driver
Possible Cause:
An array of addresses was defined that spans past the end of the address space.
Possible Solution:
Verify the size of the device's memory space and redefine the array length accordingly.
Possible Cause:
The driver attempted to read a location in a PLC that does not exist, perhaps out of range. For example, in a
PLC that only has holding registers 40001 to 41400, requesting address 41405 would generate this error.
Once this error is generated, the driver does not request the specified block of data from the PLC again. Any
other addresses being requested from this same block are considered invalid.
Possible Solution:
Update the client application to request addresses within the range of the device.
See Also:
Error Handling
Possible Cause:
The device is configured to use a DNS host name rather than an IP address. The host name cannot be
resolved by the server to an IP address.
Possible Solution:
Verify that the device is online and registered with the domain.
Specified out put coil block size exceeds m axim um block size. | Block size
specified = <num ber> (coils), M axim um block size = <num ber> (coils).
Error Type:
Error
Specified input coil block size exceeds m axim um block size. | Block size
specified = <num ber> (coils), M axim um block size = <num ber> (coils).
Error Type:
Error
www. ptc.com
Modbus TCP/IP Ethernet Driver 56
Specified int ernal regist er block size exceeds m axim um block size. | Block
size specified = <num ber> (regist ers), M axim um block size = <num ber>
(regist ers).
Error Type:
Error
Specified holding regist er block size exceeds m axim um block size. | Block
size specified = <num ber> (regist ers), M axim um block size = <num ber>
(regist ers).
Error Type:
Error
Possible Cause:
The device returned an exception code.
Possible Solution:
Consult the exception codes documentation.
See Also:
Modbus Exception Codes
Possible Cause:
The device returned an exception code.
Possible Solution:
Consult the exception codes documentation.
See Also:
Modbus Exception Codes
Bad block lengt h received. | Block range = <st art > t o <end>.
Error Type:
Warning
Possible Cause:
www. ptc.com
57 M od b u s TCP/IP Eth ern et Driver
The driver attempted to read a block of memory in the PLC. The PLC responded without an error, but did not
provide the driver with the requested block size of data.
Possible Solution:
Ensure that the range of memory exists for the PLC.
Possible Cause:
The driver could not allocate memory required to process variable import file.
Possible Solution:
Shut down all unnecessary applications and retry.
Possible Cause:
The variable import file could not be read.
Possible Solution:
Regenerate the variable import file.
Error parsing record in im port file. | Record num ber = <num ber>, Field =
<field>.
Error Type:
Warning
Possible Cause:
The specified field in the variable import file could not be parsed because it is longer than expected or
invalid.
Possible Solution:
Edit the variable import file to change the offending field if possible.
Descript ion t runcat ed for record in im port file. | Record num ber = <num -
ber>.
Error Type:
Warning
Possible Cause:
The tag description given in specified record is too long.
www. ptc.com
Modbus TCP/IP Ethernet Driver 58
Possible Solution:
The driver truncates descriptions as needed. To prevent this error, edit the variable import file to shorten
the description.
Im port ed t ag nam e is invalid and has been changed. | Tag nam e = '<t ag>',
Changed t ag nam e = '<t ag>'.
Error Type:
Warning
Possible Cause:
The tag name encountered in the variable import file contained invalid characters.
Possible Solution:
The driver constructs valid names based on the variable import file. To prevent this error and to maintain
name consistency, change the name of the exported variable.
A t ag could not be im port ed because t he dat a t ype is not support ed. | Tag
nam e = '<t ag>', Unsupport ed dat a t ype = '<t ype>'.
Error Type:
Warning
Possible Cause:
The data type specified in the variable import file is not one of the types supported by this driver.
Possible Solution:
Change the data type specified in variable import file to one of the supported types. If the variable is for a
structure, manually edit the file to define each tag required for the structure or manually configure the
required tags in the server.
See Also:
Exporting Variables from Concept
Possible Cause:
The device returned an exception code.
Possible Solution:
Consult the exception codes documentation.
See Also:
Modbus Exception Codes
www. ptc.com
59 M od b u s TCP/IP Eth ern et Driver
A client applicat ion has changed t he CEG ext ension via syst em t ag _CEGEx-
t ension. | Ext ension = '<ext ension>'.
Error Type:
Informational
Possible Cause:
A client application connected to the server changed the CEG extension on the specified device to 0 for Mod-
bus or 1 for CEG.
Possible Solution:
This device property applies only to CEG model devices. Changes do not affect other models. To restrict the
client application from changing this property, disable the client's ability to write to system-level tags
through the OPC DA settings.
St art ing unsolicit ed com m unicat ion. | Prot ocol = '<nam e>', Port = <num -
ber>.
Error Type:
Informational
All channels are subscribed t o a virt ual net work or all devices are list en-
ing t o rem ot e addresses, st opping unsolicit ed com m unicat ion.
Error Type:
Informational
www. ptc.com
Modbus TCP/IP Ethernet Driver 60
Channel is in a virt ual net work, all devices revert ed t o use one socket per
device.
Error Type:
Informational
Cannot change device ID from M odbus client m ode t o server m ode wit h a
client connect ed.
Error Type:
Informational
Cannot change device ID from M odbus server m ode t o client m ode wit h a
client connect ed.
Error Type:
Informational
M odbus server m ode not allowed when t he channel is in a virt ual net -
work. The device ID cannot cont ain a loop-back or local IP address.
Error Type:
Informational
M ailbox m odel not allowed when t he channel is in a virt ual net work.
Error Type:
Informational
www. ptc.com
61 M od b u s TCP/IP Eth ern et Driver
www. ptc.com
Modbus TCP/IP Ethernet Driver 62
{
"common.ALLTYPES_NAME": "MyChannel",
"common.ALLTYPES_DESCRIPTION": "",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Modbus TCP/IP Ethernet",
"servermain.CHANNEL_DIAGNOSTICS_CAPTURE": false,
"servermain.CHANNEL_UNIQUE_ID": 721923342,
"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,
"servermain.CHANNEL_COMMUNICATIONS_SERIALIZATION_VIRTUAL_NETWORK": 0,
"servermain.CHANNEL_COMMUNICATIONS_SERIALIZATION_TRANSACTIONS_PER_CYCLE": 1,
"servermain.CHANNEL_COMMUNICATIONS_SERIALIZATION_NETWORK_MODE": 0,
"modbus_ethernet.CHANNEL_USE_ONE_OR_MORE_SOCKETS_PER_DEVICE": 1,
"modbus_ethernet.CHANNEL_MAXIMUM_SOCKETS_PER_DEVICE": 1
}
{
"common.ALLTYPES_NAME": "MyDevice",
"common.ALLTYPES_DESCRIPTION": "",
"servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "Modbus TCP/IP Ethernet",
"servermain.DEVICE_MODEL": 0,
"servermain.DEVICE_UNIQUE_ID": 70949968,
"servermain.DEVICE_CHANNEL_ASSIGNMENT": "MyChannel",
"servermain.DEVICE_ID_FORMAT": 0,
"servermain.DEVICE_ID_STRING": "<0.0.0.0>.0",
"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": 1000,
"servermain.DEVICE_RETRY_ATTEMPTS": 3,
"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,
"modbus_ethernet.DEVICE_VARIABLE_IMPORT_FILE": "normal.txt",
"modbus_ethernet.DEVICE_VARIABLE_IMPORT_INCLUDE_DESCRIPTIONS": 1,
"modbus_ethernet.DEVICE_DEACTIVATE_TAGS_ON_ILLEGAL_ADDRESS": 1,
www. ptc.com
63 M od b u s TCP/IP Eth ern et Driver
"modbus_ethernet.DEVICE_SUB_MODEL": 1,
"modbus_ethernet.DEVICE_ETHERNET_PORT_NUMBER": 502,
"modbus_ethernet.DEVICE_ETHERNET_IP_PROTOCOL": 1,
"modbus_ethernet.DEVICE_ETHERNET_CLOSE_TCP_SOCKET_ON_TIMEOUT": true,
"modbus_ethernet.DEVICE_ZERO_BASED_ADDRESSING": true,
"modbus_ethernet.DEVICE_ZERO_BASED_BIT_ADDRESSING": true,
"modbus_ethernet.DEVICE_HOLDING_REGISTER_BIT_MASK_WRITES": true,
"modbus_ethernet.DEVICE_MODBUS_FUNCTION_06": true,
"modbus_ethernet.DEVICE_MODBUS_FUNCTION_05": true,
"modbus_ethernet.DEVICE_MODBUS_BYTE_ORDER": true,
"modbus_ethernet.DEVICE_FIRST_WORD_LOW": true,
"modbus_ethernet.DEVICE_FIRST_DWORD_LOW": true,
"modbus_ethernet.DEVICE_MODICON_BIT_ORDER": false,
"modbus_ethernet.DEVICE_TREAT_LONGS_AS_DOUBLE_PRECISION_UNSIGNED_DECIMAL": false,
"modbus_ethernet.DEVICE_OUTPUT_COILS": 32,
"modbus_ethernet.DEVICE_INPUT_COILS": 32,
"modbus_ethernet.DEVICE_INTERNAL_REGISTERS": 32,
"modbus_ethernet.DEVICE_HOLDING_REGISTERS": 32,
"modbus_ethernet.DEVICE_PERFORM_BLOCK_READ_ON_STRINGS": 0
}
N ote: The servermain.DEVICE_MODEL parameter defaults to the generic Modbus model. If this is not
desired, ensure this parameter is defined correctly.
{
"common.ALLTYPES_NAME": "MyTag",
"common.ALLTYPES_DESCRIPTION": "",
"servermain.TAG_ADDRESS": "400001",
"servermain.TAG_DATA_TYPE": 5,
"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
Modbus TCP/IP Ethernet Driver 64
Index
A client application has changed the CEG extension via system tag _CEGExtension. | Extension = '<exten-
sion>'. 59
A tag could not be imported because the data type is not supported. | Tag name = '<tag>', Unsupported
data type = '<type>'. 58
Accumulation 45
Address 31
Address Descriptions 34
All channels are subscribed to a virtual network or all devices are listening to remote addresses, stopping
unsolicited communication. 59
Allow Sub Groups 19
Applicom 30
Applicom Addressing 35
Array Support 35-38, 43-44, 49
Arrays 46
Attempts Before Timeout 16
Auto-Demotion 16
Automatic Tag Database Generation 31
www. ptc.com
65 M od b u s TCP/IP Eth ern et Driver
Cannot change device ID from Modbus client mode to server mode with a client connected. 60
Cannot change device ID from Modbus server mode to client mode with a client connected. 60
CEG 30
CEG Addressing 45
CEG Extension 23
CEGExtension 34
Channel-Level Settings 11
Channel Assignment 13
Channel is in a virtual network, all devices reverted to use one socket per device. 60
Channel Properties — Advanced 10
Channel Properties — Communication Serialization 11
Channel Properties — Ethernet Communications 9
Channel Properties — General 8
Channel Properties — Write Optimizations 9
Close Socket on Timeout 22
Comment 31
Communications Timeout 20
Communications Timeouts 15
Connect Timeout 15
Create 19
Created memory for Modbus server device. | Modbus server device ID = <device>. 59
CSV 31
Custom tags 31
Data Access 22
Data Collection 14
Data Encoding 23
Data Types Description 33
Deactivate Tags on Illegal Address 21
Decimal Addressing 45
Delete 18
Demote on Failure 16
Demotion Period 17
Description 13
www. ptc.com
Modbus TCP/IP Ethernet Driver 66
Enumerations 29
Error Handling 21
Error opening file for tag database import. | OS error = '<error>'. 54
Error parsing record in import file. | Record number = <number>, Field = <field>. 57
Ethernet 12, 21
Ethernet Manager started. 59
Ethernet Manager stopped. 59
Ethernet Settings 9
Ethernet to Modbus Plus Bridge 6
Event Log Messages 53
www. ptc.com
67 M od b u s TCP/IP Eth ern et Driver
Floats 45, 49
Fluenta 6
Fluenta Addressing 45
Fluenta FGM 30
Force Multiple Coils 35
Force Single Coil 35
Function Codes Description 35
General 13
Generate 18
Generic Modbus Addressing 35
Global Settings 11
Help Contents 5
Hexadecimal Addressing 45
Holding Register Bit Mask 22
Holding Registers 25, 37, 41, 43, 47
HoldingRegisterBlockSize 34
ID 14
Identification 8
Imported tag name is invalid and has been changed. | Tag name = '<tag>', Changed tag name =
'<tag>'. 58
Importing from Custom Applications 31
Importing tag database. | Source file = '<filename>'. 59
Include Descriptions 19
Initial Updates from Cache 15
Input Coils 25, 36, 39, 47
InputCoilBlockSize 34
Instromet 6, 30
Instromet Addressing 45
INT 31
www. ptc.com
Modbus TCP/IP Ethernet Driver 68
Inter-Device Delay 10
Internal Registers 25, 36, 40, 47
Internal Tags 34
InternalRegisterBlockSize 34
IP Protocol 13, 21
LBCD 33
Load Balanced 11
Long 33
Long Integers 45
Mailbox 6, 30
Mailbox Addressing 45
Mailbox Client Privileges 23
Mailbox Mode 49
Mailbox model not allowed when the channel is in a virtual network. 60
Masked Write Register 35
Max Sockets per Device 12
Modbus Addressing 46
Modbus Byte Order 23
Modbus Client 6
Modbus Client & Server Considerations 20
Modbus Exception Codes 61
Modbus Function 05 23
Modbus Function 06 22
Modbus Mailbox 46
Modbus server mode not allowed when the channel is in a virtual network. The device ID cannot contain a
loop-back or local IP address. 60
Modbus Unsolicited 7
Model 14
Models 6
Modicon Bit Order 23
www. ptc.com
69 M od b u s TCP/IP Eth ern et Driver
Name 13
Network 1 - Network 500 11
Network Adapter 9
Network Mode 11
Non-Normalized Float Handling 10
On Device Startup 18
On Duplicate Tag 18
On Property Change 18
OPC Quality Bad 19
Optimization Method 9
Optimizing Modbus Ethernet Communications 32
Output 45
Output Coils 25, 35, 39, 42, 47
OutputCoilBlockSize 34
Overview 6
Overwrite 18
Parent Group 18
Port 13, 21, 34
Preset Multiple Registers 35
Preset Single Register 35
Priority 11
www. ptc.com
Modbus TCP/IP Ethernet Driver 70
Redundancy 26
Replace with Zero 10
Request Timeout 16
Respect Tag-Specified Scan Rate 15
Roxar 7
Roxar Addressing 49
Roxar RFM 30
Scan Mode 15
Service 45
Set Value 31
Settings 22
Setup 7
Short 33
Short Integers 45, 49
Simulated 14
Six-Digit Addressing 46
Socket Usage 12
Socket Utilization 12
Specified holding register block size exceeds maximum block size. | Block size specified = <number>
(registers), Maximum block size = <number> (registers). 56
Specified input coil block size exceeds maximum block size. | Block size specified = <number> (coils),
Maximum block size = <number> (coils). 55
Specified internal register block size exceeds maximum block size. | Block size specified = <number>
(registers), Maximum block size = <number> (registers). 56
Specified output coil block size exceeds maximum block size. | Block size specified = <number> (coils),
Maximum block size = <number> (coils). 55
Starting unsolicited communication. | Protocol = '<name>', Port = <number>. 59
Statistics Items 50
String 33
STRING 31
String Support 38, 44, 49
Supported 6
System 45
System Tags 34
www. ptc.com
71 M od b u s TCP/IP Eth ern et Driver
Tag Counts 8
Tag Generation 17
Tag import failed due to low memory resources. 57
TIME 31
Timeouts to Demote 17
Timing 15
Transactions per Cycle 11
Treat Longs as Decimals 24
TSX Premium 42
TSX Quantum 39
UDINT 31
UINT 31
Unable to create a socket connection. 54
Unable to write to address, device responded with exception. | Address = '<address>', Exception =
<code>. 58
Unmodified 10
Unsolicited 19
Unsolicited mailbox access for undefined device. Closing socket. | IP address = '<address>'. 53
Unsolicited mailbox memory allocation error. | IP address = '<address>'. 54
Unsolicited mailbox unsupported request received. | IP address = '<address>'. 53
User 45
Variable 31
Variable Import Settings 19
Virtual Network 11
Word 33
WORD 31
Write-Only Access 48
www. ptc.com
Modbus TCP/IP Ethernet Driver 72
Zero-Based Addressing 22
Zero-Based Bit Addressing 22
www. ptc.com