Modbus Devices - User Manual - EN - 1.4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Baseline Software Platform

Modbus Devices (Master & Slave)


User Manual
This manual provides information about the configuration of the Modbus device in
Easergy Builder.

SE-MBD-S854

Publication Date (02/2020)


Read carefully the information contained in this manual before use this software tool for configuring the
control system.

www.schneider-electric.com
20/02/2020 User Manual – Modbus Device

Change Control
Rev Date Description
1.1 04-04-2016 Initial revision for Easergy Builder.

1.2 20-05-2016 Some erratas have been fixed.

1.3 17-01-2017 Included diagnostic signals MDBE_COM_STATUS and


MDBE_COM_STATUS in Modbus slave.
1.4 20-02-2020 • Information about sensitive data has been included. Paragraph
“Important information about Cybersecurity”.
• Included information regarding synchronization of SEPAM devices.

General Information
The Baseline Software Platform and all its components have been developed in accordance to the
requirements for a quality management system, complying with the ISO 9001:2015 Norm.

Document code: SE-MBD-S854


Revision/Date: 1.4 / 20-02-2020
File: Modbus Devices – User Manual_EN_1.4.pdf
Retention period: Permanent throughout its validation period + 3 years after
its cancellation.

Reference Documents
Table 1 – Reference Documents

User Manual Document Code

webApp User Manual FTE-WPP-S856


Saitel WebTool User Manual FTE-MCW-S856
Easergy Builder – User Manual SE-MSS-USR
HUe - User Manual SE-M588-USR
HU_A - User Manual SE-M551-USR
HU_AF - User Manual SE-M503-USR
SM_CPU866e - User Manual SE-M578-USR
T300 User Manual NT00378
T300 Quick Start Guide NT00383

Pag 2
User Manual – Modbus Device 20/02/2020

Software in Easergy Builder


The information contained in this document is applicable to the following software versions:
Table 2 – Software versions

Tool / Device Software version

Easergy Builder Tool 01.06.03


Modbus master Device 01.01.05
Modbus slave Device 01.00.15
Modbus MICOM Device 01.00.06
Modbus SEPAM Device 01.01.02

Hardware/Software Compatibility
Controllers and software tools supported by each type of CPU is detailed are the following:
Table 3 – Hardware / Software compatibility

Platform Saitel DP Saitel DP Saitel DR Saitel DR Saitel DR Easergy


T300

Tool / Software SM_CPU866 SM_CPU866e HU_B/HU_BI HU_A/HU_AF HUe HU250

Easergy Builder √ √ √ √ √ √

Modbus master √ √ √ √ √ √
Modbus slave √ √ √ √ √ √
Modbus SEPAM √ √ × √ √ √

Modbus MICOM √ √ × √ √ ×
Saitel Webtool √ √ (Only V0) × √ × ×
webApp
× √ (V1 & later) × × √ √

Important information about Safety


Read these instructions carefully and look at the equipment to become familiar with it before trying
to install, operate, service or maintain it. In this manual you can find different types of messages
associated with situations that have different level of risk for people and / or for equipment.

This symbol indicates "DANGER" or "WARNING". This symbol informs of an


electrical risk that will cause personal injuries if the instructions are not followed.

This symbol is associated to a safety alert. It is used to warn of possible personal


injury hazards. The user must follow all instructions or messages associated to this
symbol to avoid possible injuries.

Pag 3
20/02/2020 User Manual – Modbus Device

DANGER
DANGER indicates a hazardous situation which, if not avoided, will result in death or serious
injury.

WARNING
WARNING indicates a hazardous situation which, if not avoided, could result in death or
serious injury.

NOTICE
NOTICE is used to address practices not related to physical injury. The safety alert symbol shall
not be used with this signal word.

Important information about Cybersecurity


Modbus is an unsecure communication protocol. The RTU does not have the capability to transmit
data encrypted using this protocol.

WARNING
If a malicious user gained access to your network, transmitted information could be disclosed or
subject to tampering.

To avoid malicious use of the sensitive information that will be transmitted through an internal
network, follow the instructions below:

• Network must be physically or logically segmented.

• The access to the network must be restricted using standard controls such as firewalls.

• For transmitting data over an external network, encrypt protocol transmissions over all external
connections using an encrypted tunnel, TLS wrapper or a similar solution.

To Keep in Mind
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
Qualified personnel are individuals who:

• Have read and understood the information on the device and its user manual.

• Are familiar with the installation, commissioning, and operation of the equipment and of the
system to which it is being connected.

• Are able to safely perform switching operations in accordance with accepted safety
engineering practices and are authorized to energize and de-energize equipment and to
isolate, ground, and label it.

• Are trained in the care and use of safety apparatus in accordance with safety engineering
practices.

• Are trained in emergency procedures (first aid).


It is necessary to consider that the documentation of the equipment collects the instructions for its
installation, set up and operation. However, the manuals could not cover all the possible
circumstances neither include specific information on all the details.
In case of questions or specific problems about an Schneider Electric’s equipment, contact with his
sales office of Schneider Electric or with the customer care center and request the necessary
information.
Pag 4
User Manual – Modbus Device 20/02/2020

Symbols and Labels


Before the equipment is installed or commissioned, the user must understand the following
symbols, which may be used on the equipment or referred to in the user documentation:
Table 4 – Symbols

Symbol Associated Text Description


International Electrotechnical Commission (IEC) symbol
associated to a DANGER or WARNING message
Possibility of electric
indicating that there is an electrical risk. Failure to follow
shock
these instructions could cause damage to people or
death.
Symbol associated with a risk alert. The user must read
Caution, read the manual. the manual before handling the equipment.

American National Standards Institute (ANSI) symbol


associated to a DANGER or WARNING message
Possibility of electric
indicating that there is an electrical risk. Failure to follow
chock
these instructions could cause damage to people or
death.

Protective earth Associated symbol to the protective ground connection.


connection

This symbol indicates that the equipment has been


CE Mark developed in compliance with all applicable European
Directives.

Electronic equipment. This symbol indicates that, at the end of its life, this
Special instructions must module must be disposed according to the WEEE
be followed for disposed. Directive (Waste Electrical and Electronic Equipment).

The equipment has been designed and manufactured


Compliant with RoHS. according to RoHS Directive (Restriction of Hazardous
Substances).

Direct Voltage Symbol of direct voltage (VDC).

Alternate Voltage Symbol of alternate voltage (VAC).

Installation, Setup and Operation


Some devices use dangerous voltages (> 50 V), either the Schneider Electric device itself or some
device connected to it. The user is responsible to check that the characteristics of each equipment
are adapted and convenient for his installation. The user should read the instructions of installation
before proceeding to the use or maintenance of the equipment.

DANGER
Not following these instructions can be dangerous for the people and the equipment.

Devices that handle dangerous tensions are marked with a sticker on the front label (size: 12,5
mm). This label must be visible all the time while the module is installed on the DIN rail.
Because of the variety of uses of the product, the managers of the application and use of this
controller device will have to take the measures to the fulfillment of all the safety requirements and
provision of each application. These requirements are according to the applicable laws,
regulations, codes and standard.

Pag 5
20/02/2020 User Manual – Modbus Device

Content

1 EASERGY BUILDER & MODBUS ...........................................................................7

2 MODBUS MASTER (STD PROFILE) .....................................................................15

3 MODBUS SLAVE ...................................................................................................26

4 MODBUS SEPAM ..................................................................................................33

5 MODBUS MICOM ..................................................................................................42

Pag 6
1 Easergy Builder & Modbus
20/02/2020 User Manual – Modbus Device

Content

1 EASERGY BUILDER & MODBUS ...........................................................................7

1.1 INTRODUCTION .......................................................................................................9


1.2 ENVIRONMENT DESCRIPTION ................................................................................10
1.3 DEVICE CATALOG ................................................................................................11
1.4 INTRODUCTION TO MODBUS ..................................................................................12
1.4.1 MODBUS MASTER .........................................................................................12
1.4.2 MODBUS SLAVE ............................................................................................12
1.4.3 MODBUS SEPAM .........................................................................................13
1.5 DATA MANAGEMENT IN MODBUS...........................................................................13
1.5.1 DATA TYPES .................................................................................................13
1.5.2 FUNCTION CODES .........................................................................................14

Pag 8
User Manual – Modbus Device 20/02/2020

1.1 Introduction

Baseline Software Platform of Schneider Electric is composed by:

• Real-time operating system (RTOS): VxWorks, Linux,...

• Real-time applications and its configuration files.

• Configuration, management, supervision and monitorization tools.

NOTICE
Saitel DR basic heads (modules HU_B and HU_BI) don’t load VxWorks nor Linux. They operate
with a tailored-made software which includes the OS, database and applications.

The following figure shows the different applications included in the software platform, as well as
additional applications that implement protocols to upgrade Easergy Builder:
Figure 1 – Baseline Software Platform architecture.

The operating system abstracts the hardware from the software applications and manages the
applications in real time. It integrates the basic protocols to access the remote unit (SFTP, SSH,
etc.) and manage multiple users.
The real-time database, named coreDb, is probably the most important element. All the other
elements are developed around coreDb:

Pag 9
20/02/2020 User Manual – Modbus Device

Figure 2 – Relation between coreDb and other applications.

CoreDb performs the real-time management of RTU signals. This real-time database is associated
with data producing and consuming Devices. Devices are the different data acquisition and
processing applications software which access coreDb.
For more information about the Baseline Software Platform, please consult the the manual
“Easergy Builder User Manual”.

1.2 Environment Description

The access to Easergy Builder is done through the Windows® Home Menu, or through the direct
access created on the desktop.
Figure 3 – Easergy Builder startup window.

Pag 10
User Manual – Modbus Device 20/02/2020

The initial interface is as follows:


Figure 4 – Easergy Builder Interface.

The Easergy Builder image depend on if there is a configuration active or not. For example, the
previous figure shows Easergy Builder when you are editing a configuration:

• 1: Information about the active configuration.

• 2: Toolbar and main menu.

• 3: Edition zone.

• 4: Log console.

• 5: Device catalog.
The toolbar, main menu and edition zone will be detailed for each Device.

1.3 Device Catalog

Editing a configuration, select the tab “Devices” in the zone 2 in order to show information about
the Devices available in your PC. At the right of the zone 2 you can see the catalog Device window:
Figure 5 – Device Catalog Window.

This window appearance might be slightly different depending on the installed Devices. More
information in the Easergy Builder user manual.

Pag 11
20/02/2020 User Manual – Modbus Device

1.4 Introduction to Modbus

Modbus is a master/slave protocol which exchanges information through messages consisting of a


slave address, a function code and several data.

1.4.1 Modbus Master


Modbus master is used to control the communication with Modbus slave equipment and manage
the data exchange between these devices and coreDb. This is a software-based module which can
also be divided into two or more software modules (one for each profile).
The following diagram shows the overview of the relation between the Modbus master module, the
slave equipments and coreDb.
Figure 6 – Overview of relations between coreDb and Modbus master.

The Modbus master is a set of programs running in the CPU. It consists of the software mdbmBinC
module, and at least a software module which implements a profile, such as mdbm_STD.

NOTICE
For now, only the STD profile is available.

1.4.2 Modbus Slave


Modbus slave allows information to be exchanged between external Modbus master equipments
and the real time database coreDb. This is a software-based module which can also be divided into
two or more software modules (one for each defined profile).
The following diagram provides a general overview of the relation between the Modbus slave
module, the external master equipments and coreDb:
Figure 7 – Overview of relations between coreDb and Modbus slave.

Pag 12
User Manual – Modbus Device 20/02/2020

The Modbus slave is a set of programs running in the CPU. It consists of the software mdbeBinC
module, and at least a software module which implements a profile, such as mdbe_STD.

NOTICE
For now, only the STD profile is available.

1.4.3 Modbus MICOM


Modbus MICOM is a particular Modbus master that is used to control the communication with
MICOM P127 equipments and manage the data exchange between these equipments and coreDb.
The following diagram shows the overview of the relation between the Modbus MICOM, the slave
equipments and coreDb
Figure 8 – Overview of relations between coreDb and the Modbus MICOM module.

Modbus MICOM is implemented in the software module micomBinC.out.


In Easergy Builder, Modbus MICOM is configured using a particular Device. It isn’t configured
using a Modbus Master Device else a Modbus MICOM Device.

1.4.4 Modbus SEPAM


Modbus is an application layer message protocol that provides master/slave communication
between connected devices on different types of buses or networks. The protocol exchanges
information in messages consisting of a slave address, a function code and data.
The master sepam binController is used to control communication with MODBUS slave devices
and manage the data exchange between these devices and the database in real time.
The binController sepam is a so-called "binController" software module. It implements the Modbus
master protocol. This binController is used to control communication with the Sepam family of
protections and manages the data exchange between these and the database in real time.

1.5 Data Management in Modbus


1.5.1 Data Types
In Modbus protocol the following data type are available:

• COIL STATUS: 1-bit data (reading and writing).

• INPUT STATUS: 1-bit data (reading).

• INPUT REGISTER: Reading registers.

• HOLDING REGISTER: Reading and writing registers.

Pag 13
20/02/2020 User Manual – Modbus Device

1.5.2 Function Codes


Function codes are scheduled in the master and are sent to each slave.
The reading function codes available in STD profile are:

• READ_COIL_STATUS (FC 01)

• READ_INPUT_STATUS (FC 02)

• READ_HOLDINGS_REGISTERS (FC 03)

• READ_INPUTS_REGISTERS (FC 04)

• DIAGNOSTICS (FC 08)


The master can execute commands using the codes 05, 06, 15 and 16. The two first are not
configured for the master. Both codes are associated to the point’s coordinate in coreDb.

• FORCE_SINGLE_COIL (FC 05)

• FORCE_SINGLE_COIL (FC 05)

• FORCE_MULTIPLE_COILS (FC 15)

• PRESET_MULTIPLE_REGISTERS (FC 16)


Function codes must be coherent with the coordinates that are been defined.

Pag 14
User Manual – Modbus Device 20/02/2020

2 Modbus Master (STD Profile)

Pag 15
20/02/2020 User Manual – Modbus Device

Content

2 MODBUS MASTER (STD PROFILE) .....................................................................15

2.1 MODBUS MASTER ADMINISTRATION ......................................................................17


2.1.1 SIGNAL IDENTIFICATION – COORDINATES ........................................................17
2.1.2 DATA TYPES IN MODBUS MASTER ..................................................................17
2.1.3 POSSIBLE MAPPINGS ....................................................................................19
2.1.4 DIAGNOSTIC COORDINATES ...........................................................................19
2.2 MODBUS MASTER IN EASERGY BUILDER ..............................................................20
2.2.1 CONFIGURING REQUESTS ..............................................................................24

Pag 16
User Manual – Modbus Device 20/02/2020

2.1 Modbus Administration

2.1.1 Signal Identification – Coordinates


For the STD profile, the point coordinates for the Modbus master Device have the following format:

Coordinate for Modbus master device DATA_TYPE:Address[:FORMAT]

Where:

• DATA_TYPE: The Modbus protocol includes 4 data types:


o CS: COIL STATUS.
o IS: INPUT STATUS.
o IR: INPUT REGISTER.
o HR: HOLDING REGISTER.

• Address: Address of the Modbus register. From 0 to 65535.

• FORMAT: Only for IR and HR. Its an optional field and can be:
o :U. Unsigned 16-bit signal (stored as integer).
o :L. 32-bit signal (stored as long).
o :F. 32-bit signal (stored as float).
o :D. 64-bit signal (stored as double).
If the format isn’t indicated IR or HR, the value is a signed 16-bit integer.

2.1.2 Data Types in Modbus Master


COIL STATUS
• This data type allows the following mappings: COMMAND (destination), SETPOINT
(destination), ANALOG (source) and STATUS (source).

• With the function code Read Coil Status (01) the COIL points will be read from the slave. In this
case, this type of signals can only be associated as SOURCE of a STATUS or ANALOG point
in coreDb.

• With the function code Force Single Coil (05) or Force Multiple Coils (15) this type of points are
forced in the slave. In this case, the points are defined as DESTINATION in COMMAND or
SETPOINT.

• A coordinate can be defined as destination in SETPOINT or COMMAND and as source in


ANALOG or STATUS at the same time. Therefore, the point can be written and read at the
same time.

• An example of coordinate for this data type is CS:203.

INPUT STATUS
• This data type allows the following mappings: ANALOG (source) and STATUS (source).

• Using the function code Read Input Status (02), the signals will be read from the slave and
written to the coreDb. In this case, the signal is defined as SOURCE in STATUS or ANALOG.

• An example of coordinate for this data type is IS:201

Pag 17
20/02/2020 User Manual – Modbus Device

INPUT REGISTER
• Using the function code Read Input Register (04), signals will be read from the Modbus slave
and written to the coreDb. In this case, the signal is defined as SOURCE in STATUS or
ANALOG.

• By default, this data type is signed 16-bit signal. If not, the format must be indicated:
o :U. Unsigned 16-bit signal.
o :F. 32-bits float signal.
o :L. 32-bits long signal
o :D. 64-bits double signal.

• If the 32-bit variables need to be configured with two IR, the parameter “32 bit register” must be
unchecked. In this case, the coordinate associated to the first IR must be defined in the
coreDb. Thus, if you have a float variable (i.e. IR:203:F" and you want to define another
coordinate, this must not overlapped the coordinate IR:203:F (which takes two input registers),
but the coordinate "IR:205:F" must be allocated to it.

• If input registers are set to 32 bits, that is, the parameter “32 bit register” is checked, then the
coordinates can be defined consecutively.

• There are two options for 64-bit signals. They can use one 64-bit IR or four 16-bit IR. To
configure 64-bit variable it is necessary check the field “64 bit registers”.

• To summarize using as example the coordinate IR:203:


o IR:203. Signed 16-bit signal.
o IR:203:U. Unsigned 16-bit signal.
o IR:203:F. 32-bits signal (stored as float).
o IR:203:L. 32-bits signal (stored as long).
o IR:203:D. 64-bit signal (stored as double).

HOLDING REGISTER
• This data type allows the following mappings: COMMAND (destination), SETPOINT
(destination), ANALOG (source) and STATUS (source).

• Using the function code Read Holding Register (03), the signals will be read from the slave and
written to the coreDb. In this case, the point must be defined as SOURCE in STATUS or
ANALOG.

• There are two options for 32-bit points, which are stored in a 32-bit HR or in two 16-bit HR
each.

• If the coordinate is :U, nothing, or :F or :L or :D using one register, the function code Preset
Single Register (06) is used. In this case, the coreDb point must be defined as DESTINATION
in SETPOINT or COMMAND.

• If the coordinate is :F or :L using two registers, the function code Preset Multiple Register (16)
is used. In this case, the coreDb point must be defined as DESTINATION in SETPOINT or
COMMAND.

• If the 32-bit variables need to be configured to take 2 HR, the parameter “32 bit register” must
be checked. In this case, the coordinate associated to the first HR of the point must be defined
in the coreDb. Thus, if you have a float variable named "HR:203:F" and you want to define
another coordinate, this must not overlapped the coordinate HR:203:F (which takes two HR),
but the coordinate "HR:205:F" must be allocated to it.

• If HR points are set to 32 bits, that is, the parameter “32 bit register” is checked. In this case,
following coordinates can be defined consecutively.

Pag 18
User Manual – Modbus Device 20/02/2020

• There are two options for 64-bit signals. They can use one 64-bit HR or four 16-bit HR. To
configure 64-bit variable it is necessary check the field “64 bit registers”

• If the coordinate is :D using four registers, the function code Preset Multiple Register (16) is
used. In this case, the coreDb point must be defined as DESTINATION in SETPOINT or
COMMAND.

• One coordinate can be defined as SOURCE in STATUS or ANALONG and as DESTINATION


in SETPOINT or COMMAND at the same time, so therefore the respective holding register can
be forced and read also at the same time.

• To summarize using the coordinate HR:203, for example:


o HR:203. Signed 16-bit signal.
o HR:203:U. Unsigned 16-bit signal.
o HR:203:F. 32-bits signal (stored as float).
o HR:203:L. 32-bits signal (stored as long).
o HR:203:D. 64-bit signal (stored as double).

2.1.3 Possible Mappings


Once the coordinates’ format is defined, the user needs to determine the point types (according to
the coreDb) and the mode (source or destination) allowed for coordinates.
The table below includes the possible mappings: D: indicates that the type is allowed as a
“destination” and S: indicates that the type is allowed as a “source”. The shaded cell indicated the
recommended option.
Table 5 – Type of points for Modbus master (STD profile)

Coordinate (Type) Status Analog Command Setpoint

Read Coil Status (CS) S S


Read Input Status (IS) S S
Read Holding Register (HR) S S
Read Input Register (IR) S S
Write Single Coil (CS) D D
Write Single Register (HR) D D
Write Multiple Coils (CS) D D
Write Multiple Registers (HR) D D

2.1.4 Diagnostic Coordinates


Some diagnostic information related to the Modbus Master Device should be reflected in the
coreDb by means of information points, so that this information is available for the rest of the
processes. The coordinates which identify these point types will have the format “DIAG:XX···X”
where “XX···X” is a mnemonic that makes reference to the diagnostic information. The current
implementation defines the following diagnostic coordinates:

• DIAG:SERV: It is defined as SOURCE in STATUS or ANALOG. The value is “1” when the
slave replies to all the master's questions correctly. The value is “0” when there is a
communication error or it indicates that the RTU is not available.

• DIAG:EXCEPTION: It is defined as SOURCE in STATUS or ANALOG. It shows the


exception code returned by the slave in case of an exception.

Pag 19
20/02/2020 User Manual – Modbus Device

• DIAG:FC1: It is defined as SOURCE in STATUS or ANALOG. The value is “1” when there
is a communication fault in the primary channel associated to LINK. If the communication is
established through a simple channel, not a LINK, the value of this signal, if defined, will
never be written. The first writing to coreDb, after resetting the remote unit, does not
generate events.

• DIAG:FC2: It is defined as SOURCE in STATUS or ANALOG. The value is “1” when there
is a communication fault in the secondary channel associated to LINK. If the
communication is established through a simple channel, not a LINK, the value of this
signal, if defined, will never be written. The first writing to coreDb, after resetting the remote
unit, does not generate events.

• DIAG:FERR: It is defined as SOURCE in STATUS or ANALOG and indicates an error in


the received streaming from the slave (frame error). This coordinate will change to ‘1’ if any
error is detected in the received stream, for example a CRC error, an error in the number
of received bytes, in the function code, etc. It will be set to ‘0’ when there are no errors.
The diagnostic signals DIAG:FCi will be set to 0, whenever data are received through a “faulty”
(DIAG:FCi = 1) channel. The channel will be switched after the defined switching interval, or when
exceeding the half of the retries defined for TimeOut (RETRIES AFTER TIMEOUT), or when the
RTU is not available.

NOTICE
If the Modbus operated in a simple channels (not a Link), the signals DIAG:FCi are not
applicable.

Following table resumes the supervision point corresponding to Modbus master device: D:
indicates that the type is allowed as a “destination” and S: indicates that the type is allowed as a
“source”.
Table 6 – Diagnostic points for Modbus master (STD profile)

Coordinate (Type) Status Analog Command Setpoint

DIAG:SERV S S
DIAG:EXCEPTION S S
DIAG:FC1 S S
DIAG:FC2 S S
DIAG:FERR S S

It should be noted that there is one DIAG_SERV signal per Master, in other words, for each
SEPAM device. This signal is 1 when ALL requests are attended by the slave (SEPAM). If the
slave does not answer a question correctly, this signal becomes 0.

• DIAG:SERV = 1. Communications are OK.

• DIAG:FC1 or DIAG:FC2 are associated with communications on channel 1 and channel 2 for a
link.

• DIAG:FC1 = 1. Communications failure in the primary channel of the link.

• DIAG:FC2 for the secondary channel.

• FAIL_SERx is associated with the AB_SER module with address x.

Pag 20
User Manual – Modbus Device 20/02/2020

2.2 Modbus Master in Easergy Builder

At the left side in the configuration view of Easergy Builder, you can see the Devices tree for the
configuration that you are defining.
Use the button "Add" or the right-button of the mouse (on the tree) for creating a new Device.
Figure 9 – New Device.

Where:

• Type: Type of the new Device. For Modbus Master you must select “Modbus Master”.

• Name: Name of the new Device (Only letter, numbers and ‘_’ character are allowed for the
name).

• Description (optional): Description of the new Device.


Figure 10 – Communication channel, number of slave and profile associated to the Device.

Previously, you need to have configured the communication channels. To do that, please consult
the "Easergy Builder User Manual".

NOTICE
The communication port to TCP Modbus is 502 (please, refer to the manual to specify this
value).

Select the communication channel and number of the Slave for this Device. The Slave number for
a Device must be unique into each channel. The channel assigned to the master Device must be
configured as SwitchByMaster; the active channel is the receiving channel.
Select the Modbus profile (only STD profile is available for this version).
You have to configure at least one request in order to create the new Device.
The new Device will be shown in the tree

Pag 21
20/02/2020 User Manual – Modbus Device

Figure 11 – A new Modbus Master Device:

NOTICE
The maximum number of Modbus master Devices is 600 for SM_CPU866e and 256 for any
other platform

You can double click on the Device (or use the button Modify) in order to edit or consult the
configuration.
Figure 12 – Configuration of a Modbus Master Device:

Where:

• Modbus Type: It allows a profile to be selected from the installed profiles (only STD profile is
available).

• Communication Protocol: It sets the protocol to serial (Modbus serial) or TCP (Modbus TCP).

• Slave Number: Slave identifier (range from 1 to 255).

• Communication Timeout: If the Modbus master does not receive responses from the Modbus
slave for a longer period than this Timeout, the communication is considered interrupted. The
communication status can be monitored using the supervision signal DIAG:SERV.
Pag 22
User Manual – Modbus Device 20/02/2020

Each Profile can include a configuration section. A series of parameters related to the protocol and
data requests need to be defined. Press button , next to the “Modbus type” field. The following
items need to be specified
Figure 13 – Modbus master configuration.

• Offline Period: Time period after which the remote unit, previously unavailable, is polled again.
It is the offline period.

• Retries after timeout: Number of times the remote unit is polled with no response before it
becomes unavailable. Max 255.

• Retries after error: Number of times an erroneous response from the remote unit is allowed
before it becomes unavailable. If the slave is replying to the master’s polling incorrectly, the
master will poll the same enquiry the times defined before the remote unit becomes
unavailable. Max 255.

• 32 bit registers: If this option is enabled, Input and Holding Registers are 32 bits signals, so a
float or long data will only take one register. Nevertheless, if this option is not enabled, and we
have float or long data, these will take two Input or Holding Registers. This condition must be
considered when setting the coordinates.

• 64 bit registers: If this option is enabled, Input and Holding Registers are 64 bits signals, so a
double data will only take one register. Nevertheless, if this option is not enabled, and you have
double, these will take four Input or Holding Registers. This condition must be considered when
setting the coordinates.

• Modicon: It indicates the data format for the variables. From a Modbus point of view, they take
32 bits. If Modicon is enabled, the first Modbus message will send the least significant two
bytes of the 32 bits and then the most significant two bytes (applicable for Input and Holding
Register).

• Requests:

NOTICE
A maximum of 100 request can be set.

o Read Function: Reading Polling function code. It depends on the profile. Please note
the function codes which can be defined are read-only codes. The writing function
Pag 23
20/02/2020 User Manual – Modbus Device

codes (05 and 06) are not defined, but are implicit in the coordinates. These
messages are generated through the coreDb events.
o When function code 16:SYNCHRONIZATION is set, a synchronization message
(using 2 HR) is sent according to the Modbus PEMEX protocol. Each HR is a floating
32-bits data with format: MMDDYY.0 date, HHMMSS.0 hour. The number of bytes is
always 8.
o Start Address: Initial register from which data are to be read.
o Number of registers: Number of registers polled. The maximum number depends on
the size of the frame (250 bytes according to the normativa of Modbus). For this
length, You can request:
 2000 CS or IS
 62 HR or IR (when L or F)
 125 HR or IR (when U or nothing)
 31 HR or IR (D)
o Period: Polling period for the query (milliseconds). It is the cadence with which the
master polls the slave. As minimum, the master will poll every “Period” milliseconds.
If the channel's load is very high, the polling time might increase, so maybe the
polling does not take place at the time exactly defined in “Period”.

2.2.1 Configuring Requests


This section explains how the questions must be formed. The request must fulfill a series of
requirements, especially for the codes of function 03 and 04:

• The request must be defined having in account the number of bits. For example, if there are
16-bit variables (HR:201:U, HR:204:U) and other 32-bit variables (HR:206:L, HR:216:F) and all
them must be read, it is necessary to do two different requests:
Function code: 03 Start address: 201 Number of registers: 4
Function code: 03 Start address: 206 Number of registers: 12

• In the previous sample (first request), the master needs read the value of two HR, HR:201:U
and HR:204:U. It is necessary to ask for 4 registers.

• If there are defined some coordinates :L and/or :F and you have 32-bit registers, if you need
read a point associated to these coordinate, you have to request a HR for each point.

• For example, if you want 5 points (HR:201:L, HR:202:L, HR:203:L, HR:204:F, HR:205:F):
o If “32 bit registers” is checked, the request will be: (Function code: 03, Start address:
201, Number of registers: 5).
o If “32 bit registers” is unchecked, the request will be: (Function code: 03, Start
address: 201, Number of registers: 10), that is, to read 5 points, you have to request
10 HR.
About the requests relationed with commands, there are the following options:

• A command to a COIL 104. You have to define a command-DESTINATION or setpoint-


DESTINATION CS:104 and when the value changes, the master generates the request with
code 05.

• A command to a 16-bit HOLDING REGISTER. You have to define a command-DESTINATION


or setpoint-DESTINATION HR:203 or HR:203:U and when the value change, the master
generates a request with code 06.

• A command to a 16-bit HOLDING REGISTER, writing a float or long. You must define the
coordinates HR:203:F and HR:203:L respectively, and the master will send two HR (32-bit
value) with function code 16.

Pag 24
User Manual – Modbus Device 20/02/2020

• A command to a 32-bit HR. You have defined coordinates with :L or :F. The master will send
the request with 4 bytes and the slave must understand that 32-bit HR are in use

Pag 25
3 Modbus Slave (STD Profile)
User Manual – Modbus Device 20/02/2020

Content

3 MODBUS SLAVE ...................................................................................................26

3.1 MODBUS SLAVE ADMINISTRATION .........................................................................28


3.1.1 SIGNAL IDENTIFICATION – COORDINATES ........................................................28
3.1.2 DATA TYPES IN MODBUS SLAVE .....................................................................28
3.1.3 POSSIBLE MAPPINGS ....................................................................................29
3.1.4 DIAGNOSTIC COORDINATES ...........................................................................30
3.2 MODBUS SLAVE IN EASERGY BUILDER ..................................................................30

Pag 27
20/02/2020 User Manual – Modbus Device

3.1 Modbus Slave Administration

3.1.1 Signal Identification – Coordinates


The coordinate definition is identical to the Modbus master Device.

3.1.2 Data Types in Modbus Slave


COIL STATUS
• This data type allows the following mappings: STATUS (source and destination), ANALOG
(source and destination), COMMAND (source and destination) and SETPOINT (source and
destination).

• With the function code Read Coil Status (01) the COIL points will be read when requested by
the master.

• Using function codes Force Single Coil (05) and Force Multiple Coils (15) this type of points are
forced by the master.

• An example of coordinate for this data type is CS:203.

INPUT STATUS
• This data type allows the following mappings: STATUS (source and destination), ANALOG
(source and destination), COMMAND (source and destination) and SETPOINT (source and
destination).

• Using the function code Read Input Status (02), the signals will be read when requested by the
master.

• An example of coordinate for this data type is IS:201

INPUT REGISTER
• This data type allows the following mappings: STATUS (source and destination), ANALOG
(source and destination), COMMAND (source and destination) and SETPOINT (source and
destination).

• By default, this data type is signed 16-bit signal. If not, the format must be indicated:
o :U. Unsigned 16-bit signal.
o :F. 32-bits float signal.
o :L. 32-bits long signal
o :D. 64-bits double signal.

• If the 32-bit variables need to be configured with two IR, the parameter “32 bit register” must be
unchecked. In this case, the coordinate associated to the first IR must be defined in the
coreDb. Thus, if you have a float variable (i.e. IR:203:F" and you want to define another
coordinate, this must not overlapped the coordinate IR:203:F (which takes two input registers),
but the coordinate "IR:205:F" must be allocated to it.

• If input registers are set to 32 bits, that is, the parameter “32 bit register” is checked, then the
coordinates can be defined consecutively.

• To summarize using as example the coordinate IR:203:


o IR:203. Signed 16-bit signal.
o IR:203:U. Unsigned 16-bit signal.
o IR:203:F. 32-bits signal (stored as float).

Pag 28
User Manual – Modbus Device 20/02/2020

o IR:203:L. 32-bits signal (stored as long).


o IR:203:D. 64-bit signal (stored as double).

HOLDING REGISTER
• This data type allows the following mappings: STATUS (source and destination), ANALOG
(source and destination), COMMAND (source and destination) and SETPOINT (source and
destination).

• Using the function code Read Holding Register (03), the signals will be read when requested
by the master.

• There are two options for 32-bit points, which are stored in a 32-bit HR or in two 16-bit HR
each.

• If the coordinate is :U, nothing, or :F or :L or :D using one register, the function code Preset
Single Register (06) is used. In this case, the coreDb point must be defined as DESTINATION
in SETPOINT or COMMAND.

• If the coordinate is :F or :L using two registers, the function code Preset Multiple Register (16)
is used.

• If the 32-bit variables need to be configured to take 2 HR, the parameter “32 bit register” must
be checked. In this case, the coordinate associated to the first HR of the point must be defined
in the coreDb. Thus, if you have a float variable named "HR:203:F" and you want to define
another coordinate, this must not overlapped the coordinate HR:203:F (which takes two HR),
but the coordinate "HR:205:F" must be allocated to it.

• If HR points are set to 32 bits, that is, the parameter “32 bit register” is checked. In this case,
following coordinates can be defined consecutively.

• There are two options for 64-bit signals. They can use one 64-bit HR or four 16-bit HR. To
configure 64-bit variable it is necessary check the field “64 bit registers”

• If the coordinate is :D using four registers, the function code Preset Multiple Register (16) is
used.

• To summarize using the coordinate HR:203, for example:


o HR:203. Signed 16-bit signal.
o HR:203:U. Unsigned 16-bit signal.
o HR:203:F. 32-bits signal (stored as float).
o HR:203:L. 32-bits signal (stored as long).
o HR:203:D. 64-bit signal (stored as double).

3.1.3 Possible Mappings


Once the coordinates’ format is defined, the user needs to determine the point types (according to
the coreDb) and the mode (source or destination) allowed for coordinates.
The table below includes the possible mappings: D: indicates that the type is allowed as a
“destination” and S: indicates that the type is allowed as a “source”. The shaded cell indicated the
recommended option:
Table 7 – Coordinate mapping in coreDb.

Function code Status Analog Command Setpoint

Read Coil Status (CS) S/D S/D S/D S/D


Read Input Status (IS) S/D S/D S/D S/D
Read Holding Register (HR) S/D S/D S/D S/D

Pag 29
20/02/2020 User Manual – Modbus Device

Function code Status Analog Command Setpoint

Read Input Register (IR) S/D S/D S/D S/D


Write Single Coil (CS) S/D S/D S/D S/D
Write Single Register (HR) S/D S/D S/D S/D
Write Multiple Coils (CS) S/D S/D S/D S/D
Write Multiple Registers (HR) S/D S/D S/D S/D

3.1.4 Diagnostic Coordinates


Diagnostic information could be interesting to be known as a point in coreDb to be available to the
rest of processes. Current implementation defines the following diagnostic coordinates.

• MDBE_COM_STATUS: It indicates the status of the communications between the slave


Modbus Device and the external master. It is equal to ‘0’ if the communication timeout is
arrived without answer from the external master, so the RTU will be out of service. It takes a
value equal to ‘1’ if the communication between the slave RTU and the external master is
performing correctly.

• MDBE_COM_ENABLED: Optional coordinate which indicates if a Modbus Slave answers


requests from its Modbus Master. These responses are sent if this coordinate value is different
to 0 and its quality flag is good (bits NT_LQF and/or IV_LQF are not equal to 1). Otherwise, the
Modbus Slave will not answer requests from its Modbus Master. Whether this point is not
mapped, a Modbus Slave will always answer the received requests from its Modbus Master.
Following table resumes the supervision point corresponding to Modbus master device: D:
indicates that the type is allowed as a “destination” and S: indicates that the type is allowed as a
“source”.
Table 8 – Modbus slave – Diagnostic points in coreDb.

Coordinate (Type) Status Analog Command Setpoint

MDBE_COM_STATUS S
MDBE_COM_ENABLED D

3.2 Modbus Slave in Easergy Builder

At the left side in the configuration view of Easergy Builder, you can see the Devices tree for the
configuration that you are defining.
Use the button "Add" or the right-button of the mouse (on the tree) for creating a new Device.
Figure 14 – New Device

• Type: Type of the new Device. For Modbus slave you must select “Modbus Slave”.
Pag 30
User Manual – Modbus Device 20/02/2020

• Name: Name of the new Device (Only letter, numbers and ‘_’ character are allowed for the
name). Max. 32 characters).

• Description (optional): Description of the new Device


Figure 15 – Communication channel, number of slave and profile associated to the device.

Previously, you need to have configured the communication channels. To do that, please consult
the Easergy Builder user manual.

NOTICE
The communication port to TCP Modbus is 502 (please, refer to the manual to specify this
value)

Select the communication channel and number of the Slave for this Device. The Slave number for
a Device must be unique into each channel. The channel must be set to AutoSwitch; the active
channel is the receiving channel
Select the Modbus profile (only STD profile is available for this version).
The new Device will be shown in the tree.
Figure 16 – New modbus master device

You can double click on the Device (or use the buttom Modify) in order to edit or consult the
configuration.

Pag 31
20/02/2020 User Manual – Modbus Device

Figure 17 – Configuration of a modbus slave device

Where:

• Modbus Type: It allows a profile to be selected from the installed profiles (only STD profile
is available).

• 32 bit registers: If this option is enabled, Input and Holding Registers are 32 bits signals,
so a float or long data will only take one register. Nevertheless, if this option is not enabled,
and we have float or long data, these will take two Input or Holding Registers. This
condition must be considered when setting the coordinates.

• 64 bit registers: If this option is enabled, Input and Holding Registers are 64 bits signals,
so a double data will only take one register. Nevertheless, if this option is not enabled, and
you have double, these will take four Input or Holding Registers (or two if “32 bit registers”
is checked). This condition must be considered when setting the coordinates.

• Modicon: It indicates the data format for the variables. From a Modbus point of view, they
take 32 bits. If Modicon is enabled, the first Modbus message will send the least significant
two bytes of the 32 bits and then the most significant two bytes (applicable for Input and
Holding Register).

• Communication Protocol: It sets the protocol to serial (Modbus serial) or TCP (Modbus
TCP).

• Slave Number: Slave identifier (range from 1 to 255).

• Communication Timeout: If the Modbus slave does not receive responses from the
Modbus master for a longer period than this Timeout, the communication is considered
interrupted. The communication status can be monitored using signal
MDBE_COM_STATUS

Pag 32
4 Modbus SEPAM
20/02/2020 User Manual – Modbus Device

Content

4 MODBUS SEPAM ..................................................................................................33

4.1 MODBUS SEPAM ADMINISTRATION ......................................................................35


4.1.1 SIGNAL IDENTIFICATION – COORDINATES ........................................................35
4.1.2 POSSIBLE MAPPINGS & DIAGNOSTIC COORDINATES ........................................35
4.2 MODBUS SEPAM IN EASERGY BUILDER ...............................................................37
4.2.1 CONFIGURING REQUESTS ..............................................................................40

Pag 34
User Manual – Modbus Device 20/02/2020

4.1 Modbus SEPAM Administration

4.1.1 Signal Identification – Coordinates


The coordinate format of the SEPAM device points in coreDb is chosen based on the SEPAM
memory map.
The coordinates are formed by a single numeric field in four-digit hexadecimal range 0000 to FFFF,
except for coordinates of analog inputs that include the option of to include the sign in the
measurement. By default, will be type 16 NS (unsigned). When you include the parameter "S"
separated by ":" address will be taken to sign, type 16 O.
Therefore, the point type is identified by the address provided in hexadecimal, as shown in these
examples:
Table 9 – Examples of coordinates of Modbus SEPAM

Name Description Coordinate

Digital Inputs

TS064 Command aborted by locking switch. C93F


TS053 Lock switch connection (C.T.R.). C934
TS022 No switch opens. C915
TS024 No switch closes. C917

Analog Inputs

EACI01 Intensity. FB80


EACI02 Voltage. FB81
EACI03 Active power. FB82:S
EACI04 Reactive power. FB83:S

Command Inputs

TC49 Command to open switch. C870


TC50 Command to close switch. C871
TC51 Command to open bar switch 1. C872
TC52 Command to close bar switch 1. C873

4.1.2 Possible Mappings & Diagnostic Coordinates


Some diagnostic information related to the Modbus SEPAM should be reflected in the coreDb by
means of information points, so that this information is available for the rest of the processes. The
coordinates which identify these point types will have the format “DIAG:XX···X” where “XX···X” is a
mnemonic that makes reference to the diagnostic information. The current implementation defines
the following diagnostic coordinates.

• DIAG:SERV: It is defined as a STATUS-SOURCE. The value is “1” when the slave replies to
all the master's questions correctly. The value is “0” when there is a communication error or it
indicates that the RTU is not available.

Pag 35
20/02/2020 User Manual – Modbus Device

• DIAG:EXCEPTION: It is defined as SOURCE in ANALOG. It shows the exception code


returned by the slave in case of an exception.
o 1.- Unknown function code.
o 2.- Wrong address.
o 3.- Wrong data.
o 4.- Device not ready.
o 7.- Negative acknowledgment.

• DIAG:FC1: It is defined as SOURCE in STATUS. The value is “1” when there is a


communication fault in the primary channel associated to LINK. If the communication is
established through a simple channel, not a LINK, the value of this signal, if defined, will never
be written. The first writing to coreDb, after resetting the remote unit, does not generate events.

• DIAG:FC2: It is defined as SOURCE in STATUS. The value is “1” when there is a


communication fault in the secondary channel associated to LINK. If the communication is
established through a simple channel, not a LINK, the value of this signal, if defined, will never
be written. The first writing to coreDb, after resetting the remote unit, does not generate events.
The diagnostic signals DIAG:FCi will be set to 0, whenever data are received through a “faulty”
(DIAG:FCi = 1) channel. The channel will be switched after the defined switching interval, or when
exceeding the half of the retries defined for TimeOut (RETRIES AFTER TIMEOUT), or when the
RTU is not available.

NOTICE
If the Modbus operated in a simple channels (not a Link), the signals DIAG:FCi are not
applicable.

Following table resumes the supervision point corresponding to Modbus SEPAM device.
Table 10 – Coordinate mapping in coreDb and Diagnostic points of Modbus SEPAM

Coordinate Description Status Analog Command Setpoint

coreDb Points

(C8F0 – C9EF) Remote-indications zone S


(C100 – C14F) Logic inputs S
(FB80 – FB83) Metering compact zone S
(C840 – C87F) Remote-control zone 1 D

Diagnostic Points

DIAG:EXCEPTION S
DIAG:SERV S
DIAG:FC1 S
DIAG:FC2 S

1When you define a command using his coordinate, you have always to use the selection address. Never use the
execution address.
Pag 36
User Manual – Modbus Device 20/02/2020

4.2 SEPAM device synchronization

There are two options for synchronizing SEPAM devices:

• For each SEPAM a SYNC request is sent every X time. For example, if you need every 24
hours, 86400000ms will be configured. A request will be sent to each of the devices in the
channel, so this option generates a lot of information traffic on the network.

• The recommended option is to use a broadcast message. To do this, a SYNC message must
be configured on each device and set 1 in the "Sync. Broadcast" field. In this case, a broadcast
message would be sent every time indicated in FREQ. The advantage is that when the first
SYNC request is executed (the first of all the Devices), it is sent in broadcast to all the devices
of the channel, so it is not necessary to send it to each device individually. With this option, the
network traffic is not affected.
Therefore, it is recommended:

• Define a SYNC message for each Modbus SEPAM device in our configuration

• Set the "Sync Broadcast" field to 1


For example, if our configuration is:

• Device 1  SYNC request (every hour) and "Sync Broadcast" = 1

• Device 2  SYNC request (every 12 hours) and "Sync Broadcast" = 1

• Device 3  SYNC request (every 24 hours) and "Sync Broadcast" = 1


Every hour (the shortest time of all), a synchronization request will be sent to all SEPAMs in Device
1, 2 and 3. The requests configured in Devices 1 and 2 would never be executed but must be
defined in order to receive the broadcast message.
As for the format of the message sent, Saitel's software builds it according to the type of SEPAM
we are configuring for that Device.
All SEPAMs in the same channel must be of the same type.
The SEPAM type is configured in the "Serial for Requests" field in the Device configuration in
Easergy Builder.

4.3 Modbus SEPAM in Easergy Builder

At the left side in the configuration view of Easergy Builder, you can see the Devices tree for the
configuration that you are defining.
Use the button "Add" or the right-button of the mouse (on the tree) for creating a new Device.
Figure 18 – New Device

Pag 37
20/02/2020 User Manual – Modbus Device

Where:

• Type: Type of the new Device. For Modbus SEPAM you must select “Sepam Protocol”.

• Name: Name of the new Device (Only letter, numbers and ‘_’ character are allowed for the
name). Max. 32 characters).

• Description (optional): Description of the new Device


Figure 19 – Communication channel, number of slave and profile associated to the Device.

Previously, you need to have configured the communication channels. To do that, please consult
the Easergy Builder user manual.
Select the communication channel and number of the Master for this Device. The Master number
for a Device must be unique into each channel.
The new Device will be shown in the tree:
Figure 20 – New Modbus SEPAM Device.

You can double click on the Device (or use the buttom Modify) in order to edit or consult the
configuration.

Pag 38
User Manual – Modbus Device 20/02/2020

Figure 21 – Configuration of a Modbus SEPAM Device.

Where:

• Address: SEPAM device’s address (from 1 to 255).

• Protocol: Communication type, SERIAL or TCP.

• Sync. Broadcast: The synchronization request is in broadcast mode (1) or nominal (0).

• Serie for requests: SEPAM serie for request (20, 40 60 or 80).

• Link timeout: If no response is received from the slave for longer than this time, is considered
to have been broken the communication. It takes into account also the retries configured by the
parameter "Retries by timeout" set to each slave. The communication status can be monitored
by the monitoring signal DIAG: SERV. Recommended value: 1000 ms

• Interchar timeout: Timeout (ms) between characters before a frame is completed.


Recommended value: 200 ms.

• Application timeout: Timeout in seconds for a response to a request. Recommended value:


60 s.
• Offline period: If the device is Offline, this is the time (s) to retry to be Online. Recommended
value: 60 s.
• Retries by error: Number of times that a wrong answer is allowed before marking the device
as out of service. If the slave responds to the master's question incorrectly, the master will ask
the same question the number of times defined in this parameter before to mark the slave as
out of service.
• Retries by timeout: Number of times that the master will ask to the slave without response
before to mark it as out of service.
• Clear event queue: If 1, the event queues will be removed when overflow.

Pag 39
20/02/2020 User Manual – Modbus Device

• Event confirm FC: Function code to be used to confirm that events were read. Recommended
value: 6
o 5: Write Single Coil
o 6: Write Single Register
o 15: Write Multiple Coils
o 16: Write Multiple Registers.

• Event Zone 1: Position of the bit in Check-Word indicating lost events in zone 1. The value to
be set depends on the type of SEPAM device.

• Overflow Zone 1: Position of the bit in Check-Word indicating not confirmed events in zone 1.
The value to be set depends on the type of SEPAM device.

• No Sync: Position of the bit in Check-Word that indicating the device is not synchronized. The
value to be set depends on the type of SEPAM device.

• Event Zone 2: Position of the bit in Check-Word indicating lost events in zone 2. The value to
be set depends on the type of SEPAM device.

• Overflow Zone 2: Position of the bit in Check-Word indicating not confirmed events in zone 2.
The value to be set depends on the type of SEPAM device.
To map signals in coreDb, we must know that the coordinates of the points defined in the
COMMAND or SETPOINT table for a sepam type bin have the following format:
Address[:S`Address´][:b`Bit´][:F`Function_code´]
Where:

• Address: This is the address of the Modbus registry to be written. Its value is between 0 and
65535. If the address is prefixed with the string "0x", the value of the register address is
considered to be in hexadecimal format.

• S`Address´: This parameter is optional. It is the address of the Modbus register to write the
command selection. If this parameter is set to the coordinate, it means that the execution is
prefixed with the string "0x", the value of the register address is considered to be in
hexadecimal format.

• B`Bit´: This parameter is optional. Its value is between 0 and 15. Its functionality depends on
the parameter `FFunction_Code´:
o If the function code is 5 (Write Single Coil) or 16 (Write Multiple Registres) this field
has no functionality.
o If the function code is 6 (Write Single Registrer) it indicates the bit to write from the
register.
o If the function code is 15 (Write Multiple Coils) it indicates the number of outputs to be
written. If the value of the field is 0, an output is written. If it is 15, 16 outputs are
written.

4.3.1 Configuring Requests


This section explains how you can configure the scheduled requests for a SEPAM device:

• Type: Request type:


o CHK_WORD: Read ‘check-word’ register. Max. number of CHK_WORD request: 1.
o EVNT_ZONE_1: Read the zone 1 of events. For this request type, the field ‘FREQ’
does not applied. Max. number of EVNT_ZONE_1 request: 1.
o EVNT_ZONE_2: Read the zone 2 of events. For this request type, the field ‘FREQ’
does not applied. Max. number of EVNT_ZONE_2 request: 1.

Pag 40
User Manual – Modbus Device 20/02/2020

o SYNC: Synchronization request. Max. number of SYNC request: 1


o REQ: Read SEPAM registers.

• Function code: Function code for request:


o 1: Read Coils.
o 2: Read Discrets Inputs.
o 3: Read Holding Registers.
o 4: Read Input Registers.
o 5: Write Single Coil.
o 6: Write Single Register.
o 15: Write Multiple Coils.
o 16: Write Multiple Registers.

• Init. Reg.: Initial register of the request.

• Number of Registers: Number of the requested registers. This value depends on the function
code:
o Max value 0: For FC 5 (Write Single Coil) or 6 (Write Single Register).
o Max value 123: For FC 16 (Write Multiple Registers).
o Max value 125: For FC 3 (Read Holding Registers) or 4 (Read Input Registers).
o Max value 1968: For FC 15 (Write Multiple Coils).
o Max value 2000: For FC 1 (Read Coils) or 2 (Read Discrets Inputs).

• Freq: Frequency (ms) to execute this request.


o A frequency equal to zero is allowed for all requests except the check-word request.

Pag 41
5 Modbus MICOM
User Manual – Modbus Device 20/02/2020

Content

5 MODBUS MICOM ..................................................................................................42

5.1 MODBUS MICOM ADMINISTRATION .......................................................................44


5.1.1 SIGNAL IDENTIFICATION – COORDINATES ........................................................44
5.1.2 POSSIBLE MAPPINGS & DIAGNOSTIC COORDINATES ........................................45
5.2 MODBUS MICOM IN EASERGY BUILDER ................................................................46
5.2.1 CONFIGURING REQUESTS ..............................................................................48

Pag 43
20/02/2020 User Manual – Modbus Device

5.1 Modbus MICOM Administration

This Device is used to set the communications between coreDb and the MiCOM P127 protection.

NOTICE
HU250 (T300) does not support modbus MICOM device.

5.1.1 Signal Identification – Coordinates


Coordinates in table STATUS and ANALOG for the MICOM Device have the following format:
Coordinate for MICOM device Address[:b’Bit’][:Format]

Where:

• Address: Address of the Modbus register. If the prefix ‘0x’ is used, the address is in
hexadecimal format.

• b’Bit’: (Optional). Number of bit to be read in the register. This value depends on the ‘Format’
parameter. If is a 16-bits word, the value is between 0 and 15, else if it is a 32-bits word,
between 0 and 31.

• Format: Format of the received data according to the following table. Default value: signed 16-
bits word.
Table 11 – Format for MICOM data

Format Description Reception order

Not defined Signed 16-bits word 2–1


U Unsigned 16-bits word 2–1
ILL Signed 32-bits integer. 1–2–3-4
ILH Signed 32-bits integer. 2–1–4–3
IHL Signed 32-bits integer. 3–4–1–2
IHH Signed 32-bits integer. 4–3–2–1
ULL Unsigned 32-bits integer. 1–2–3–4
ULH Unsigned 32-bits integer. 2–1–4–3
UHL Unsigned 32-bits integer. 3–4–1–2
UHH Unsigned 32-bits integer. 4–3–1–2

For tables COMMAND and SETPOINTS the coordinates have the following format:

Coordinate for MICOM device Address[:b’Bit’][:F’Function_code’]

• Address: Address of the Modbus register to be write. If the prefix ‘0x’ is used, the address is in
hexadecimal format.

• b’Bit’: (Optional). The value is between 0 and 15. It depeds on the value for Function_code.
o Not applies for FC 5 (Write Single Coil) or 16 (Write Multiple Registers).
o Number of bit to be written in the register for FC 6 (Write Single Register).
o Number of outputs to be wrotten if FC is 15 (Write Multiple Coils). Value 0 indicates 1
output is written, value 15 indicates 16 outputs are written.

Pag 44
User Manual – Modbus Device 20/02/2020

• F’Function_code’: (Optional). Fucntion code. Default value: 6 (Write Single Register).


o 5: Write Single Coil)
o 6: Write Single Register)
o 15: Write Multiple Coils
o 16: Write Multiple Registers
Some coordinates could be: “3088”, “3088:b0”, “0xC90”, “0xC90:b8”, “516:UHH”, “0x220:UHL”,
“516:b9:IHL”, “0x220:IHL:b12”,
“0xC88”, “0xC88:b7”, “0xC88:b2:F15”, “240”, “240:b0” and “240:F6:b12”.

5.1.2 Possible Mappings & Diagnostic Coordinates


Some diagnostic information related to the Modbus SEPAM should be reflected in the coreDb by
means of information points, so that this information is available for the rest of the processes. The
coordinates which identify these point types will have the format “DIAG:XX···X” where “XX···X” is a
mnemonic that makes reference to the diagnostic information. The current implementation defines
the following diagnostic coordinates.

• DIAG:SERV: It is defined as SOURCE in STATUS. The value is “1” when the slave replies to
all the master's questions correctly. The value is “0” when there is a communication error or it
indicates that the RTU is not available.

• DIAG:EXCEPTION: It is defined as SOURCE in ANALOG. It shows the exception code


returned by the slave in case of an exception.
o 1.- Unknown function code.
o 2.- Wrong address.
o 3.- Wrong data.
o 4.- Device not ready.
o 7.- Negative acknowledgment.

• DIAG:FC1: It is defined as SOURCE in STATUS. The value is “1” when there is a


communication fault in the primary channel associated to LINK. If the communication is
established through a simple channel, not a LINK, the value of this signal, if defined, will never
be written. The first writing to coreDb, after resetting the remote unit, does not generate events.

• DIAG:FC2: It is defined as SOURCE in STATUS. The value is “1” when there is a


communication fault in the secondary channel associated to LINK. If the communication is
established through a simple channel, not a LINK, the value of this signal, if defined, will never
be written. The first writing to coreDb, after resetting the remote unit, does not generate events.

• DIAG:FMT_DATE: Codification format for the timestamp:


o 1: Not defined.
o 2: According to IEC 60870-5-103.
o 3: The format is read from the protection using the command DATE_FMT.

• DIAG:ACK_MODE: Confirmation mode for the events:


o 1: Automatic mode.
o 2: Manual mode.
o 3; The mode is read from the protection using the command EVNT_MODE_ACK’.

Pag 45
20/02/2020 User Manual – Modbus Device

Following table resumes the supervision point corresponding to Modbus MICOM device.
Table 12 – Mapping in coreDb for Modbus MICOM.

Function code Status Analog Command Setpoint

coreDb Points

Read Coils S S
Read Discrets Inputs S S
Read Holding Registers S S
Read Input Registers S S
Write Single Coil D D
Write Single Register D D
Write Multiple Coils D D
Write Multiple Registers D D

Diagnostic Points

DIAG:SERV S S
DIAG:FC1,DIAG:FC2 S S
DIAG:EXCEPTION S S
DIAG:FMT_DATE S S
DIAG:ACK_MODE S S

5.2 Modbus MICOM in Easergy Builder

At the left side in the configuration view of Easergy Builder, you can see the Devices tree for the
configuration that you are defining.
Use the button "Add" or the right-button of the mouse (on the tree) for creating a new Device
Figure 22 – New Device.

Where:

• Type: Type of the new Device. For Modbus MICOM you must select “MICOM Master
Protocol”.

• Name: Name of the new Device (Only letter, numbers and ‘_’ character are allowed for the
name). Max. 32 characters).

• Description (optional): Description of the new Device.

Pag 46
User Manual – Modbus Device 20/02/2020

Figure 23 – Communication channel, number of slave and profile associated to the Device

Previously, you need to have configured the communication channels. To do that, please consult
the Easergy Builder user manual.
Select the communication channel and number of the Slave for this Device. The Slave number for
a Device must be unique into each channel.
The new Device will be shown in the tree:
Figure 24 – New Modbus SEPAM Device.

You can double click on the Device (or use the buttom Modify) in order to edit or consult the
configuration.
Figure 25 – Configuration of a Modbus SEPAM Device.

Pag 47
20/02/2020 User Manual – Modbus Device

Where:

• Address: MICO device’s address (from 1 to 255).

• Link timeout: If no response is received from the slave for longer than this time, is
considered to have been broken the communication. It takes into account also the retries
configured by the parameter "Retries by timeout" set to each slave. The communication
status can be monitored by the monitoring signal DIAG: SERV. Recommended value: 1000
ms

• Interchar timeout: Timeout (ms) between characters before a frame is completed.


Recommended value: 200 ms.

• Application timeout: Timeout in seconds for a response to a request. Recommended


value: 60 s.
• Offline period: If the device is Offline, this is the time (s) to retry to be Online.
Recommended value: 60 s.
• Error retries: Number of times that a wrong answer is allowed before marking the device
as out of service. If the slave responds to the master's question incorrectly, the master will
ask the same question the number of times defined in this parameter before to mark the
slave as out of service.
• Timeout retries: Number of times that the master will ask to the slave without response
before to mark it as out of service.
• Date FMT: Format of the timestamp:
o 1: Not defined.
o 2: According to IEC 60870-5-103.
o 3: The format is read from the protection using the command DATE_FMT.

• Event ACK Mode: Confirmation mode for events:


o 1: Automatic mode.
o 2: Manual mode.
o 3: The mode is read from the protection using the command EVNT_MODE_ACK’.

• Decode Event Mode: The value of “Address” and “Value” must be interchanged (1) or not
(0).

• No ACK Event: Number of bit of the register ‘relays status’ for not confirmed events. Value
between 0 and 15. For MiCOM P127 must be set to ‘2’.

• No Sync: Number of bit of the register ‘relays status’ for not synchronized protection.
Value between 0 and 15. For MiCOM P127 must be set to ‘3’

5.2.1 Configuring Requests


This section explains how you can configure the scheduled requests for a MICOM device:

• Type: Request type:


o RELAY_STS: Read ‘relays status’ register of the MICOM P127. Max. number of
RELAY_STS request: 1.
o OLD_EVNT: Read the oldest not confirmed events. In this request type, FREQ only
applies if a RELAY_STS request is not defined. Max. number of OLD_EVNT request:
1.
o SYNC: Synchronization request. Max. number of SYNC request: 1
o DATE_FMT: Read the date format. Max. number of DATE_FMT request: 1.

Pag 48
User Manual – Modbus Device 20/02/2020

o EVNT_MODE_ACK: Set the confirmation mode for events. Max. number of


EVNT_MODE_ACK request: 1.
o EVNT_ACK: Confirm events if the confirmation mode is manual. Max. number of
EVNT_ACK request: 1.
o REQ: Read MICOM P127 registers.

• Function code: Function code fot request:


o 1: Read Coils.
o 2: Read Discrets Inputs.
o 3: Read Holding Registers.
o 4: Read Input Registers.
o 5: Write Single Coil.
o 6: Write Single Register.
o 15: Write Multiple Coils.
o 16: Write Multiple Registers.

• Init. Reg.: Initial register of the request.

• Number of Registers: Number of the requested registers. This value depends on the function
code:
o Max valud 0: For FC 5 (Write Single Coil) or 6 (Write Single Register).
o Max value 123: For FC 16 (Write Multiple Registers).
o Max value 125: For FC 3 (Read Holding Registers) or 4 (Read Input Registers).
o Max value 1968: For FC 15 (Write Multiple Coils).
o Max value 2000: For FC 1 (Read Coils) or 2 (Read Discrets Inputs).

• Number of bit: Number of the bit into the word to be read or written.

• Freq: Frequency (ms) to execute this request

Pag 49
20/02/2020 User Manual – Modbus Device

Index of Figures
Figure 1 – Baseline Software Platform architecture. .................................................................................................... 9

Figure 2 – Relation between coreDb and other applications. ....................................................................................10

Figure 3 – Easergy Builder startup window. ..............................................................................................................10

Figure 4 – Easergy Builder Interface. ........................................................................................................................11

Figure 5 – Device Catalog Window. ..........................................................................................................................11

Figure 6 – Overview of relations between coreDb and Modbus master.....................................................................12

Figure 7 – Overview of relations between coreDb and Modbus slave. ......................................................................12

Figure 8 – Overview of relations between coreDb and the Modbus MICOM module. ...............................................13

Figure 9 – New Device. .............................................................................................................................................21

Figure 10 – Communication channel, number of slave and profile associated to the Device. ..................................21

Figure 11 – A new Modbus Master Device: ...............................................................................................................22

Figure 12 – Configuration of a Modbus Master Device: ............................................................................................22

Figure 13 – Modbus master configuration. ................................................................................................................23

Figure 14 – New Device ............................................................................................................................................30

Figure 15 – Communication channel, number of slave and profile associated to the device. ..................................31

Figure 16 – New modbus master device ...................................................................................................................31

Figure 17 – Configuration of a modbus slave device ................................................................................................32

Figure 18 – New Device ............................................................................................................................................37

Figure 19 – Communication channel, number of slave and profile associated to the Device. ..................................38

Figure 20 – New Modbus SEPAM Device. ................................................................................................................38

Figure 21 – Configuration of a Modbus SEPAM Device. ..........................................................................................39

Figure 22 – New Device. ...........................................................................................................................................46

Figure 23 – Communication channel, number of slave and profile associated to the Device ...................................47

Figure 24 – New Modbus SEPAM Device. ................................................................................................................47

Figure 25 – Configuration of a Modbus SEPAM Device. ..........................................................................................47

Pag 50
User Manual – Modbus Device 20/02/2020

Index of Tables
Table 1 – Reference Documents .................................................................................................................................. 2

Table 2 – Software versions ......................................................................................................................................... 3

Table 3 – Hardware / Software compatibility ................................................................................................................ 3

Table 4 – Symbols ........................................................................................................................................................ 5

Table 5 – Type of points for Modbus master (STD profile) ........................................................................................19

Table 6 – Diagnostic points for Modbus master (STD profile) ....................................................................................20

Table 7 – Coordinate mapping in coreDb. ..................................................................................................................29

Table 8 – Modbus slave – Diagnostic points in coreDb..............................................................................................30

Table 9 – Examples of coordinates of Modbus SEPAM .............................................................................................35

Table 10 – Coordinate mapping in coreDb and Diagnostic points of Modbus SEPAM..............................................36

Table 11 – Format for MICOM data ............................................................................................................................44

Table 12 – Mapping in coreDb for Modbus MICOM. ..................................................................................................46

Pag 51
20/02/2020 User Manual – Modbus Device

Glossary
A
ASDU: Application Service Data Unit

C
CoreDb: Real time database of the Baseline Software Platform.
CPU: Central Processing Unit.

D
DB: Data base.

E
EN: English Languaje

H
HU_A: Saitel DR Advanced Head Unit.
HU_AF: Saitel DR Advanced Head Unit with acquisition.
HU_B: Saitel DR Basic Head Unit.
HU_BF: Saitel DR basic HU with acquisition

I
IED: Intelligent Electronic Device.
I/O: Input / Output.
ITB: Intelligent Terminal Block.

L
LAN: Local Area Network.

O
OSI: Open System Interconnect

P
PC: Personal Computer.
PLC: Programable Logic Controler.

R
RAM: Random Access Memory.
RTU: Remote Terminal Unit.
Rev: Revision.
RTC: Real Time Clock
RTOS: Real Time Operating System

Pag 52
User Manual – Modbus Device 20/02/2020

S
SBO: Select Before Operate.
SCADA: Supervisory Control And Data Acquisition.
SM_CPU866: Saitel DP CPU (standard).
SM_CPU866e: Saitel DP CPU (advanced).
SO: Operating System.

T
TCP: Transmission Control Protocol.

Pag 53
Printed in:

Tuesday, February 18, 2020

Schneider Electric
C/ Charles Darwin s/n
Parque Científico y Tecnológico de la Cartuja
Seville, Spain

©2020 All rights reserved. The information contained in this document is


confidential and is owned by Schneider Electric. It cannot be copied or distributed
in any way, unless there is express written authorization by Schneider Electric.
Although this information was verified at the time of publication, may be subject to change without notice.

FTE-MBD-S854-1.4 02/2020

Pag 54

You might also like