More memory maps in 1 memory map

I

Thread Starter

Ivar

I am developing a MODBUS interface board which can be used to connect a MODBUS Control Unit to a Burner Control for Central Heating Systems.
This interface Board can be used for 4 types of Burner Controls. Because every Burner Control has it's own variables i created a memory map which has all the variables.

Now i like to know how to handle the responses.
What do i have to return if for example the MODBUS Control Unit asks for a Variable which is not used in the connected Burner Control?

Another problem occures when a sensor value of a Burner Control is defined in the memory map, but the Burner Control is programmed not to use this sensor.

What do i have to return if the MODBUS Control Unit asks for this Variable?

Thanks in Advance!
 
L

Lynn August Linse

My own experience - dealing with products which move generic Modbus as pure numbers only - is that you should avoid as many Modbus error returns as possible. For example, it is hugely bad to throw an exception if 4x00009 is read because at the moment it is not-used, but then have both 4x00008 and 4x00010 registers be valid and used. (I am sure all OPC vendors will second this comment!)

So I'd suggest defining error (or null) values for all unused registers. It could be zero, but better something like 0xFFFF or 0xFEFE which is easily detected in software as being "bad".

So an uninstalled/unused sensor returns a "bad sensor" value, not a Modbus error.
 
>What do i have to return if for example the MODBUS Control Unit asks for a Variable which is not used in the connected Burner Control?

By 'not used', I assume you mean outside of the range of contiguous addresses implemented by the burner control. If so, return Modbus exception code 2 (illegal data address).

>Another problem occures when a sensor value of a Burner Control is defined in the memory map, but the Burner Control is programmed not to use this sensor. What do i have to return if the MODBUS Control Unit asks for this Variable?

If the address exists but simply contains invalid values because it is disabled, it shouldn't be a Modbus exception. You should probably return a special data value that indicates burner is not used.

It might be helpful to download some known working Modbus products to assist with your Modbus development.

http://automatedsolutions.com/products/modbus.asp


Mark
http://automatedsolutions.com
 
Thanks for your information. I already thought this would be the solution.

Defining an Error is possible if MODBUS asks for registers, but in case of coils or discrete inputs this is not possible, because the value can only be 0 or 1. Do you know how to handle this? maybe the best way is returning a 0 in case a sensor or for example a thermostat is not present and to use another register to give this information to the MODBUS unit.



 
Top