News:

  • August 21, 2026, 12:48:23 AM

Login with username, password and session length

Author Topic: Modbus read of coil or register 0  (Read 7950 times)

eman5oh

  • Sr. Member
  • ****
  • Posts: 59
Modbus read of coil or register 0
« on: October 30, 2017, 10:08:08 PM »
I have noticed that when using the MRX command it seem you can not read Modbus coil 0 or register 0 because the offset has to be 1 or larger. Why is this, or am I missing something?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Modbus read of coil or register 0
« Reply #1 on: October 30, 2017, 10:39:35 PM »
Because there is no such thing in Modbus protocol.  The application layer addresses start at offset 1, e.g. 40001 is the first Holding Register, 30001 is the first Input Register, etc.

Do-more Designer PLCs have Modbus data-blocks as a Modbus Slave (Server), which DO start at 0, because all of the Do-more data-blocks are 0-based, e.g. MHR0, MIR0, etc., just like V0 and D0.  These are not addressable remotely via Modbus.

eman5oh

  • Sr. Member
  • ****
  • Posts: 59
Re: Modbus read of coil or register 0
« Reply #2 on: October 31, 2017, 01:39:52 PM »
Thank You, that clears it up.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Modbus read of coil or register 0
« Reply #3 on: October 31, 2017, 03:28:22 PM »
With some Modbus devices we've had to enter 1 more than the documented register address to read it. We never tried to read a register 0 though.
An output is a PLC's way of getting its inputs to change.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Modbus read of coil or register 0
« Reply #4 on: November 01, 2017, 04:22:56 PM »
There is a table in the Help File in the "Communicating with Modbus/TCP Devices" section. If you had the Modbus Register ranges mapped in this table, it would be helpful. I floundered around a little before I figured it out.