Modbus Register Address

W

Thread Starter

Whitepage

Dear all,

I have a problem with Modbus Register address,
Let i explain clearly which problem i have for you ,
As you said , the register address from : 0000-FFFFh ,
In our program PME , i used the Modicon (Schneider) program, They have
format is :

*0*xxxx, (coil)
*1*xxxx,(Input status)
*3*xxxx,(Input Register)
*4*xxxx,(Holding Register),

All of them is* 5 digits* ,

that mean if i have register address example is : 1005( 4 digits)
When i enter in my program , it will be :

1005 = 0xxxx + 1005
11005 =1xxxx + 1005
31005 =3xxxx + 1005
41005 =4xxxx + 1005,
As picture attached , it is OK .

But, if i have the register is : 50768 (5 digits).

if i enter this address in my program :

50768 = 0xxxx + 50768
60768 =1xxxx + 50768
80768 =3xxxx +50768
90768 =4xxxx +50768

*They will be not the same with the format address : 0xxxx, 1xxxx,
3xxxx,4xxxx, ? *

If i enter them as below :

050768
150768
350768
450768
They are *6 digi*ts, what will be happen? , is it Ok ?

If you have any info in this problem, please help me at [email protected]

Thanks
 
F

Fred Loveless

Greetings, the short and quick answer is nothing.

The first number in a Modbus register specifies the type of data register and the rest specifies the actual register offest from the start of the memory space.

So 41,401,4001,40001, and 400001 are all the same register.

Now the protocol specifies the total possible register range as 0(0x0000) to 65535(0xFFFF) however that does not mean that the device you are working with actually supports the entire address range so if you request a register address that does not exist the device should respond with an exception code.
 
Yes Fred is correct in the breakdown of the "region" (4=holding register) vs. the offset within that region. There's a grey area that exists in the original PI-MBUS-300 spec whereby the "offset" as it exists on the wire could be any number between 0..65535 (offsets 1..65536).

It is not explicitly allowed or disallowed. But the original Modbus design with limited total PLC memory really only intended there to be a total of 10,000 offsets available within any region. Unfortunately there are some masters out there that adhere to this original "intended limit" and therefore won't allow you to access an offset on a slave higher than 9999. In some cases you may need a gateway to remap registers > 9999 on slave devices down to < 9999 so that such register-limited masters can access them.

Darrin
 
Dear Darrin,

Thanks for your reply

Can you help to show me the way i can change the modbus address >9999 to < 9999?

Thanks so much
 
Dear Fred ,

Thanks for your advice.

But now i don't know what i have to do for this problem. i tried two way i said above, but i had no replies from these PM. the Program Schneider PME (Power Monitoring system) can't read data.

Please tell me if you have any solution.

Thanks
 
If you are attempting to pair a master that won't allow configuration of offsets >9999 to a slave with offsets that exist >9999, then the only way to interface them is with something like a gateway device.

For example, this device is a 2-port serial gateway that allows any offset on devices on one side to be exposed as any other offset on the other side:
http://www.iccdesigns.com/products/millennium/xltr-1000.html

Darrin
 
Actually, the original modicon only supported 0-999 addressing. Anyways, if your driver only supports a 5 digit address and it uses the 4xxxx format, it is not possible to read any register beyond 10000 (0-9999). There is no work around for an inflexible driver that only supports a 4 digit offset. The protocol supports a 5 digit offset but if the driver does not, you will need to move your memory down to within the 0-9999 range.

> Thanks for your advice.

> But now i don't know what i have to do for this problem. i tried two way i said
> above, but i had no replies from these PM. the Program Schneider PME (Power
> Monitoring system) can't read data.
 
Top