Today is...
Sunday, March 26, 2017
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
A tutorial introduction to programming using the QuickBuilder Programming Environment.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Correct Code for Modbus Communication
Need help with Modbus RS485 and code to control Raylogic processor

Dear Sir,

I am Using Raylogic processor (Nano) and i want to control Daikin VRV AC thru RS485. we installed Modbus panel, but i don't have Hex Code. pls Help for same.

also i am send one command. pls check is right or wrong.

ON \x01\x06\xA4\x11\x57\x61\x27\x05
OFF \x01\x06\xA4\x11\x57\x60\xE7\xC4

Vilas panchal

Moderator's Note: I fixed the misspellings in this post. The author is not a native English speaker, so be nice to him. Thanks guys.

2 out of 2 members thought this post was helpful...


There are some problems with the telegrams you are sending to the Daikin AC.

-First of all you use address \xA4\x11 (42001), this should be \x07\xD0 (2000). Registers 4xxxx are holding registers and you do not have to use this with modbus commands. Same for input registers do not use the 3xxxx. The command determines which registers you want to read or write.

-Second problem is that for the Daikin (and a lot of other modbus devices) register 40001 is addresses as 0 so this means that if you want to read or write to register 42001 you should address it as 2000. (Remove 4xxxx or 3xxxx and subtract 1) Command 6 and 16 write to 4xxxx registers. You can not write to 3xxxx registers.

-Third problem is that the bytes in your checksum are in the wrong sequence. They should be switched.

See below telegram for ON and OFF

ON \x01\x06\x07\xD0\x57\x61\x76\x9F
OFF \x01\x06\x07\xD0\x57\x60\xB7\x5F

Thanks for your Help

i need one more help. i want to know x57 what its meaning in the below code

>ON \x01\x06\x07\xD0\x57\x61\x76\x9F

> ON \x01\x06\x07\xD0\x57\x61\x76\x9F

Function code 0x06, write single register
0x07 D0 Write to register 42001 (2000)
0x57 61 Data to write 22369


Thanks for your help.

I want to send command for AC ON at 20 deg C and SWING Position
please let me know this is correct or wrong command.

AC ON AT 20degC \x01\x06\x07\xD0\x07\x61\x4A\x9F
AC ON AT 20degC \x01\x06\x07\xD1\x07\x61\x1B\x5F

please let me know any reference material for making new commands.