ProSoft Technology MVI46-MCM User Manual

Page 55

Advertising
background image

MVI46-MCM ♦ SLC Platform

Diagnostics and Troubleshooting

Modbus Communication Module

User Manual

ProSoft Technology, Inc.

Page 55 of 108

March 29, 2011

4.3.2 Command Error Codes

The MVI46-MCM module will return an individual error code for every configured
command. The location of these error codes are determined by the valued
entered for the parameter, C

OMMAND

E

RROR

P

OINTER

.

This parameter

determines where in the module's 5000-register database the error codes for
each command will be placed. The amount of error codes returned into the
database is determined by the C

OMMAND

C

OUNT

parameter; therefore if the

maximum number of commands have been selected (100), then 100 registers
will be placed into the module memory.

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 returned by the device
itself. This means that the Slave device understood the command, but replied
with an Exception Response, which indicates that the command could not be
executed. These responses typically do not indicate a problem with port settings
or wiring.

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 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.

Instead, try reading just one register, and see if the error code goes away. You
can also try adjusting your DevAddress -1, as some devices have a 1 offset.

An Error Code of 3 is common on Modbus Write Commands (Function Codes
5,6,15, or 16). Typically, this is because you are 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.

Refer to the documentation for your Slave device, or contact ProSoft Technical
Support for more help with these types of error codes.

Advertising