Author Topic: Modbus RTU - Error Writing Unsigned 16 bit integer  (Read 1132 times)

brian3472

  • Newbie
  • *
  • Posts: 2
    • View Profile
Modbus RTU - Error Writing Unsigned 16 bit integer
« on: October 30, 2019, 09:52:55 PM »
I've just started working with Advanced HMI today and have made some progress then ran into this issue. I have device I'm communicating with using the Modbus RTU driver. It's not a PLC but a custom controller supporting Modbus RTU over RS-485. For one function I need to write an unsigned value of 65280 to holding register 40101. I've tested this in Modbus Poll without any issues. I setup a basic label with the register 40101 to allow me to write any value I choose. When I run the panel and attempt to write this value 65280 or 0xFF00 I get an error reporting an overflow from the basic label. It seems I can write any signed 16bit value to this register but not an unsigned. I'm hoping I'm just missing something in setting up the register or value. Any help is greatly appreciated!

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Modbus RTU - Error Writing Unsigned 16 bit integer
« Reply #1 on: October 30, 2019, 10:33:45 PM »
Usually, you would use "U" modifier: U40101 or 40101@U.

See this topic for other Modbus tips:

https://www.advancedhmi.com/forum/index.php?topic=765.0

Also check other Modbus related topics that could be found in the forum.