Link to home
Start Free TrialLog in
Avatar of websss
websssFlag for Kenya

asked on

Modbus - whats the maximum I can store in one register?

Hi

I'm trying to find out what the max value I can store in one register on Modbus
I.e. register number 40001

I'm not sure if i can store 4, 8 or 16 digits
i.e. 9999 or 99999999  etc

Does anyone know?
Avatar of viki2000
viki2000
Flag of Germany image

But Modbus is a communication protocol. The register belongs to a specific hardware PLC.
What PLC do you use?

For example here at the bottom of page is mentioned under Modbus function codes - Data Access 16bit, but then in Implementing is mentioned also floating and integer  32bit:
https://en.wikipedia.org/wiki/Modbus
Avatar of websss

ASKER

Thanks
I know about modbus and hardware

I'm create my own modbus simulated hardware...  I won't bother going in why,  but I need it

So I can store a 32bit value in each?
ASKER CERTIFIED SOLUTION
Avatar of viki2000
viki2000
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for the points and in the same time I hope my answer helps you and does not confuse you.
In microcontrollers for example, you may have data as float or 16bit integer, but the hardware registers, the memory cell, can be only 8bit. Then for one float or long or unsigned int we need more than 8 bits and it uses more memory locations.
The idea is that for Modbus you have 16bit registers, but also 32bit data, integer or float.