TOP Server Modbus TCP Setup Summary

TOP Server Modbus TCP Setup Summary
TOP Server 5.19
Configuration Guide:
Modbus TCP/IP Device
Page 2 of 21
Table of Contents
Channel Setup
Device Setup
Further Information
Page 3 of 21
This document is intended to provide an easy to use reference guide on configuring a connection to a
Modbus TCP/IP device using the TOP Server. It is not intended to be comprehensive, and the help file
should be referenced for any additional information – if needed. This document will describe the channel
and device setup, give a summary of the settings that will be encountered – and when it is appropriate to
change them from the default values.
Channel Setup
1. The first step in configuring a connection to a Modbus TCP/IP device from TOP Server is to create
a Channel. A channel represents a communication medium from the PC running TOP server to the
device. In the case of the Modbus TCP/IP driver, the Channel will represent the socket connection
over which communications will occur.
2. The Channel name is user configurable, and will be how the Channel appears in the TOP Server
tree view – i.e. how clients will reference devices configured under this channel:
3. Click next and choose the Modbus TCP/IP Ethernet Driver from the Driver dropdown list. This
selection determines which protocol will be used to communicate over the channel. The “Enable
Diagnostics” checkbox has no impact on communications so can be left unchecked, but statistic
tags will be inactive until diagnostics are enabled.
Page 4 of 21
4. Click next and choose whether or not this channel should be included in a Virtual Network, and if
‘yes’ which Virtual network the channel should be assigned to.
a. The Transactions per cycle specifies the number of single read/write transactions that can
occur on the channel. When a channel is given the opportunity to communicate, this
number of transactions is attempted.
b. The Network Mode is used to control how channel communication is delegated:
i. Load Balanced mode – Each channel is given the opportunity to communicate in
turn, one at a time.
ii. Priority mode – Channels are given the opportunity to communicate according to
transaction priority:
1. Channels with pending writes have the highest priority
2. Channels with pending explicit reads (through internal plug-ins or external
client interfaces) are prioritized based on the read’s priority.
3. Scanned reads and other periodic events (driver specific).
Page 5 of 21
5. Click next and choose the appropriate Network Adapter that the channel should use for
communications. This Adapter should be on the same network as the devices TOP Server will be
communicating to. When left at Default the Operating Systems default adapter will be used.
Page 6 of 21
6. Click next to review the Write optimization settings for this Channel. These will generally be left at
the default value, but can be altered as needed.
a. Write all values for all tags will queue all write requests and issue them in the order they
were received.
b. Write only latest value for non-Boolean tags will not queue all writes, but only write the
last value that was received from the client application for any non-Boolean tags.
Write only latest value for all tags will not queue any writes, and simply write the last
value that was received from the client application for any points.
d. The Duty Cycle determines how many writes will be processed per 1 read request. Since
writes are treated with higher priority this can be used to improve communication rates in
write-heavy channels
Page 7 of 21
7. Click next to review how the driver will handle non-normalized floating point values. This can
generally be left at the default value, unless non-normalized values are expected (e.g. Non-ANumber or infinity)
Page 8 of 21
8. Specify the Socket sharing behavior for devices under this Ethernet channel.
a. Share a single socket across all devices on this channel – The channel will maintain a
single socket that it will open and close repeatedly to connect to devices configured under
this channel.
b. Use one or more sockets per device on this channel – The channel will maintain
multiple sockets for communications to any devices under this channel. This is the
recommended settings for systems where multiple devices have to be configured under a
single channel.
The unsolicited port number will specify which port TOP Server will accept incoming Unsolicited
messages on, if the device is set to send them.
Page 9 of 21
9. The last dialog will summarize the selected Channel settings. If all settings are correct, selecting
Finish will finalize the configuration and create the Channel.
Device Setup
1. Click to add a device to the newly configured Channel
Page 10 of 21
2. The Device name is user configurable, and will determine how the device appears in the TOP
Server Tree view, and how client applications access the device.
Page 11 of 21
3. Select the appropriate Device model. This example will use a generic Modbus Device.
4. Specify the Device ID – this will be the IP address on the network.
Page 12 of 21
5. Specify the devices Scan Mode settings for Subscription based clients. In systems where
bandwidth utilization is not a concern, this setting should be left at the default. Other options
a. Respect client specified scan rate – Will respect the requested scan rate from client
applications to determine how often to scan the device
b. Request data no faster than… - Will set a ceiling; data will be requested no faster than
the specified time value.
Request all data at… - All data will be requested at the specified timing interval
d. Do not scan, demand poll only – there will be no automatic scanning done of the device,
unless a plug-in or client application manually triggers the poll (via the _DemandPoll
system tag)
e. Respect tag specified scan rate – respects the scan rate specified at the tag level
Page 13 of 21
6. The timing settings should be set appropriately based on the type of connection, and the level of
congestion on the network. These can generally be left at the default, and increased/decreased as
Page 14 of 21
7. The Auto-Demotion settings will determine whether unresponsive devices will be taken out of the
polling cycle for a specified period of time. In situations where multiple devices are configured under
a single channel it is recommended to enable auto-demotion, and discard write requests on devices
that are written to frequently. Write requests will overwrite the auto-demotion period, and attempt a
connection immediately. Since devices under a channel are treated sequentially, this will prevent a
downed device from repeatedly slowing down communications for other devices on the channel.
Page 15 of 21
8. Click next to specify the Database Creation Settings. The driver can automatically generate a tag
database from a CSV file, Concept, or ProWORX. Here you can specify if and when the tag
database will be created, how previously generated tags will be handled, and if you would like the
tags to be included in a specified tag group. This parameter keeps automatically generated tags
from mixing with tags that have been entered manually.
Page 16 of 21
9. Click next to specify the port number for the device, as well as the transport protocol (TCP or UDP)
that will be used for communications. Port 502 is the default port for Modbus TCP/IP
10. Specify the Data Access Settings as they are appropriate for the Modbus Device. These may need
to be changed based on the protocol implementation for the specific controller.
a. Use zero based addressing – Specifies whether the devices address space is zero based
or one based (i.e is the first address in the memory map 0 or 1). Using Zero-based
addressing will reference the address with an offset of 1, whereas One-based addressing
will reference the first register with an offset of 0.
b. Use zero based bit addressing within registers – This setting will specify whether bits
within registers should be addressed 0-15 (Checked) or 1-16 (unchecked). This setting will
not affect what is sent to the device, only which bit the TOP Server will reference for the
specified register.
Page 17 of 21
Use holding register bit mask writes – Will use Function code 22 to change a single bit
inside a holding register. If function code 22 is not supported the server will use a
Read/Change/Write sequence to alter the value.
d. Use Modbus function 06 for single register writes – Will use Modbus Function code 06
when writing to single registers. Function code 16 (Write multiple registers) will be used if
this setting is unchecked.
e. Use Modbus function 05 for single coil writes – Will use Modbus function code 05 when
writing to single coils. Function code 15 (Write multiple coils) will be used if this setting is
Page 18 of 21
11. Specify the Data Encoding settings as appropriate for the device.
a. Use default Modbus byte order – When unchecked the TOP Server driver will expect
data to be sent using the Intel Byte order (Low order byte last), rather than the default
Modbus Byte order (High order byte last).
b. First word low in 32 bit data types – Specifies whether the device will send the low order
word first or second when dealing with 32 bit data types, as these will be stored in two
Modbus Registers.
First Dword low in 64 bit data types – Specifies whether the device will send the low
order Dword first or second when dealing with 64 bit data types. The word order within
each Dword is determined based on the previous (32 bit data type) setting
d. Use Modicon bit order (bit 0 is the MSB) – Will change the expected bit order to match
the Modsoft programming software. When checked the writing to bit 0 in TOP Server will
alter bit 15 in the device.
e. Treat Longs as Double Precision Unsigned Decimal – When enabled the driver will
encode/decode Longs with a value ranging from 0 to 99999999. Where each word has a
value between 0 and 9999.
Page 19 of 21
12. Specify the block sizes that should be used to read contiguous registers from the device. These
indicate the maximum offsets for reading a range of addresses in a single request, rather than
mutliple smaller ones. In Telemetry situations these should be increased to reduce the number of
a. Coils are limited from 8-2000 in multiples of 8
b. Registers are limited from 1-120
Page 20 of 21
13. Specify the import file to be used if Automtically generating the Tag Database. If registers will be
manually addressed or dynamically referenced this can be left at the default setting.
14. Specify how TOP Server should handle situations where the device indicates we are referencing an
illegal address. (Error code 2 or 3). When this setting is checked, TOP Server will deactivate the
erroneous tags and not waste time trying to poll them.
Page 21 of 21
15. After reviewing the device settings in the summary, clicking Finish will create the device.
16. Tags can now be configured statically in the server, or dynamically from the client application. For
help with the proper addressing syntax the appropriate driver help file section should be referenced.
Further Information
This guide is intended to server as a quick, step-by-step, guide on configuring a Modbus TCP/IP Ethernet
device in TOP Server v5.x. It is not intended to be a comprehensive ‘how-to’ regarding the Modbus TCP/IP
Ethernet driver, and the TOP Server help file should be referenced for further information.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF