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.
1 Product Overview 1.1 Product Function Developed by Sichuan Odot Automation System Co., Ltd and based on market demand and years of project experience, MG-IOT01 is a protocol converter supporting to convert a variety of PLC protocols to MODBUS TCP and MQTT protocol.
Supports data calculation. 4 serial ports real time refresh, short scanning period, strong loading capacity. Supports Bridge mode, collecting PLC data without affecting PLC and HMI communication. With watchdog function, and the watchdog time can be set. ...
9 – 36V DC Input Voltage Power Consumption Max.200mA@24V Ethernet Parameters Gateway Working Transparent transmission mode, address mapping mode Mode optional, Modbus TCP protocol Ethernet Ports No. 2 RJ45, 10M, 100M adaptive rate with switch function Network Protocol ETHERNET, ARP, IP, TCP, ICMP, MQTT Number of TCP Up to 5 Serial Port Parameter...
2.2 Indicator Description The device has a total of 6 LED status indicators, and its symbol definition and status description are shown in Table 2. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 8 / 79...
Blink Data exchanging COM4 status indication No data exchange Note: * Green color —— The status of the MG-IOT01 gateway indicator during normal communication 2.3 Terminal Definition The device wiring adopts 16Pin 3.81mm pitch plug-in terminal block, and the terminal definition of RS485/RS232/RS422 interface is as shown in “Table 3”.
COM 2 RS422 Receive 2 T/S+ COM 2 RS232_TX RS485+ Positive Shielding Ground Shielding Layer Layer COM 3 3R/S- COM 3 RS232_RX Shielding Layer RS485- COM 3 RS422 Send 3T/S+ COM 3 RS232_TX RS485+ Positive Shielding Ground Shielding Layer Layer COM 4 COM 4 RS422 Receive...
Page 11
the gateway cover. Turn the gateway CH1 and CH3 DIP switches to the ON position, and the serial port 1 and 3 to the RS232 mode. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 11 / 79...
Page 13
3. When the gateway device adopts the RS422 communication interface, the hardware dialing code is as follows: Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 13 / 79...
2.5 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.
2.7 Software Interface 1 Open the software and the main interface as follow: 2. It consists of a Project bar, a Property bar, an Output bar, and a Configuration Information bar. Create a Project and select Configuration Information in the Project bar and configure it in the Configuration Information bar.
3 How to Use the Gateway 3.1 Serial Port Side Collection Channel Each serial port of the gateway has two working modes: General mode and Bridge mode. In the General mode, the gateway serial port is directly connected to the PLC for data collection.
Page 18
(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.
If there are multiple IOT gateways on the same network segment, you can click the light button, and the corresponding ETH light of the IOT gateway will flash five times to distinguish multiple MG-IOT01 modules on the same network. This document is demonstrated using the PPI protocol of the S7-200.
Page 20
2. Double-click "MG-IOT01-PPI" in the project bar and configure the network port and serial port parameters in "Ethernet Port" and "Serial Port" window on the right. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 20 / 79...
Page 21
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.
Page 22
Baud rate: Serial port baud rate, the range is 2400 – 115200bps, the default is 9600bps. Please set this parameter to be the same as the device connected to the serial port. Check Digit: No Parity, Odd Parity, Even Parity optional. No parity by default. Please set this parameter to be the same as the device connected to the serial port.
Page 23
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 hold" mode. This parameter is only valid for the Modbus read command. Please set this value according to actual needs.
Page 24
Click “Collection Points Config” and add: read or write commands in the "Add Collection Points" column. Then configure the collection point information in the parameter bar, such as: Register Area, Start address, PLC data type, etc. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 24 / 79...
Page 25
The main parameters are as follows: Register Area: Which area the data point belongs to, such as Q, M, V, etc. of Start Address: The offset address of the 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.
Page 26
When you choose to publish to the MODBUS TCP channel, you can click on Automatic Publish to publish the collection point to an address area of Modbus. If the user wants to publish to different data areas, you can manually configure the publish point.
Page 27
"Parameter" column. Then select the Collection channel in the relation column, Collect point, click the associated point, and complete the relation of the published data. As shown below: (2) MQTT channel configuration Select MQTT channel as publish channel, and configure publish channel parameters on the right side, including Server parameter, Device parameter, and Communication parameter.
Page 28
MQTT sever parameter Parameter Name Parameter Description Port Server remote port Connection Mode Connection method (IP address: IP address connection / domain name: domain name connection) TLS enable Encryption enable (currently encryption is not supported) Server Domain Server domain name (Connection by IP, can be Name ignored) Server IP...
Page 29
Parameter Name Parameter Description Device name Corresponding to the user name in the MQTT, the name of the connected user is used for authentication. The username must be less than 128 characters. Password Corresponding to the password in the MQTT, the password of the connected user can be used for authentication.
Page 30
format in the Parameter column. Then select the collection channel in the relation column, Collection point, click “Relation” or “Relation all” to complete the relation of the publish data. MQTT publish parameters Parameter Name Parameter Description Topic Name The name that needs to be published to the topic Qos level MQTT message level, currently only supports 0,1 Send mode...
Page 31
5. Download, Upload, Import, Export Configuration After all the collection points and publishing points are configured, right-click MG-IOT01-PPI, and you can choose to download and configure to the gateway. You can also choose to upload, import, and export configurations. When uploading and importing a configuration, you need to create an MG-IOT project first.
3.4 IP Address Modification First, power the gateway 24VDC, connect the network cable to the gateway and the computer, and change the IP address of the computer's local network card to the 192.168.1.* network segment. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 32 / 79...
Page 33
Then open the configuration software, click Tools-Searching for devices, select the local network card, click Searching, it will scan to the IOT gateway of the same network segment, click OK to create an IOT project on the left. Modify the gateway IP address as: 192.168.10.12 (cross-segment), and change the LAN gateway IP to: 192.168.10.1.
Page 34
MG-IOT01-PPI and click the download parameter directly. You will see Download success in the lower right corner. After the IP address is successfully changed, you need to change the local computer's IP address to: 192.168.10. * Network segment.
On the configuration software, change the IP address of the configuration parameters: 192.168.10.12, right-click MG-IOT01-PPI and click Upload. After the upload is successful, you can see that the upload is successful in the right lower corner. Complete the modification of the gateway IP address.
Page 36
The test programming interface is as follows: After editing, save and download. Put the PLC in RUN. 4.1.2 MG-IOT01 Configuration Open the configuration software, click Tools-Searching for devices, select the local network card, click Searching for devices, it will scan to the IOT gateway of the same network segment, click OK to create an IOT project on the left.
Page 37
connected to serial port 1. Set the parameters of serial port 1 to General, RS485 / 9600, even / 8/1, and other parameters default. Configure the collection channel parameters as shown below: Select Serial Port 1 for the collection channel serial port and fill in 2 for the slave ID.
Page 38
Configure the collection point and click Publish to area 4. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 38 / 79...
Page 39
Click the Publish channel and click MODBUS TCP to view the correspondence relationship of the data publish address. After configuring all collection points and publish points, right-click MG-IOT01-PPI and select Download Configuration to Gateway. 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 and Modbus data communication port 502 to access the...
4.2 Implementing PPI Protocol to MQTT Data Exchange 4.2.1 Smart 200 PLC Configuration Power on the Smart 200 PLC, connect pin 3 of the RS485 serial port to the gateway serial port 1T/S+, and pin 8 to the gateway serial port 1R/S-. Serial port parameters: ID = 2, 9600, E81.
Page 42
4.2.2 MG-IOT01 Configuration Open the configuration software, click Tools-Searching for devices, select the local network card, click Searching for devices, it will scan to the IOT gateway of the same network segment, click OK to create an IOT project on the left.
Page 43
Configure the collection channel parameters as shown below: Select Serial Port 1 for the collection channel serial port and fill in 2 for the slave ID. Configure the collection point as shown in the following: Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 43 / 79...
Page 44
Right-click the Publish channel config to manually add the MQTT channel and set the configuration parameters manually. Port number: 1883, Connection mode: IP address, MQTT server IP: 192.168.1.50 (local machine's network card IP address, the machine simulates an MQTT server). Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.
Page 47
After all the collection points and publish points are configured, right-click MG-IOT01-PPI, and you can choose to download the configuration to the gateway. After successful download, complete the data MQTT publish. After completing the above settings, the MQTT client can use the MQTT.fx test software to access the gateway and access the collected data.
5 Testing Applications for Collecting Mitsubishi FX Series PLC Data 5.1 Implementing FX Serial Port Protocol to Modbus TCP Data Exchange 5.1.1 MITSUBISHI PLC Configuration Power on Mitsubishi PLC, connect 1 of RS422 serial port pin to gateway serial port 1T/S-, pin 2 to gateway serial port 1T/S+, pin 4 to gateway serial port 2R/S-, and pin 7 to Gateway serial port 2R/S+.
Page 49
5.1.2 MG-IOT01 Configuration Open the configuration software, click Tools-Searching for devices, select the local network card, click Searching for devices, it will scan to the IOT gateway of the same network segment, click OK to create an IOT project on the left.
Page 50
Configure the collection channel parameters as shown below: Select Serial Port 1 for the collection channel serial port and fill in 1 for the slave ID. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 50 / 79...
Page 51
Click the Publish channel and click MODBUS TCP to view the correspondence relationship of the data publish address. After configuring all collection points publish points, right-click MG-IOT01-FX select Download Configuration to Gateway. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.
5.2 Implementing FX Serial Port Protocol to MQTT Data Exchange 5.2.1 Same as 5.1.1 5.2.2 MG-IOT01 Configuration Open the configuration software, click Tools-Searching for devices, select the Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com...
Page 53
local network card, click Searching for devices, it will scan to the IOT gateway of the same network segment, click OK to create an IOT project on the left. The IP address uses the default IP address: 192.168.1.254. The PLC is connected to serial port 1.
Page 54
Configure the collection point as shown in the following figure: Right-click the PUBLISH channel to manually add the MQTT channel and set the configuration parameters manually. Port number: 1883, connection mode: IP address, MQTT server IP: 192.168.1.50 (local computer network card IP address, the computer simulates MQTT server).
Page 55
Click Publishing Point config. After all the collection points and publishing points are configured, right-click MG-IOT01-FX and choose to download and configure to the gateway. After successful download, complete the data MQTT publish. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.
Page 56
After completing the above settings, the MQTT client can use the MQTT.fx test software to access the gateway and access the collected data. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 56 / 79...
6 Test Application for Collecting Omron PLC Data 6.1 Implementing the Hostlink Protocol to Modbus TCP Data Exchange 6.1.1 Omron PLC Configuration Power on the Omron PLC, and add a CP1W-CIF11 (485 communication module). This communication module has a DIP switch to set the communication mode.
Page 58
6.1.2, MG-IOT01 Configuration Open the configuration software "Odot Configuration Software", click Tools-Search for devices, select the local network card, click Search for devices, and the IOT gateway on the same network segment will be scanned. Click OK to generate an IOT project. : 192.168.1.254. PLC serial port 1, set the parameters of serial port 1 to pass-through, RS485 / 9600, even / 7/2, and other parameter settings.
Page 59
Configure the Collection channel parameters as shown below: Select serial port 1 for the collection channel serial port and fill in 1 for the slave ID. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 59 / 79...
Page 60
Click the Publish channel and click MODBUS TCP to view the correspondence relationship of the data publish address. After configuring all collection points and publish points, right-click MG-IOT01-OM and select Download Configuration to Gateway. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.
Page 61
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 and Modbus data communication port 502 to access the collected data. This document uses Modbus Poll to simulate Modbus TCP client to collect data.
6.2.1 Same as 6.1.1 6.2.2 MG-IOT01 Configuration 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 63
Select serial port 1 for the collection channel serial port, and fill 1 in the slave Configure the collection point as shown in the following figure: Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 63 / 79...
Page 64
Right-click the publishing channel to manually add the MQTT channel and set the configuration parameters manually. 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). Click Publishing Point config. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.
Page 65
After configuring all collection points and publishing points, right-click MG-IOT01-OM and choose to download and configure to the gateway. After successful download, complete the data MQTT publish. After completing the above settings, the MQTT client can use the MQTT.fx test software to access the gateway and access the collected data.
7 Collection of Test Data for Delta PLC Data 7.1 Implementing Modbus RTU Protocol to Modbus TCP Data Exchange 7.1.1 DELTA PLC Configuration Power on the Delta PLC, connect 4 RXD of the RS232 serial port pin to the gateway serial port 1T / S +, pin 5 TXD to the gateway serial port 1R / S-, and pin 8 to the gateway serial port GND.
Page 67
7.1.2 MG-IOT01 Configuration 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. The IP address uses the default IP address: 192.168.1.254.
Page 68
Configure the collection channel parameters as shown below: The serial port of the collection channel is selected as serial port 3, the encoding method is ASCII, and the slave ID is 1. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 68 / 79...
Page 69
Click the publish channel and click MODBUS TCP to view the correspondence relationship of the data address. After configuring all collection points and publishing points, right-click MG-IOT01-MB select Download Configuration to Gateway. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China.
Page 70
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.
7.2.1 Same as 7.1.1 7.2.2 MG-IOT01 Configuration 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 72
Configure the collection channel parameters as shown below: Select serial port 1 for the collection channel serial port, the encoding method is ASCII, and the slave ID is 1. Add.: No.6 Hongsheng Road, Hi-Tech District, Mianyang, Sichuan, China. Web: www.odotautomation.com 72 / 79...
Page 73
The corresponding Modbus address of Delta PLC output coil Y is shown in the table below, and the collection points are configured according to the point table. Right-click the publish channel to manually add the MQTT channel and set the configuration parameters manually.
Page 75
After configuring all collection points and publishing points, right-click MG-IOT01-OM and choose to download and configure to the gateway. After successful download, complete the data MQTT publish. After completing the above settings, the MQTT client can use the MQTT.fx test software to access the gateway and access the collected data.
8 Appendix 8.1 Siemens S7-200/200 SMART PLC Serial Wiring PLC serial port supports RS485 interface. PLC DB9 (female) 9pin DB9 Terminal MG-IOT Gateway terminal definition ———— 1/4/7/10 8 D- R/S- ———— 2/5/8/11 3 D+ T/S+ ———— 3/6/9/12 5 GND 8.2 Mitsubishi FX series PLC Serial Port Wiring Mitsubishi PLC serial communication is RS422, so you need to open the shell of the gateway before testing, and change the position of the jumper wire as described in 2.4.
you need to dial 2, 3 to ON (RS485 method). Terminal MG-IOT Gateway terminals terminal definition —— 1 RDA- 1/4/7/10 R/S- —— —— 2 RDB+ 2/5/8/11 T/S+ —— 8.4 Delta DVP series PLC serial port wiring Delta's DVP PLC serial communication is RS232, so before testing, you need to open the shell of the gateway and change the position of the jumper wire as described in 2.4.
Need help?
Do you have a question about the MG-IOT01 and is the answer not in the manual?
Questions and answers