FluentModbus icon indicating copy to clipboard operation
FluentModbus copied to clipboard

WriteMultipleRegisters Error

Open petranodavide opened this issue 2 years ago • 1 comments

Hi, I would need to write an alphanumeric value inside a register, in particular the one with address 208. For example: Test2022 I noticed the instruction below client.WriteMultipleRegisters (machine.unitIdentifier, 208, new byte [] {084, 101, 115, 116, 050, 048, 050, 050}); it doesn't work as it should. The machine displays only the value 2 (050). I want to clarify that the machine's Endianness is Little. what am I doing wrong? thank you

petranodavide avatar Feb 09 '22 17:02 petranodavide

I am not sure what went wrong. I have tried to reproduce your issue with the "Modbus slave" application (www.modbustools.com) as shown here, and its working fine:

image

image

You could try to transmit only 2 bytes per request and use "WriteSingleRegister" two times to write the value.

Apollo3zehn avatar Feb 10 '22 09:02 Apollo3zehn