
MVI56-MCM
♦
ControlLogix Platform
Verify Communications
Modbus Communication Module
Page 64 of 159
ProSoft Technology, Inc.
July 24, 2008
Below is a list of the error codes for the module:
Standard Modbus Protocol Errors
Code Description
1 Illegal
Function
2
Illegal Data Address
3
Illegal Data Value
4
Failure in Associated Device
5 Acknowledge
6
Busy, Rejected Message
The "Standard Modbus Protocol Errors" are error codes that are being returned
by the device itself. This means that the slave device understood the command,
and replied back to that command with what is referred to as an Exception
Response. The slave does not like something about the command that has been
issued by the master.
The most common values are Error Code 2 and Error Code 3.
Error Code 2 means that the module is trying to read an address in the device
that the slave does not recognize as being a valid address. This is typically
caused by the slave device skipping some registers. If you have a slave device
that has address 40001 to 40005, and 40007 to 40010, you cannot issue a read
command for addresses 40001 to 40010 (function code 3, DevAddress 0, Count
10) because address 40006 is not a valid address for this slave.
Try reading just one register, and see if the error code goes away. You may also
want to try adjusting your DevAddress -1, as some devices have a 1 offset.
An Error Code of 3 is common on Modbus Write Commands (FC 5,6,15, or 16).
Typically, this is because you may be trying to write to a parameter that is
configured as read only in the slave device, or the range of the data you are
writing does not match the valid range for that device.
If you are getting one of the above listed error codes, this typically means that
cabling, parameters such as baud rate, data bits, parity, and your wiring are all
good, it is just that the slave device does not like the command being issued for
some reason or another.
You may contact your slave device manufacturer or ProSoft Technical Support
for more help with these types of error codes.
Module Communication Error Codes
Code Description
-1
CTS modem control line not set before transmit
-2
Timeout while transmitting message
-11
Timeout waiting for response after request
253
Incorrect slave address in response
254
Incorrect function code in response
255
Invalid CRC/LRC value in response