Modbus client troubleshooting
Created Date: August 19th, 2015
Some Modbus device manufacturers use the terms Master (client) and Slave (server). Typically the external IO device is going to be a server and the robot is going to behave as the client (requesting and consuming messages from the server). Master=client and Slave=server. However, note that the UR controller can be both a server and a client
Watchdogs: When using the MODBUS client to connect to servers with watchdogs enabled (e.g. Beckhoff BK9050)
If you set up output signals with 0Hz frequency and set the output signal in a program, the watchdog will time out when the program stops, and when it is restarted it will report an error (MODBUS exception E2 or E3).
To avoid this either use signals with a constant update frequency, or disable the watchdog on the server.
With Beckhoff 9050:
- You can reset the watchdog timer by writing to address 4385(0x1121) first 48847(0xBECF) and then 45054 (0xAFFE)
- You can disable the watchdog timer by writing to address 4384(0x1120) value 0
Exception codes
The server (external device) responds error messages with exception codes:
- 0x01: ILLEGAL_FUNCTION_CODE
- 0x02: ILLEGAL_DATA_ACCESS (if the request address is illegal)
- 0x03: ILLEGAL_DATA_VALUE (if the request data is invalid)
- 0x04: SLAVE_DEVICE_FAILURE (error has occured in the external device)
- 0x05: ILLEGAL_DATA_VALUE (if the request data is invalid)
- 0x06: SLAVE_DEVICE_BUSY (if slave (server) is not able to respondnow)
For further information about exception codes, consult this page: http://www.simplymodbus.ca/exceptions.htm