stefanodimattia / nmodbus

Automatically exported from code.google.com/p/nmodbus
0 stars 0 forks source link

checksum error in query then some slave Modbus response with an exception "11" #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
see file in attachment.

each time i send a MODBUS query on TCP/IP, an error of checksum appears.

Some Server Modbus give a answer but a TSX ETG 1000 no accept to answer 
and sen an exception number "11".

Original issue reported on code.google.com by jreber...@hotmail.com on 2 Mar 2007 at 2:29

Attachments:

GoogleCodeExporter commented 8 years ago
Are you by chance addressing serial slaves through a TCP/IP gateway?

The slave exception code 11 (0x0B) is the GATEWAY TARGET DEVICE FAILED TO 
RESPOND 
exception response. Serial devices require a slave ID to be specified, rather 
than 
being addressed purely by IP.

To do so, use the IModbusMaster interface as opposed to the IModbusTcpMaster 
interface. The IModbusMaster method signatures include an argument for slave ID.

e.g.

IModbusMaster master = ModbusTcpMaster.CreateTcp(client);
...
master.WriteMultipleRegisters(slaveID, startAddress, registers);

Let me know if this doesn't solve your problem.

Scott

Original comment by sja...@gmail.com on 29 Mar 2007 at 7:44

GoogleCodeExporter commented 8 years ago
Hello,

My problem was a wrong value assignment of slaveID. ( "null" instead of 
"0x00/0xFF")
also the calculating of cheksum returned an error and the gateway didn't accept 
the 
query.

thanks,
Jerome.

Original comment by jreber...@gmail.com on 30 Mar 2007 at 7:20

GoogleCodeExporter commented 8 years ago

Original comment by sja...@gmail.com on 2 Dec 2007 at 1:35