Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Modbus through MD485 - endianess


dwind Jul 11, 2018 11:34 AM

Hello,

I am trying to read a Float 32-bit Float (Big Endian) from a barometer through Modbus-RTU and MD485..

Monitoring the messages with Hyperterminal, I see the logger sending a correct? modbus message:

05 03 01 08 00 02 45 B1 to read registers 264 and 265.

The reply is also ?correct:

05 03 04 44 78 1C B0 22 6E with the bold bytes corresponding to FP: 992.448242 (hPa) in Big Endian

The commands I use are:

SerialOpen(ComSDC7,9600,3,0,1000) '8N1 communication 9600 baud rate.

ModbusMaster(ModbusResult,COMSDC7,115200,5,3,Pressure,265,1,3,100,0)

Still I cannot get the value in the relative variable.

Thank you very much in advance.

Daniel


JDavis Jul 12, 2018 03:18 PM

Try using 2 for the last parameter of ModbusMaster.


dwind Jul 13, 2018 07:12 AM

Dear Davis,

I've checked and tried several values for the timeout (last parameter of ModbusMaster) but still not worked.


JDavis Jul 13, 2018 10:36 PM

It isn't the timeout parameter. There is an optional parameter for data format.

Log in or register to post/reply in the forum.