MODBUS slave description in XML

T

Thread Starter

Toni Kaesbeck

<p>Hi,

<p>Is there a standard description in XML on the register assignment of a MODBUS slave? There have been discussion in the last year, but I cannot find any formal standard or de-facto standard.

<p>Too simple?
<pre>
<?xml version="1.0"?>
<MAP_ENTRY>
<param>P_Pressure</param>
<reg>40001</reg>
<reg_cnt>2</reg_cnt>
</MAP_ENTRY>
<MAP_ENTRY>
<param>P_Level</param>
<reg>40003</reg>
<reg_cnt>2</reg_cnt>
</MAP_ENTRY>
</pre>
<p>Thanks<br>
Toni
 
T

Toni Kaesbeck

Hi,

obviously the XML part of my posting was "eaten" by the browser. So I try again (not using the XML ">", replacing with "___")

START:
___?xml version="1.0" ?>
___MODBUS_SLAVE_PARAM_MAP cnt="2">
___MAP_ENTRY>
___PARAM>P_Pressure,/PARAM>
___REG>40001</REG>
___REG_CNT>2</REG_CNT>
___FORMAT>IEEE754</FORMAT>
___/MAP_ENTRY>
___MAP_ENTRY>
___PARAM>P_Level,/PARAM>
___REG>40003</REG>
___REG_CNT>2</REG_CNT>
___FORMAT>IEEE754</FORMAT>
___/MAP_ENTRY>
___/MODBUS_SLAVE_PARAM_MAP>

Hope this works better now and somebody can give me some feedback on a standard or de-facto standard (maybe SCHNEIDER/MODICON uses a certain format.

Thanks,
Toni
 
A

Automation Linse

Correct - wish there was as it would be great for OPC to import.

><?xml version="1.0"?>
> <MAP_ENTRY>
> <param>P_Pressure</param>
> <reg>40001</reg>
> <reg_cnt>2</reg_cnt>
> </MAP_ENTRY>
> <MAP_ENTRY>
> <param>P_Level</param>
> <reg>40003</reg>
> <reg_cnt>2</reg_cnt>
> </MAP_ENTRY>

I'd add a <DESC> field for text description.

Likely the <reg> should be 6 digit (400001) not five since modern "large" devices can easily support 65535 registers (ie: 4x65536) - or better, just retain the "x" so it is 4x0002 (XML is text after all).

<reg_cnt> would be better as (or suplimented with) a data type, since we have the Big/Little-endian problem (ie: Modicon stores 32-bit floats as low-word first DESPITE the general view that Modbus is BigEndian). So <data_type> could be FP32_LOHI or FP32_HILO and so on. This would allow UINT16_9999, SINT16, etc with obvious meaning.

Adding another useful "complexity" - it WOULD be nice if this XML file also included any "issues" with the slave - such as it only supports writes of 64 or 100 regs and not 122, etc. It could define which Modbus functions are supported (ie: no to #6 or yes to #23)

Drop me an email if you want to discuss more - email is LynnL at my employer.

best regards
- LynnL, www.digi.com
 
J
A way to tell a single OPC server how to access data in a mix of different Modbus devices on the same network would be great. Such a standard should be developed by the Modbus-IDA organization. The configuration tool for each
device could generate the file describing which register holds which data. I would also like to add in engineering unit and scaling information for analogue values.

OPC has joined HART, Fieldbus, and Profibus in adopting EDDL (IEC 61804) for describing data in a device. The IEC standard lists a bunch of keywords for doing this, but does not really say if the result shall be a binary file, a text file, or whatever. Certainly using it as an XML schema would be the best. It would be great Modbus-IDA followed the same path, but in XML.

Jonas Berge
SMAR
===========
[email protected]
www.smar.com
Learn fieldbus and industrial Ethernet at your own pace:
www.isa.org/fieldbuses
Learn OPC and automation software at your own pace: www.isa.org/autosoftware
 
H

Heinz-Jürgen Oertel

I think that Schneider is adopting the same standard for Modbus XML device description as it uses for CANopen. Which will be the same like others, Ethernet powerlink and EtharCAT are using.

--

with best regards / mit freundlichen Grüßen

Heinz-Jürgen Oertel
 
Top