Showing results for 
Search instead for 
Did you mean: 

Modbus error 6010 Exception code: 10

Go to solution

Hello to all,


I need help with the modbus library, I just downloaded it and since I am not an expert at modbus I'm having some troubles using it. Basically what I want to do right now is to read two input registers of a slave device (address 1006 and 1007); using MB Ethernet Master Query Read Holding Registers (poly).vi. All I get is an error 6010 MODBUS Exception code: 10. I saw the MB Ethernet Example to compare it with mine and see if I was missing something but I haven't been able to solve the problem.


I am putting a screenshot of the block diagram.


Please someone tell me what I am missing!


0 Kudos
Message 1 of 8

I don't see the cluster for MBAP header wired into the top of your Modbus VI.

0 Kudos
Message 2 of 8

I didn't put it since I'm not sure what to put on it, and in the detailed help says that is additional info not usually required. So I left it unwired. Also in the MB Ethernet Example that input was unwired.

Where do I get the info for that cluster?

0 Kudos
Message 3 of 8
Accepted by topic author rd.mcdt

I've only done serial modbus, not ethernet modbus, so I can't be sure.  But with serial modbus, you definitely have to define the slave address.  That cluster has a "client ID" which seems to be that it should be equivalent to a slave address.

0 Kudos
Message 4 of 8

The indicator says Holding registers but I made a mistake at naming that indicator.

0 Kudos
Message 5 of 8

Googling exception 10 gave me this.


" Modbus Exception Code 10 Received from the Connected Modbus Device "Specialized use in conjunction with gateways indicates that the gateway was unable to allocate an internal communication path from the input port to the output port for processing the request. This usually means that the gateway is misconfigured or overloaded."



Maybe that info helps.

0 Kudos
Message 6 of 8

The default address of the slave device is 1, I put it in the Unit ID of the MBAP cluster, and the error disappeared. Apparently now is reading something, I don't think the reading was correct but maybe it's something related with the register address.


But at least is now reading something without an error. 😄

Thanks for the help!!

0 Kudos
Message 7 of 8

That's good to hear.


Keep an eye for the register addresses as well.  At least in serial, the register is zero-based while the modbus spec has them starting with zero.  So 40001 and 40002 registers would be entered as register 0 and register 1 in the VI's.  (Drop the leading digit that identifies the type of register and subtract 1.)


I don't know if the register numbers you used already account for that or not because your register numbers didn't seem to have that leading digit that would indicate te type of register.

0 Kudos
Message 8 of 8