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

SGW1-IA3-MMP – Modbus Multiplexer Exemys

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 1


SGW1-IA3-MMP – Modbus Multiplexer Exemys

Exemys products are constantly evolving to meet the needs of our customers. For this reason,
the specifications and capabilities are subject to change without notice.

Find updates at www.exemys.com


Copyright © Exemys, 2007. All rights reserved.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 2


SGW1-IA3-MMP – Modbus Multiplexer Exemys

Page Index

1 Introduction ________________________________________________________
________________________________________________________ 4
1.1 User’s Manual Purpose ________________________________________________
________________________________________________ 4
1.2 Product Overview____________________________________________________
____________________________________________________ 4
1.3 Ordering Codes _____________________________________________________
_____________________________________________________ 5
1.4 Technical Specifications _______________________________________________
_______________________________________________ 5
2 Installation ________________________________________________________
________________________________________________________ 6
2.1 Power ____________________________________________________________
____________________________________________________________ 6
2.2 Connections________________________________________________________
________________________________________________________ 6
2.3 LED indicators ______________________________________________________
______________________________________________________ 7
3 Configuration ______________________________________________________
______________________________________________________ 8
3.1 Master / Slave configuration parameters ___________________________________
___________________________________ 9
3.2 Serial Port Configuration _____________________________________________
_____________________________________________ 10
3.3 RTS Control Configuration ____________________________________________
____________________________________________ 11
3.4 Slave ranges, Configuration ___________________________________________
___________________________________________ 11
3.5 Other configuration settings. __________________________________________
__________________________________________ 14
4 Typical Usage Modes ________________________________________________
________________________________________________ 15
4.1 Multiplexer Mode __________________________________________________
__________________________________________________ 15
4.2 De-
De-Multiplexer Mode ________________________________________________
________________________________________________ 16
4.3 Converter Mode ____________________________________________________
____________________________________________________ 17
4.4 Interchange memory Mode ____________________________________________
____________________________________________ 17
5 Monitoring _______________________________________________________
_______________________________________________________ 18

A. FIRMWARE UPGRADE 19

B. FACTORY SETTINGS 22

C. DIN RAIL MOUNT 23

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 3


SGW1-IA3-MMP – Modbus Multiplexer Exemys

1 Introduction

1.1 User’s Manual Purpose

The purpose of this manual is to provide the instructions for installing and operating the
SGW1-IA3-MMP quickly and simply. The manual begins with a general description of the
product, following the instructions for the correct installation of the hardware. The
configuration and operation of the device is detailed later.

Acronym Description
PC Personal Computer
USB Universal Serial Bus
LED Led Indicator
GND Ground (Reference)

1.2 Product Overview

The SGW1-IA3-MMP is a Modbus communications multiplexer / converter over serial ports. It


allows you to connect Modbus RTU / ASCII masters to Modbus RTU / ASCII slaves. Each of
the serial devices can operate with Baud Rate, Data Bits, Parity, Bits Stop and different
Modbus protocol type (RTU or ASCII).

The SGW1-IA3-MMP orders the interrogations coming from the different masters assigning a
priority according to the order of arrival of the different masters, and then sends them to the
slaves.

As an additional function, the device allows the exchange of information between Modbus
masters through the 1000-byte exchange memory that can be read and written by any of the
connected masters.
www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 4
SGW1-IA3-MMP – Modbus Multiplexer Exemys

1.3 Ordering Codes

Part Number Description

SGW1-4B0
4B0-00
4B0 00-IA3-MMP
00 4 RS-232 / RS-485 ports

SGW1-13B0
13B0-00
13B0 00-IA3-MMP-CF
00 CF 1 RS232with flow control + 3 RS-232 / RS-485 ports

1.4 Technical Specifications

Communication Protocol Modbus RTU, Modbus ASCII.

Communication Ports 4 RS232/RS485 + 1 USB type B.

Configuration
Configuration Serial USB console.

Firmware
Firmware upgrade Via serial RS232 console

LED’s Indicators
Indicators Power, Modbus data

Dimensions 100 mm x 22,5 mm x 112 mm (Height x Width x Length).

10 a 30 [Vdc].
Power
12 Vdc – 70 [mA]
24 Vdc – 40 [mA].

Operation: -15 to 65 ºC.


Temperatures
Temperatures
Storage: -40 to 75 ºC.

1 year
Warranty
Technical support included.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 5


SGW1-IA3-MMP – Modbus Multiplexer Exemys

2 Installation

2.1 Power
The SGW1-IA3-MMP accepts a power supply in the range of +10 to 30 Vdc and must connect
the positive of the power supply to terminal No. 17 and the negative of the power supply to
terminal No. 18, as shown in the following figure:

2.2 Connections

SGW1-4B0
4B0-
4B0-00-IA3-MMP
00 SGW1-13B0
13B0-
13B0-00-IA3-MMP-CF
00 CF

RS232 ports are DTE type. That is, it is transmitted through the TX terminal and is received by
the RX terminal. If you want to connect another DTE device you must cross the terminals Tx and
Rx.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 6


SGW1-IA3-MMP – Modbus Multiplexer Exemys

2.3 LED indicators


The SGW1-IA3-MMP has five indicator LEDs. One of them indicates that the device is
energized (Power). While the other four are each linked to their serial port and shows the
state of communications.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 7


SGW1-IA3-MMP – Modbus Multiplexer Exemys

3 Configuration

The SGW1-IA3-MMP provides a command console for configuration via USB port.

To access it, the SGW1-IA3-MMP must be connected to a USB port on a PC and it must have
the Exemys terminal program called Exemys Console.

The driver for the USB can be downloaded from here: http://www.exemys.com/rmsrmdriver

The terminal program can be downloaded from here: http://www.exemys.com/console

Once the driver and the terminal type program have been installed, the terminal must be run,
connect the SGW1-IA3-MMP to a USB port on the PC and go to the Connection -> USB
menu, a window will open with the description of all the Exemys products with USB found.
Select with double click the product to be configured and pressing ENTER will show a ">"
sign indicating that you can enter the configuration commands listed below.

In the commands below, the suffix X must be replaced by A, B, C or D depending on the serial port
that you want to configure.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 8


SGW1-IA3-MMP – Modbus Multiplexer Exemys

3.1 Master / Slave configuration parameters

Command Description
Configures if a Master or a Slave will be connected to the COM

MSCOM: • M = Master. / S = Slave.


(M|S)(M|S)
(M|S)(M|S) Example of use: MSCOM:MMSM
(COM A, B and D connected to master devices, COM C connected to slave/s
device/s).
Sets the maximum waiting time in the slave response.
This command applies to all ports connected to slaves.

NOTE: When the SGW1-IA3-MMP sends an order to the slave it expects a


SLVTOUT:
response from the slave. If the slave does not respond within this time it will go to
(50..30000)
the next master.
[ms]
• Value = 50 ... 30000 [ms].

Example of use: SLVTOUT:100


Sets the maximum waiting time in the response of the slaves connected to the X
port.

NOTE: When the SGW1-IA3-MMP sends an order to the slave it expects a


SLVTOUTx:
response from the slave. If the slave does not respond within this time it will go to
(50..30000)
the next master.
[ms]
• Value = 50 ... 30000 [ms].

Example of use: SLVTOUTA:100


Set the response priority level for all masters connected to the device.

NOTE: The priority of level 0 is the maximum. For each priority level added, extra
10 milliseconds are delayed before responding to that master's order.
PRIORITY:
(0..100)
This command applies to all ports connected to masters.
[ms]
• Value = 0 ... 100 [ms].

Example of use: PRIORITY:1


Sets the response priority level of the master connected to the X port.

NOTE: The priority of level 0 is the maximum. For each priority level added, extra
PRIORITYx:
10 milliseconds are delayed before responding to that master's order.
(0..100)
[ms] • Value = 0 ... 100 [ms].

Example of use: PRIORITYB:2

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 9


SGW1-IA3-MMP – Modbus Multiplexer Exemys

3.2 Serial Port Configuration

Command Description
Configures the baud rate of the X port.
BAUDx:
• Values = 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600 or
(1200|…|
115200..
115200)
Example of use: BAUDA:115200
Configures the data bits of the X port.
BITSx:
• Values = 7 or 8.
(7|8)
Example of use: BITSB:7
Configure the parity of port X.

PARITYx: • N = NONE - / = EVEN - (Even Parity) /


(N|E|O) O = ODD - (Odd Parity)

Example of use: PARITYC:E


Set the stop bits for the X port.
STOPx:
• Values = 1 or 2.
(1|2)
Example of use: BITSB:2
Configure Modbus type of port X.
PROTOCOLx:
• R = Modbus RTU / A = Modbus ASCII
(R|A)
Example of use: PROTOCOLA:R
Modbus RTU packet expiration time for port X.
PKTTOUTx:
(3..50) • Value = 3 ... 50 [Bytes Time].
[Bytes Time]
Example of use: PKTTOUTD:4
Enable or Disable the exceptions for port X.
EXCEPTIONx:
• E = Enabled / D = Disabled
(E|D)
Example of use: EXCEPTIONA:D
Enables or disables write protection of Modbus registers for the master connected
to the port X.
WPROTECTx:
(E|D) • E = Enabled / D = Disabled

Example of use: WPROTECTB


B:D

PKTTOUT - Modbus RTU packet expiry time: Modbus RTU packets are separated
from each other by a time interval. This parameter allows you to change the
maximum time to count after the last byte of the packet is received, during which
the SGW1-IA3-MMP will assume that the packet has not yet been terminated.
After this maximum time, the SGW1-IA3-MMP will assume that the packet has
finished arriving. The time is entered in one-byte time units, with a minimum of 3
units.
www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 10
SGW1-IA3-MMP – Modbus Multiplexer Exemys

EXCEPTION: Enables or disables the SGW1-IA3-MMP to respond or not to


exceptions in case of communication errors.
If the option is disabled the SGW1-IA3-MMP will respond to the errors with silence,
otherwise, it will return an exception code that we detail below:
0x0A: This exception is caused by: The message has the address (ID) of a device
that is not configured in the slave table.
0x0B: This exception occurs for: No response was received within the maximum
message wait time (Message response time).

3.3 RTS Control Configuration

The SGW1-13B0-00-IA3-MMP-CF can handle the RTS pin on port A for the activation of the
transmission in devices, such as a radio modem.

The RTS pin handles a timer, which will activate a time before sending data through the
serial port and will turn off a time after the end of the shipment. This option applies only to
port A on the device.

Command Description
Sets the RTS polarity.
RTSLOGIC:
• 0 = Inverted. / 1 = Normal.
(0|1)
Example of use: RTSLOGIC:1
Configures the delay prior to sending data.
RTSDON:
• Value = 0 ... 1000 [ms].
(0..1000)
[ms]
Example of use: RTSDON:50

Sets the delay after sending data.


RTSDOFF:
(0..1000) • Value = 0 ... 1000 [ms].
[ms]
Example of use: RTSDOFF:20

Since firmware version 2.2,


2.2 if RTSDON is set to 0, the RTS pin will stay steady ON of OFF
according to the value configured with RTSLOGIC.

3.4 Slave ranges, Configuration


In SGW1-IA3-MMP it is possible to limit the ranges of slaves that can be accessed by each of
the masters independently. If the slave attempted to interrogate is not within the allowed
ranges, the request is ignored.

It is also possible to apply an Offset to the ID of the Modbus queries that arrive from the
masters before sending them to the corresponding slave port. This allows you to change the
ID with which the slaves are read from the point of view of the masters.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 11


SGW1-IA3-MMP – Modbus Multiplexer Exemys

A total of 32 ranges can be configured, with the following data:

Command Description
Adds a range of slaves to which the indicated master will access.

• M: (A | B | C | D) - This is the port to which the Master is connected.


• F: (1 ... 254) - Lower range rank.
• L: (1 ... 254) - Top rank of the range.
• S: (A | B | C | D) - It is the port to which the Slaves are connected.
• O:: (0 ... 254) - Offset to subtract the ID number when sending it to the slave.
• E:: (E | D) – Enables/Disables Modbus ENRON conversation

Parameters O and E are optional

SRANGEADD: Example of use:


(M,F,L,S,O,E)
SRANGEADD:A,20,50,C

Queries arriving at port A with Modbus ID between 20 and 50 are sent to port
C without applying offset to the received ID.

SRANGEADD:A,20,50,C,1,E

Queries arriving at port A with Modbus ID between 20 and 50 are sent to port C
C applying a -1 offset to the ID received and converting the query to ENRON
format.

Deletes a range of slaves to which a designated master has access.

• M: (A | B | C | D) - This is the port to which the Master is connected.


• F: (1 ... 254) - Lower range rank.
• L: (1 ... 254) - Top rank of the range.
• S: (A | B | C | D) - It is the port to which the Slaves are connected.
• O: (0 ... 254) - Offset to subtract the ID number when sending it to the slave.
• E: (E | D) – Enables/Disables Modbus ENRON conversation
SRANGEDEL:
(M,F,L,S,O,E|ALL)
Parameters O and E are optional

• ALL: Clears the range table completely.

Example of use:
SRANGEDEL:A,20,50,C,0 Clear Range A, 20.50, C, 0
SRANGEDEL:ALL Deletes all ranges.

SRANGELIST Lists configured slave’s ranges.

• Example 1: Enable master A to access slaves with ID between 1 through 20 connected in


COM B and slaves 35 through 39 that will be connected in COM C.

SRANGEADD:A,1,20,B,0
SRANGEADD:A,35,39,C,0

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 12


SGW1-IA3-MMP – Modbus Multiplexer Exemys

• Example 2 (Offset use): Read four Modbus slaves from two masters. Two of the slaves have
the ID # 1 and the other two the ID # 2.

The devices will be connected as follows to the device:

• Port A: Master 1.
• Port B: Master 2.
• Port C: First pair of slaves with ID # 1 and # 2.
• Port D: Second pair of slaves with ID # 1 and # 2.

The configuration will be as follows:

SRANGEADD:A,1,2,C,0
SRANGEADD:A,3,4,D,2
SRANGEADD:B,1,2,C,0
SRANGEADD:B,3,4,D,2

In this way, both masters will be able to access the first pair of slaves using ID # 1 and # 2,
and the second pair of slaves using ID # 3 and # 4.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 13


SGW1-IA3-MMP – Modbus Multiplexer Exemys

3.5 Other configuration settings.

Command Description
Configure the ID of the internal slave to access the data transfer memory.
INTSLVID:
• Values = 1 ... 254.
(1..254)
Example of use: INTSLVID:110
Enables the traces by the USB console, for port X. Or for all ports by setting ALL.
TRACESON:
• Values = A, B, C, D, or ALL.
(A|B|C|D|ALL)
Example of use: TRACESON:D
Disables the traces by the USB console, for port X. Or for all ports by setting ALL.
TRACESOFF:
• Values = A, B, C, D, or ALL.
(A|B|C|D|ALL)
Example of use: TRACESOFF:ALL
Turn on or off the aggregate of information to the TRACES.
This aggregated information is the content of Modbus frames expressed in
hexadecimal.

TRACESFULL: NOTE:
NOTE Keep in mind that for this command to work, TRACES must be enabled on
(E|D) at least one port

• E = Enabled. / D = Disabled.

Example of use: TRACESFULL:OFF


LIST
Lists the current device configuration.
HELP
Displays the list of all available commands with syntax and descriptive text.
FACTRESET Restart the machine's factory settings.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 14


SGW1-IA3-MMP – Modbus Multiplexer Exemys

4 Typical Usage Modes


4.1 Multiplexer Mode
In this mode of use the SGW1-IA3-MMP allows up to 3 Modbus masters to query 1 or more
slaves simultaneously.

Example of configuration: 3 Masters and 1 Slave.

The first command that we should use is MSCOM and set Port A in slave mode and the other
ports master mode.

Then, if necessary, configure each particular port according to


its characteristics, as in the previous example.

With the BAUD, BITS, PARITY, STOP and PROTOCOL commands you can configure the
particular characteristics of each port. The team will perform conversions between one COM
and another if necessary.

It is important to take into account the response time of the slaves. This time can be set on
each port connected to slaves with the SLVTOUT command. Then you must set the response
time (timeout) on each of the master devices connected to the device. As a rule the master
timeout must be at least N times the timeout set in SGW1, N being the number of masters (1,
2 or 3)

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 15


SGW1-IA3-MMP – Modbus Multiplexer Exemys

4.2 De-Multiplexer Mode


In this mode of use the SGW1-IA3-MMP has the ability to establish communication between
a master and several slaves with different characteristics, such as Modbus type, parity, baud
rate, etc. To do this you must configure each port of the device with the particular
characteristics of each slave.

Example of configuration: 1 Master and 3 Slaves (with different characteristics in their series
ports).

The first command to use is MSCOM and set Port A in "Master" mode and the other Ports in
"Slaves" mode”.

In order for the device to know which port to send the Modbus query sent by the master, the
Modbus ID range of the slave devices of each port must be configured. Use the
SRANGEADD, SRANGEDEL, and SRANGELIST commands

With the BAUD,BITS,PARITY,STOP and PROTOCOL commands you can configure


the particular characteristics of each port. The team will perform conversions between one
COM and another if necessary.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 16


SGW1-IA3-MMP – Modbus Multiplexer Exemys

4.3 Converter Mode


In this mode of use the SGW1-IA3-MMP functions as a Modbus protocol converter,
converting from Modbus ASCII to Modbus RTU and vice versa. It can also function as an
RS232 / RS485, parity, stop bit and / or baud rate converter.

4.4 Interchange memory Mode

This feature allows Modbus masters connected to the device to exchange information
between them by reading and writing a memory area of the SGW1-IA3-MMP intended for
this purpose. This mode can be used in conjunction with the multiplexer mode.

The exchange records range from 40001 to 41000 (Holding Registers)

The Modbus ID number of the internal slave is 240. It can be modified through the
INTSLVID command.

•Example 1: A master connected to Port A, henceforth Master A, needs to read 50 registers


(Holding Register) of the master connected to Port B, henceforth Master B, and in turn
Master B needs to read 100 registers (Holding Register) of master A.

For this we must configure master A to read registers 40001 to 40050 of slave # 240 and to
write registers 40051 to 40150 with the information that master B needs. In the same way,
set up master B to read registers 40051 to 40150 of slave # 240 and to write registers 40001
to 40050 with the information that master A needs

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 17


SGW1-IA3-MMP – Modbus Multiplexer Exemys

5 Monitoring

The SGW1-IA3-MMP allows you to monitor communications on all four ports from the USB
console. With the TRACESON command the monitoring messages are enabled. With the
complementary command TRACESFULL you can have more detailed information.

Activating the TRACESON command, we will see the incoming and outgoing traffic
corresponding to the port activated and the ID of the target device. Then when adding the
TRACESFULL command, the content of the traffic expressed in hexadecimal is added to
the above information.

In the following example, the TRACESON and TRACESFULL commands of ports A and C
are activated:

Activation of the TRACESON and TRACESFULL commands cause process delays in the device,
due to the density of information to be presented; So activating these commands slows
communication between the devices.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 18


SGW1-IA3-MMP – Modbus Multiplexer Exemys

A. Firmware Upgrade
The firmware of the device can be upgraded in case of new versions with improvements, by
accessing the serial console intended for this purpose.

Connect an RS232 cable such as the one between the device and a device and follow these
steps

1) Open an Exemys Console terminal type program in the COM of the corresponding
device and verify in the terminal that the Baudrate is in 9600.

The terminal type program can be downloaded from here:


http://www.exemys.com

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 19


SGW1-IA3-MMP – Modbus Multiplexer Exemys

2) Turn the SGW1-IA3-MMP on and within the first 7 seconds enter CFG and press
ENTER or press the CFG button that is available. Once this is done the SGW1-IA3-
MMP will display the welcome message to the configuration command console:

SGW1-IA3-MMP Modbus Multiplexer-Exemys (2.0):


--------------------------------------------
>

3) Then, in the terminal go to the menu Functions -> Update Device.

4) Locate and select the binary file (.bin) to transfer and press the Open button to
start updating the firmware of your device.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 20


SGW1-IA3-MMP – Modbus Multiplexer Exemys

5) During the transfer of the file the progress of the process will be displayed.

6) At the end of the device will be restarted to install the update, preserving the
configuration that was available.

Do not turn off the device once the message Verifying firmware ... is displayed, this can cause
irreparable damage.

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 21


SGW1-IA3-MMP – Modbus Multiplexer Exemys

B. Factory settings
Parameter Value

Ports A, C y D
Mode. MASTER
Priority 0[ms]
Baud Rate. 9600
Data bits 8
Parity NO
Stop bits 1
Modbus type RTU
Exceptions Disabled
Modbus RTU packet time 3[bytes Time]
Over write protection Disabled

Port B
Mode SLAVE
Message response time 500[ms]
Baud Rate. 9600
Data bits 8
Parity NO
Stop bits 1
Modbus type RTU
Exceptions Disabled
Modbus RTU packet time 3[bytes Time]

RTS - Port A – Device Model 13B0-


13B0-00
RTS Logic. 1
RTS On. 0[ms]
RTS Off. 0[ms]

Slave Tables
Port A, 1, 254, Port B, 0
Port Master, ID start, ID Finish, Port Slave, Offset. Port C, 1, 254, Port B, 0
Port D, 1, 254, Port B, 0

Others
Internal memory ID 240

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 22


SGW1-IA3-MMP – Modbus Multiplexer Exemys

C. DIN Rail mount


The device can be DIN rail mounted. To attach the module to the rail, point the top of the
device toward it and locate the adapter slot on its top edge. Press firmly onto the rail until it
clicks into place (a click will be heard when attaching the module to the DIN rail)

VISTA LATERAL DEL EQUIPO

Riel DIN Riel DIN

Click !

To remove the rail module, first remove the input terminals. Then, insert a screwdriver into
the lower lock of the device's DIN connector and force the connector down until the module
disengages

VISTA LATERAL DEL EQUIPO

Riel DIN

Riel DIN

www.exemys.com SGW1-IA3-MMP User’s Manual Rev. 1 23

You might also like