CRC Failure when using 32Bit Float


Thread Starter



I am writing a slave application, which reads the Master's request (03H function), and passes a 4 Byte float followed by 2 Byte CRC.

so for instance - when the master sends me this<pre>
01 03 00 6D 00 02 55 D6

My Slave Replies with
01 03 04 42 c8 00 00 B5 6F (sending the value 100.0)</pre>
But my master polling software gives me CRC error. But I basically use the same algorithm to calculate CRC as i have used when I was sending 2 Byte integer values followed by the checksum.

I am rather new to all these things, and I am sure I am missing something. So please comment and share your thoughts as to why I keep getting this error.

BTW, I am using Modbus Poll as my master. Also I mapped the 32Bit float value across two holding registers. Not sure if that's the right thing to do.

Anyways, thanks for reading. I appreciate any help I can get.