ModBus/TCP Function 16 - No Response

J

Thread Starter

jensencom

Hi,

I use function 03 to read some registers from a modbus Slave Device, using ModBus/TCP. When using function 16 (write multiple registers), the slave gives no response. I have to build the Protocol myself, so with function 03 I send:

2 Bytes Transaction ID: 00 00h
2 Bytes Protocol ID: 00 00h
1 Byte Length_MSB: 00h
1 Byte Length_LSB: 06h
1 Byte Unit ID: 00h
1 Byte Function Code 03h
2 Byte Address 00 00h
2 Byte requestet # of Words 00 26h

Therefore, I get my data as Response from ModBus Slave Device.

Now I want to send my Data to this device.
2 Byte Transaction-ID: 0000h
2 Byte Protocol ID: 0000h
2 Byte Data Length: 00 17h
1 Byte Unit Code: 00h
1 Byte FunctionCode: 10h
1 Byte AddressHigh 04h
1 Byte AddressLow 01h
1 Byte Word Count High 00h
1 Byte Word Count High 08h
1 Byte Byte Count 10h
and 16 Byte of Data

Therefore, I get NO response. Reading the Spec, it should work properly?

Can you help?

jensencom
 
F

Fred Loveless

It is possible that the device does not support multi-item writes. This is a problem when using devices that using a modubs protocol but are not modicon units. We see the issue all the time. Do have have make and model information and does the manufacturer indicate that Multi-writes are supported. If it is not supported then they should be returning an exception that indicates that. You may try writing one register with Function code 16 and if that work try writing blocks, i.e. 8 register, 16 register, etc.

Fred Loveless
Support Manager
Kepware Technologies
http://www.kepware.com
 
Top