InGateway502 Quick Start Manual

InGateway502 Quick Start Manual

InGateway502 (IG502 for short) can provide rich networking functions and analysis of various mainstream industrial protocols such as ModbusTCP/RTU, and can be connected to mainstream loT cloud platforms such as AWS and Azure. Help customers quickly achieve data collection, local processing and data migration to the cloud. IG502 supports connecting to the InHand Cloud platform, helping users achieve batch management of devices through the cloud platform, such as configuration, upgrades, etc.
This document is used to explain the basic configuration operations of IG502 networking, software version update, etc., so that users can master the basic configuration of IG502 and the use of common functions.

1. Access and connect IG502 to the Internet

  • Step 1: By default, the IP address of WAN on IG502 is 192.168.1.1; the IP address of LAN on IG502 is 192.168.2.1. This document uses the LAN port to access the IG502 as an example. Set the PC’s IP address to be on the same subnet with LAN.
  • Set IP address Method 1: Enable the PC to obtain an IP address automatically (recommended)
                                

  • Set IP address Method 2: Set a fixed IP address

Select Use the following IP address, enter an IP address (By default,any from 192.168.2.2 to 192.168.2.254), subnet mask (By default,255.255.255.0), default gateway (By default,192.168.2.1), and DNS server address, and click OK.


  • Networking Method 1: Connect to the Internet by SIM card
  • Step 2: Insert the SIM card. (Note: Before inserting or removing the SIM card, unplug the power cable; otherwise, the operation may cause data loss or damage the IG502.) After inserting the SIM card, connect the 4G LTE antenna to the ANT interface and power on the IG502.


  • Step 3: Launch the browser on the PC and access the IP address of LAN. Enter the login user name and password. The default user name and password are adm and 123456 respectively.


  • Step 4: After successful login, you can see the web page as shown below:


  • Step 5: Choose Network > Network Interfaces > Cellular page of IG502 and select Enable Cellular and click Submit.


When the network connection status is Connected and an IP address has been allocated, the IG502 has been connected to the Internet with the SIM card.

  • Networking Method 2: Connect to the Internet by Ethernet
  • Step 2: Use the Ethernet cable to connect the WAN and LAN ports of the IG502 respectively, as shown below:


  • Step 3: Launch the browser on the PC and access the IP address of LAN. Enter the login user name and password. The default user name and password are adm and 123456 respectively.


  • Step 4: After successful login, you can see the web page as shown below:


  • Step 5: Choose Network > Network Interface > WAN page of IG502 to configure the IP address of the WAN port and click Submit. (When the network type is a static IP address, you need to configure the IP, subnet mask, and other information according to the site network conditions.)



  • Step 6: Choose Network > Routing > Static Routing page of IG502 to add a static route for WAN port and click Submit. (Select "WAN" for the interface item, and configure the other items according to the site network conditions.)


  • Step 7: Choose System > Network Tools page of IG502 and use the Ping tool to check whether the IG502 has successfully connected to the Internet. The following figure shows that IG502 have successfully connected to the Internet:


  • To change the IP address of LAN, choose Network > Network Interfaces > LAN page of IG502 to configure LAN.


  • To change the user name and password for logging in to the web management interface of IG502, choose System > User Management page of IG502 and set the new user name and password.


2. Update the Software

To obtain the latest software version of IG502 and updated functions, please visit the Resource. To update the IG502 software version, do as follows.

2.1 Update the IG502 firmware.

Choose System > Firmware Upgrade. Select a firmware file and click Start Upgrading. After the update is completed, you are prompted to restart the system to Apply the new firmware.


2.2 Upgrade the Python SDK of IG502.

Choose Edge Computing > Python Edge Computing. Select Python Engine, select an Python SDK file, and click Upgrade; when the upgrade confirmation window pops up, click Confirm. Then the IG502 automatically performs the upgrade.


3. Python Edge Computing

3.1 Install and run Python App

To install and run Python App (App for short) in IG502, please refer to the following process, this document takes Device Supervisor as an example:

  • Step 1: Install the App

Before installing the App, you need to ensure that the Python Edge Computing Engine is enabled and the Python SDK is installed, as shown in the following figure:


Choose Edge Computing > Python Edge Computing. click the Add button and select the App package file to be installed, then click Confirm.


After importing, you can view the imported Apps, as shown in the following figure:


  • Step 2: Run the App

Select enable App and click Submit.


Once enabled, the App automatically runs and will run every time the IG502 is started.


3.2 Update Configuration File for App

If the installed App supports importing configuration files to modify the running mode, you can update the App running configuration by referring to the following process:

  • Step 1: Choose Edge Computing > Python Edge Computing, click the Import Configuration button and select the configuration file to be imported, then click Confirm.


  • Step 2: Restart the App after the import is successful. After the App restarts, it will runing according to the imported configuration file.


3.3 Update Python App version

Generally, if you need to update the Python App version, you only need to import the new version of the App on the Edge Computing > Python Edge Computing page.


After the update is completed, as shown below:


3.4 Enable the Debug Mode

To run and debug Python code on IG502, you need to enable IG502's debug mode. Choose Edge Computing > Python Edge Computing, select Enable Debug Mode. After enabling, you can develop IG502 through VS Code. How to use VS Code for Python development of IG502, please refer to Quick Start for MobiusPi Python Development.


After the debugging mode is enabled, IG502 will start an SSH server to listen on port 222 of LAN (default IP address being 192.168.2.1). The user name and password of the SSH server are displayed on the previous web page. A random password is generated every time the debugging mode is enabled or the IG502 is restarted to ensure security.

4. InHand Cloud

The InHand Cloud developed by InHand supports functions such as monitoring IG502 status, remote maintenance of equipment, remote batch delivery of IG502 configuration, and IG502 batch upgrade, helping users to conveniently and efficiently manage IG502 and field devices. In order to enable the InHand Cloud to remotely manage the IG502 and field devices, the IG502 needs to be connected to the cloud platform. The connection method is as follows:
Choose System Management > InHand Cloud, tick Enable InHand Cloud and configure the corresponding server address and registered account, and click Submit after the configuration is complete. The InHand Connect Service platform mainly provides users with remote maintenance channels, and the InHand Device Manager platform mainly provides users with gateway management services (such as batch remote upgrades, etc.).

  • Server address: the address of the InHand Cloud. 
  • Registered account: the InHand Cloud account associated with the IG502 device (if you have not registered an account, you need to register an account first) 
  • Advanced settings: Contains configurations such as heartbeat interval. Generally, you can use the default configuration. 


After the IG502 is successfully connected to the InHand Device Manager, the status is described as Connection Accepted.


5. Data Collection And Upload To The Cloud

  • Step 1: Connect PLC

Use Ethernet or serial cable to connect IG502 and PLC, the following figure describes how to connect serial port terminals of IG502:


  • Step 2: Install and run Device Supervisor

Please refer to 3.1 Install and Run Python App for how to install and run Device Supervisor.

  • Step 3: Add a PLC

Choose Edge Computing > Device Supervisor > Device List, and click Add. On the device adding page, select the PLC protocol and configure the PLC communication parameters. The following figure is an example of adding S7-1200 PLC:


  • Step 4: Add variable

On the Device List page, click Add variable, and configure the variable parameters in the pop-up box.


  • Step 5: Configure a cloud service to report and receive data

Choose Edge Computing > Device Supervisor > Cloud. Select Enable Cloud Service, configure the MQTT connection parameters and publish and subscribe messages (this document takes the configuration of publish messages as an example), and then click Submit. After the above configuration is correctly completed, the collected data can be monitored in the gateway and cloud platform.



6. I/O Module

IG502 supports the digital input, pulse counting, digital output, and pulse output functions. In addition, IG502 can remotely read I/O status data or report it to the cloud platform through Modbus TCP. I/O in each mode is defined as follows:

  • Digital input (Dry contacts and wet contacts are specified based on actual connections.)
  • Dry contacts

0: disconnected

1: connected

The following figure shows the connection modes.


  • Wet contacts

0: 0 V DC to 3 V DC/-3 V DC to 0 V DC

1: 10 V DC to 30 V DC/-30 V DC to -10 V DC (4 mA min)

The following figure shows the connection modes.


  • Pulse counting

A maximum of 3000 Hz pulse signal counting is supported, up to 4294967296. The following figure shows the connection modes.


  • Digital output

0: Low level

1: High level. According to the external power output voltage, if no external power supply is connected, no voltage is output. The maximum voltage output is 30 V, 500 mA.

The following figure shows the connection modes.


  • Pulse output

A maximum of 5000 Hz pulse signal output is supported. The following figure shows the connection modes.


The procedure for configuring I/O and obtaining I/O status data is as follows:

  • Step 1: Choose "Edge Computing > IO Module > Configuration", and configure the I/O functions based on the site requirements. The following figures show a configuration example.
  • Digital input


  • Pulse counting

The starting value is 0. After power down, the value counted by the power down is retained.


  • Digital output


  • Pulse output

According to the frequency of 5000 Hz, the duty cycle is 50% for the pulse output.


  • Step 2 (optional): Set the pulse counting and pulse output.

After setting DI to the pulse counting, click Start to count the pulses received by the DI. Otherwise, do not count it. Click Reset to reset the count value to the starting value.


After setting DO to the pulse counting, click Start to output pulses based on the specified output frequency. Otherwise, do not output pulses.


  • Step 3: Set Modbus TCP Slave.

Turn on the Enable switch to enable the Modbus TCP Slave function. This function allows Modbus TCP Master to read the I/O status of IG502. After you turn on the External Access switch, Modbus TCP Master outside the gateway can read the I/O status of IG502, such as the SCADA software. Set other parameters based on the site requirements. The following figure shows a configuration example.


  • Step 4: Read the I/O status through Modbus TCP.

Use Device Supervisor to read the I/O status of IG502 in Step 3 as an example. First, add a Modbus TCP controller and set the controller communication parameters based on Modbus TCP Slave.


Then, configure the data to be collected according to the Modbus mapping table. For example, read DI0 Counter Value as an example.



After the configuration is completed, you can obtain DI0 Counter Value.


7. Advanced Configuration of Peripheral Interfaces

7.1 Serial Ports

The IG502 is equipped with two serial ports, one of which supports RS485, while the other can operate in either RS-232 or RS-485 mode.
When the interface configuration is set to RS232 + RS485:
The device node corresponding to the RS232 serial port is: /dev/ttyO1
The device node corresponding to the RS485 serial port is: /dev/ttyO3

When the interface configuration is set to RS485 + RS485:
The device node corresponding to the first RS485 serial port (RS485-1) is: /dev/ttyO1 
The device node corresponding to the second RS485 serial port (RS485-2) is: /dev/ttyO3

7.2 DIP switches

The DIP switch is located on the left panel of IG502 and is used to control the pull-up and pull-down resistors of the RS-485 bus. The number of devices that the RS-485 bus can carry can be increased by selecting the pull-up and pull-down resistors. In the initial state, the pull-up resistors of COM1 and COM2 are both disabled.

Identification

Function Description

PU1

ON: Enable the pull-up resistor of COM1 OFF: Disable the pull-up resistor of COM1

PD1

ON: Enable the pull-down resistor of COM1 OFF: Disable the pull-down resistor of COM1

PU2

ON: Enable the pull-up resistor of COM2 OFF: Disable the pull-up resistor of COM2

PD2

ON: Enable the pull-down resistor of COM2 OFF: Disable the pull-down resistor of COM2


Note: In the initial state, the load capacity of RS-485 is 32, but this is only a theoretical value. In practical applications, the more nodes there are, the longer the transmission distance is, and the worse the electromagnetic environment is, the higher the requirements for the cable will be.

Appendix

Factory reset

There are two ways to restore the IG502 to factory settings: hardware factory reset and software factory reset.

  • Hardware factory reset
  • Step 1: Hold down the RESET button within 10s after the device is powered on; 
  • Step 2: When the ERR light is always on, release the RESET key; 
  • Step 3: After the ERR light goes out, press and hold the RESET key again, and release the RESET key when the ERR light flashes; wait for the ERR light to go out, indicating that the factory reset was successful. 
  • Software factory reset

Choose System Management > Configuration Management, click the reset button and select OK. IG502 will complete the factory reset operation by itself.











    • Related Articles

    • InGateway902 Quick Start Manual

      This document is used to explain the basic configuration operations of InGateway902 (IG902 for short) networking, software version update, etc., so that users can master the basic configuration of IG902 and the use of common functions. 1. Configure ...
    • InGateway902 Quick Start Guide_V1.1

      Edge Gateway InGateway902 Quick Start Guide Version 1.1, Oct. 2024 www.inhand.com The software described in this manual is according to the license agreement, can only be used in accordance with the terms of the agreement. Copyright Notice © 2024 ...
    • EC312 Quick Start Guide_V1.0

      Edge computer EC300 series Quick Start Guide Version 1.0 May 2024 www.inhand.com The software described in this manual is provided under a license agreement and can only be used in accordance with the terms of that agreement. Copyright Statement © ...
    • EC942 Quick Start Guide_V1.0

      Edge computer EC940 series Quick Start Guide Version 1.0 May 2024 www.inhand.com The software described in this manual is provided under a license agreement and can only be used in accordance with the terms of that agreement. Copyright Statement © ...
    • EC954 Quick Start Guide_V1.0

      Edge Computer EC950 Series Quick Start Guide Version 1.0, May 2024 www.inhand.com The software described in this manual is provided under a license agreement and can only be used in accordance with the terms of that agreement. Copyright Statement © ...