This document may help you to solve problems you may encounter when using the Modbus TCP protocol with the Engiby driver on Saia PCD® systems. Note that a good knowledge of the partner device is necessary to correctly configure the driver on the Saia PCD®.
For trouble shooting Modbus RTU and ASCI (serial), please refer to this document: Modbus Trouble shooting
Note also that a lot of information is also given in the Modbus FAQ documents
For Modbus 1 (obsolete) : at Modbus FAQ
For Modbus 2 : at Modbus 2 Driver
In very rare cases 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 : Modbus 2 History
Typical troubles with the Modbus Slave Driver
No TCP communication
If no TCP connection is possible from the master, it is most probably a cabling problem, a bad network configuration or a configuration error of the Saia PCD®. In this case
check the cabling. LAN installations are generally of good quality, but ensure that all patch cables are placed correctly.
If you are connected over a router, ensure that the TCP or UDP port 502 is open and routed to the correct IP address.
Ensure that that Saia PCD® configuration is correct: IP communiation activated, correct IP address and subnet mask.
If possible try to establish a PG5 connection with the online option 'SOCKET' from the same point as the Modbus master. If this don't work, 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 a "Standard Application" FBox must be placed.
This error is also indicated by the error 'Application timeout' in the Master FBox. - Check the station address to which the master sends its request. This is shown 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 needs some time to free the unused sockets.
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 dosn't work in parallel of 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 Burgess Controls if an update is needed)
Furthermore, under PG5 2.x, 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 address 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:
- The correct Modbus function is used
- The address from which values are requested is valid for the slave
- The number of requested values is supported by the slave
All this information should be given in the manual of the slave device, else contact the manufacturer to obtain this information.
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 of the values to be read is bigger than 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.