Modbus TCP Trouble shooting

This document may help you to solve problem you may encounter when using the Modbus TCP protocol with the Engiby driver on PCD systems. Note that a good knowledge of the partner device is necessary to correctly configure the driver on the PCD.

For trouble shouting on Modbus RTU and ASSI (Serial), please read this document: www.engiby.ch/modbus/modtrb.htm

Note also that a lot of information is also given in the Modbus FAQ document
For Modbus 1 : at
www.engiby.ch/modbus/modfaq.htm.
For Modbus 2 : at
www.engiby.ch/modbus/tcpfaq.htm.

You may also encounter known and fixed problem of the driver itself.
Here you can fined the list of the last modifications of the Modbus 2 driver.

Typical troubles with the Modbus Slave Driver

No TCP communication
If no TCP connect is possible from the master, it is most probably a cabling problem, a bad network configuration or PCD IP configuration error.
Check the cabling. LAN installations are generaly of a good quality. But ensure that all patch cables are placed correctly.
If you are connected over a router, ensure that the Modbus port 502 is open and routed to the correct address.
Ensure that that PCD configuration is correct: activated, correct IP address and subnet mask.
If possible try to establish a PG5 connection with the oline option 'SOCKET' from the same point as the Modbus master. If this don't works, don't look further for a Modbus problem.
These remarks are also valid if UDP is used.

No response
TCP connection is possible but not replay is received by the master. Typical error are:
 - You did not place any application Fbox. In a simple slave program, after the Slave Link Fbox, place the Standard Application Fbox.
    This error is also indicated by the error 'Application timeout' in the Master Fbox.
 - Check the station address at which the master sends its request. This is shown in online in the Master Link Fbox.
    The default value is 1, but some master send the request with address 0 or other. Adjust it in Slave application Fbox.

Difficulties to reconnect after broken link.
In some cases, difficulties have been noticed to reconnect slaves after a break of the link (broken cables or powered off devices).
This is partially due to the fact that the PCD has a limited number of internal sockets. After a socket is closed (normally or because of broken link) the firmware need some time to free the unused socket.
Ensure that you are using a recent firmware and Modbus driver.
If possible use the UDP protocol instead of TCP. UDP is not specified as possible option in the Modbus specification but work well also. It is simpler and even more efficient.
It such difficulties remains, it may be worth to place one Modbus Link Fbox for each Slave station (up to 10 are possible). In this case, less TCP connect/disconnect is needed and the handling of the internal sockets is improved.

Modbus TCP don't work the EIBNet/IP driver
To be able to share the Open Data Mode (communication mode used for open TCP/UDP) between several drivers (even using different TCP ports), the communication drivers must use a specific mechanism. This has been implemented in the following versions:
Modbus 2: version 2.5.057 (contact Engiby if an update is needed)
EIB Library version $2.5.302 for PG5 1.4 and $2.6.041 for PG5 2.0 (contact Saia if an update is needed)
Furthermore, under PG5 2.0, it is necessary to activate the Open Data Mode initialisation in the Device Configurator.
Other 'native' communication protocols, like S-Bus, Saia Modbus, HTTP or FTP are not concerned by this topic.

Typical troubles with the Master Driver

No TCP connection
Same remarks as for the Slave driver.

Some requests remains without response
In Modbus TCP, you must adjust the IP address of the concerned slave but also its station address. Some slaves expect the addrress 1, other the address 0 by default.
Some slaves do not supports all Modbus functions or have restriction on the number of requested values.
Check the following:
- You use the correct Modbus function
- The address where you request values is valid for the slave
- The number of requested values is supported by the slave
All these data should be given in the manual of the slave device, else ask the manufacturer.

Error ‘Slave message’ in the Master Fbox
This error means that the slave refused the request and sent an error message back (also called 'exception response').
Typical causes are:
- The requested address is not valid for the slave.
- The range overpasses the valid address range in the slave.
- A value sent is not accepted by the slave.
Take care at the address offset option (0 or 1). If this option is not correctly set the address maybe shifted by one and be invalid for the slave.
E.g. address 25 in the master with offset=1, maybe understand as address 24 in the slave if the offset 1 is not applied by the slave. Address 24 may be invalid for the slave.

Modbus TCP don't work the EIBNet/IP driver
Same comments as for the Slave Driver. See comments above.

Back to Engiby main page

Engiby / 08.06.2010