Author Topic: How to read MODBUS register  (Read 362 times)

songl1993

  • Regular
  • *
  • Posts: 1
    • View Profile
How to read MODBUS register
« on: April 24, 2021, 08:17:43 am »
Hi I'm trying to read a value using TCP/IP MODBUS, and the register number is 0FFDH. I put the start address as "0" just to test it, and got "illegal function". Then I put in 255 (decimal value of 0FF), and still got "illegal function".
 
What kind of input value do you accept for the start address on MODBUS CLIENT?

Thank you,

support

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 86
    • View Profile
    • Apphugs
Re: How to read MODBUS register
« Reply #1 on: April 24, 2021, 09:08:01 am »
0x0FFD = 4093
If that doesn't work try +1 and -1, i.e. 4092 and 4094

Register addresses can be 0 based or 1 based, depending on Modbus device, hence try the addresses either side of 4093

Hope this helps