ACKSYS-logo

ACKSYS DTUS0414 Modbus Firmware Ethernet And Wi-Fi Port Servers

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-product

Product Specifications

  • Product Name: MODBUS TCP Firmware User’s Guide for Ethernet and Wi-Fi Port Servers
  • Manufacturer: ACKSYS
  • Address: ZA Val Joyeux 10, rue des Entrepreneurs, 78450 VILLEPREUX FRANCE
  • Contact:

Product Usage Instructions

When to Use the MODBUS Firmware
This embedded software allows any port server (wired or wireless) made by ACKSYS to be used as a gateway between a MODBUS TCP network and a MODBUS serial network. The MODBUS Gateway may operate in two modes:

  1. Serial Master Mode (Client mode) when connected to one master MODBUS serial peripheral.
  2. Serial Slave Mode (Server mode) when connected to slave MODBUS serial peripherals.

MODBUS / Serial Overview
MODBUS: Master/Slave communication protocol where one device (Master) controls serial activity by polling slave devices. Supports one master device and up to 247 slave devices with assigned addresses.

Transmission Media: Initially for serial asynchronous media like RS232, RS422, or RS485. MODBUS TCP firmware handles this on its serial port but can encapsulate frames in TCP/IP for Ethernet or radio transmission.

Modes of Transmission
ASCII Framing: Framing in ASCII mode uses the colon character to indicate the beginning of the frame and carriage return/line feed to delineate the end of the frame.

COPYRIGHT (©) ACKSYS 2009
This document contains information protected by Copyright. The present document may not be wholly or partially reproduced, transcribed, stored in any computer or other system whatsoever, or translated into any language or computer language whatsoever without prior written consent from ACKSYS Communications & Systems – ZA Val Joyeux – 10, rue des Entrepreneurs – 78450 VILLEPREUX – FRANCE.

REGISTERED TRADEMARKS 

  • ACKSYS is a registered trademark of ACKSYS.

NOTICE

  • ACKSYS ® gives no guarantee as to the content of the present document and takes no responsibility for the profitability or the suitability of the equipment for the requirements of the user.
  • ACKSYS ® will in no case be held responsible for any errors that may be contained in this document, nor for any damage, no matter how substantial, occasioned by the provision, operation or use of the equipment.
  • ACKSYS ® reserves the right to revise this document periodically or change its contents without notice.

WHEN TO USE THE MODBUS FIRMWARE ?

This embedded software allows any port server (wired or wireless) made by ACKSYS to be used as a gateway between a MODBUS TCP network and a MODBUS serial network. The MODBUS Gateway may operate in two distinct modes, depending on the type of equipment connected to the serial line:

  • With one master MODBUS serial peripheral, the port server operates in SERIAL MASTER MODE mode (also named “Client” mode).
  • With slave MODBUS serial peripherals, the port server operates in SERIAL SLAVE MODE mode (also named “Server” mode).

MODBUS/TCP is a variant of the MODBUS family of simple, vendor-neutral communication protocols intended for supervision and control of automation equipment. Specifically, it covers the use of MODBUS messaging in an ‘Intranet’ or ‘Internet’ environment using the TCP/IP protocol. The most common use of the protocol at this time is for Ethernet attachment of PLC’s, I/O modules, and ‘gateways’ to other simple field buses or I/O networks.

The MODBUS Applications Programming Interface for Network Communications, (MBAP), was developed by Modicon to allow traditional serial MODBUS communications to occur over a TCP/IP network. It basically defines a “wrapper” around the MODBUS protocol to accommodate routing data packets between two network nodes. The same master/slave messaging protocol is used, however the network aspect allows multiple master devices to access data from the same or different slave devices connected to the network. Using the Client/Server approach, a MODBUS/TCP slave device represents the server side of the communications model, accepting and responding to queries from one or more network client master applications.

MODBUS / SERIAL OVERVIEW

MODBUS
MODBUS is a Master/Slave communication protocol, whereby one device, (the Master), controls all serial activity by selectively polling one or more slave devices. The protocol provides for one master device and up to 247 slave devices on a common line. Each device is assigned an address to distinguish it from all other connected devices. Only the master initiates a transaction. Transactions are either a query/response type, (only a single slave is address), or a broadcast/no response type, (all slaves are addressed). A transaction comprises a single query and single response frame or a single broadcast frame.

Transmission media
MODBUS was initially devised to work on serial asynchronous media like RS232, RS422 or RS485. This is the kind of media that the MODBUS TCP firmware handles on its serial port. However the MODBUS frames can be transmitted through other media like Ethernet or radio; in this case the MODBUS frame must be encapsulated in the frame of the specific media. On its network port, the MODBUS TCP firmware encapsulates MODBUS frames in TCP/IP frames to handle the specific addressing of devices on this medium. The following descriptions apply to the serial asynchronous media.

Modes of transmission
The mode of transmission is the structure of the individual units of information within a message, and the numbering system used to transmit the data. Two modes of transmission are available for use in a serial MODBUS system. Both modes provide the same capabilities for communicating with PLC slaves; the mode is selected depending on the equipment used as a MODBUS Master. One mode must be used per MODBUS system; mixing of modes is not allowed.
The modes are ASCII (American Standard Code for Information Interchange), and RTU, (Remote Terminal Unit.) The characteristics of the two transmission modes are defined below:

ASCII Framing
Framing in ASCII transmission mode is accomplished by the use of the unique colon, (:), character to indicate the beginning of frame and carriage return/line feed, (CRLF), to delineate end of frame. The line feed character also serves as a synchronizing character which indicates that the transmitting station is ready to receive an immediate reply.

BEGIN FRAME  

ADDRESS

 

FUNCTION

 

DATA

ERROR CHECK  

EOF

READY TO RECEIVE
 

:

 

2-CHAR 16- BIT

 

2-CHAR 16- BITS

 

N X 4- CHAR N X 16-

BITS

 

2-CHAR

16-BITS

 

CR

 

LF

RTU Framing
Frame synchronization can be maintained in RTU transmission mode only by simulating a synchronous message. The receiving device monitors the elapsed time between receipts of characters. If three and one-half character times elapse without a new incoming character, then the frame received is considered terminated: the receiving device checks the CRC (last two characters received) to determine frame validity, and assumes that the next byte received will be an address. A frame is also considered completed when 256 characters have been received.
Note: for practical purposes, the three and one-half character time is usually rounded up to four characters time.

T1,T2,T3,T4 ADDRESS FUNCTION DATA CHECK T1,T2,T3,T4
  8-BITS 8-BITS N X 8-BITS 16-BITS  

USING THE FIRMWARE IN SLAVE MODE

The SLAVE mode, also called “Server” mode, is used when the Modbus Slave devices are located on the serial link of the Port server. The Master is then a Modbus TCP device, located on the network side of the Port server. The port server acts as a gateway between the networked Modbus TCP master device and serial Modbus slave devices.

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (1)

The port server gateway converts and transfers requests from the TCP clients towards the serial line, then wait for an answer and sends it back to the client. As the serial line may support several bussed slave Modbus peripherals, these ones are distinguished on the serial link by their own unique Modbus address. Therefore, on TCP side, the client application identifies each serial peripheral by its Modbus address and the IP address of the port server gateway.

Nevertheless, if the TCP client has not the possibility to specify the Modbus address of the slave device, the latter may be forced by the port server gateway, allowing the client to identify the slave device only by its IP address. In this case, the slave device must be unique on the serial link.

With firmware versions 2.0.0.0 and above, up to five simultaneously opened connections are allowed. Upon reception of a sixth connection request, the oldest unused connection is automatically closed. The port server gateway handles only one transaction at a time. It can memorize one additional request from the network, which will be sent to the serial line after completion of the current transaction (answer from the serial peripheral or time out).  The delay allocated to the serial peripheral’s answer, called “Time Out” delay, is defined in the administration menu discussed later in this documentation (command “stout”).

If the slave device fails to respond to a Modbus request, at expiration of the time out the gateway merely cancels the transaction: no answer is returned to the TCP client, so it can likewise fall in time out. Therefore, the TCP client time out value must be slightly higher than the gateway time out configured by command “stout”. Optionally, and if handled by the TCP client, the gateway can return Modbus exception 11 (0xB) in case of response failure from a slave device. This exception, defined by Modbus TCP specifications, is specific to gateways, and may be activated using command “exception”.

An access control option may be activated to forbid device accessibility to unauthorized clients: use command “authip” to define a list of authorized IP addresses. In Slave mode, the port server gateway listens by default Modbus TCP registered port 502. Nevertheless, another port can be configured, for compatibility with some non-standard applications, by the mean of command “mdbport”. SLAVE mode configuration summary

(Slave devices on the Port server serial link)
The following parameters must be checked in Slave mode. All these parameters can also be changed with the browser interface (Network serial port servers administration software).

  • Network parameters (IP address, IP gateway, netmask, DHCP…)
  • On WiFi models, WiFi parameters (SSID, channel, infrastructure/ad-hoc, keys…)
  • Serial parameters (baud rate, electrical interface…)
    please note: the “slave” and “master” submodes of the RS422 interface are NOT related to the “slave” and “master” roles in MODBUS. Please refer to the “set serial interface” command for details.
  • Parameters specific to the Modbus Slave mode:
    • Fiarmware
      download and/or activate the MODBUS firmware (see product user’s guide or quick start guide).
    • Device Mode
      command: set serial mode slave
    • Modbus Mode
      Either command: set serial mode rtu Or command: set serial mode ascii
    • Response time out
      command: set serial stout nnnn
  • Seldom used parameters:
    • These parameters should be changed only in special cases. See the command list for details.
    • command: set net slaveid nn
    • command: set net exception on / off
    • command: set net authip [IP Address]
    • command: set net mdbport nnnn
    • command: set net metric nn
  • Debugging parameter
    command: set serial nocheck on / off
    This command allows to suppress integrity control of serial frames received from a slave device. When activated, frame length and CRC control are disabled, and data is returned “as is” to the TCP client, without any error warning. Serial nocheck should only be used for debugging purposes.

More parameters are available. See the product user’s guide or the quick start guide.

USING THE FIRMWARE IN MASTER MODEUSING THE FIRMWARE IN MASTER MODE

In this mode, also called “Client” mode, the MODBUS master equipment is connected on the serial link, and the MODBUS port server gateway acts as a proxy for the networked slaves, capturing requests from the master, sending them to the networked slaves when appropriate, waiting for answers and retransmitting them to the serial master. If other slave MODBUS peripherals are present on the serial bus, they are not accessible from the network. Every request issued by the master toward slave TCP devices must be acknowledged by an answer in a predefined delay, configurable through the administration menu (command “tcpto”).

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (2)

The Master on the serial line doesn’t know the network address of the slave devices that it interrogates: those are identified on the serial side by an unique MODBUS address. A translation table in the administration menu establishes the correspondence between the MODBUS serial addresses and the corresponding IP addresses.

In the case of a distant server managing itself several slave serial devices, these last are also identified by their own MODBUS address. The configuration table of the port server gateway offers the possibility to establish a correspondence between the MODBUS address known by the master equipment on the port server serial link, and the distant slave address used on the remote Server serial link. For example, serial MODBUS address range 1 to 8, scanned by the Master, may be assigned to addresses 31 to 38 (‘unit identifier’ field of the MODBUS TCP frame) on the remote slave serial link.

The port server gateway can manage simultaneously up to 5 active connections, each of these connections capable to give access to up to 247 slave devices (on the same IP address). If the number of servers to interrogate (different IP addresses) is greater than 5, the oldest connection is closed when the master gives out the sixth connection request.

In Master mode, the port server gateway requests connections to remote server on the TCP registered port 502. It is however possible to define a different TCP port for connection to non-standard equipments.
MASTER mode configuration summary

(Modbus Master device is on the port server serial link)
The following parameters must be checked in Master mode. All these parameters can also be changed with the browser interface (Network serial port servers administration software).

  • Network parameters (IP address, IP gateway, netmask, DHCP…)
  • On WiFi models, WiFi parameters (SSID, channel, infrastructure/ad-hoc, keys…)
  • Serial parameters (baud rate, electrical interface…)
    please note: the “slave” and “master” submodes of the RS422 interface are NOT related to the “slave” and “master” roles in MODBUS. Please refer to the “set serial interface” command for details.
  • Parameters specific to the Modbus Master mode:
    • Firmware
      download and/or activate the MODBUS firmware (see product user’s guide or quick start guide).
    • Device Mode
      command: set serial mode master (because your serial device is a master)
    • Modbus Mode
      Either command: set serial mode rtu Or command: set serial mode ascii
    • Serial / Network address assignment command: set net slaveid […]
    • Response time out
      command: set net tcpto nnnn
  • Seldom used parameters:
    • These parameters should be changed only in special cases. See the command list for details.
    • command: set net mdbport nnnn
    • command: set net metric nn

COMMANDS REFERENCE LIST

Displaying the configuration parameters is allowed if the “showperm” parameter is set to “allow”. If set to “deny”, the configuration parameters can only be displayed by the administrator after logging in.
Some parameters can only be displayed for your information but cannot be changed.

Conventions used in these tables

  • bold text must be typed as is.
  • italicized text denotes a parameter which must be replaced by the proper value.
  • italicized bold text denotes warnings or limitations.

Tables

  • general parameters
  • network parameters
  • wireless parameters
  • serial parameters
  • parameters available only for the “WLg” products range
  • notes

SETTING OR DISPLAYING THE GENERAL PARAMETERS

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (3)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (4)

SETTING OR DISPLAYING THE NETWORK PARAMETERS

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (5)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (6)

Syntax in MASTER mode

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (7)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (8)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (9)

SETTING OR DISPLAYING THE SERIAL PARAMETERS

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (10)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (11)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (12)

SETTING OR DISPLAYING PARAMETERS FOR THE “WLG” RANGE OF DEVICES

ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (13)ACKSYS-DTUS0414-Modbus-Firmware-Ethernet-And-Wi-Fi-Port-Servers-fig- (14)

NOTES

  1. This group of commands allows to retrieve or set globally the ACKSYS device server configuration.
  2. Security note: sensitive data, like login and password information, are conveyed in clear text by the following commands. You must take any step to protect these data from disclosure. As a basic protective step, the commands themselves can only be used by a logged-in operator.
  3. Usage note: Some data conveyed by these commands should be kept unique to a device. This applies especially to the IP and MAC addresses in the ‘common’ parameters. You should either avoid to change this unique data or to restore them after using the ‘set’ commands.
  4. Usage note: Some parameters take effect immediately, as specified elsewhere. Beware that the parameters you change do not affect the device at the moment you set them. For example, if you change the DHCP Client Id, this will take effect at the next lease expiration, which could happen soon.
  5. Use this group of commands to improve buffering of outgoing network data.
  6. Usage note: When in RFC2217 mode, and for the purpose of these commands, any change in the control signals and the line state trigger the same actions as an arrival of 7 or 8 characters. This behavior of control signals and line state could change in the future.
  7. Usage note: For the purpose of these commands, “send to the client application” means that the data is queued for transmission as soon as possible. The reception at the client side may be delayed by network contention, client not acknowledging data fast enough, packet lost, etc.
  8. Usage note: When a delay is specified as a number of characters duration, it is converted at run-time into a count of milliseconds (based on the character size and baud rate), and rounded up to the next millisecond.
  9. Character strings can be naked or quoted. If naked, they start at the first non-space character, they finish at end of line, and can include any “authorized character”. If quoted, they start at the first character after the opening double quote, they finish either at end of line or at the first encountered double quote, and can include any “authorized character” except the double quote itself. The authorized characters are: A to Z, a to z, 0 to 9, * ,?, “, -, underscore, ., :, space.

FAQs

What is MODBUS TCP used for?
MODBUS TCP is used as a gateway between MODBUS TCP and MODBUS serial networks, allowing communication between different types of equipment.

How many slave devices can be connected in a MODBUS network?
A MODBUS network supports up to 247 slave devices along with one master device.

Can MODBUS frames be transmitted through Ethernet?
Yes, MODBUS frames can be transmitted through Ethernet by encapsulating them in TCP/IP frames for addressing devices on this medium.

ZA Val Joyeux
10, rue des Entrepreneurs 78450 VILLEPREUX FRANCE

Telephone: +33 (0)1 30 56 46 46
Fax: +33 (0)1 30 56 12 95
Web: www.acksys.fr
Hotline: support@acksys.fr
Sales: sales@acksys.fr

Documents / Resources

ACKSYS DTUS0414 Modbus Firmware Ethernet And Wi-Fi Port Servers [pdf] User Guide
DTUS0414 Modbus Firmware Ethernet And Wi-Fi Port Servers, DTUS0414, Modbus Firmware Ethernet And Wi-Fi Port Servers, Firmware Ethernet And Wi-Fi Port Servers, Wi-Fi Port Servers

References

Leave a comment

Your email address will not be published. Required fields are marked *