0% found this document useful (0 votes)
50 views12 pages

Mod Bus For Ed Mi Meters

The document provides an application note for setting up ModBus protocol and register mapping on EDMI energy meters, specifically the mk6 Genius, mk11, mk3, and mk10 Atlas models. It outlines the ModBus requirements, features, and configuration steps, including the mapping of meter registers to ModBus addresses and the use of ModScan32 for testing. Additionally, it explains how to create additional mappings using ToolBox and EziView, as well as how to use the mk6 as a protocol converter for mk3 meters.

Uploaded by

dao nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views12 pages

Mod Bus For Ed Mi Meters

The document provides an application note for setting up ModBus protocol and register mapping on EDMI energy meters, specifically the mk6 Genius, mk11, mk3, and mk10 Atlas models. It outlines the ModBus requirements, features, and configuration steps, including the mapping of meter registers to ModBus addresses and the use of ModScan32 for testing. Additionally, it explains how to create additional mappings using ToolBox and EziView, as well as how to use the mk6 as a protocol converter for mk3 meters.

Uploaded by

dao nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

ModBus for EDMI

Meters

EDMI Energy Meters


ModBus Application Note
R e v i s i o n A

Release Date: 2 June 2003


1680-E-0?

EDMI Pty Ltd E.D.M.I. (Asia) Pte Ltd


41 Deakin Street 47 Yishun Industrial Park A
Brendale, Qld, 4500 Singapore 768724
Australia
Intentionally Blank

Page ii ModBus for EDMI meters


ModBus Overview
ter1
ap
h
C

This application document describes how to setup ModBus protocol and register mapping on
EDMI meters. The discussion on ModBus is restricted to EDMI mk6 Genius/mk11 and mk3
meters however the mk10 Atlas also supports this protocol.

The Mk6 meter has 3 ports, optical port, modem port, and EziPort (or SCADA port). The SCADA
port requires a special IO card that provides a RS485 connection.

Version 2.00 of the firmware supports the ModBus RTU protocol on either the modem port or
SCADA port.

For further information EDMI support may be contacted via email at support@edmi.com.sg.
The EDMI web site is located at www.edmi.com.sg.

Protocol Overview
The basic ModBus RTU protocol is shown below.

Start Address Function Data CRC End

- Start is a delay time of at least 3.5 characters.

- The address is 1…247, where 0 is a broadcast address.

- Function is the type of operation to perform. The Mk6 meter only responds to function
code 3 (ie. register 40001 - 49999).

- Data is the starting register address followed by the number of register addresses to read.
This is only for the function code 3

- CRC is a simple LRC and the end is a delay of 3.5 characters.

The ModBus protocol has some limitations. Reading of ModBus registers are based on 16 bit
words. Since the majority of the meters registers are 32 bits the meter software will utilise 2
ModBus addresses. Therefore your software will need to be able to accommodate for this
limitation.

For more information see Modicon.

A good ModBus test program to use called ModScan32 which is available from the WinTech
website www.win-tech.com.
Features
EDMI ModBus has the following features:

- Mapping of up to 256 meter registers to ModBus addresses

- Has built in default mapping for 22 of the most commonly used registers and additional
mappings can me created in ToolBox or EziView.

- Excepts ModBus Function 3 (Holding Register) commands

- Compatible with ModBus RTU type protocol

- Supports any data types or sizes and is only restricted by the software eg. 8, 16, 32 and 64
Bit floating points or integers and special types.

- Supports Mk3 register mapping via a master Mk6 Genius protocol translations device over a
RS485 meter network.

ModBus Requirements
For the mk6 Genius Energy Meter ModBus has the following basic requirements:

- Only compatible with firmware series 2 (ie. An version that is 2.xx)

- Requires your energy meter to have ModBus Extended feature code 503 (you can check for
this Extended Feature Codes in Online Variables in EziView, see Figure 1-1)

- A ModBus tool will be required from ToolBox if additional mapping of registers beyond the
default mk6 Genius mappings.

- Either an RS232 Modem Port or SCADA port for communications with the software

Figure 1-1 ModBus Extended Feature Code

If you are not sure which version of firmware you meter then there you can check this using
EziView software. Connect to the meter on open Online Variables. There is a section called
System which will display the firmware version. Alternatively you can hold down the select
button on the front of the meter for 10 seconds to view the meters basic configuration. A series
of displays will appear one after then other. Wait until the 3rd screen appears which will display
the firmware version.
How it works
The Genius Mk6 meter accepts valid ModBus messages with function code 3- Read Holding
Register. The register address ranges from 0001 to 9999 which corresponds to 40001 to
49999. Each register address represents a 16 bit word (2 bytes), so to read a float (4 bytes)
requires 2 registers.

When a request is received the meter will translate that register address into an internal
EDMI register.

Each ModBus register address refers to a 16 bit word (2 bytes). When reading other data
types, like floating point numbers that are 32 bits (4 bytes) wide, there is no standard.
ModBus is big-endian, MSB transmitted first, but the 32 and 64 bit numbers are undefined.
Most ModBus reading programs have a big-endian or little-endian option, although not all do.
To cope with this, the meter also has a big-endian / little-endian option.

Setting up for ModBus


This section will demonstrate the setting up and testing of ModBus for several different types of
configurations. The example setup will use the ModScan32 trial demo software that can be
downloaded from the Win-Tech website www.win-tech.com.

Basic Setup
Firstly you should verify that you have got the necessary requirements to use ModBus on your
meter. See section on ModBus Requirements and Page 3 a list of requirements.

The next step involves setting up the communication port settings. I have decided to configure
the modem’s RS232 port for ModBus however you can setup ModBus on the SCADA port also.
These settings will depend on your software configuration. The Dial, Response, Reg Int and
Initialisation parameters are ignored. The most important settings to consider are the Baud
Rate, Data Bits, Parity, Stop Bits, ModBus enabled and Type set to no modem. Also make sure
that the port is set to Normal. See Figure 1-2 for the setup used in this example.

Selecting the ModBus option will require a tool from ToolBox to be created. More information
about this will be included in the following sections.

Figure 1-2 Modem Port Configuration

When the ModBus option is ticked or enabled it is important that you configure some options
that relate to ModBus. Select the Configure button as seen in Figure 1-2 to find two additional
parameters to set.

Page 4 ModBus for EDMI meters


Now you should set the unit address to identify the meter according to your software setup. In
this example it is set to a unit address of 5. This address should be different from any other
device in the ModBus system. See Figure 1-3 for the setup used in the example.

Figure 1-3 ModBus Configuration

It is also important that you set the User Level. This parameter will give the ModBus access to
all the mapped registers according to the select User Level. If this is set to Administrator or
Default_1 then this will give the ModBus software access to all mapped registers. However it is
possible to specify a User Level will restrict the ModBus software of which registers it can read.

It is important to note that when the User Level is set to “None” the meter will not respond with
any valid data.

At this point, don’t create any register mappings in EziView. No mappings are required if you
only want to use the default mappings as found in Figure 1-4. At this point you can complete
the setup by choosing either of 3 different types of ModBus setup possibilities depending on
what you want to do. They are:

1. Default ModBus for Mk6 Genius – For only reading the built in mapped registers.

2. Additional Mappings for Genius – Create additional ModBus address to Meter Register
mapping.

3. Using ModBus with the Mk3 – Read registers from EDMI Mk3 meters using ModBus
protocol over a RS485 with a Genius Mk6 as a protocol converter.
Default ModBus for Mk6 Genius
The default setting of ModBus for MK6 is quite simple since the register mappings are already
built into the meter. Figure 1-4 has the list of the default ModBus address mappings used by
the Mk6 Genius.

Read MODBUS MODBUS Meter Options Description


Address Address Size Register
9002 9001 2 E000 1 Phase A Voltage
9004 9003 2 E001 1 Phase B Voltage
9006 9005 2 E002 1 Phase C Voltage
9008 9007 2 E010 1 Phase A Current
9010 9009 2 E011 1 Phase B Current
9012 9011 2 E012 1 Phase C Current
9014 9013 2 E020 1 Phase angle of A Phase
9016 9015 2 E021 1 Phase angle of B Phase
9018 9017 2 E022 1 Phase angle of C Phase
9020 9019 2 E030 1 Phase A Watts
9022 9021 2 E031 1 Phase B Watts
9024 9023 2 E032 1 Phase C Watts
9026 9025 2 E040 1 Phase A vars
9028 9027 2 E041 1 Phase B vars
9030 9029 2 E042 1 Phase C vars
9032 9031 2 E050 1 Phase A VA
9034 9033 2 E051 1 Phase B VA
9036 9035 2 E052 1 Phase C VA
9038 9037 2 E060 1 Frequency
9040 9039 2 E023 1 Angle between VTA and VTB
9042 9041 2 E024 1 Angle between VTA and VTC
9044 9043 2 E025 1 Power factor
Figure 1-4 Default Mk6 Genius Register Mapping

Let’s now look at how it works when the software reads a particular register in the meter. Just
say for example that the software using ModBus wants to read phase A voltage. The default
mapping will map the Phase A Voltage register E000 to the ModBus Address 9001. Since
ModBus is limited to 16 bit words for data and the voltage is stored as a 32 bit float, the meter
will use two ModBus addresses to capture the data. That is why you will notice that in the list
of mappings that only every second ModBus address is used. The following ModBus address of a
mapping should NOT be used since it is word (16 bit) aligned.

The software however will require special handling of this type of 32 bit data. In the
ModScan32 test software the data must be set as Swapped FP. This will align the data and
format it into a floating point number before displaying it on the screen.

It is important to note that for the default mapping of say 9001, the actually ModBus address to
be read in the software is 49002.

Page 6 ModBus for EDMI meters


Figure 1-5 shows the ToolBox setup for only using the default registers. These settings are the
default settings however if you want to use the SCADA port for ModBus communications then
you should specify that where is says Select ModBus port.

Figure 1-5 ToolBox Setup using Default Mappings

Once you have created this tool. Make sure you upload it into the meter and test it out to make
sure it works accordingly.

Additional Mappings for Genius Mk6


It is also possible to create additional mapping for registers that are not found in the default
mapping list. There are two ways to setup for additionally mappings. They are:

1. Mappings are contained in the Tool

2. Mappings are contained in EziView

The difference between these two setups is that:

For scenario 2 the ModBus register mapping configuration is stored in the meters MTR file. You
setup the mapping in EziView in the setup shown in Figure 1-3 and these mappings are saved
and can be changed easily through the EziView data synchronisation interface. In this case it is
quite easy in the future to change the setup without creating a new ModBus tool in ToolBox.

However for scenario 1 above the ModBus mapping is stored in the Tool. Every time the meter
is powered up the configuration is written back to the meters mapping. The setup cannot be
changed once it is configured in the meter.
EziView Mapping

Ok let’s say you want to use EziView to setup mappings of the additional ModBus registers. I
this case you will need to create a ModBus tool that will allocate buffers for EziView to store the
additional register mapping in. In Figure 1-6 demonstrates how to create 12 buffers for EziView
to map additional registers.

Figure 1-6 ToolBox Setup for EziView Additional Buffers

Now once this tool is installed into the meter it is possible to create up to 12 additional mappings
in EziView. Figure 1-7 is an example of additional mappings created in EziView.

Figure 1-7 EziView Setup of Additional Mapping

Parameter Description
Unit Address Address that this meter responds to. It ranges from 1 to 247.
User level to use when reading the register values. ModBus does not
User Level
have a login.
ModBus register address ranging from 0001 to 9999. 0 is invalid and
Address
indicates an unused entry.
Number of 16 bit words (2 bytes) the data takes up. The minimum is 1
Size (16 bits), typical it is 2 (32 bits - floating point number), 4 is the
maximum (64 bit - double precision floating point number).
Register Internal meter register. Double click to choose from the list.
Big-endian / little-endian option. 0 for 8/16 bit values, 1 for 32 bit
Options
values, 2 for 64 bit values.
Description Read only description of the chosen register.
Figure 1-8 EziView Mapping Setup Parameters

Page 8 ModBus for EDMI meters


ToolBox Mapping

In ToolBox it is quite easy to create additional ModBus register mappings. Create a ModBus tool
and click the Add button. It will then let you select the ModBus address, meter register, meter
register type and an optional description. See Figure 1-9 for an example.

Figure 1-9 ToolBox Setup of Additional Mappings

For this setup you don’t select the option to Map for Slave Meter. This is only for mapping
registers for external Mk3 (also Genius Mk6 if its firmware doesn’t support ModBus) meters.

Once you have created the mapping in this tool then click Ok and upload the tool with the
meter.

Using ModBus with the Mk3


This setup will allow the Genius Mk6 to act as a protocol convert for Mk3’s connected to a RS485
meter network. This setup is simular to setting up additional register mapping in a tool from
ToolBox. The only difference is that you need to select Map for slave meter.

Figure 1-10 ToolBox Setup for Mk3 Mappings

In Figure 1-10 the tool mapping will map the Phase A voltage for a Mk3 with the serial number
9304225 to the ModBus address 4003. The software would be able to read the address 44004
using the same unit address 5 and the Mk6 Genius would respond by reading the register E000
from the Mk3 meter and passing it back to the ModBus software.
Using ModBus Test Software
Now the meter is reading to talk using ModBus. This document uses ModScan32 software from
WinTech which can be downloaded from www.win-tech.com. This software is very easy to use
and can be easily configured to test the ModBus setup on the meter.

Firstly you have to set the communications properties correctly. After accepting the setup the
software will start scanning the specified port for the set address. Now set the base address to
9002 and the length to 44 to read all the default registers in the Genius Mk6 meter. The
ModBus point type should be set to 03: Holding Registers and the device type set 5 we set in
the EziView setup for the meter.

The meter will be return data now but in the incorrect format. You will need to go to the display
options in the menu and change it to Swapped FP (swapped floating point). Now the software
should be showing the data correctly. See Figure 1-11 for an example of the output. As you
can see that only the Phase A voltage is connected and the other data that is easily
distinguishable is the frequency.

Figure 1-11 ModBus Monitoring Software

Page 10 ModBus for EDMI meters

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy