Power Monitoring Expert - How to fix 'Illegal Data Address' errors



Goals and Symptoms

Summary / Symptoms
For Modbus device types configured through the MDI, customers may see errors in the SystemLog or Vista/WebReach: 'Illegal Data Address'.

This may happen for one or more objects on a Vista diagram, but not necessarily everything on the diagram.
Stripping down a diagram object by object may yield certain permutations where all the registers return data, but adding another object will make one or more of them stop working again.
Reducing the 'Maximum number of registers for a single request' Advanced Property in the MDI for this device type may improve the situation, or fix it entirely, or yield errors for different combinations of registers.

Facts and Changes

MDI Modbus Device Importer
Translator file .ion .xml
5.6 Service Pack 2 SP2
System error unexpected result ION Exception code NotSupported
Illegal Data Address

Causes and Fixes

This error indicates that ION Enterprise is requesting data from register addresses that don't exist on the device. The most likely cause of this is that the ION-E Modbus translator is 'grouping' requests over address ranges that don't exist on the device.

The Modbus translator tries to reduce the number of requests to a device by combining them. For this simplified example, say you had a Vista digram with an object linked to register 4 and one for register 8 on a Modbus device. Instead of making 2 requests, one to register 4, and one to register 8, the Modbus translator will combine them into one; a single request for everything from register 4 to 8 inclusive, then just pick out what it wants from the response.

This is meant to decrease communications bandwidth and works just fine for most devices. However, if this particular device didn't actually have a register 7, then the request would cause an 'Illegal Data Address' error from the device, because the request is spanning an address range where there are in fact no registers at some of those addresses. Both numeric objects in your Vista diagram would display no data, just the error message.

This is what the Advanced Property 'Maximum number of registers for a single request' in the MDI controls. It defines the biggest range of addresses the the Modbus translator can include in a single request. For instance, if it is set to 1, then every register on the device is queried one at a time. If it were set to 5 (but not 4!), then it would be able to combine the requests for register 4 and register 8 as in the example above. Reducing this value in the MDI may help this type of problem, but at the expense of slower overall communication to the device.

The converse of the above situation can also happen: if a Modbus request is for too small an address range, it may give an 'Illegal Data Address' error. Some Modbus devices have certain registers that must be requested as a group; if queried individually, they will give an error. This is typically for a multi-register data type, like a DateTime bank of registers.

In another simplified example, let's say that a device has a DateTime stored in registers 3, 4 and 5. They must be requested as a group to get a correct response from the device: always a 3-register request, for registers 3, 4 and 5 inclusive. A single-register request for register 4, in the middle of this DateTime, will throw an 'Illegal Data Address' error.

There are new options available in MDI files in 5.6 SP2 to work around these 2 cases. It requires manually editing the XML file created for the device by the MDI, and adding new elements to it. In these new elements, you can define address ranges that don't exist on a device, or address ranges that must be requested together to get a proper response.

Using the documentation for the Modbus device, determine if there are any address ranges that fall into these 2 categories, and make careful notes about them.

Open the XML file for the device from \ION Entperprise\config\translators\ in a text editor. At the very bottom, but before the closing <\ModbusMap> element, you can add a new <TransactionConfiguration> element like the following, to specify address ranges that don't exist on this device, or address ranges that must be requested as a group.

This example specifies with InvalidAddressRange that the device does not have registers at the addresses 47037, 47038, and 47039 (3 registers starting at address 47037). The Modbus translator will not make requests within this range. The DatasetAddressBlock specifies that for any register in the range 47052, 47053 and 47054, the whole block must be requested from 47052 thru 47054 inclusive.

  • <TransactionConfiguration>
    • <InvalidAddressRange ModbusAddress="47037" NumberOfRegisters="3"/>
      <DatasetAddressBlock ModbusAddress="47052" NumberOfRegisters="3"/>

This example tells the Modbus translator that the device does not have registers from 44004 to 44099, but start again at 44100 (96 registers starting at address 44004).
  • <TransactionConfiguration>
    • <InvalidAddressRange ModbusAddress="44004" NumberOfRegisters="96"/>

This example tells the Modbus translator that the device has 4 blocks of registers that must be requested as the whole block of 3 registers each:
  • <TransactionConfiguration>
    • <DatasetAddressBlock ModbusAddress="47037" NumberOfRegisters="3"/>
      <DatasetAddressBlock ModbusAddress="47042" NumberOfRegisters="3"/>
      <DatasetAddressBlock ModbusAddress="47047" NumberOfRegisters="3"/>
      <DatasetAddressBlock ModbusAddress="47052" NumberOfRegisters="3"/>

After making these changes to the XML file, save it, and restart SiteServer to ensure that the changes are picked up.

Last Revised: October 29, 2008
Applies To: ION Enterprise 5.6 Service Pack 2
Internal PMO/PMC
All content © 1992-2008 Schneider Electric

Legacy KB System (APS) Data: RESL193079 V3.0, Originally authored by DaTh on 10/30/2008, Last Edited by DaTh on 01/26/2010
Related ranges: ION Enterprise V5.6

This is valid for current Power Monitoring Expert versions.
This functionality has been extended to include the ability to exclude registers other than Holding Registers (those with prefixes other than "4") as of Power Monitoring Expert 8.2. A hot fix is availible for Power Monitoring Expert 8.1 for this extended functionality.