mg iot02 iot 4g gateway - eldar automatyka

44
Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 1 / 44 MG-IOT02 IOT 4G Gateway User’s Manual V1.0 2019.11.01

Upload: others

Post on 30-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 1 / 44

MG-IOT02

IOT 4G Gateway

User’s Manual

V1.0 2019.11.01

Page 2: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 2 / 44

Multi-functional IOT 4G Gateway

Sichuan Odot Automation System Co., Ltd.

2019-06

Copyright©2019. All Rights Reserved.

Page 3: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 3 / 44

Version Information

Date Version No. Revised Content Author/reviser

2019/07/02 V1.0 Initial version CCL

Ownership Information

This User’s Manual shall not be republished partly or entirely in any paper or

electronic forms without authorization from the copyright owner.

Disclaimer

This User’s Manual is only for the purpose to assist the user in the use of the

product, and the company is not responsible for any loss or error caused by the

use of the information in this document. The products and texts described in this

document are constantly being developed and refined. Sichuan Odot Automation

System Co., Ltd. has the right to modify this document without notifying the user.

Software Download

Please visit https:// www.odotautomation.com to download the software for

corresponding products, or contact our sales for the software you need.

Page 4: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 4 / 44

CONTENTS

1 Product Overview ........................................................................................................... 5

1.1 Product Introduction ....................................................................................... 5

1.2 Function Introduction ..................................................................................... 5

1.3 Technical Parameters ....................................................................................... 6

2 Hardware Description .................................................................................................... 8

2.1 Appearance ......................................................................................................... 8

2.2 Indicator Description ....................................................................................... 8

2.3 Terminal Definition .........................................................................................10

2.4 System Reset ....................................................................................................11

2.5 Installation Dimensions ................................................................................12

3 How to Use the Gateway ............................................................................................12

3.1 Serial Port Side Collection Channel ........................................................12

3.2 Ethernet Port Side Publish Channel .........................................................13

3.3 Configuring Software Usage ......................................................................14

3.4 IP address modification ................................................................................28

4 Test Application of Collecting Modbus RTU Serial Device Data........................31

4.1 Realize Modbus RTU to Modbus TCP data exchange .......................32

4.2 Realize Modbus RTU to MQTT data interaction ..................................36

Page 5: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 5 / 44

1 Product Overview

1.1 Product Introduction

MG-IOT02 is a MODBUS RTU protocol to MODBUS TCP and MQTT protocol

converter developed by Sichuan ODOT Automation System Co., Ltd based on

market demand and years of experience.

Any device with RS485 / RS422 / RS232 interface can be connected to the

MODBUS TCP network through this gateway, and to the cloud through MQTT. In

this way, low-speed serial devices can be connected to high-speed Ethernet and

cloud servers to realize the function of industrial data collection, and at the same

time support the function of 4G connecting to the cloud platform through MQTT.

1.2 Function Introduction

9-36V wide voltage input, Anti-reverse protection.

Communication terminal isolation processing, 1500V isolation voltage.

Dual Ethernet ports, with switch function, support cascade.

2KV network port isolation protection, 10M / 100Mbps rate adaptive,

automatic MDI / MDIX rollover.

Supports MODBUS RTU / ASCII protocol.

Supports 200 collection points

Supports MQTT to connect to cloud via two options (Network port and 4G).

Supports data sorting and swapping.

Supports data type replacement.

Supports data calculation.

The watchdog can be enabled, and the watchdog time can be set.

The interval for sending data packets can be freely adjusted, which makes it

more flexible to use.

Support one-button reset function to restore factory settings.

35mm standard rail mounting.

Page 6: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 6 / 44

EMC complies with EN 55022: 2010 & EN55024: 2010 international

standards.

1.3 Technical Parameters

The relevant technical parameters of this product are shown in "Table 1". Please

use this product within the parameters of this product in order to obtain better

performance.

Table 1. Technical parameters

Environmental parameters

Working

Temperature -40–85℃

Storage

Temperature -55–125℃

Working Humidity 5%–95% (Non-condensing)

Power Parameters

Number of power

ports 1 channel

Input Voltage

Range 9–36V DC

Power

Consumption Max.200mA@24V

Ethernet Parameters

Gateway Working

Mode

Transparent transmission mode, address mapping mode

optional, Modbus TCP / IP protocol

Number of

Ethernet ports 2 RJ45, 10M, 100M adaptive rate, with switch function

Network Protocol ETHERNET, ARP, IP, TCP, ICMP, MQTT

TCP Connection Max 5

Page 7: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 7 / 44

No. of TCP

connections

Serial Parameters

Number of Serial

Ports 2 RS485 /RS232 or 1 RS422

Serial

Communication

Mode

MODBUS RTU/ACSII

Baud Rates 1200–115200 bps

Parity Check No parity, odd parity, even parity

Supported Slaves Max 62 (without Repeater)

Supported Data

Points 200

4G module parameters

Supported

Frequency Bands LTE FDD, LTE TDD, WCDMA, TD-SCDMA, CDMA, GSM

Supported Rates for Each Band

LTE LTE FDD: Max 150Mbps (DL)/Max 50Mbps (UL)

LTE TDD: Max 130Mbps (DL)/Max 35Mbps (UL)

UMTS DC-HSDPA: Max 42Mbps (DL) HSUPA: Max 5.76Mbps (UL)

WCDMA: Max 384Kbps (DL)/ Max 384Kbps (UL)

TD-SCDMA TD-SCDMA: Max 4.2Mbps (DL)/ Max 2.2Mbps (UL)

CDMA2000

EVDO: Max 3.1Mbps (DL)/ Max 1.8Mbps (UL)

1X Advanced: Max 307.2Kbps (DL/UL)

1X Advanced: Max 307.2Kbps (DL/UL)

GSM EDGE: Max 296Kbps (DL)/ Max 236.8Kbps (UL)

GPRS: Max 107Kbps (DL)/ Max 85.6Kbps (UL)

Page 8: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 8 / 44

2 Hardware Description

2.1 Appearance

2.2 Indicator Description

The device has a total of 6 LED status indicators. The symbol definition and status

description are shown in "Table 2".

Table 2. Indicator description

Symbol Definition Status Description

PWR Power indicator

ON Power connected

OFF No power connection

Page 9: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 9 / 44

Note: *Green ——The status of MG-IOT02 gateway indicator during normal

communication

ETH Network fault indication

ON TCP gateway

communication error

OFF TCP gateway

communication normal

SS 4G signal indication

Steady

green Excellent signal

Flashing

green Good signal

Flashing

red Normal signal

Steady red Weak signal

4G 4G communication

indication

Flashing 4G communication

4G without communication OFF No 4G communication

CO3 COM3 status indication Flashing Data exchange

OFF No data exchange

CO4 COM4 status indication Flashing Data exchange

OFF No data exchange

Page 10: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 10 / 44

2.3 Terminal Definition

The device wiring uses 16Pin 3.81mm pitch plug-in terminal blocks. The

terminal definitions of the RS485 / RS232 / RS422 interface are shown in "Table

3".

Table 3. Terminal definitions

No

.

RS485 RS232 RS422

Symbol Definition Definition Definition

1

NC NC NC NC NC

2

3

4

5

6

7 3 R/S- COM 3

RS485- COM 3 RS232_RX

RS

42

2 C

ha

nn

el 1

RS422 Send

Negative

8 3T/S+ COM 3

RS485+ COM 3 RS232_TX

RS422 Send

Positive

9 GND Shielding Layer Shielding Layer Shielding Layer

10 4R/S- COM 4

RS485- COM 4 RS232_RX

RS422 Receive

Negative

11 4 T/S+ COM 4

RS485+ COM 4 RS232_TX

RS422 Receive

Positive

12 GND Shielding Layer Shielding Layer Shielding Layer

13 PE Ground terminal

14 PE Ground terminal

15 V- Power input negative

16 V+ Power input is positive

Page 11: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 11 / 44

2.4 System Reset

The device has a system reset button RESET. When the user forgets the IP

address of the device and port number and cannot connect to the gateway, the

reset button can be triggered. The system parameters will be restored to the

factory settings and the device will be restarted. The reset button can be clicked

with a paper clip. All the indicators flash once to indicate that the reset was

successful. The technical parameters of the gateway are as follows:

Parameter Name Default Value

Ethernet

Protocol Converter IP 192.168.1.254

Subnet Mask 255.255.255.0

LAN Gateway IP 192.168.1.1

Configuration Port 1024

DHCP Enable Not Enable

DNS server address 114.114.114.114

Serial Port

Serial Port Collection Mode General

Serial Port Type RS485

Serial Port Baud Rate 9600bps

Parity Bit No check

Data bit 8 bit

Stop bit 1bit

Receive Character Interval 3.5t

Slave Response Timeout 100ms

Timeout Processing Mode Data-hold

Data collection time 100ms

Page 12: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 12 / 44

2.5 Installation Dimensions

3 How to Use the Gateway

3.1 Serial Port Side Collection Channel

There is only one Collection channel, Modbus RTU / ASCII channel. The serial

port works in Master Mode. This serial port can connect up to 62 Modbus RTU /

ASCII slave devices without Relays. This mode is mainly used for data

communication between Modbus TCP Master and the Modbus RTU / ASCII slave

Page 13: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 13 / 44

station. In this way, low-speed serial devices can be connected to high-speed

Ethernet and cloud servers to realize the function of industrial data collection.

3.2 Ethernet Port Side Publish Channel

There are two modes for the network port side Publish channel, Modbus TCP

Publish channel and MQTT Publish channel.

Modbus TCP Publish channel

The data area has 4K (bit) DO (coil), DI (discrete input) area, and 1K (uint16_t)

AO (hold register), and the AI (input register) area is used to store the acquired

data. The user can associate the collection point with the corresponding Modbus

data area and address through the configuration software. After the Modbus

Publish channel is configured, the gateway will set up the Modbus server and

publish the collection point data to the corresponding Modbus data area. Users

can access the Modbus server for data exchange. The Modbus server supports 5

client accesses simultaneously.

MQTT Publish Channel

MQTT is an IoT transport protocol designed for lightweight publish /subscribe

message transmission and is used to provide reliable network services for IoT

devices in low bandwidth and unstable network environments. The gateway is

based on the standard MQTT3.1.1 protocol for secondary development,

supporting Alibaba Cloud, Baidu Cloud, Tencent Cloud, onenet and other cloud

platforms and private cloud connections and provides data collection. At the same

time support the function of 4G connecting to the cloud platform through MQTT

.The device supports subscription and Publish of 10 themes at the same time, and

can install up to 50 data points under each theme. It supports triggering and

configurable periodic data distribution, and supports the publishing of messages in

binary pass-through and JOSN format.

Josn data format: plain text

Page 14: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 14 / 44

Data format(publish/Subscribe)

{

"version" : "1.0",

"params" : {

"name" : data,

"name" : data,

"name" : data,

},

"id" : 31359,

"method" : "thing.event.property.post"

}

Field Description Type

version Version number, fixed at 1.0 String

name Collection point name String

Data Collecting point data

Id ID number, fixed at 31359 Int32

method Attributes,"thing.event.property.post" String

3.3 Configuring Software Usage

1. Open the configuration software “Odot Configuration Software”, click Tools—

Searching, select the local network card, and click Searching. The IOT gateway

on the same network segment will be scanned. Click OK to generate an IOT

project on the left. If there are multiple IOT gateways on the same network

segment, you can click the lighting button, and the "ETH" light of the

Page 15: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 15 / 44

corresponding IOT gateway will flash five times to distinguish between multiple

MG-IOT02 modules on the same network.

2. Double-click "MG-IOT02-4G" in the project bar, and the gateway "Network port"

and "Serial port" window and parameters pop up on the right. The two serial ports

of MG-IOT02 correspond to serial port 3 and serial port 4 in the configuration

software. (Serial port 1 and serial port 2 are disabled).

Page 16: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 16 / 44

Page 17: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 17 / 44

The main parameters have the following meanings:

IP address:

Gateway IP, the gateway creates the Modbus TCP server IP, the user

accesses this IP, port 502, and logs in to the Modbus TCP server.

Serial port working mode:

Used to set the collection mode of the serial port of the gateway

Disable:

Do not use this serial port.

“General mode”:

Use this serial port.

“Relay mode”:

Invalid

Page 18: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 18 / 44

Serial Port Type:

RS232 / RS485 / RS422 can be selected. The default is RS485.

Baud Rate:

The baud rate of the serial port. The selectable range is 1200 – 115200bps,

and the default is 9600bps.

Data bits:

7 bits, 8 bits can be selected, and the default is 8 bits.

Check digit:

No parity, odd parity, even parity, and no parity by default.

Stop bits:

1 bit, 2 stop bits are optional, the default is 1 stop bit.

Char Pitch (t):

The time from after confirming the end of the received message and before

the new serial port data received is considered that one frame of the

message ends. 1.5t – 200t optional, default 3.5t (t is the time for single

character transmission, related to baud rate). In general, you do not need to

change this parameter.

Overtime time:

After the gateway sends a frame of the message, it waits for the reply

message. If the message is not received at this time, the communication is

timed out. This communication fails. Do not set the time to be too short,

especially in three-way mode, otherwise communication may fail.

Message Interval Time (ms):

The cycle time of gateway collecting from the PLC, after one communication,

the interval time (the delay of receiving the slave response message to the

next command), 0ms-65535ms optional, the default is 100ms, it is

recommended to set 100ms to prevent communication failure because of slow

response of the connected device. In the three-way mode (bridge mode), it

can be lengthened appropriately, and if too short it will affect the response of

the HMI.

Work Mode:

If the slave responds over time when read data from PLC, the timeout data

processing mode can select "data clear" or "data hold". The default is "data

Page 19: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 19 / 44

hold" mode. This parameter is only valid for the Modbus read command.

Please set this value according to actual needs

3. Right-click "Collection Channel" in the project bar and select Add MODBUS

RTU / ASCII Protocol. "Modbus_1" appears in its drop-down menu.

Double-click "Modbus_1", and the window for configuring channel parameters and

configuring collection points pops up on the right. In the configuration channel

parameter window, select the communication serial port, encoding method and

slave station number.

Page 20: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 20 / 44

Click "Collection channel config" and add a read or write command in the "Add

Collection Point" column. Then configure the collection point information in the

parameter bar. For example, register area, start address, data type, etc.

Page 21: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 21 / 44

The meaning of the main parameters is as follows:

Register Area: Modbus address area to which the data point belongs

Start address: the offset address of the Modbus address area where the

data point is located.

Data Offset Bits: If in the selected register it is 1 address stores 1 word data

(16 bits) and the PLC data type is Bool type. This parameter, together with the

Start address, can determine which bit to be read in the 1 word data. If the

register 1 address stores 1 bit, this parameter does not need to be configured,

the default is 0.

Data Type: Determine the data type and length of a data point read from the

Modbus device on the serial port side.

Enable trigger mode:

Enable: Send a command to the Modbus device on the serial port side when

there is data change in the write command.

Disable: Write command is sent cyclically to the Modbus device on the serial

port side.

Calculation processing:

None: no operation; multiplication / division: calculated value = base +

magnification (*, /) collected value

Base: Same as above;

Multiple: same as above

Store data type sort: Store data type sort: default little endian, there are

other types to choose from.

Storage type: The data type of the collected data is stored. For example, the

data type of the Modbus device on the serial port side is int and the storage type

is float, and the data will be type converted.

4 Create a Publish channel

(1) Collection points are automatically published to Modbus TCP server

After all the collection points are configured, select the Enable automatic

publishing function in the automatic publishing column, set the data publishing

area, start address, address interval parameters, and click one-click publishing to

publish all collection points to the Modbus TCP server. Modbus TCP can be

Page 22: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 22 / 44

automatically generated in the Publish channel drop-down menu in the project

bar.

(2) Manual Modbus TCP channel configuration

Right-click the publishing channel in the "Project Bar" on the left and select the

publishing channel that needs to be added. There are two options, Modbus TCP

channel and MQTT channel.

Page 23: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 23 / 44

Click the Modbus TCP channel to configure the Modbus TCP server parameters.

The default port number is 502, the watchdog is enabled or disabled, and the

watchdog time.

Page 24: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 24 / 44

Click "Publish Point Config" and select the Add Read and Write command in the

"Add Publishing Point" column. Configure the publishing point name, Modbus

register area, and start address in the "Parameter" column. Then select the

associated acquisition channel, acquisition point, and click to associate the point.

As shown in the figure: A read command has been added. The publishing point

name is RPoint 1 and it is published to the address 00001. It collects CPoint 1

data from Modbus devices on the serial port side.

(3) Manual MQTT channel configuration

Right-click the publishing channel and click MQTT channel. Double-click MQTT to

configure MQTT publishing channel parameters, including interface parameters,

MQTT server parameters, device parameters, and communication parameters.

Page 25: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 25 / 44

A. Interface parameters

Transmission interface: MQTT Publish can choose network port, 4G, default

4G.

B. MQTT server parameters

Parameter name Parameter description

Port The remote port of the server. Default 502

Connection Mode Connection method (IP address connection or domain

name connection)

TLS enabled Encryption enabled (encryption is not currently

supported)

MQTT server

domain name

Server domain name (if connected via IP, you can

ignore it)

MQTT server IP Server IP (if connected via domain name, ignore it)

C Equipment Parameters

Parameter name Parameter Description

Device name

Corresponds to the user name in MQTT, which

identifies the connected user's name. The user name

that can be used for authentication needs to be less

than 128 characters.

Key

Corresponds to the password of the user whose

password is identified in MQTT. It can be used for

authentication. The password must be less than 128

characters.

Client ID

Corresponds to the client identifier (Client) in MQTT,

the unique identifier from client to server. It must be

unique to all clients connected to a server and is the

key in handling Qos levels 1 and 2 message IDs.

D Communication Parameters

Parameter Name Parameter Description

Session sign

Corresponds to session cleanup in MQTT

Hold; keep the cut session, after the network is

disconnected and reconnected, the previous session

information is restored, and the client and server need

to have a session persistence mechanism

Page 26: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 26 / 44

Clear: Clears the previous session. Each connection

is a new session.

The session only lasts as long as the network

connection

Request timeout MQTT request timeout (ms)

Keep-alive time MQTT keep-alive time (ms)

Click "Configure Publishing Point" and select a command in the "Add Publishing

Point" column to add it. Add command types to choose from: MQTT Subscribe /

MQTT Publish.

E MQTT publishing parameter configuration

Configure published parameters in the parameter list

Parameter Name Parameter Description

Subject name The name that needs to be published to the

topic

Qos Level MQTT message level, currently only supports

0, 1

Send mode Message push method: trigger, loop

Sending interval

(ms) Publish cycle time, trigger can be ignored

Data Format Published message format: binary, JSON

Page 27: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 27 / 44

F. MQTT subscription parameter configuration

Parameter Name Parameter Description

Subject Name Name of the topic to subscribe to

Qos Level MQTT message level, currently only supports 0,

1

Data Format Subscribed message format: binary, JSON

After the MQTT publish and subscribe parameters are set, they can be collected

independently, or all collection points can be associated with one click.

After all the collection points and publishing points are configured, right-click MG-

IOT02 and choose to download and configure to the gateway. You can also

choose to upload, import, and export configurations. When uploading and

importing the configuration, you need to create a MG-IOT02 project first. If the

download fails, please check whether the computer IP address and the gateway

IP address are on the same network segment, and check whether the gateway IP

address is set correctly. If you forget the gateway IP address, you can reset the

Page 28: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 28 / 44

gateway by reset button. After resetting, the gateway IP address is the factory

default IP address.

Note: When downloading and uploading, make sure that the computer and the

gateway are on the same network segment.

3.4 IP address modification

First power the gateway with 24VDC, connect the network cable to the gateway

and the computer, and change the IP address of the computer's local network

card to 192.168.1. *

Then open the configuration software Odot Configuration Software, click Tools-

Search for devices, select the local network card, click Search for devices, it will

scan to the IOT gateway of the same network segment, click OK to generate an

IOT project on the left.

Page 29: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 29 / 44

Change the gateway IP address of the configuration software interface as:

192.168.10.12 (cross-segment), and change the LAN gateway IP to:

192.168.10.1. After the modification is completed, right-click MG-IOT01-PPI and

click the download parameter directly. You will see the download successful in the

lower right corner.

Page 30: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 30 / 44

After the IP address is successfully modified, you need to change the local

computer's IP address to: 192.168.10. * Network segment.

On the configuration software Odot Configuration Software interface, modify the

IP address of the configuration parameters: 192.168.10.12, right-click MG-IOT01-

4G and click Upload Parameters. After the upload is successful, you can see that

the upload is successful in the lower right corner. Complete the modification of the

gateway IP address.

Page 31: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 31 / 44

4 Test Application of Collecting Modbus RTU

Serial Device Data

In this test, Modbus Slave software is used to simulate Modbus RTU serial

devices. The gateway needs to collect the data in the address area of Modbus

RTU serial devices 40001-40015, 30001 – 30020.

The Modbus Slave data interface is displayed as follows:

Page 32: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 32 / 44

4.1 Realize Modbus RTU to Modbus TCP data exchange

1. Open the configuration software “Odot Configuration Software”, click Tools—

Search for devices, select the local network card, and click Search for devices.

The IOT gateway on the same network segment will be scanned. Click OK to

generate an IOT project on the left.

2. Configure the acquisition channel parameters as shown below:

Collection channel parameters: serial device connected to serial port 3, encoding

method RTU, station address filled in 1, serial port parameters: 9600bps, N / 8/1.

Page 33: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 33 / 44

Page 34: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 34 / 44

Configure collection points to collect Modbus Slave data. Click to publish to

Modbus TCP 4 area.

Page 35: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 35 / 44

3. Click the Publish channel, and click MODBUS TCP to view the corresponding

relationship of the data Publish address. After configuring all collection points and

publishing points, right-click on MG-IOT01-4G and select Download Configuration

to Gateway.

4. After completing the above settings, the Modbus TCP client can use the

Modbus TCP protocol to access the gateway through the gateway IP address

192.168.1.254, Modbus data communication port 502, and access the collected

data. This document uses Modbus Poll to simulate Modbus TCP client to collect

data.

Page 36: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 36 / 44

4.2 Realize Modbus RTU to MQTT data interaction

1. The configuration of the collection point data is configured according to the

collection point of 4.1.

2. Right-click the right of the Publish channel to manually add the MQTT channel

and set the configuration parameters manually. Transmission interface: network

port, port number: 1883, connection mode: IP address, MQTT server IP:

192.168.1.50 (local machine network card IP address, the machine simulates the

MQTT server).

Page 37: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 37 / 44

Click Configure Publishing Point.

Page 38: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 38 / 44

3. After configuring all collection points and publishing points, right-click on MG-

IOT01-4G and choose to download and configure to the gateway. After successful

download, complete the data MQTT Publish.

4. After completing the above settings, the MQTT client can use the MQTT.fx test

software to access the gateway to access the collected data.

a. Local LAN access data. Transmission interface: network port, port number:

1883, connection mode: IP address, MQTT server IP: 192.168.1.50 (local

machine network card IP address, the machine simulates the MQTT server).

Page 39: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 39 / 44

Page 40: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 40 / 44

b. External network access, the local computer is connected to the wireless

network. Click Network Connections, right-click Wireless, click Bridge-connection.

Page 41: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 41 / 44

Enter the IP in the browser interface to find the local IP address.

Gateway MQTT Publish channel configuration:

MQTT.fx test software test:

Page 42: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 42 / 44

C. Select the transmission channel transmission interface as 4G, and click

Download. The setting of the communication connection is the same as when the

transmission interface is a network cable. Just change the transmission interface.

4G communication,

Page 43: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 43 / 44

Page 44: MG IOT02 IOT 4G Gateway - ELDAR AUTOMATYKA

Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 44 / 44

Sichuan Odot Automation System Co., Ltd.

Add: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.

Tel: +86-0816-2538289

Zip Code: 621000

Email:[email protected]

Web: www.odotautomation.com