Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: eman5oh on October 30, 2017, 10:08:08 PM

Title: Modbus read of coil or register 0
Post by: eman5oh 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?
Title: Re: Modbus read of coil or register 0
Post by: franji1 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.
Title: Re: Modbus read of coil or register 0
Post by: eman5oh on October 31, 2017, 01:39:52 PM
Thank You, that clears it up.
Title: Re: Modbus read of coil or register 0
Post by: b_carlton 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.
Title: Re: Modbus read of coil or register 0
Post by: ATU 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.