Newbie question on register assignments

E

Thread Starter

Ed Francy

I am starting development of a Modbus slave. Is there some standard for mapping modbus registers for configuration and measurements?

How is a Modbus master configured to use these if I just assign them any way I wish?

I have implimented a HART slave previously, and HART controllers have a special language (DDL) for defining how HART masters interact with slaves. Is there anything like this for Modbus?

All the specs I have found on the Modbus protocol define just the protocol, not specfics about how to map your device's I/O. Am I missing something?

Another question - must I do the 'multiply floating point values then divide on the other end' method to transfer floating point values? Or can I transfer a 4 byte floating point number with two register reads?

cheers,
-ed

PS: I apologize if this message has been posted multiple time. The connection kept timing out on me.
 
Masters come in different shapes, forms, and flavors.

Some Modbus masters have the ability to read contiguous slave registers as a "block".

So you want to consider which slave registers might be most useful to the master client and designate them as contiguous registers. Leave the rarely used or esoteric value registers on the periphery of the slave map.
 
Modbus is the protocol (language) that you use to communicate to the PLC.

The address assignments of the PLC are a function of the PLC you are working with and they vary from PLC to PLC.
Modicon addressing uses the first digit to determine if it is a digital or analog input/output.

In my experience it is preferable to start your hardware addressing (input/output modules) from the lowest address and keep the addressses contiguous. Allow for future expansion if required.

Internal addresses are not so critical but if they are to be made available to a supervisory system then it is good praactise to keep them contigious since the drivers read the data in blocks.
 
Modbus is the protocol (language) that you use to communicate to the device. The address assignments are a function of the device you are working with and they vary.
Modicon addressing (which is a standard since it was associated with Modbus initially)uses the first digit to determine if it is a digital or analog input/output and the other digits for the addressing.

With PLCs, which allows you to address the I/O as you like my experience is it preferable to start your hardware addressing (input/output modules) from the lowest address and keep the addressses contiguous. Allow for future expansion if required.

If your device isn't fexible then you have to use the addressing that they have configured.
 
So is the master configurable to any mapping of register assignments, as long as their function is provided somehow? Is there a process in place for doing this? Can I supply a slave device and have no responsibility in the configuration of a master to read my slave?

I have seen specs for slave devices that have registers for a 'burn and run' type location (so you save your config changes, and then run with them). Is this common?

The ability to configure the mapping was mentioned. Is it common for devices to allow the end user map the register assignments?

thanks for the replies!
-ed
 
For some reason my response ended up in the middle of the conversation at "Jun 13, 2006 12:07 am"

Please read there, thanks! ;-)

-ed
 
There are 4 basic types of register in Modicon Modbus

0x register represents a digital Output
1x register represents a digital Input
4x register represents a analogue Output (16 bit)
3x register represents a analogue Input (16 bit)

Only the Modbus master can initiate communications. The modbus master can request data from any slave on the network, it should receive a reply from the slave in question. You can also broadcast i.e send a request to ALL the slaves on the network. When broadcasting no reply is given to master.

There are various modbus 'Function codes' which specify what the master is asking of the slave, for example you may wish to read one off 1x register, or mulitple 1x registers. There would be a different function code for these two instructions, there are various function codes for reading / writng or both, for 0x , 1x 3, and 4 x type registers.

See http://www.Modbus.org for more info or I can Email you a modbus protocol manual. [email protected]
 
Top