0% found this document useful (0 votes)
38 views86 pages

Modbus TCP Quickstart

The document is a Quick Start guide for configuring Modbus/TCP using Comtrol's DeviceMaster products. It includes installation steps, configuration procedures for Modbus/RTU and Modbus/ASCII devices, and troubleshooting support. Additionally, it provides links to software and documentation for managing and configuring the DeviceMaster devices effectively.

Uploaded by

OZAN GOKCEN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views86 pages

Modbus TCP Quickstart

The document is a Quick Start guide for configuring Modbus/TCP using Comtrol's DeviceMaster products. It includes installation steps, configuration procedures for Modbus/RTU and Modbus/ASCII devices, and troubleshooting support. Additionally, it provides links to software and documentation for managing and configuring the DeviceMaster devices effectively.

Uploaded by

OZAN GOKCEN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

Modbus®/TCP

Interface Configuration Quick Start


Trademark Notices
Comtrol, DeviceMaster, and PortVision are registered trademarks of Comtrol Corporation.
Concept is a trademark of Schneider Electric.
Modbus is a registered trademark of Schneider Electric.
PLC is a registered trademark of Allen-Bradley Company, Inc.
Ethernet is a registered trademark of Digital Equipment Corporation, Intel, and Xerox Corporation.
SIMATIC and Step7 are registered trademarks of Siemens AG.
Portions of SocketServer are copyrighted by GoAhead Software, Inc. Copyright © 2001. GoAhead Software,
Inc. All Rights Reserved.
Windows is a registered trademark of Microsoft Corporation in the United States and/or other countries.
Other product names mentioned herein may be trademarks and/or registered trademarks of their respective
owners.
Eighth Edition, January 31, 2019
Copyright © 2005-2019. Comtrol Corporation. 
All Rights Reserved.
Comtrol Corporation makes no representations or warranties with regard to the contents of this document or
to the suitability of the Comtrol product for any particular purpose. Specifications subject to change without
notice. Some software or features may not be available at the time of publication. Contact your reseller for
current product information.

Document Number: 2000477 Rev H


Table of Contents

Overview...................................................................................................................................5
Comtrol Modbus Solutions .......................................................................................................................... 5
Modbus/TCP Installation Overview .......................................................................................................... 6
Locating the Latest Software and Documentation ............................................................................... 7

Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters............................9


Prerequisites................................................................................................................................................... 9
Configuring Modbus/RTU Slaves............................................................................................................. 10
Configuring Modbus/ASCII Slaves .......................................................................................................... 12
Configuring Modbus/RTU Master............................................................................................................ 14
Configuring Modbus/ASCII Master ......................................................................................................... 16

Configuring Read-Only Raw/ASCII Devices ..................................................................19


Prerequisites................................................................................................................................................. 19
Read-Only Raw/ASCII Serial Devices ..................................................................................................... 19
Modbus Raw Data Addressing ................................................................................................................. 28
Received Message Format ........................................................................................................................ 28
Read-Only Raw/ASCII Ethernet Devices ............................................................................................... 29
Modbus Addressing .................................................................................................................................. 38
Received Message Format ........................................................................................................................ 38

Configuring Read/Write Raw/ASCII Devices.................................................................39


Prerequisites................................................................................................................................................. 39
Read/Write Raw/ASCII Serial Devices.................................................................................................... 39
Modbus Addressing .................................................................................................................................. 52
Receive and Transmit Message Formats ................................................................................................ 52
Read/Write Raw/ASCII Ethernet Devices .............................................................................................. 54
Modbus Addressing .................................................................................................................................. 66
Receive and Transmit Message Formats ................................................................................................ 67

Filtering/Data Extraction Configuration .......................................................................69


PLC Filtering/Data Extraction ................................................................................................................. 71
Application Filtering/Data Extraction ................................................................................................... 74

Application Socket Configuration....................................................................................77

Alias Device ID Functionality ...........................................................................................81

Troubleshooting and Technical Support........................................................................83


Troubleshooting Checklist ....................................................................................................................... 83
General Troubleshooting........................................................................................................................... 84
Daisy-Chaining DeviceMaster 2E/4-Port Units..................................................................................... 85
Technical Support ....................................................................................................................................... 86

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Table of Contents - iii


Table of Contents

iv - Table of Contents DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Overview

This Quick Start is intended to help you quickly set-up serial or Ethernet device with DeviceMaster MOD or
DeviceMaster UP product installations.
Note: The DeviceMaster MOD or UP is simply referred to as the DeviceMaster in this document.
You can use this document to locate software and installation documentation for the DeviceMaster to quickly
configure:
• Interfaces to serial Modbus/RTU and Modbus/ASCII slaves and masters
• Read-only devices such as barcode scanners and some RFID readers
• Read/write devices such as printers and some weigh scales

Comtrol Modbus Solutions

When you order the Modbus part number for your DeviceMaster, Modbus Router is loaded on the
DeviceMaster by default, so you will need to upload the Modbus/TCP firmware. You may want to review our
other Modbus solutions to make sure that the feature rich Modbus/TCP application is what you want to use.
Optionally, Modbus Router or Modbus Server may be more effective for your particular environment.
The Comtrol web site provides information about the differences between the three Modbus solutions:
• MODBUS/TCP
• MODBUS SERVER
• MODBUS ROUTER
If Modbus Server or Modbus Router is a better solution, you can DOWNLOAD the appropriate firmware and
corresponding documentation.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Overview - 5


Modbus/TCP Installation Overview

Modbus/TCP Installation Overview

The DeviceMaster follows these installation steps.


1. Connect the DeviceMaster to the network using the DeviceMaster MOD | DeviceMaster UP Hardware
Installation Guide.
2. Download PortVision DX and install the latest version.
3. Configure the DeviceMaster network settings using PortVision DX.
4. Depending on the DeviceMaster model, do the following:
• Models without Modbus/TCP loaded, which includes all DeviceMaster MOD or UP models unless you
special-ordered Modbus/TCP to be installed - you must download and install the software assembly
(.msi), which contains the Modbus/TCP firmware and supporting files.
• Models with Modbus/TCP loaded on the DeviceMaster, you should check to see if a later version of
Modbus/TCP is available for installation. Check the Modbus/TCP version in PortVision DX against the
web site to see if a later version is available. Typically, you should download and install the latest .msi
file and upload the latest version, which may include updates or enhancements.
Note: Models that have Modbus/TCP loaded on the DeviceMaster at the factory are identified in
PortVision DX and the DeviceMaster MOD or UP is labeled accordingly.
5. If necessary, download and install the Modbus/TCP firmware into the DeviceMaster using PortVision DX.
6. Verify any Ethernet TCP/IP devices are connected to the same subnet as the DeviceMaster.
7. Configure serial or Ethernet TCP/IP characteristics using the DeviceMaster embedded web page (Server
Configuration).
• Modbus/RTU serial slave devices (Page 10)
• Modbus/ASCII serial slave devices (Page 12)
• Modbus/RTU serial master (Page 14)
• Modbus/ASCII serial master (Page 16)
• Read-only raw/ASCII serial devices (Page 19)
• Read-only raw/ASCII Ethernet devices (Page 29)
• Read/write raw/ASCII serial devices (Page 39)
• Read/write raw/ASCII Ethernet devices (Page 54)
8. Optionally, the DeviceMaster MOD | DeviceMaster UP Modbus/TCP User Guide provides detailed
information about each web page.
9. You may want to reference the Programming Interface chapter in the DeviceMaster MOD | DeviceMaster
UP Modbus/TCP User Guide.
10. Optionally, reference the example PLC programs in the DeviceMaster MOD | DeviceMaster UP Modbus/
TCP User Guide.
11. Connect any serial device or devices using the DeviceMaster MOD | DeviceMaster UP Hardware
Installation Guide.

6 - Overview DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Locating the Latest Software and Documentation

Locating the Latest Software and Documentation

You can use the links in this table to check for updated software or documentation.

Software and Documentation FTP


Use PortVision DX to manage Comtrol Ethernet-attached devices to:

• Scan the network for attached devices


• View networked devices in real-time
• Access product-specific network settings configurations
• Assign IP addresses and network settings to one or multiple
devices
• Upload the latest firmware or Bootloader
PortVision DX • Save and load configuration files
(Windows) • Access DeviceMaster configuration web pages
• Access Telnet/SSH sessions
• Remotely reboot devices
• Download technical documentation
• Enable event logging to assist in monitoring and troubleshooting
• Create shortcuts to quickly access your favorite applications
• Organize devices into folders and create multiple views
• Enter notes about a folder or device
This is the application that may or may not have been loaded on the
DeviceMaster depending on the model that was ordered.
Modbus/TCP Firmware
You may need to use PortVision DX to load this firmware.
This contains hardware installation, configuration information, and
DeviceMaster MOD |
connector information.
DeviceMaster UP Hardware
Installation and Configuration This includes using PortVision DX to configure the IP address and if
Guide
necessary, how to update the firmware.
Modbus/TCP Interface
Configuration Quick Start This document with web interface configuration procedures.

The User Guide contains detailed information about the Modbus/TCP


(application) firmware, which includes additional information about
the web configuration interface for Modbus/TCP.
Modbus/TCP User Guide
It also discusses the example PLC programs that were installed on
your system and provides a Programming Interface chapter.
This Guide discusses the data extraction and filtering processes in the
DeviceMaster are designed to off load as much work as possible from
DeviceMaster Filtering and the PLC and/or application and provide a very simple and easy to use
Data Extraction Reference interface for standard RFID and barcode data.
Guide
This functionality and interface is designed to save dozens, possibly
hundreds of lines of ladder logic in a typical PLC program.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Overview - 7


Locating the Latest Software and Documentation

8 - Overview DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Configuring Modbus/RTU and Modbus/ASCII Slaves
and Masters

For pure Modbus devices, the DeviceMaster supports:


• Modbus/RTU serial slaves
• Modbus/ASCII serial slaves
• Modbus/RTU serial masters
• Modbus/ASCII serial masters
• Modbus/TCP masters

Modbus Master(s) to Modbus Slave(s)


Note: All masters can communicate to all slaves.

Prerequisites

Before you can configure the serial ports for these modes, make sure that you have done the following:
• Installed the hardware
• Configured the DeviceMaster IP address using PortVision DX or the web interface
• If necessary, uploaded the latest Modbus/TCP firmware using PortVision DX or the web interface
Note: The DeviceMaster provides an Modbus/TCP interface, which may or may not have the Modbus/TCP
firmware loaded at the factory (depending on the model you purchased). Models that have Modbus/
TCP loaded on the DeviceMaster are identified in PortVision DX and the DeviceMaster is labeled
accordingly.
If you need to perform any of these procedures or locate the latest files, see the Overview on Page 5.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters - 9
Configuring Modbus/RTU Slaves

Configuring Modbus/RTU Slaves

Use the following procedure to configure a serial interface to Modbus/RTU slave(s).


1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial menu, which opens to the Serial Port Overview page.

10 - Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Configuring Modbus/RTU Slaves

3. Click Port N for the port you want to configure, where N is the port number, which opens the
corresponding Port Serial Configuration page.

4. If desired, enter a Port


Name.
5. Configure the serial
characteristics for your
device and leave the
Discard Rx Packets With
Errors option enabled.
6. Under the General
Protocol Settings section,
configure the serial port
for Modbus/RTU-to-Slaves
operation.
a. Set the Serial Port
Protocol option to
Modbus/RTU-to-Slaves.
b. Under the Modbus
Slave and Raw/ASCII
Data Device Settings
section, set the Device
Response Timeout value
or leave at the default.
c. 2/4-port models only:
Under the Modbus
Slave Settings section, enable the Lost Device Search Enable option if you want the DeviceMaster to
search for a lost Modbus slave device on other Modbus/RTU and/or Modbus/ASCII slave ports that
also have this option enabled.
7. Click the Save button.
Note: If necessary, see Filtering/Data Extraction Configuration on Page 69 or Application Socket
Configuration on Page 77 for additional configuration procedures.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters - 11
Configuring Modbus/ASCII Slaves

Configuring Modbus/ASCII Slaves

Use the following procedure to configure a serial interface to Modbus/ASCII slave(s).


1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial menu, which opens to the Serial Port Overview page.

12 - Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Configuring Modbus/ASCII Slaves

3. Click Port N for the port you want to configure, where N is the port number, which opens the
corresponding Port Serial Configuration page.

4. If desired, enter a Port


Name.
5. Configure the serial
characteristics for your
device and leave the
Discard Rx Packets With
Errors option enabled.
6. Under the General
Protocol Settings section,
configure the serial port
for Modbus/ASCII-to-
Slaves operation.
a. Set the Serial Port
Protocol option to
Modbus/ASCII-to-
Slaves.
b. Under the Modbus
Slave and Raw/ASCII
Data Device Settings
section, set the Device
Response Timeout
value or leave at the
default.
c. 2/4-port models only: Under the Modbus Slave Settings section, enable the Lost Device Search Enable
option if you want the DeviceMaster to search for a lost Modbus slave device on other Modbus/RTU
and/or Modbus/ASCII slave ports that also have this option enabled.
7. Click the Save button.
Note: If necessary, see Filtering/Data Extraction Configuration on Page 69 or Application Socket
Configuration on Page 77 for additional configuration procedures.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters - 13
Configuring Modbus/RTU Master

Configuring Modbus/RTU Master

Use the following procedure to configure a serial interface to Modbus/RTU master.


1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial menu, which opens to the Serial Port Overview page.

14 - Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Configuring Modbus/RTU Master

3. Click Port N for the port you want to configure, where N is the port number, which opens the
corresponding Port Serial Configuration page.

4. If desired, enter a Port


Name.
5. Configure the serial
characteristics for your
device and leave the
Discard Rx Packets With
Errors option enabled.
6. Under the General
Protocol Settings section,
set the Serial Port Protocol
option to Modbus/RTU-to-
Master.
7. Click the Save button.
Note: If necessary, see
Filtering/Data
Extraction
Configuration on
Page 69 or
Application Socket
Configuration on
Page 77 for
additional
configuration
procedures.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters - 15
Configuring Modbus/ASCII Master

Configuring Modbus/ASCII Master

Use the following procedure to configure a serial interface to Modbus/ASCII master.


1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial menu, which opens to the Serial Port Overview page.

16 - Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Configuring Modbus/ASCII Master

3. Click Port N for the port you want to configure, where N is the port number, which opens the
corresponding Port Serial Configuration page.
4. If desired, enter a Port Name.
5. Configure the serial characteristics for your device and leave the Discard Rx Packets With Errors option
enabled.
6. Under the General Protocol Settings section, set the Serial Port Protocol option to Modbus/ASCII-to-Master.
7. Click the Save button.

Note: If necessary, see Filtering/Data Extraction Configuration on Page 69 or Application Socket


Configuration on Page 77 for additional configuration procedures.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters - 17
Configuring Modbus/ASCII Master

18 - Configuring Modbus/RTU and Modbus/ASCII Slaves and Masters DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Configuring Read-Only Raw/ASCII Devices

This chapter contains these subsections:


• Prerequisites (below)
• Read-Only Raw/ASCII Serial Devices (below)
• Read-Only Raw/ASCII Ethernet Devices on Page 29

Prerequisites

Before you can configure the ports, make sure that you have done the following:
• Installed the hardware
• Configured the DeviceMaster IP address using PortVision DX or the web interface
• If necessary, uploaded the latest Modbus/TCP firmware using PortVision DX or the web interface
Note: The DeviceMaster provides a Modbus/TCP interface, which may or may not have the Modbus/TCP
firmware loaded at the factory (depending on the model you purchased). Models that have Modbus/
TCP loaded on the DeviceMaster are identified in PortVision DX and the DeviceMaster is labeled
accordingly.
If you need to perform any of these procedures or locate the latest files, see the Overview on Page 5.

Read-Only Raw/ASCII Serial Devices

Read-only raw/ASCII
serial devices use the
Serial menus to:
• Allow connections
between a serial
device, such as a
barcode scanner or
RFID reader, to
PLC(s) and/or
application(s).
• Provide an optional
filtering mechanism
for string, RFID, and
barcode data.
The PLC and application
can both communicate to
the serial device, but they
cannot communicate
directly to each other. Serial Read-Only Device Communications

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 19
Read-Only Raw/ASCII Serial Devices

Use the following procedure to configure read-only raw/ASCII serial devices.


1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial menu, which opens to the Serial Port Overview page.

20 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Serial Devices

3. Click Port N for the port you want to configure, where N is the port number, which opens the Port Serial
Configuration page.
4. If desired, enter a Port Name.
5. Configure the serial characteristics for your device and leave the Discard Rx Packets With Errors option
enabled.
6. Under the General Protocol Settings section, configure the serial port for read-only raw/ASCII device
operation.
a. Set the Serial Port Protocol option to Raw-Data.
b. Under the Modbus Slave and Raw/ASCII Data Device Settings section, set the Device Response
Timeout value or leave at the default.
c. 2/4-port models only: Under the Modbus Slave Settings section, enable the Lost Device Search Enable
option if you want the DeviceMaster to search for a lost Modbus slave device on other Modbus/RTU
and/or Modbus/ASCII slave ports that also have this option enabled.
7. Click the Save button.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 21
Read-Only Raw/ASCII Serial Devices

8. Click the Raw/ASCII Settings sub-menu, which opens the corresponding Port Raw/ASCII Configuration
page for that port.
9. Under the Raw/ASCII Data Control section, leave the Raw/ASCII Data Message Transfer Mode option set
to Data-Stream.
10. Under the Serial Packet Identification section, set the following options accordingly.
a. Set the STX (Start of transmission) Rx Detect option in decimal format.
b. Set the ETX (End of transmission) Rx Detect option in decimal format.
c. Enable the Strip Rx STX/ETX option under the PLC Specific Settings or Application Specific Settings
sections if you do not want the STX and ETX bytes returned to the PLC or application(s).
11. Click the Save button.

Note: Refer to your device's User Manual for the Start and End of Transmission byte(s) settings. You may
also be able to use the Diagnostics | Serial Interface Logs page to determine these settings.

22 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Serial Devices

12. Click the Modbus Settings sub-menu, which opens the Port Modbus Configuration (Raw/ASCII Only) page
for that port.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 23
Read-Only Raw/ASCII Serial Devices

13. Configure the Modbus/TCP and/or Serial Modbus Master Settings for your environment using one of the
following settings:
• Master Receive Transfer mode (recommended) writes data directly into the memory of a Modbus/
TCP slave or serial Modbus slave attached to this gateway. This requires the least amount of PLC
programming, requires the least amount of PLC overhead, and provides minimal latency.

You can use the Master Receive Transfer method only if your PLC can operate as
a Modbus/TCP slave, Modbus/RTU serial slave, or Modbus/ASCII serial slave.

Go to Step 14 on Page 25 to configure Master Receive Transfer mode.


• Slave Receive Transfer mode requires the PLC to poll for received data. This method is provided for
PLC programmers who prefer polling for data or those who have PLCs that can only operate in master
mode.

Note: You can use the Slave Receive Transfer method only if your PLC
can operate as a Modbus/TCP master, Modbus/RTU serial master,
or Modbus/ASCII serial master.

Go to Step 15 on Page 27 to configure Slave Receive Transfer mode.

24 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Serial Devices

14. Master Receive Transfer Mode Only: Under the Serial Modbus Master and Modbus/TCP Interface
Settings section:
a. Set the Rx (To PLC) Transfer Mode option to Master (Write to PLC).
b. Set the Tx (From PLC) Transfer Mode option to either Slave (PLC Writes) or Off.
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. For
writing to a Modbus/TCP slave or Modbus serial slave, this can be a maximum of 1,518 bytes.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Leave the Tx MS Byte First option disabled.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received during the Maximum PLC Update Rate time period, only
the last received data packet will be sent to the PLC.)
h. Leave the Disable Tx Sequence Number Check option disabled.

Under the Modbus/TCP Master Rx/Tx Settings section:


i. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to
that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves,
set the PLC IP Address to that of this
DeviceMaster in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
j. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this DeviceMaster.
k. If necessary, set the Disable Sequence Number/Length Header option if you want to transmit data
without the 4 byte header (sequence number and data length).

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 25
Read-Only Raw/ASCII Serial Devices

Under the Modbus Rx/Mode Only section:


l. Set the PLC Rx Data Address (Base 1) option to the PLC
memory address where you want to place the received
data message. This address is Base 1, which means the
address starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will need
to add one to your address.
m. Set the Maximum PLC Update Rate option to the fastest rate your PLC can reliably receive and process
data. This is typically longer than the scan rate. The default of 40 milliseconds is usually sufficient,
but your system may require a longer time period.
n. Set the Use Maximum Sized Modbus Messages option if you are receiving messages over 196 bytes, your
PLC can receive messages larger than 200 bytes, and you want to decrease latency and network
usage.
o. Click the Save button.

Note: Go to Step 16 on Page 27 to complete configuration.

26 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Serial Devices

15. Slave Receive Transfer Mode Only: Under the Serial Modbus Master and Modbus/TCP Interface
Settings section:
a. Set the Rx (To PLC) Transfer Mode option to Slave (PLC Polls).
b. Set the Tx (From PLC) Transfer Mode option to either Slave (PLC Writes) or Off.
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. This
can be a maximum of 246 bytes in Slave Rx mode.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Leave the Tx MS Byte First option disabled.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received between received data requests, only the last received
data packet will be returned.)
h. Leave the Disable Tx Sequence Number Check option disabled.
i. Click the Save button.

16. Set up the filtering/data extraction settings, see Filtering/Data Extraction Configuration on Page 69.
17. Set up the application socket interface settings, see Application Socket Configuration on Page 77.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 27
Modbus Raw Data Addressing

Modbus Raw Data Addressing


The serial port receive data addresses used for polling:
Serial Port
Raw/ASCII Serial Port 1 Serial Port 2 Serial Port 3 Serial Port 4 Access Rule
Addressing
Unit ID 255 (FF Hex) 255 (FF Hex) 255 (FF Hex) 255 (FF Hex) N/A
Receive Data 1000 (Base 0) 2000 (Base 0) 3000 (Base 0) 4000 (Base 0)
Read Only
Address 1001 (Base 1) 2001 (Base 1) 3001 (Base 1) 4001 (Base 1)

Received Message Format


If all is set up correctly, the data packets will be written into the PLC memory space starting at the specified
memory location. The first word received is the sequence number. This is incremented with each new data
packet. The next word is the length, which indicates the number of data bytes received. The rest is data.
The format of received serial data sent to or returned to the PLC:

Access
Name Data Type Data Value(s)
Rule
Receive (DeviceMaster to PLC) message data Get
Structure of: 0-65535 (FFFF Hex)
Produced data sequence WORD 1-1024 (Master Rx Mode)
Data length (in bytes) WORD 0-246 (Slave Rx Mode)
Array of 
Data array 0-65535
WORD

General requirements:
• The memory area must be defined in 16 bit words and large enough to handle the largest serial packet
plus two words for the produced sequence number and data length parameters.
• The Maximum Rx Data Packet Size must be set large enough to accept the largest possible packet.
• For large received data packets over 246 bytes (This may be less for your PLC).
The Rx (To PLC) Transfer Mode must be set to Master (Write to PLC).
- The data will automatically be placed in continuous memory.
- All data will have been transferred to the PLC when the sequence number is updated.

28 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Ethernet Devices

Read-Only Raw/ASCII Ethernet Devices

Read-only raw/ASCII Ethernet devices use the Ethernet menus to:


• Allow connections between devices that communicate over Ethernet TCP/IP, such as a barcode scanner,
RFID reader, or weigh scale, and a PLC and/or application.
• Provide an optional filtering mechanism for string, RFID, and barcode data.
• Provide support for
only Raw/ASCII type
data.
Verify that you have an
actual Ethernet device in
which to connect to and
that the Ethernet device
supports Ethernet TCP
socket connections.
Use the following
procedure to configure
read-only Ethernet
devices.
Note: The Ethernet
device must be a
target Ethernet
device such as a
barcode scanner, Ethernet TCP/IP Read-Only Device Communications
RFID reader,
weigh scale, or
some other device that is to be connected to a PLC and/or application.
1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Ethernet menu, which opens to the Ethernet Device Overview page.

3. Click Device N for the port that you want to configure, where N is the Socket number, which opens the
Device Interface Configuration page for the corresponding socket.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 29
Read-Only Raw/ASCII Ethernet Devices

4. If desired, enter a Device Name.


5. Click the Enable option and configure the settings for your environment using one of the following
procedures.
• If your Ethernet TCP/IP device requires another device to connect to it, configure the socket port on the
DeviceMaster to Connect mode.
- Leave the Listen option unselected.
- Set the Connect To Mode option to Connect-Always.
- Set the Connect Port option to the socket port number of your Ethernet device.
- Set the Connect IP Address option to the IP address of your Ethernet device.
Note: Do not enter the IP address of the DeviceMaster or PLC here.
- Set the Disconnect Mode option to Never.
- If desired, enter a value for the Idle Timer option.
- If desired, enter a value for the Rx Timeout Between Packets (ms) option.
- Click the Save button.

30 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Ethernet Devices

• If your Ethernet TCP/IP device is configured to connect to another device, configure the socket port on
the DeviceMaster to Listen mode.
- Select the Listen option.
- Use the default Listen Port on the DeviceMaster of 8xxx or designate your own.
- Set the Connect To Mode option to Never.
- Set the Disconnect Mode option to Never.
- Configure your Ethernet device to connect to the DeviceMaster at the DeviceMaster IP address and
Listen Port.
- Click the Save button.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 31
Read-Only Raw/ASCII Ethernet Devices

• If you do not know if your device will connect to another Ethernet device, but do know your device’s
socket port and IP address, you can do the following to enable both the Listen and Connect modes:
- Select the Listen option.
- Use the default Listen Port on the DeviceMaster of 8xxx or designate your own.
- Set the Connect To Mode option to Connect-Always.
- Set the Connect Port option to the port number of your Ethernet device.
- Set the Connect IP Address option to the IP address of your Ethernet device.
Note: Do not enter the IP address of the DeviceMaster or PLC here.
- Set the Disconnect Mode option to Never.
- Optionally configure your Ethernet device to connect to the DeviceMaster at the DeviceMaster IP
address and Listen Port.
- Set the Rx Timeout Between Packets option. Set to zero to stream data with the Rx STX/ETX Detect
settings set to none. For normal settings, typical values are 10 to 50 ms.
- Click the Save button.

32 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Ethernet Devices

6. Click the Raw/ASCII Settings sub-menu, which opens the Device Raw/ASCII Configuration page for the
corresponding Device number.
7. Set the Raw/ASCII Data Message Transfer Mode option to Data-Stream.
8. Set up the Device Socket Packet ID Settings.
a. Set the STX (Start of transmission) Rx Detect option in decimal format.
b. Set the ETX (End of transmission) Rx Detect option in decimal format.
c. Enable the Strip Rx STX/ETX option under the PLC Specific Settings or Application Specific Settings
sections if you do not want the STX and ETX bytes returned to the PLC or application(s).
d. Click the Save button.

Note: Refer to your device's User Manual for the Start and End of Transmission byte(s) settings. You may
also be able to use the Ethernet Device Interface Logs page to determine these settings.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 33
Read-Only Raw/ASCII Ethernet Devices

9. Configure the Modbus/TCP and/or Serial Modbus Master Settings for your environment using one of the
following methods.
• Master Receive Transfer mode (recommended) writes data directly into the memory of a Modbus/
TCP slave or serial Modbus slave attached to this gateway. This requires the least amount of PLC
programming, requires the least amount of PLC overhead, and provides minimal latency.

Note: You can use the Master Receive Transfer method only if your PLC can
operate as a Modbus/TCP slave, Modbus/RTU serial slave, or Modbus/
ASCII serial slave.
Go to Step 10 on Page 35 to configure Master Receive Transfer mode.
• Slave Receive Transfer mode requires the PLC to poll for received data. This method is provided for
PLC programmers who prefer polling for data or those who have PLCs that can only operate in master
mode.

Note: You can use the Slave Receive Transfer method only if your PLC can
operate as a Modbus/TCP master, Modbus/RTU serial master, or
Modbus/ASCII serial master.

Go to Step 11 on Page 37 to configure Slave Receive Transfer mode.

34 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Ethernet Devices

10. Master Receive Transfer Mode Only: Under the Serial Modbus Master and Modbus/TCP Interface
Settings section:
a. Set the Rx (To PLC) Transfer Mode option to Master (Write to PLC).
b. Set the Tx (From PLC) Transfer Mode option to either Slave (PLC Writes) or Off.
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. For
writing to a Modbus/TCP slave or Modbus serial slave, this can be a maximum of 1,518 bytes.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Leave the Tx MS Byte First option disabled.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received during the Maximum PLC Update Rate time period, only
the last received data packet will be sent to the PLC.)
h. Leave the Disable Tx Sequence Number Check option disabled.

Under the Modbus/TCP Master Rx/Tx Settings section:


i. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to
that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves,
set the PLC IP Address to that of this DeviceMaster
in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
j. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this DeviceMaster.
k. If necessary, set the Disable Sequence Number/Length Header option if you want to transmit data
without the 4 byte header (sequence number and data length).

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 35
Read-Only Raw/ASCII Ethernet Devices

Under the Master Rx Mode Only section:


l. Set the PLC Rx Data Address to the PLC memory
address where you want to place the received data
message. This address is Base 1, which means the
address starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will need
to add one to your address.
m. Set the Maximum PLC Update Rate option to the fastest
rate your PLC can reliably receive and process data.
This is typically longer than the scan rate. The default of 40 milliseconds is usually sufficient, but
your system may require a longer time period.
n. Set the Use Maximum Sized Modbus Messages option if you are receiving messages over 196 bytes, your
PLC can receive messages larger than 200 bytes, and you want to decrease latency and network usage
o. Click the Save button.

p. Go to Step 12 on Page 37 to complete configuration.

36 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read-Only Raw/ASCII Ethernet Devices

11. Slave Receive Transfer Mode Only: Under the Serial Modbus Master and Modbus/TCP Interface
Settings section:
a. Set the Rx (To PLC) Transfer Mode option to Slave (PLC Polls).
b. Set the Tx (From PLC) Transfer Mode option to either Slave (PLC Writes) or Off.
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. This
can be a maximum of 246 bytes in Slave Rx Mode.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Leave the Tx MS Byte First option disabled.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received between received data requests, only the last received
data packet will be returned.)
h. Leave the Tx Sequence Number Check option disabled.
i. Click the Save button.

12. Set up the Filtering/Data Extraction Configuration settings, see Filtering/Data Extraction Configuration
on Page 69.
13. Set up the Application TCP Connection Configuration settings, see Application Socket Configuration on
Page 77.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read-Only Raw/ASCII Devices - 37
Modbus Addressing

Modbus Addressing
The receive data addresses used for polling are as follows:

Socket Port Raw/


Socket Port 1 Socket Port 2 Socket Port 3 Socket Port 4 Access Rule
ASCII Addressing
Unit ID 254 (FF Hex) 254 (FF Hex) 254 (FF Hex) 254 (FF Hex) N/A
1000 (Base 0) 2000 (Base 0) 3000 (Base 0) 4000 (Base 0)
Receive Data Address Read Only
1001 (Base 1) 2001 (Base 1) 3001 (Base 1) 4001 (Base 1)

Received Message Format


If all is set up correctly, the data packets will be written into the PLC memory space starting at the specified
memory location. The first word received is the sequence number. This is incremented with each new data
packet. The next word is the length, which indicates the number of data bytes received. The rest is data.
The format of received socket data sent to the PLC:

Name Data Type Data Value(s) Access Rule


Receive (DeviceMaster to PLC) message data Get

Structure of:
WORD 0-65535 (FFFF Hex)
Produced data sequence 1-2048 (Master Rx Mode)
WORD 0-246 (Slave Rx Mode) 
Data length (in bytes)
0-65535
Array of
Data array WORD 0-65535

General requirements:
• The memory area must be defined in 16 bit words and large enough to handle the largest serial packet
plus two words for the produced sequence number and data length parameters.
• The Maximum Rx Data Packet Size must be set large enough to accept the largest possible packet.
For large received data packets over 246 bytes (This may be less for your PLC):
- The Rx (To PLC) Transfer Mode must be set to Master (Write to PLC).
- The data will automatically be placed in continuous memory.
- All data will have been transferred to the PLC when the sequence number is updated.

38 - Configuring Read-Only Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Configuring Read/Write Raw/ASCII Devices

This section discusses the following:


• Prerequisites
• Read/Write Raw/ASCII Serial Devices on Page 39
• Read/Write Raw/ASCII Ethernet Devices on Page 54

Prerequisites

Before you can configure the ports, make sure that you have done the following:
• Installed the hardware
• Configured the DeviceMaster IP address using PortVision DX or the web interface
• If necessary, uploaded the latest Modbus/TCP firmware using PortVision DX or the web interface
Note: The DeviceMaster provides a Modbus/TCP interface, which may or may not have the Modbus/TCP
firmware loaded from the factory (depending on the model you purchased). Models that have Modbus/
TCP loaded on the DeviceMaster are identified in PortVision DX and the DeviceMaster is labeled
accordingly.
If you need to perform any of these procedures or locate the latest files, see the Overview on Page 5.

Read/Write Raw/ASCII Serial Devices

Read/write raw/ASCII serial devices use the Serial menus to:


• Allow connections between a serial device, such as a barcode scanner or RFID reader, and a PLC and/or
application(s).
• Provide an optional
filtering mechanism for
string, RFID, and
barcode data.
Note: The PLC and
application(s) can
both communicate to
the serial device, but
they cannot
communicate
directly to each
other.

Serial Read/Write Device Communications

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 39
Read/Write Raw/ASCII Serial Devices

Use the following procedure to configure read/write raw/ASCII serial devices.


1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial menu, which opens to the Serial Port Overview page.

40 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Serial Devices

3. Click Port N for the port you want to configure, where N is the port number, which opens the Port Serial
Configuration page for the corresponding port.
4. If desired, enter a Port Name.
5. Set up the Serial Configuration for your device.
6. Leave the Discard Rx Packets With Errors option enabled.
7. Under the General Protocol Settings section, set the Serial Port Protocol option to Raw-Data.
8. Click the Save button.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 41
Read/Write Raw/ASCII Serial Devices

9. Select the Raw/ASCII Settings sub-menu, which opens the Port Raw/ASCII Configuration page for the
corresponding port.
10. Set the Raw/ASCII Data Message Transfer Mode option.
• Selecting Data-Stream enables asynchronous communication to the device.
- Transmit data is sent immediately from all Modbus and active Application interfaces.
- Received data will be returned to the Modbus interface and all active Application interfaces.
- If Data-Stream is selected, the rest of the options in this section are not applicable.
• Selecting Command/Response enables synchronous communications with the device.
- Transmit data will expect one or more responses.
- Responses will only be returned to the transmit message originator.
If Command/Response is selected:
- Set the Response Timeout to a valid timeout period for your device.
- The Cmd/Resp Age Time will set the time at which old responses to the Modbus interface are
discarded.
- The Cmd/Resp Expected Responses Per Command indicates the number of responses expected per
transmitted message. This is typically 1.
- Set the Cmd/Resp Mode Response To Modbus/TCP Based On option to:
- IP-Address if there is only one Modbus/TCP interface per IP-Address communicating to this
port. This is typically used for PLC or single OPC Server/SCADA systems.
- TCP-Connection if there is more than one Modbus/TCP interface per IP-Address
communicating to this port. This typically is required for multiple OPC Server/ SCADA
systems running on the same computer.

11. Set up the Serial Packet Identification section.


• Set the STX (Start of transmission) Rx Detect option in decimal format.
• Set the ETX (End of transmission) Rx Detect option in decimal format. Refer to your serial device's User
Manual for these settings.
• Enable the Strip Rx STX/ETX option under the PLC Specific Settings or Application Specific Settings
sections if you do not want the STX and ETX bytes returned to the PLC or application(s).

42 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Serial Devices

• If desired, set the STX (Start of transmission) Tx Append option in decimal format. This will append the
STX byte(s) to transmitted messages from the PLC or application.
• If desired, set the ETX (End of transmission) Tx Append option in decimal format. This will append the
ETX byte(s) to transmitted messages from the PLC or application.
12. Select the Modbus Settings sub-menu, which opens the Port Modbus Configuration (Raw/ASCII Only)
page.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 43
Read/Write Raw/ASCII Serial Devices

13. Configure the Serial Modbus Master and Modbus/TCP Interface settings for your environment using one
of the following methods.
• PLC Master/DeviceMaster Slave mode. You can use the PLC Master/DeviceMaster UP Slave method
only if your PLC can operate as a Modbus/TCP master, Modbus/RTU serial master, or Modbus/ASCII
serial master. Go to Step 14 on Page 45 for configuration procedures.

• PLC Slave/DeviceMaster Master mode. You can use the PLC Slave/DeviceMaster UP Master method
only if your PLC can operate as a Modbus/TCP slave, Modbus/RTU serial slave, or Modbus/ASCII serial
slave. Go to Step 15 on Page 46 for configuration procedures.

• Dual Master – Write mode. You can use Dual Master - Write method only if your PLC can operate as
a Modbus master and slave simultaneously. Go to Step 16 on Page 48 for configuration procedures.

• Dual Master – Read mode. You can use Dual Master - Read method only if your PLC can operate as
a Modbus master and slave simultaneously. Go to Step 17 on Page 50 for configuration procedures.

44 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Serial Devices

14. PLC Master/DeviceMaster Slave Mode Only


Use the following procedure to configure PLC Master/DeviceMaster Slave mode in the Port Modbus
Configuration (Raw/ASCII Only) page.
a. Set the Rx (To PLC) Transfer Mode option to Slave (PLC Polls).
b. Set the Tx (From PLC) Transfer Mode option to Slave (PLC Writes).
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. This
can be a maximum of 246 bytes in Slave Rx Mode.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received between received data requests, only the last received
data packet will be returned.)
h. Set the Disable Tx Sequence Number Check option if you want to disable the transmit sequence number
checking.
• If selected, the transmit sequence number checking is disabled. All transmit messages will be
transmitted if the sequence number has been incremented or not.
• If not selected, the sequence number is checked and the message will only be transmitted if the
sequence number has been incremented.
i. Click the Save button.
j. Go to Step 18 on Page 51 to complete configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 45
Read/Write Raw/ASCII Serial Devices

15. PLC Slave/DeviceMaster Master Mode Only:


Use the following procedure to configure PLC Slave/DeviceMaster Master mode in the Port Modbus
Configuration (Raw/ASCII Only) page.
a. Set the Rx (To PLC) Transfer Mode option to Master (Write to PLC).
b. Set the Tx (From PLC) Transfer Mode option to Master (Poll the PLC).
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. This
can be a maximum of 1518 bytes in Master Rx Mode.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received during the Maximum PLC Update Rate time period, only
the last received data packet will be returned.)

Under the Modbus/TCP Master Rx/Tx Settings section:


h. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to
that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves,
set the PLC IP Address to that of this DeviceMaster
in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
i. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this DeviceMaster.
j. If necessary, set the Disable Sequence Number/Length Header option if you want to transmit data
without the 4 byte header (sequence number and data length).

46 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Serial Devices

Under the Master Rx/Tx Mode Only section:


k. Set the PLC Rx Data Address (Base 1) to the PLC memory
address where you want to place the received data message.
This address is Base 1, which means the address starts at 1
(or 400001 for some PLCs). If your address range is Base 0,
or starts at zero, you will need to add one to your address.
l. Set the Maximum PLC Update Rate (msec) to the fastest rate your PLC can reliably receive and process
data. This is typically longer than the scan rate. The default of 40 milliseconds is usually sufficient,
but your system may require a longer time period.
m. Set the Use Maximum Sized Modbus Messages option if you are receiving messages over 196 bytes and
PLC can receive messages larger than 200 bytes, or you want to decrease latency and network usage.
Under the Master Tx Mode Only section:
n. Set the PLC Tx Data Address (Base 1) to the PLC memory address at which to request the transmit
data message. This is Base 1, which means the address starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will need to add one to your address.
o. Set the PLC Tx Poll Rate (msec) to the rate at which you would like the DeviceMaster to poll for
transmit messages. If Tx Sequence Number Syncing is disabled, this rate must be faster than the rate
at which you wish to transmit data. If not, transmit messages will be lost.
p. Set the PLC Tx Poll Message Length to the length in bytes of your longest transmit data packet plus
four bytes for the sequence number and length parameters at the start of the transmit message
(maximum of 250 bytes). Any additional bytes requested will be left unused.
q. If you wish to enable synchronization of the transmit data messages between the PLC and the
DeviceMaster:
- Enable Tx Sequence Number Syncing Enable.
- Set the PLC Tx Consumed Sequence Address to the PLC memory address at which you wish the
DeviceMaster to write the transmit consumed sequence number. This memory address must point
to a 16-bit word and, like the other address definitions, is base 1. When the Tx Produced Sequence
Number (at the PLC Tx Data Address) and this consumed sequence number are equal, the
DeviceMaster has transmitted the last message and is ready for the next transmit message.
r. Click the Save
button.
























Note: Go to Step 18 on Page 51 to complete configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 47
Read/Write Raw/ASCII Serial Devices

16. Dual Master – Write Mode Only


Use the following procedure to configure Dual Master – Write mode in the Port Modbus Configuration
(Raw/ASCII Only) page.
a. Set the Rx (To PLC) Transfer Mode option to Master (Write to PLC).
b. Set the Tx (From PLC) Transfer Mode option to Slave (PLC Writes).
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. This
can be a maximum of 1518 bytes in Master Rx Mode.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received during the Maximum PLC Update Rate time period, only
the last received data packet will be returned.)
h. Set the Disable Tx Sequence Number Check option if you want to disable the transmit sequence number
checking.
• If selected, the transmit sequence number checking is disabled. All transmit messages will be
transmitted if the sequence number has been incremented or not.
• If not selected, the sequence number is
checked and the message will only be
transmitted if the sequence number has
been updated.
Under the Modbus/TCP Master Rx/Tx Settings
section:
i. Set the PLC IP Address to that of your PLC in
xxx.xxx.xxx.xxx format.
j. Set the PLC Device ID to that of your PLC.
This is typically 1.
k. If necessary, set the Disable Sequence Number/
Length Header option if you want to transmit
data without the 4 byte header (sequence
number and data length).
Under the Master Rx Mode Only section:
l. Set the PLC Rx Data Address to the PLC
memory address where you want to place the
received data message. This address is Base
1, which means the address starts at 1 (or 400001 for some PLCs). If your address range is Base 0, or
starts at zero, you will need to add one to your address.
m. Set the Maximum PLC Update Rate option to the fastest rate your PLC can reliably receive and process
data. This is typically longer than the scan rate. The default of 40 milliseconds is usually sufficient,
but your system may require a longer time period.
n. Set the Use Maximum Sized Modbus Messages option if you are receiving messages over 196 bytes, and
the PLC can receive messages larger than 200 bytes or you want to decrease latency and network
usage.

48 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Serial Devices

o. Click the Save button.

Note: Go to Step 18 on Page 51 to complete configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 49
Read/Write Raw/ASCII Serial Devices

17. Dual Master – Read Mode Only:


Use the following procedure to configure Dual Master – Read mode in the Port Modbus Configuration
(Raw/ASCII Only) page.
a. Set the Rx (To PLC) Transfer Mode option to Slave (PLC Polls).
b. Set the Tx (From PLC) Transfer Mode option to Master (Poll the PLC).
c. Set the Maximum Rx Data Packet Size option to that of the largest expected receive data packet. This
can be a maximum of 246 bytes in Slave Rx Mode.
d. Set the Oversized Rx Packet Handling option to either Truncate or Drop, depending how you want to
handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received between received data requests, only the last received
data packet will be returned.)

Under the Modbus/TCP Master Rx/Tx Settings section:


h. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to
that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves,
set the PLC IP Address to that of this DeviceMaster
in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
i. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this DeviceMaster.
j. If necessary, set the Disable Sequence Number/Length Header option if you want to transmit data
without the 4 byte header (sequence number and data length).

50 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Serial Devices

Under the Master Tx Mode Only section:


k. Set the PLC Tx Data Address to the PLC memory address at which to request the transmit data
message. This is Base 1, which means the address starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will need to add one to your address.
l. Set the PLC Tx Poll Rate option to the rate at which you would like the DeviceMaster to poll for
transmit messages. If the Tx Sequence Number Syncing option is disabled, this rate must be faster than
the rate at which you wish to transmit data. If not, transmit messages will be lost.
m. Set the PLC Tx Poll Message Length option to the length in bytes of your longest transmit data packet
plus four bytes for the sequence number and length parameters at the start of the transmit message
(maximum of 250 bytes). Any additional bytes requested will be left unused.
n. If you wish to enable synchronization of the transmit data messages between the PLC and the
DeviceMaster:
• Enable the Tx Sequence Number Syncing Enable option.
• Set the PLC Tx Consumed Sequence Address option to the PLC memory address at which you wish
the DeviceMaster to write the transmit consumed sequence number. This memory address must
point to a 16-bit word and, like the other address definitions, is base 1. When the Tx Produced
Sequence Number (at the PLC Tx Data Address) and this consumed sequence number are equal, the
DeviceMaster has transmitted the last message and is ready for the next transmit message.
o. Click the Save button.

18. Set up the filtering/data extraction settings:


• If no filtering/data extraction is required, leave all filtering/data extraction settings to defaults (off).
• If filtering/data extraction is required, see Filtering/Data Extraction Configuration on Page 69.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 51
Modbus Addressing

19. Set up the application socket interface settings:


• If no application socket interface is required, leave all application socket interface settings at defaults
and the application Enable option is not selected.
• If an application socket interface is required, see Application Socket Configuration on Page 77.
20. Click the Save button.

Modbus Addressing
The DeviceMaster serial port data addressing used for slave modes:

Serial Port Raw/


Serial Port 1 Serial Port 2 Serial Port 3 Serial Port 4 Access Rule
ASCII Addressing
Unit ID 255 (FF Hex) 255 (FF Hex) 255 (FF Hex) 255 (FF Hex) N/A
1000 (Base 0) 2000 (Base 0) 3000 (Base 0) 4000 (Base 0)
Receive Data Address Read Only
1001 (Base 1) 2001 (Base 1) 3001 (Base 1) 4001 (Base 1)
Transmit Data 1300 (Base 0) 2300 (Base 0) 3300 (Base 0) 4300 (Base 0)
Read/Write
Address 1301 (Base 1) 2301 (Base 1) 3301 (Base 1) 4301 (Base 1)

Receive and Transmit Message Formats


The format of received serial data messages sent to or returned from the PLC:

Name Data Type Data Value(s) Access Rule


Receive (DeviceMaster to PLC) message data Read
Structure of: 0-65535 (FFFF Hex)
Produced data sequence WORD 1-1024 (Master Rx Mode)
Data length (in bytes) WORD 0-246 (Slave Rx Mode)
Array of
Data array 0-65535
WORD
General requirements:
• The memory area must be defined in 16 bit words and large enough to handle the largest serial packet
plus two words for the produced sequence number and data length parameters.
• The Maximum Rx Data Packet Size must be set large enough to accept the largest possible packet.
For large received data packets over 246 bytes (This may be less for your PLC):
• The Rx (To PLC) Transfer Mode option must be set to Master (Write to PLC).
• The data will automatically be placed in continuous memory.
• All data will have been transferred to the PLC when the sequence number is updated.
The format of the transmit serial data received from the PLC:

Name Data Type Data Value(s) Access Rule


Transmit (PLC to DeviceMaster) message data Read/Write
Structure of: 0-65535 (FFFF Hex)
Produced data sequence WORD 1-236 (Slave Mode)
Data length (in bytes) WORD 1-246 (Master Mode)
Array of
Data array 0-65535
WORD

52 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Receive and Transmit Message Formats

Transmit messages have the following characteristics:


• All data is transferred in 16 bit words.
• If operating in Tx (From PLC) Transfer Mode of Master (Poll the PLC): The sequence number must be
incremented when there is new data to transmit.
• If operating in Tx (From PLC) Transfer Mode of Slave (PLC Writes): The sequence number must be
incremented when there is new data to transmit only if the Disable Tx Sequence Number Check is not
selected.
• The data length field indicates the number of valid bytes contained in this message.
• The actual length of the message received from a PLC may contain extra, unused data.
• Unused data is ignored.
• A request for transmit data returns the last transmit data message.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 53
Read/Write Raw/ASCII Ethernet Devices

Read/Write Raw/ASCII Ethernet Devices

Read/write raw/ASCII
Ethernet devices use the
Ethernet menus to:
• Allow connections
between an Ethernet
device, such as a
barcode scanner, RFID
reader, or weigh scale,
and a PLC and/or an
application.
• Raw/ASCII data is the
only supported data
type.
• The Ethernet device
must support
Ethernet TCP socket
connections.
Note: The PLC and
applications can
both communicate
to the Ethernet
device, but they cannot communicate directly to each other.
Use the following procedure to configure read/write Ethernet devices.
1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Ethernet menu, which opens to the Ethernet Device Overview page.

54 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Ethernet Devices

3. Click Device N for the port that you want to configure, where N is the Socket number, which opens the
Device Interface Configuration page for the corresponding socket.
4. If desired, enter a Device Name.
5. Click the Enable option and configure the settings for your environment using one of the following
procedures.
• If your Ethernet TCP/IP Device requires another device to connect to it, configure the socket port on
the DeviceMaster to Connect mode:
- Leave the Listen option unselected.
- Set the Connect To Mode option to Connect-Always.
- Set the Connect Port option to the socket port number of your Ethernet device.
- Set the Connect IP Address option to the IP Address of your Ethernet device.
Note: Do not enter the IP address of the DeviceMaster or PLC here.
- Set the Disconnect Mode option to Never.
- Click the Save button.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 55
Read/Write Raw/ASCII Ethernet Devices

• If your Ethernet TCP/IP Device is configured to connect to another device, configure the socket port on
the DeviceMaster to Listen mode:
- Select the Listen option.
- Use the default Listen Port on the DeviceMaster of 8xxx or designate your own.
- Set the Connect To Mode option to Never.
- Set the Disconnect Mode option to Never.
- Configure your Ethernet device to connect to the DeviceMaster at the DeviceMaster IP address and
Listen Port.
- Click the Save button.

56 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Ethernet Devices

• If you do not know if your device will connect to another Ethernet device, but do know your device’s
socket port and IP address, you can do the following to enable both the Listen and Connect modes:
- Select the Listen option.
- Use the default Listen Port on the DeviceMaster of 8xxx or designate your own.
- Set the Connect To Mode option to Connect-Always.
- Set the Connect Port option to the port number of your Ethernet device.
- Set the Connect IP Address to the IP address of your Ethernet device.
Note: Do not enter the IP address of the DeviceMaster or PLC here.
- Set the Disconnect Mode option to Never.
- Optionally configure your Ethernet device to connect to the DeviceMaster at the DeviceMaster IP
Address and Listen Port.
- Set the Rx Timeout Between Packets option. Set to zero to stream data with the Rx STX/ETX Detect
settings set to none. For normal settings, typical values are 10 to 50 ms.
- Click the Save button.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 57
Read/Write Raw/ASCII Ethernet Devices

6. Select the Raw/ASCII Settings sub-menu, which opens the Device Raw/ASCII Configuration page.

7. Set the Message Transfer mode under the Raw/ASCII Data Control section:
• Selecting Data-Stream enables asynchronous communications to the device.
- Transmit data will be sent immediately from all Modbus and active Application interfaces.
- Received data will be returned to the Modbus interface and all active Application interfaces.
- If Data-Stream is selected, the rest of the options in this section are N/A (not applicable).
• Selecting Command/Response enables synchronous communications with the device.
- Transmit data will expect one or more responses.
- Responses will only be returned to the transmit message originator.
If Command/Response is selected:
- Set the Cmd/Resp Response Timeout to a valid timeout period for your device.
- The Cmd/Resp Age Time, Discard Responses After (sec) option sets the time at which old responses to
the Modbus interface are discarded.
- The Cmd/Resp Expected Responses Per Command option indicates the number of responses expected
per transmitted message. This is typically 1.
- Set the Cmd/Resp Mode Response To Modbus/TCP Based On option to:
- IP-Address if there is only one Modbus/TCP interface per IP-Address communicating to this
port. This is typically used for PLC or single OPC Server/SCADA systems.
- TCP-Connection if there is more than one Modbus/TCP interface per IP-Address
communicating to this port. This typically is required for multiple OPC Server/ SCADA
systems running on the same computer.
8. Set up the Device Socket Packet ID Settings section.
a. Set the STX (Start of transmission) Rx Detect option in decimal format.
b. Set the ETX (End of transmission) Rx Detect option in decimal format.
9. If necessary, set up the PLC Specific Settings section.
a. Set the STX (Start of transmission) Rx Detect option in decimal format.
b. Set the ETX (End of transmission) Rx Detect option in decimal format.
c. Enable the Strip Rx STX/ETX option if you do not want the STX and ETX bytes returned to the PLC.

58 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Ethernet Devices

10. If necessary, set up the Application Specific Settings section.


a. Set the STX (Start of transmission) Tx Append option in decimal format.
b. Set the ETX (End of transmission) Tx Append option in decimal format.
c. Enable the Strip Rx STX/ETX option if you do not want the STX and ETX bytes returned to the
application.
Note: Refer to your device's User Manual for the Start and End of Transmission byte(s) settings. 
You may also be able to use the Diagnostics | Ethernet Device Interface Logs page to determine these
settings.
11. Click the Save button.
12. Click the Modbus/TCP Settings sub-menu, which displays the Device Modbus Configuration page..

13. Configure the Modbus/TCP Settings for your environment using one of the following methods.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 59
Read/Write Raw/ASCII Ethernet Devices

• PLC master/DeviceMaster Slave mode, go to Step 14 on Page 61 for configuration procedures.

Note: You can use the PLC Master/DeviceMaster Slave method only if your PLC can operate as a
Modbus/TCP master, Modbus/RTU serial master, or Modbus/ASCII serial master.

• PLC slave/DeviceMaster Master mode, go to Step 16 on Page 62 for configuration procedures.

Note: You can use the PLC Slave/DeviceMaster Master method only if your PLC can operate as a
Modbus/TCP slave, Modbus/RTU serial slave, or Modbus/ASCII serial slave.
• Dual Master – Write mode, go to Step 18 on Page 64 for configuration procedures.

Note: You can use the Dual Master - Write method only if your PLC can operate as a Modbus
master and slave, simultaneously.

60 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Ethernet Devices

• Dual Master – Read mode, go to Step 19 on Page 65 for configuration procedures.

Note: You can use the Dual Master - Read method only if your PLC can operate as a
Modbus master and slave, simultaneously.
14. PLC Master/DeviceMaster Slave Mode Only
Use the following procedure to configure PLC Master/DeviceMaster Slave mode in the Device Modbus
Configuration page.
a. Set the Rx (To PLC) Transfer Mode option to Slave
(PLC Polls).
b. Set the Tx (From PLC) Transfer Mode option to
Slave (PLC Writes).
c. Set the Maximum Rx Data Packet Size option to
that of the largest expected receive data packet.
This can be a maximum of 246 bytes in Slave Rx
mode.
d. Set the Oversized Rx Packet Handling option to
either Truncate or Drop, depending how you want
to handle oversized received packets.
e. Set the Rx MS Byte First option if you want to
receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received between received data requests, only the last received
data packet will be returned.)
h. Set the Disable Tx Sequence Number Check option if you want to disable the transmit sequence number
checking.
• If selected, transmit sequence number checking is disabled. All transmit messages will be
transmitted if the sequence number has been incremented or not.
• If not selected, the sequence number is checked and the message will only be transmitted if the
sequence number has been updated.
15. Click the Save button.
Note: Go to Step 20 on Page 66 to complete configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 61
Read/Write Raw/ASCII Ethernet Devices

16. PLC Slave/DeviceMaster Master Mode Only


Use the following procedure to configure PLC Slave/DeviceMaster Master mode in the Device Modbus
Configuration page.
Under the Serial Modbus Master and Modbus/TCP Settings section:
a. Set the Rx (To PLC) Transfer Mode option to
Master (Write to PLC).
b. Set the Tx (From PLC) Transfer Mode option to
Master (Poll the PLC).
c. Set the Maximum Rx Data Packet Size option to
that of the largest expected receive data packet.
This can be a maximum of 2048 bytes in Master
Rx mode.
d. Set the Oversized Rx Packet Handling option to
either Truncate or Drop, depending how you want
to handle oversized received packets.
e. Set the Rx MS Byte First option if you want to
receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received during the Maximum PLC Update Rate time period, only
the last received data packet will be returned.).
h. Set the Disable Tx Sequence Number Check option if you want to disable the transmit sequence number
checking.
• If selected, transmit sequence number checking is disabled. All transmit messages will be
transmitted if the sequence number has been incremented or not.
• If not selected, the sequence number is checked and the message will only be transmitted if the
sequence number has been updated.
Under the Modbus/TCP Master Rx/Tx Settings section:
i. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC IP Address to that of this
DeviceMaster in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
j. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this DeviceMaster.
k. If necessary, set the Disable Sequence Number/Length Header option if you want to transmit data
without the 4 byte header (sequence number and data length).
Under the Master Rx Mode Only section:
l. Set the PLC Rx Data Address option to the PLC memory address where you want to place the received
data message. This address is Base 1, which means the address starts at 1 (or 400001 for some PLCs).
If your address range is Base 0, or starts at zero, you will need to add one to your address.
m. Set the Maximum PLC Update Rate option to the fastest rate your PLC can reliably receive and process
data. This is typically longer than the scan rate. The default of 40 milliseconds is usually sufficient,
but your system may require a longer time period.
n. Set the Use Maximum Sized Modbus Messages option if you are receiving messages over 196 bytes, your
PLC can receive messages larger than 200 bytes, and you want to decrease latency and network
usage.

62 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Ethernet Devices

Under the Master Tx Mode Only section:


o. Set the PLC Tx Data Address option to the PLC memory address at which to request the transmit data
message. This is Base 1, which means the address starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will need to add one to your address.
p. Set the PLC Tx Poll Rate option to the rate at which you would like the DeviceMaster to poll for
transmit messages. If Tx Sequence Number Syncing is disabled, this rate must be faster than the rate
at which you wish to transmit data. If not, transmit messages will be lost.
q. Set the PLC Tx Poll Message Length option to the length in bytes of your longest transmit data packet
plus four bytes for the sequence number and length parameters at the start of the transmit message
(maximum of 250 bytes). Any additional bytes requested will be left unused.
r. If you wish to enable synchronization of the transmit data messages between the PLC and the
DeviceMaster:
• Enable the Tx Sequence Number Syncing Enable option.
• Set the PLC Tx Consumed Sequence Address to the PLC memory address at which you wish the
DeviceMaster to write the transmit consumed sequence number. This memory address must point
to a 16-bit word and, like the other address definitions, is base 1. When the Tx Produced Sequence
Number (at the PLC Tx Data Address) and this consumed sequence number are equal, the
DeviceMaster has transmitted the last message and is ready for the next transmit message.
17. Click the Save button.

Note: Go to Step 20 on Page 66 to complete configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 63
Read/Write Raw/ASCII Ethernet Devices

18. Dual Master – Write Mode Only


Use the following procedure to configure Dual Master - Write mode in the Device Modbus Configuration
page.
Under the Serial Modbus Master and Modbus/TCP Interface Settings section:
a. Set the Rx (To PLC) Transfer Mode option to
Master (Write to PLC).
b. Set the Tx (From PLC) Transfer Mode option to
Slave (PLC Writes).
c. Set the Maximum Rx Data Packet Size option to
that of the largest expected receive data packet.
This can be a maximum of 2048 bytes in Master
Rx mode.
d. Set the Oversized Rx Packet Handling option to
either Truncate or Drop, depending how you want
to handle oversized received packets.
e. Set the Rx MS Byte First option if you want to
receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received during the Maximum PLC Update Rate time period, only
the last received data packet will be returned.)
h. Set the Disable Tx Sequence Number Check option if you want to disable the transmit sequence number
checking.
• If selected, the transmit sequence number checking is disabled. All transmit messages will be
transmitted if the sequence number has been incremented or not.
• If not selected, the sequence number is checked and the message will only be transmitted if the
sequence number has been updated.
Under the Modbus/TCP Master Rx/Tx Settings section:
i. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC IP Address to that of this
DeviceMaster in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
j. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this
DeviceMaster.
k. If necessary, set the Disable Sequence Number/Length
Header option if you want to transmit data without the
4 byte header (sequence number and data length).
Under the Master Rx Mode Only section:
l. Set the PLC Rx Data Address to the PLC memory
address where you want to place the received data
message. This address is Base 1, which means the
address starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will need
to add one to your address.
m. Set the Maximum PLC Update Rate option to the fastest rate your PLC can reliably receive and process
data. This is typically longer than the scan rate. The default of 40 milliseconds is usually sufficient,
but your system may require a longer time period.

64 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Read/Write Raw/ASCII Ethernet Devices

n. Set the Use Maximum Sized Modbus Messages option if you are receiving messages over 196 bytes, your
PLC can receive messages larger than 200 bytes, and you want to decrease latency and network
usage.
o. Click the Save button.
Note: Go to Step 20 on Page 66 to complete configuration.
19. Dual Master - Read Mode Only
Use the following procedure to configure Dual Master - Read mode in the Device Modbus Configuration
page.
Under the Serial Modbus Master and Modbus/TCP Interface Settings section:
a. Set the Rx (To PLC) Transfer Mode option to Slave
(PLC Polls).
b. Set the Tx (From PLC) Transfer Mode option to
Master (Poll the PLC).
c. Set the Maximum Rx Data Packet Size option to
that of the largest expected receive data packet.
This can be a maximum of 246 bytes in Slave Rx
mode.
d. Set the Oversized Rx Packet Handling option to
either Truncate or Drop, depending how you want
to handle oversized received packets.
e. Set the Rx MS Byte First option if you want to receive data most significant byte first.
f. Set the Tx MS Byte First option if you want to transmit data most significant byte first.
g. Set the Disable Non-Filtered To PLC Rx Queue option if you only want to receive the last received data
packet. (If two or more packets are received between received data requests, only the last received
data packet will be returned.)
h. Set the Disable Tx Sequence Number Check option if you want to disable the transmit sequence number
checking.
• If selected, transmit sequence number checking is disabled. All transmit messages will be
transmitted if the sequence number has been incremented or not.
• If not selected, the sequence number is checked and the message will only be transmitted if the
sequence number has been updated.
Under the Modbus/TCP Master Rx/Tx Settings section:
i. Enter the PLC IP Address:
• For Modbus/TCP slaves, set the PLC IP Address to that of your PLC in xxx.xxx.xxx.xxx format.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC IP Address to that of this
DeviceMaster in xxx.xxx.xxx.xxx format.
Note: The Modbus serial slave must be attached to one of the serial ports on this DeviceMaster.
j. Enter the PLC Device ID:
• For Modbus/TCP slaves, set the PLC Device ID to that of your PLC. This is typically 1.
• For Modbus/RTU or Modbus/ASCII serial slaves, set the PLC Device ID to that of the serial slave
device.
Note: This must be a unique device ID attached to this DeviceMaster.
k. If necessary, set the Disable Sequence Number/Length Header option if you want to transmit data
without the 4 byte header (sequence number and data length).

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 65
Modbus Addressing

Under the Master Tx Mode Only section:


l. Set the PLC Tx Data Address to the PLC memory
address at which to request the transmit data
message. This is Base 1, which means the address
starts at 1 (or 400001 for some PLCs). If your
address range is Base 0, or starts at zero, you will
need to add one to your address.
m. Set the PLC Tx Poll Rate option to the rate at which
you would like the DeviceMaster to poll for
transmit messages. If Tx Sequence Number Syncing
is disabled, this rate must be faster than the rate at
which you wish to transmit data. If not, transmit
messages will be lost.
n. Set the PLC Tx Poll Message Length option to the
length in bytes of your longest transmit data packet
plus four bytes for the sequence number and length
parameters at the start of the transmit message
(maximum of 250 bytes). Any additional bytes
requested will be left unused.
o. If you wish to enable synchronization of the
transmit data messages between the PLC and the
DeviceMaster:
• Enable the Tx Sequence Number Syncing Enable option.
• Set the PLC Tx Consumed Sequence Address to the PLC memory address at which you wish the
DeviceMaster to write the transmit consumed sequence number. This memory address must point
to a 16-bit word and, like the other address definitions, is base 1. When the Tx Produced Sequence
Number (at the PLC Tx Data Address) and this consumed sequence number are equal, the
DeviceMaster has transmitted the last message and is ready for the next transmit message.
p. Click the Save button.
20. Set up the Filtering/Data Extraction Configuration settings:
• If no filtering/data extraction is required, leave all filtering/data extraction settings to defaults (off).
• If filtering/data extraction is required, see Filtering/Data Extraction Configuration on Page 69.
21. Set up the Application TCP Connection Configuration settings:
• If no application socket interface is required, leave all application socket interface settings at defaults
and the application Enable option is not selected.
• If an application socket interface is required, see Application Socket Configuration on Page 77.

Modbus Addressing
The DeviceMaster socket port data addressing used for slave modes:

Socket Port Raw/


ASCII Addressing Socket Port 1 Socket Port 2 Socket Port 3 Socket Port 4 Access Rule

Unit ID 254 (FF Hex) 254 (FF Hex) 254 (FF Hex) 254 (FF Hex) N/A
1000 (Base 0) 2000 (Base 0) 3000 (Base 0) 4000 (Base 0)
Receive Data Address Read Only
1001 (Base 1) 2001 (Base 1) 3001 (Base 1) 4001 (Base 1)
1300 (Base 0) 2300 (Base 0) 3300 (Base 0) 4300 (Base 0)
Transmit Data Address 1301 (Base 1) Read/Write
2301 (Base 1) 3301 (Base 1) 4301 (Base 1)

66 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Receive and Transmit Message Formats

Receive and Transmit Message Formats


The format of received serial data sent to or returned to the PLC:

Access
Name Data Type Data Value(s) Rule
Receive (DeviceMaster to PLC) message data Read
Structure of: 0-65535 (FFFF Hex)
Produced data sequence WORD 1-2048 (Master Rx Mode)
Data length (in bytes) WORD 0-246 (Slave Rx Mode)
Data array Array of 0-65535
WORD
General requirements:
• The memory area must be defined in 16 bit words and large enough to handle the largest serial packet
plus two words for the produced sequence number and data length parameters.
• The Maximum Rx Data Packet Size must be set large enough to accept the largest possible packet.
For large received data packets over 246 bytes (This may be less for your PLC):
• The Rx (To PLC) Transfer Mode option must be set to Master (Write to PLC).
• The data will automatically be placed in continuous memory.
• All data will have been transferred to the PLC when the sequence number is updated.
The format of the transmit serial data received from the PLC:
Name Data Type Data Value(s) Access Rule
Transmit (PLC to DeviceMaster) message data Read/Write
Structure of: 0-65535 (FFFF Hex)
Produced data sequence WORD 1-236 (Slave Mode)
Data length (in bytes) WORD 1-246 (Master Mode)
Array of
Data array 0-65535
WORD
Transmit messages have the following characteristics:
• All data is transferred in 16 bit words.
• If operating in Tx (From PLC) Transfer mode of Master (Poll the PLC): The sequence number must be
incremented when there is new data to transmit.
• If operating in Tx (From PLC) Transfer mode of Slave (PLC Writes): The sequence number must be
incremented when there is new data to transmit only if the Disable Tx Sequence Number Check option is not
selected.
• The data length field indicates the number of valid bytes contained in this message.
• The actual length of the message received from a PLC may contain extra, unused data.
• Unused data is ignored.
• A request for transmit data returns the last transmit data message.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Configuring Read/Write Raw/ASCII Devices - 67
Receive and Transmit Message Formats

68 - Configuring Read/Write Raw/ASCII Devices DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Filtering/Data Extraction Configuration

The filtering/data extraction


configuration provided for each serial
and Ethernet interface port provides
filtering for string, RFID, and barcode
data. It also extracts the various
parameters from EPCglobal RFID tag
and UPC/EAN barcode data. This
feature is intended to greatly simplify
both PLC and application programming
tasks.
Filtering/data extraction configuration
options are included under the Serial Modbus/TCP Filtering Functionality
and Ethernet menus in the Filtering sub-
menu.
1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial or Ethernet menu.
3. Click the appropriate Port or Socket number.
4. Click the Filtering sub-menu, which opens the Filtering/Data Extraction Configuration page.

Note: This screen represents Serial | Filtering/Data Extraction Configuration page.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Filtering/Data Extraction Configuration - 69


5. Select your filtering modes:
• Use String Filtering if:
- Your received data can be no greater than 128 bytes in length.
- Your received data is not in EPCglobal or Barcode UPC/EAN formats or you do not want the
DeviceMaster to extract the RFID tag or Barcode parameters.
- You want to filter and eliminate duplicate received messages.
• Use RFID Filtering if:
- You have an Alien or Intermec RFID reader or another reader that can provide RFID tag data is
ASCII Hexadecimal format similar to either an Alien or Intermec reader.
- Your data is in EPCglobal format and you want the DeviceMaster to extract the RFID tag data
parameters and filter based on those parameters.
• Use Barcode Filtering if your barcode data is in UPC-A, UPC-E, EAN-13, JAN, EAN-14, or EAN-8
formats and you want the DeviceMaster to extract the barcode data parameters and filter based on
those parameters.
6. Click the Save button.

70 - Filtering/Data Extraction Configuration DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


PLC Filtering/Data Extraction

PLC Filtering/Data Extraction

Use the following procedure to configure PLC filtering/data extraction on the appropriate Filtering/Data
Extraction Configuration page that corresponds to the desired serial or Ethernet socket port.
1. Click the Serial or Ethernet menu, click the Port or Device number, and then click Filtering.

Note: This shows the Serial version of the Filtering/Data Extraction


Configuration page.

2. Set To PLC Filter Mode to the desired mode.


• If you select String (128 char max), set the Filter Age Time (below) to how long after the last read you want
an entry to be filtered.
• For RFID (EPCglobal formats):
- Set any or all of the To PLC Filter Options (RFID Only) filtering options.
- Set any or all of the To PLC Filter Options (RFID/Barcode) filtering options.
Note: You must select at least one filtering option for filtering/data extraction to function.
3. If Antenna Grouping is desired, set RFID Antenna Grouping option to reflect your antenna configuration.
• Set the RFID Reader Interface Type option to that of your RFID Reader configuration. If your RFID
Reader is not listed, refer to the Filtering and Data Extraction Reference Manual for the supported
RFID reader interfaces. If your RFID reader format matches one the listed formats, then set the RFID
Reader Interface Type option to that format.
• Set the Filter Age Time option to how long after the last read you want an entry to be filtered.
• If you want the DeviceMaster to discard any non-RFID tag messages, set the Discard Unrecognized Data
option to either To-PLC or To-PLC/Application.
Refer to the Filtering and Data Extraction Reference Manual for formatting and other information.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Filtering/Data Extraction Configuration - 71


PLC Filtering/Data Extraction

To PLC RFID Data Format


When the PLC interface is operating in RFID filtering mode, all data sent to the PLC will be in the
following format:

Field Data Type Description


UINT
Produced data sequence Sequence number that is incremented with each
Values = 0-65535
number new message.
(FFFF Hex)

Length of RFID message UINT Length in bytes of following data.


Values = 20-148
Company Code extracted from tag data.
Depending on encoding scheme, this field may
Company Code DWORD[2]
include Company Prefixes, Company Prefix
Indexes, or Government Managed Identifier.
Product Code extracted from tag data
Product/Location Code DWORD[2] Depending on encoding scheme, this field may
include the Item reference, location reference,
asset reference, object class, or be set to zero.
Serial Number extracted from tag data.
Serial Number DWORD[2] Depending on the encoding scheme, this field may
include the Serial Number or individual asset
reference.
Encoding Scheme UINT Encoding Scheme from tag data
Filtering Value UINT Filtering value from tag data
Antenna Number UINT Antenna number on RFID Reader/Scanner
Tag Data Length UINT Length of RFID tag string in bytes
Tag data string (variable length field)
Tag Data BYTE[128] May also include non-tag messages, which can
optionally be sent to the PLC and/or application.

4. For Barcode (UPC/EAN formats):


• Set any or all of the To PLC Filter Options (RFID/Barcode) filtering options. (You must select at least one
for the filtering/data extraction to function.)
• If you are using standard twelve to fourteen-digit UPS/EAN barcodes, set the Barcode UPC/EAN 12-14
Digit Format option to match that of your barcodes. The Company-5/Product-5 is the most popular
format.
• If you are using eight-digit UPC/EAN barcodes, set the Barcode UPC/EAN 8 Digit Format option to match
that of your barcodes.
• If you want the DeviceMaster to discard any non-RFID tag messages, set the Discard Unrecognized Data
option to either To-PLC or To-PLC/Application.
• Refer to the Filtering and Data Extraction Reference Manual for formatting and other information.

72 - Filtering/Data Extraction Configuration DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


PLC Filtering/Data Extraction

To PLC Barcode Data Format


When the PLC interface is operating in Barcode Filtering mode, all data sent to the PLC is in the
following format:

Field Size Description


UINT
Produced data sequence Values = 0-65535 Sequence number that is incremented
number with each new message.
(FFFF Hex)
UINT
Length Length in bytes of following data.
Values = 12-140
Company Code DWORD Company Code
Product Code DWORD Product Code
Numbering Code (from first byte(s) of
Numbering Code UINT barcode data)
Barcode Data Length UINT Length of barcode string in bytes
Barcode Data BYTE[128] Barcode data string (variable length field)

Note: The Company Code will be set to zero for all EAN-8 codes.
5. Make sure that you click Save when you have completed configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Filtering/Data Extraction Configuration - 73


Application Filtering/Data Extraction

Application Filtering/Data Extraction

Use the following procedure to configure application filtering/data extraction. Under the Filtering/Data
Extraction Configuration page that corresponds to the desired serial or socket port.
1. Click the Serial or Ethernet menu, click the Port or Device number, and then click Filtering.

Note: This shows the Serial version of the Filtering/Data Extraction


Configuration page.

2. Set To Application Filter Mode to the desired mode.


• For String (128 char max): set the Filter Age Time option to how long after the last read you want an entry
to be filtered.
• For RFID (EPCglobal formats):
- Set any or all of the To Application Filter Options (RFID Only) filtering options.
- Set any or all of the To Application Filter Options (RFID/Barcode) filtering options.
Note: You must select at least one filtering option for filtering/data extraction to function.
3. If Antenna Grouping is desired, set RFID Antenna Grouping option to reflect your antenna configuration.
• Set the RFID Reader Interface Type option to that of your RFID Reader configuration. If your RFID
Reader is not listed, please refer to the Filtering and Data Extraction Reference Manual for the
supported RFID reader interfaces. If your RFID reader format matches one the listed formats, then set
the RFID Reader Interface Type option to that format.
• Set the Filter Age Time option to how long after the last read you want an entry to be filtered.
• If you want the DeviceMaster to discard any non-RFID tag messages, set the Discard Unrecognized Data
to either To-Application or To-PLC/Application.
Refer to the Filtering and Data Extraction Reference Manual for formatting and other information.

74 - Filtering/Data Extraction Configuration DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Application Filtering/Data Extraction

To Application RFID Data Format


When the application interface is operating in RFID filtering mode, all data sent to the application will be
in the following format:

Field Data Type Description


Company Code extracted from tag data. Depending on encoding
Company Code DWORD[2] scheme, this field may include Company Prefixes, Company Prefix
Indexes, or Government Managed Identifier.
Product Code extracted from tag data
Product/Location Depending on encoding scheme, this field may include the Item
DWORD[2]
Code reference, location reference, asset reference, object class, or be set
to zero.
Serial Number extracted from tag data.
Serial Number DWORD[2] Depending on the encoding scheme, this field may include the Serial
Number or individual asset reference.
Encoding Scheme UINT Encoding Scheme from tag data
Filtering Value UINT Filtering value from tag data
Antenna Number UINT Antenna number on RFID Reader/Scanner
Tag Data Length UINT Length of RFID tag string in bytes

Note: The RFID parameters will be sent to the application in big-endian format. All parameters, with the
exception of the Tag data string, will have to be byte-swapped for use on a little-endian system.
4. For Barcode (UPC/EAN formats):
• Set any or all of the To Application Filter Options (RFID/Barcode) filtering options. (You must select at
least one for the filtering/data extraction to function.)
• If you are using standard twelve to fourteen digit UPS/EAN barcodes, set the Barcode UPC/EAN 12-14
Digit Format option to match that of your barcodes. The Company-5/Product-5 is the most popular
format.
• If you are using eight digit UPC/EAN barcodes, set the Barcode UPC/EAN 8 Digit Format option to match
that of your barcodes.
• If you want the DeviceMaster to discard any non-RFID tag messages, set the Discard Unrecognized Data
option to either To-Application or To-PLC/Application.
Refer to the Filtering and Data Extraction Reference Manual for formatting and other information.
To Application Barcode Data Format
When the application interface is operating in Barcode filtering mode, all data sent to the application will
be in the following format:

Field Size Description


Company Code DWORD Company Code
Product Code DWORD Product Code
Numbering Code UINT Numbering Code (from first byte(s) of barcode data)
Barcode Data Length UINT Length of barcode string in bytes
Barcode Data BYTE[128] Barcode data string (variable length field)

Note: The Company Code will be set to zero for all EAN-8 codes. The Barcode parameters will be sent to
the application in big-endian format. All parameters, with the exception of the Barcode data string,
will have to be byte-swapped for use on a little-endian system.
5. Make sure that you click Save when you have completed configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Filtering/Data Extraction Configuration - 75


Application Filtering/Data Extraction

76 - Filtering/Data Extraction Configuration DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Application Socket Configuration

Use the Application Socket Configuration connection only for connecting to an application such as a
configuration, database, telnet, or a control application when you want to communicate to a serial or Ethernet
device.
Note the following:
• When the application socket is connected to an application, it will allow the application to send and
receive data from the serial or Ethernet device.
• The application socket cannot send data directly to the PLC. Nor can the PLC send data directly to the
application.
• If the PLC interface is also enabled, data received from the serial or Ethernet device will be sent to both
the PLC and application.
• Do not connect the application socket to the DeviceMaster or to the PLC. This may cause
erroneous operation.
Use the following procedure to configure the application socket connection.
Application TCP Connection Configuration pages are available under the Serial and Ethernet menus for the
corresponding serial port or Ethernet socket device.
Access the appropriate configuration page using the following steps:
1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Click the Serial or Ethernet menu.
3. Click the appropriate Port or Socket number.
4. Click the Application Interface sub-menu, which opens the Application TCP Configuration page.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Application Socket Configuration - 77


Application Socket Configuration

5. If your Ethernet TCP/IP application requires another device to connect to


it, configure the socket port on the DeviceMaster to Connect mode:
a. Select the Enable option.
b. Leave the Listen option unselected.
c. Set the Connect To Mode option to Connect-Always.
d. Set the Connect Port option to the socket port number of your
Ethernet application.
e. Set the Connect IP Address to the IP address of your Ethernet
application.
Note: Do not enter the IP address of the DeviceMaster or PLC
here. Connect Mode
f. Set Disconnect Mode to Never.
g. Go to Step 8 to finish configuring the application TCP connection.
6. If your Ethernet TCP/IP application is configured to connect to another
device, configure the socket port on the DeviceMaster to Listen mode:
a. Select the Enable option.
b. Select the Listen option.
c. Use the default Listen Port on the DeviceMaster of 8xxx or designate
your own.
d. Set the Connect To Mode option to Never.
e. Set the Disconnect Mode option to Never.
f. Configure your Ethernet application to connect to the DeviceMaster
at the DeviceMaster IP address and Listen Port.
Listen Mode
g. Go to Step 8 to finish configuring the application TCP connection.
7. If you do not know if your application will connect to another Ethernet
device, but do know your application’s socket port and IP address, you
can do the following to enable both the Listen and Connect modes:
a. Select the Enable option.
b. Select the Listen option.
c. Use the default Listen Port on the DeviceMaster of 8xxx or designate
your own.
d. Set the Connect To Mode option to Connect-Always.
e. Set the Connect Port option to the socket port number of your
Ethernet application.
Listen and Connect Mode
f. Set the Connect IP Address option to the IP address of your Ethernet
application.
Note: Do not enter the IP address of the DeviceMaster or PLC here.
g. Set the Disconnect Mode option to Never.
h. Optionally configure your Ethernet application to connect to the DeviceMaster at the DeviceMaster IP
address and Listen Port.
i. Go to Step 8 to finish configuring the application TCP connection.

78 - Application Socket Configuration DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Application Socket Configuration

8. Set up the Application Rx Packet ID Settings. This is recommended for all application connections and
necessary for installations where multiple connections can be active at one time.
If the start and end of transmission characters are known:
a. Set the Rx Timeout Between Packets option to a time that ensures that an entire message is received.
Values in the 60 to 100 millisecond range are typical.
b. Set the STX (Start of Transmission) Rx Detect option to the known value. Typical values are:
• none
• Standard STX character: one byte, Byte 1 = 2.
c. Set the ETX (End of Transmission) Rx Detect option to the known value. Typical values are:
• none
• Standard ETX character: one byte, Byte 1 = 3
• CR, LF: two bytes, Byte 1 = 13, Byte 2 = 10
If the start and end of transmission characters are not known, set the Rx Timeout Between Packets option
to a time that ensures that an entire message is received. Values in the 60 to 100 millisecond range are
typical.

9. Make sure that you click Save when you have completed configuration.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Application Socket Configuration - 79


Application Socket Configuration

80 - Application Socket Configuration DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Alias Device ID Functionality

Use the Alias Modbus Configuration page to set up Alias device IDs. Alias Device IDs convert received
message Device IDs to alias device IDs and then route the modified Modbus message.
Note the following:
• The Alias Modbus Device ID functionality allows modification of device IDs only when messages are
received from Modbus masters.
• Alias device ID configurations can convert a Modbus message to address a
- Modbus device (Device ID 1-247)
- Serial raw/ASCII device (Device ID = 255)
- Ethernet TCP/IP raw/ASCII device (Device ID = 254)
• The Alias Device ID functionality is intended to help solve problems that occur when:
- A serial Modbus device ID cannot be changed to match a Modbus master program, such as for a PLC.
- A Modbus master program, such as for a PLC or SCADA system, cannot be modified.
- A Modbus master with one connection, such as serial PLC, requires connectivity to multiple Modbus
slave devices with the same device ID and one or more of the slave devices are connected remotely to
different gateways.
Note: The Modbus/TCP firmware has been designed to provide network-wide Modbus connectivity for serial
Modbus masters.
Use the following procedure to add one or Alias Modbus Device ID configurations:.
1. Enter the DeviceMaster IP address in your web browser or highlight the DeviceMaster in PortVision DX
and click Webpage.
2. Select the Modbus sub-menu, which opens the Known Modbus Slave Device List page.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Alias Device ID Functionality - 81


Alias Device ID Functionality

3. Select the Alias Configuration sub-menu.

4. Click the Add Alias Configuration button.


5. Enter the Rx Device ID. This is the device ID that you want to convert.
6. Enter the Alias Device ID. This is the device ID that you want the received device ID converted to.
7. Select Modbus/TCP Master Enable if you want the alias device ID configuration applied to messages
received from Modbus/TCP masters.
8. Select Modbus Serial Master Enable if you want the alias device ID configuration entry applied to messages
received from Modbus serial masters.
9. Select Save.

82 - Alias Device ID Functionality DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H


Troubleshooting and Technical Support

This section contains troubleshooting information for your DeviceMaster. You should review the following
subsections before calling Technical Support because they will request that you perform many of the
procedures or verifications before they will be able to help you diagnose a problem.
• Troubleshooting Checklist on Page 83
• General Troubleshooting on Page 84
• Daisy-Chaining DeviceMaster 2E/4-Port Units on Page 85
If you cannot diagnose the problem, you can contact Technical Support on Page 86.

Troubleshooting Checklist

The following checklist may help you diagnose your problem:


• Verify that you are using the correct types of cables on the correct connectors and that all cables are
connected securely.
Note: Most customer problems reported to Comtrol Technical Support are eventually traced to cabling or
network problems.
• If the DeviceMaster is a DIN rail model, verify that the chassis and signal are grounded.
• Isolate the DeviceMaster from the network by connecting the device directly to a NIC in a host system.
• Verify that the Ethernet hub and any other network devices between the system and the DeviceMaster
are powered up and operating.
• Reset the power on the DeviceMaster and watch the PWR or Status light activity.

PWR or Status LED Description


5 sec. off, 3 flashes, 5 sec. off, 3 flashes ... Redboot™ checksum failure.
5 sec. off, 4 flashes, 5 sec. off, 4 flashes ... SREC load failure.

5 quick flashes The default application is starting


up.
10 sec. on, .1 sec. off, 10 sec. on .1 sec. off
The default application is running.
...

• If the device has a power switch, turn the device’s power switch off and on, while watching the LED
diagnostics.
• If the DeviceMaster does not have a power switch, disconnect and reconnect the power cord.
• Verify that the network IP address, subnet mask, and gateway is correct and appropriate for the network.
If IP addressing is being used, the system should be able to ping the DeviceMaster.
• Verify that the IP address programmed into the DeviceMaster matches the unique reserved IP configured
address assigned by the system administrator.
• If using DHCP, the host system needs to provide the subnet mask and gateway.
• Reboot the system and the DeviceMaster.
• If you have a spare DeviceMaster, try replacing the device.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Troubleshooting and Technical Support - 83
Troubleshooting and Technical Support

General Troubleshooting

This table illustrates some general troubleshooting tips.


Note: Make sure that you have reviewed the Troubleshooting Checklist on Page 83.

General Condition Explanation/Action


Indicates that boot program has not downloaded to the unit.
1. Reboot the system.
2. Make sure that you have downloaded the most current
PWR or Status LED flashing firmware for your protocol:
ftp://ftp.comtrol.com/html/up_main.htm.
Note: If the PWR or Status LED is still flashing, contact
Technical Support.
Indicates that power has not been applied or there is a hardware
PWR or Status LED not lit
failure. Contact Technical Support.
Cannot ping the device through Isolate the DeviceMaster from the network. Connect the device
Ethernet hub directly to the NIC in the host system (see Page 83).
The default IP address is often not accessible due to the subnet
masking from another network unless 192.168 is used in the
Cannot ping or connect to the network.
DeviceMaster
In most cases, it will be necessary to program in an address that
conforms to your network.
DeviceMaster continuously Invalid IP information may also cause the switch or router to
reboots when connected to some check for a gateway address. Lack of a gateway address is a
Ethernet switches or routers common cause.

84 - Troubleshooting and Technical Support DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H
Troubleshooting and Technical Support

Daisy-Chaining DeviceMaster 2E/4-Port Units

The DeviceMaster 2E/4-port models with external power supplies follow the IEEE specifications for standard
Ethernet topologies.
When using the UP and DOWN ports, the DeviceMaster 2E/4 is classified as a switch. When using the UP port
only, it is a simple end node device.
The maximum number of daisy-chained DeviceMaster 2E/4 units, and the maximum distance between units
is based on the Ethernet standards and will be determined by your own environment and the conformity of
your network to these standards.
Comtrol has tested with seven DeviceMaster 2E/4 units daisy-chained together using 10 foot CAT5 cables, but
this is not the theoretical limit. You may experience a performance hit on the devices at the end of the chain,
so it is recommended that you overload and test for performance in your environment. The OS and the
application may also limit the total number of ports that may be installed.
Following are some quick guidelines and URLs of additional information. Please note that standards and
URLs do change.
• Ethernet 10BASE-T Rules
- The maximum number of repeater hops is four.
- You can use Category 3 or 5 twisted-pair 10BASE-T cables.
- The maximum length of each cable is 100m (328ft).
Note: Category 3 or 5 twisted pair cables look the same as telephone cables but they are not the same.
The network will not work if telephone cables are used to connect the equipment.
• Fast Ethernet 100BASE-TX rules
- The maximum number of repeater hops is two (for a Class II hub). A Class II hub can be connected
directly to one other Class II Fast Ethernet hub. A Class I hub cannot be connected directly to another
Fast Ethernet hub.
- You must use Category 5 twisted-pair 100BASE-TX cables.
- The maximum length of each twisted-pair cable is 100m (328ft).
- The total length of twisted-pair cabling (across directly connected hubs) must not exceed 205m (672ft).
Note: Category 5 twisted pair cables look the same as telephone cables but they are not the same. The
network will not work if telephone cables are used to connect the equipment.
• IEEE 802.3 specification: A network using repeaters between communicating stations (PCs) is subject to
the “5-4-3” rule of repeater placement on the network:
- Five segments connected on the network.
- Four repeaters.
- Three segments of the 5 segments can have stations connected. The other two segments must be inter-
repeater link segments with no stations connected.
See http://www.optronics.gr/Tutorials/ethernet.htm for more specific information.
Additional information may be found at http://compnetworking.about.com/cs/ethernet1/ or by
searching the web.

DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H Troubleshooting and Technical Support - 85
Troubleshooting and Technical Support

Technical Support

It contains troubleshooting procedures that you should perform before contacting Technical Support since
they will request that you perform, some or all of the procedures before they will be able to help you diagnose
your problem. If you need technical support, use one of the following methods.

Comtrol Contact Information


ftp://ftp.comtrol.com/html/up_modbus_tcp_main.htm
Downloads
http://downloads.comtrol.com/htm/up_modbus_tcp_main.htm
Web site http://www.comtrol.com
Phone 763.957.6000

86 - Troubleshooting and Technical Support DeviceMaster Modbus/TCP Quick Start: 2000477 Rev. H

You might also like