Invalid range error while modbus writing register value.

We were using this Modbus library for the last couple of years along with Ruby on Rails frameworks (https://github.com/rmodbus/rmodbus).
In recent days we are noticing Modbus is showing some random range register values.

Example: Charger Limit register value range is 0.0 to 0.0 and we are trying to write the same value to register but it is showing an error message as the range should be between -7.0 to 0.0 likewise it returning different random range values even when we pass correct range value.

Above I have provided an example for one of the registers but random ranges are coming to a few other registers as well.

Could you please suggest to us how to overcome this problem or how to handle these exceptions?

Your inputs are most appreciated.
 
Is your Modbus device the client or the server?

In your example, you state that the Charger Limit register value range is 0.0 to 0.0. Modbus itself doesn't define a value range for registers. Any range limitation is vendor-specific. Where does this range come from? What does "pass correct range value" mean? Are you writing to specific registers on a Modbus device that are for the allowable range of another register?

Please provide more details on your issue so that we can better help you identify the cause.
 
Hi Jschulze,

Thanks for the quick response.

Please find below answers to the questions asked.

Is your Modbus device the client or the server? - Client
Any range limitation is vendor-specific. - Yes, It is all customized ranges.
Where does this range come from? - Software Controls
What does "pass correct range value" mean? - Assume like, For the particular register there should range between -1793.0 to 0.0 defined in the control system, the same range values we are given from the application server and writing into control software using Modbus client. While writing into a control system we are getting errors saying like given value is not in the defined range. Please find below an example, how the random range values are generated.

[1, 2,3,6,7,-7,16,455868418,456261634,456523778,456392706,16777216,1537,

456130562,67108864,456785922,805306880,4123,456916994,455999490,

135195,1055530,455737346,34609968,269490998,16709,33554432]

Are you writing to specific registers on a Modbus device that are for the allowable range of another register? - Yes, we are writing a specific register with a defined range from controls systems.

Happy to provide if any other information needed to understand this issue.

Regards,
Mylara
 
I apologize, I still don't quite understand.

From what I believe I understand, your Modbus device (which uses RModBus) is the client. Your client is reading/writing registers on a Modbus server device. The server has data registers, such as Charger Limit, that have a valid range of values that can be written. However, when your Modbus client writes value that you believe is valid, you receive an invalid range error. Is this understanding correct?

Is RModBus generating the invalid range error or is the Modbus server returning a Modbus exception code (perhaps exception code 03 ILLEGAL DATA VALUE)? Could the error be originating from somewhere else, for example between some application software and the RModBus library?

What is the Modbus server device?

Please try explaining your system in terms of the Modbus devices involved (i.e. client and server) and, if possible, avoid using generic terms such as Software Controls, Control System, and Application Server.

If you can provide a diagram, that would be very helpful.
 
Top