Page 2
PLC-502 User Manual This manual applies to the following models, and the corresponding networks supported by the models are listed in the table below: Model Network WIFI and WAN cable networks, use WAN by PLC-501-W0 default LTE Cat4 and WAN cable networks, use WAN by PLC-501-N4 default...
PLC-502 User Manual 1. Product Introduction This chapter mainly introduces the outlook, accessories, specifications and mechanism of PLC-501. 1. Brief Introduction 2. Product Outlook 3. Accessories 4. Dimension 5. Working Mechanism 6. Specifications 7. Typical Usecases 1.1 Brief Introduction PLC-501 is an industrially designed product, and is especially used with PLCs.
Page 5
WIFI. PLC-501 is easy to use, and is plug-n-play without any configuration. Together with eTung’s eYun platform and Virhub/Vircom software, it can be easy to integrate with PLC programming software, and there is no extra integration effort. PLC-501 is stable and easy-to-use, thus...
PLC-502 User Manual 1.3 Standard Accessories Figure 1-2: 4G all frequency sucking antenna Figure 1-3: WIFI antenna...
Page 8
PLC-502 User Manual Figure 1-4: Cross cable NOTE: The accessories may be different because of different models and customer requirements, the figures above are just for reference.
PLC-502 User Manual 1.5 Working Mechanism Figure 1-7: PLC-501 working mechanism PLC-501 has RJ45 Ethernet interface and RS232/RS485 serial interface, so it can connect with PLCs that have Ethernet interface or serial interface, and Ethernet and serial interfaces can be used at the same time.
PLC-502 User Manual Support serial port DTU function, Ethernet and serial interfaces can be used at the same time Support agent client 1.6.2 Indicator Light Description Color Status Description Indicato r Light There are three signal lights. Signal Orange Always light All lights one means the signal...
PLC-502 User Manual 1.6.3 Serial Port Definition Type RS-232 RS-485 485A 485B Definition Send Receive Table 1-2: PLC-501 serial port terminal definition 1.6.4 RESET Button To reset PLC-501 to default, login its configuration web page, and choose “System tools” -> “Restore set”; Or: press the RESET button continuously, the signal lights will flash one by one, until all lights are on, that means the reset is finished.
PLC-502 User Manual Figure 1-7: PLC-501 reset button 1.7 Typical Usecases Figure 1-9: Implement PLC remote monitoring and program update via PLC-501’s serial functionality...
Page 15
PLC-502 User Manual Figure 1-10: Implement PLC remote monitoring and program update via PLC-501’s virhub functionality Figure 1-11: Implement remote control of touchscreen desktop via PLC-501’s agent client functionality and VNC software...
PLC-502 User Manual 2. Device Configurations This chapter introduces how to use PLC-501 and related parameters. 1. Configurations 2. Parameters 3. Restore to default 4. Firmware Update 5. Remote Configurations 2.1 Configurations 2.1.1 Preparation One cross Ethernet cable used to connect PLC-501 with PC or customer device;...
Page 17
PLC-502 User Manual Figure 2-1: Set IP address Open IE browser, input address "http://192.168.10.1" and press Enter; Input "root" as username and "1234" as password, then press Enter to login web configuration interface and configure the device. Figure 2-2: Login router configuration interface ...
Page 18
PLC-502 User Manual configuration interface. To change some parameter, click it, modify and then save it, then reboot the router. Below shows PLC-501’s current status, including: product ID, version, running time, current time, CPU usage, memory usage, status, model and model manufacturer, SIM IMEI, SIM ICCID, WAN/LAN connection status, current status, network, network speed, and signal, etc.
Page 19
PLC-502 User Manual Server can also be set manually, as shown in the figure below, Server is set to “Self-defined”, and then input server domain/IP and port accordingly.
Page 20
PLC-502 User Manual Figure 2-4: Configure virhub functionality To use DTU functionality, click “DTU Function” -> “Basic Cfg”. DTU function is enabled by default; server is set to auto-selected by default that means PLC-501 will automatically choose the server that is near it and has lowest network delay.
Page 21
PLC-502 User Manual Server can also be set manually, as shown in the figure below, Server is set to “Self-defined”, and then input server domain/IP and port accordingly.
Page 22
PLC-502 User Manual Figure 2-5: Configure DTU functionality PLC-501 has one RS232 and one RS485 serial port, choose either serial port to use in “UART Choice”:...
Page 23
“Agent Client”, set mServer (plc.lianwangbao.com) DN and port (8080), the default values are eTung mServer DN and port, normally keep the default values, unless users build its own mServer. Then configure device information, set device IP (for example, 192.168.10.20) and port (for example, 5900), and tick “Enable”, then click Save and reboot...
Page 24
PLC-502 User Manual Figure 2-7: Configure agent client functionality It is possible to configure multiple lines in agent client configuration, each line corresponds to a channel, and at most 5 channels are supported. Each channel has a 15-byte channel ID. The channel ID is derived from PLC-501’s IMEI.
PLC-502 User Manual 2.2 Configuration Parameters Each configuration menu has multiple parameters, and some of them have sub-menus. Details are described below. Configuration Menu Item Description Show device information, connection and Current status data transfer status. Configure to use wireless (2G/3G/4G), Network Select cable network (WAN) or WIFI, set ICMP host, and whether to allow external access.
PLC-502 User Manual Set advanced parameters, for example, Advanced Cfg frame size for data transmission, and timeout for data received from serial port. Set heart beat parameters, normally with Link Management default values Set server address for Virhub function, “Auto-selected” by default that means it Virhub will automatically choose the server that is near it and has lowest network delay.
Figure 2-9: Restore to default Or: press the RESET button continuously to reset it to default. 2.4 Firmware Update Ask eTung for firmware to update. The firmware (*.img) can be uploaded from local disk, or downloaded from a server from Internet.
Page 28
PLC-502 User Manual Figure 2-10: Upgrade firmware If the firmware can be downloaded from a server, input download URL (please ask eTung technical support for the URL), and click “Upload/Download”: Figure 2-11: Input URL and download firmware Wait for a moment, until "Update" is shown, choose "Delete the configuration"...
PLC-502 User Manual rebooting. Wait a moment and then refresh the webpage to see the configuration page again. Figure 2-12: Choose delete the configuration or keep network configuration 2.5 Remote Configurations SMS commands and remote AT commands can be used on PLC-501 to modify configuration parameters remotely.
Page 30
PLC-502 User Manual those that need to change and you do not have to write all of them. If some item does not need to change, write two continuous colons, and if some item needs to clean, write a space. For example: AT+WN=3gnet (configure onely APN, and other parameters keep unchanged) AT+DC=,,user...
Page 31
PLC-502 User Manual Check SMS password, with reply below: OK:passwd 8) AT+INFO? Check device information. with reply below: OK:IMEI,version,IP address at Ethernet interface 2. Change configuration parameters via remote AT commands 1) This method can be used only when enabliing DTU function or virhub function, and PLC-501 is shown online in mServer.
Page 32
PLC-502 User Manual 1) AT+MSERVER=addr, port Change data center address and port, with reply OK or ERROR. addr: data center address, either IP address or domain port: data center port 2) AT+CSQ Query signal strength and network mode, with the following reply: OK:sig_quality,net_mode sig_quality: 0-31, bigger value means better signal quality...
Page 33
PLC-502 User Manual 12) AT+NETMODE Query current network in use, with reply: +NETMODE: WAN/WIFI/MOBILE\r 13) AT+IFSTATUS Query data interfaces’ status, with reply: +IFSTATUS: SERIAL(0/1,0/1), LAN(0/1,0/1)\r Bracket SERIAL(0/1,0/1) shows RS232 and RS485 data interfaces’ status: 1 means data are received from the serial interface, otherwise 0.
PLC-502 User Manual Appendix 1: Use PLC-501 Virhub Functionality to Implement PLC Program Remote Update 1. Apply eYun account Access website , press “Register”, and http://wangkoutong.lianwangbao.com input registration information. Pay attention that the password should not be too simple. Input a correct email address, then after submit the system will automatically send a web link to the mailbox, just click the link to enable the account.
Page 35
PLC-502 User Manual Figure Appendix 1-2: Input registration information 2. Configure PLC-501 Connect PLC-501 with PC via Ethernet cross cable, and the IP address in PC is set to 192.168.10.20; Open browser and input URL: 192.168.10.1; Input username: root, and password: 1234 to login; ...
Page 36
PLC-502 User Manual Figure Appendix 1-3: Configure PLC-501’s virhub functionality 3. Configure Virhub function Open and run ET Connector installation package from eTung’s CD, or downloaded from eTung’s website: www.etungtech.com: Downloads->Software. Run ET Connector, input the username and password applied before.
Page 37
PLC-502 User Manual Figure Appendix 1-4: Login ET Connector 1) Configure virtual network adapter’s IP address: Set IP1 to be in the same IP range as PLC’s IP that connects to PLC-501, for example, PLC’s IP is 192.168.10.20, and then set IP1 to 192.168.10.200. The virtual net adapter is used to build a virtual LAN with PLC.
Page 38
PLC-502 User Manual Figure Appendix 1-5: Configure virtual network adapter’s IP address Normally, it’s enough to set one virtual IP address, i.e. IP1, if the devices(PLCs) are in the same IP range. But if it is required to set multiple virtual IP address, press “Advanced Setting” and then add virtual IP addresses, as shown below: Keep IP2 (192.168.168.200) unmodified, and press “Add”...
Page 39
PLC-502 User Manual Figure Appendix 1-6: Succeed to set IP address of Virtual network adapter 2) Add device: in Virhub add PLC-501 to the user account: first,choose “Virhub” in the toolbar, and then press “Add Terminal”, then input the ID number of PLC-501 and press “Add”. Figure Appendix 1-7: Add device Figure Appendix 1-8: Succeed to add device If add device fails, please first make sure if the SVR2 led light is on, that...
Page 40
PLC-501 can be accessed remotely via Virhub. Normally, PLC-501 dials up into the wireless network and gets an inner IP address, and it cannot be accessed from the internet via this inner IP. eTung’s Virhub solution can solve the problem. First, enable Virhub function on PLC-501, and set a remote access IP;...
Page 41
PLC-502 User Manual enable Virhub and configure username, then there are two parameters: “Remote Access IP” and “Remote Access Mask”, with default values: 192.168.168.XX and 255.255.255.0, where XX is the last two digits of PLC-501’s ID number, and if the last two digits are 00, XX will be 100. Figure Appendix 1-10: Configure PLC-501r’s remote access IP Normally set the two parameters with default values, and they can also be changed on demand.
Page 42
PLC-502 User Manual Figure Appendix 1-11: Configure the Virtual Network adapter’s IP address to access PLC-501 remotely Click “OK” after configuration is complete, the software will then set the IP address on the Virtual Network adapter. 3) Access PLC-501 remotely Run ET Connector software, and switch to Virhub interface, right-click PLC-501 in the device list and choose “Login Terminal”, a web browser will be run automatically, access PLC-501’s remote access IP...
Page 43
PLC-502 User Manual Figure Appendix 1-12: Access PLC-501’s Web configuration page remotely Then we can login the web page to change PLC-501’s parameters remotely, just as PLC-501 is directly connected locally.
PLC-502 User Manual Appendix 2: Use PLC-501 Serial Functionality to Implement PLC Program Remote Update PLC-501 has two user serial ports, so it can connect with PLCs that have serial ports, and perform remote program download and transparent data transmission. eYun platform and Vircom functionality make it easier to implement remote access of PLCs that have serial port.
Page 45
PLC-502 User Manual Figure Appendix 2-2: Input registration information 2. Configure PLC-501 Connect PLC-501 with PC via Ethernet cross cable, the IP address in PC is set to 192.168.10.20; Open browser and input URL: 192.168.10.1; Input username: root, and password: 1234 to login; ...
Page 46
PLC-502 User Manual Figure Appendix 2-3: Configure PLC-501’s serial functionality 3. Configure Vircom software Find ET Connector installation package from eTung website: www.etungtech.com: Downloads->Software, then download and install ET Connector. Run ET Connector software, login with eYun account; Switch to Vircom interface;...
Page 47
PLC-502 User Manual Figure Appendix 2-4: Run ET Connector software Figure Appendix 2-5: Add terminal Figure Appendix 2-6: Succeed to add terminal...
Page 48
PLC-502 User Manual Figure Appendix 2-7: Map a virtual COM Figure Appendix 2-8: Succeed to map virtual COM...
PLC-502 User Manual Appendix 3: Configure PLC-501 to Access Internet via 4G Network According to the description of Ch. 2.1 Configurations, login PLC-501’s webpage, choose “Network Settings” -> “Network Select”, configure to use 4G to access Internet. Set Network to “WIRELESS (2G/3G/4G)”, press “Save” and then reboot PLC-501.
PLC-502 User Manual Appendix 4: Configure PLC-501 to Access Internet via Cable/WIFI 1. Configure PLC-501 to access Internet via cable network According to the description of ch. 2.1 Configurations, login PLC-501’s webpage, choose “Network Settings” -> “Network Select”, configure to use WAN to access Internet.
Page 51
PLC-502 User Manual Figure Appendix 4-3: Set type When choosing PPPoE, PPPoE username and password should be set additionally: Figure Appendix 4-4: Configure PPPoE username and password When choosing STATIC, configure static IP, net mask, gateway and DNS accordingly:...
Page 52
PLC-502 User Manual Figure Appendix 4-5: Configure static IP When choosing DHCP, no additional parameters need to configure: Figure Appendix 4-6: Configure DHCP Click "Save", and plug in Ethernet cable on LAN (WAN) of PLC-501 and connect to the cable network, then reboot PLC-501. After reboot, login PLC-501's web configuration page, it can be seen that PLC-501 has connected to the Internet with WAN.
Page 53
PLC-502 User Manual Figure Appendix 4-7: PLC-501 accesses Internet via WAN 2. Configure PLC-501 to access Internet via WIFI PLC-501-W0 and PLC-501-W0 can access Internet via WIFI. According to the description of ch. 2.1 Configurations, login PLC-501’s webpage, choose “Network Settings”...
Page 54
PLC-502 User Manual Figure Appendix 4-8: Set network as WIFI Choose “Network Settings” -> “WIFI Client”, to configure WIFI parameters. Figure Appendix 4-9: Configure WIFI parameters – 1 Click “Refresh” to search the WIFI APs around:...
Page 55
PLC-502 User Manual Figure Appendix 4-10: Search WIFI APs Choose WIFI AP in the list, select security type, and input pin, then click “Save”, and reboot PLC-501. Figure Appendix 4-11: Configure WIFI parameters – 2...
Page 56
PLC-502 User Manual By default connection type is DHCP, i.e. get IP address dynamically. It is also supported to assign static IP address manually, and set subnet netmask, default gateway and DNS, as shown in the figure below: Figure Appendix 4-12: Configure WIFI parameters – 3 WAN will be disabled automatically once WIFI is enabled.
Page 57
PLC-502 User Manual Figure Appendix 4-13: PLC-501 accesses Internet via WIFI NOTE: PLC-501-N4 does not have WIFI module, and then cannot access Internet via WIFI.
PLC-502 User Manual Appendix 5: Configure PLC-501 to Switch Network Automatically PLC-501 can access Internet via 4G, WIFI or WAN cable network, and it supports automatic network switch. For example, PLC-501-N4 can access Internet via 4G or WAN, and uses WAN by default; when WAN is unavailable, it will automatically switch to use 4G network.
PLC-502 User Manual Appendix 6: Send/Receive SMS with PLC-501’s Ethernet Interface and SMS Format PLC-501 supports sending/receiving SMSs via Ethernet interface. The method is described below: First, establish a TCP connection with the PLC-501’s Ethernet IP (192.168.10.1 by default) and port: 10086; then use command AT+SMS or AT+SMSA to send SMSs. For example, use TCP Test Tool to send SMS as shown below: Figure Appendix 6-1: Send SMS via PLC-501’s Ethernet interface 1) In the left part “Client”, input PLC-501’s Ethernet IP address “192.168.10.1”...
Page 60
PLC-502 User Manual attention to end with CR, then click “send”; if “OK” is shown in box “Edit/Data Log”, that means the command has been sent successfully. NOTE: 1) Currently receiving long SMSs is supported, but sending long SMSs is not supported, i.e.
Page 61
PLC-502 User Manual Use 8bit encoding to send “1234”to 13812345678: AT+SMS=13812345678,2,4,31323334\r Below is the command shown in hexadecimal: 41 54 2B 53 4D 53 3D 31 33 38 31 32 33 34 35 36 37 38 2C 32 2C 34 2C 33 31 33 32 33 33 33 34 0D Use Unicode encoding to send “你好”...
Page 62
PLC-502 User Manual number>,<encoding format>,<data length>,<data>\r\n The messages with the same identifier can be assembled into one long SMS. For example, a long SMS is received from 10001, with identifier 05000376, total 4 messages, and below is the fourth message: \r\n+SMSL:05000376,4,4,10001,3,6,007600793002...
PLC-502 User Manual Appendix 7: Use VNC and PLC-501 to Access and Control Devices Remotely VNC is the abbreviation of Virtual Network Console. It is a kind of excellent remote control software, and it includes two parts: client software (vncviewer) and server software (vncserver).
Page 64
PLC-502 User Manual Figure Appendix 7-1: Use eTung PLC LianWangBao an VNC to remote control touchscreen 1. Install and run vncserver on the touchscreen, and run vncviewer on PC or mobile, and PC (or mobile) can access Internet; 2. Configure touchscreen IP address: set the IP address to be in the same IP range as PLC-501’s LAN IP, for example 192.168.10.20.
Page 65
Login PLC-501 web configuration page, choose “ConnBox” -> “Agent Client” , mServer DN or IP is plc.lianwangbao.com and mServer port is 8080 by default, that is eTung LianWangBao mServer, normally use the default settings, until customer builds its own mServer. Then configure device information, including touchscreen ‘s IP (for example, 192.168.10.20) and vncserver’s...
Page 66
PLC-502 User Manual functionality. Configure multiple lines in agent client configuration, and enable all of them. For example, configure two channels as shown in the figure below, each channel has touchscreen’s IP as device IP, and vncserver’s listening port as device port. This allows two PCs (or mobile phones) to remote control the touchscreen at the same time, thus implements device remote control in different locations.
Page 67
PLC-502 User Manual Figure Appendix 7-6: Login LianWangBao server Click “Terminal Control” -> “Add Terminal”, Figure Appendix 7-7: Add terminal Input the channel ID corresponding to the agent client, for example: 240305501234567:...
Page 68
Attention: terminal can be added only when it is online. If it fails to add terminal, make sure PLC-501 has connected online in LianWangBao server, or ask eTung technical support for help. After terminal is added, assign TCP port for the terminal: Click the terminal in terminal list, then click “Terminal Control”...
Page 69
PLC-502 User Manual If multiple channels are configured in PLC-501’s agent client, then add terminal for each independent channel and assign TCP port for the terminal accordingly. As shown in the figure below, two terminals and corresponding TCP ports are added: Figure Appendix 7-9: Add TCP port for each terminal 6.
Page 70
PLC-502 User Manual Figure Appendix 7-10: Use vncviewer to access LianWangBao server’s TCP port Click “OK”, then there will be a warning dialog, and then prompts the password dialog. Input the password to verify, then the remote touchscreen’s desktop will be shown on PC (or mobile). Figure Appendix 7-11: Input password Attention:...
Page 71
PLC-502 User Manual 1) If multiple PCs (or mobile phones) access touchscreen at the same time, make sure each PC use an independent channel, i.e. in vncviewer’s server information use different TCP port for different channels, otherwise the connections will be lost and PCs cannot work correctly. 2) The solution above is just one of device remote access solutions.
Same IP Some projects have devices, i.e. PLCs, with a fixed IP address by default. ETUNG LianWangBao is used to implement devices’ remote access. However, the devices are configured with the same default IP, and the monitoring center cannot distinguish them with IP. Virhub together with...
Page 73
PLC-502 User Manual 1. Use Ethernet cable to connect device with LianWangBao; 2. Configure LianWangBao Ethernet IP to be in the same IP range as device Ethernet IP, for example: 192.168.2.*; 3. Configure IP virtual mapping, map the device’s IP to some IP (Access IP) in a different IP range, for example: 192.168.8.1, and make sure...
Page 74
PLC-502 User Manual different devices are assigned to different IPs; 4. Enable Virhub in LianWangBao;...
Page 75
PLC-502 User Manual 5. Run Virhub software on host PC, and set virtual network adapter IP as in the same IP range as the access IPs mapped to devices; 6. Use the access IPs to communicate with devices.
PLC-502 User Manual Appendix LianWangBao’s MODBUS TCP Interface Description LianWangBao has built-in MODBUS TCP protocol, and as MODBUS TCP slave, MODBUS TCP client can get system time, LianWangBao current status, signal strength, LianwangBao serial ID, SIM card ICCID, and longitude/latitude, etc. Acquiring longitude/latitude needs GPS/BDS location module embedded in LianWangBao.
Page 78
PLC-502 User Manual status 0: Running 1: Breakdown CPU usage, with value Int16 0~100 Memory usage, with Int16 value 0~100 Positioning status, 0: Int16 Invalid, 1: Valid 17~18 Float32 Running time, unit: hour 19~20 Reserved LianWangBao serial ID, 21~35 Int16 15 digits, encoding with Reserved SIM card ICCID, 20...
PLC-502 User Manual Appendix LianWangBao’s Enhanced DMZ Function In case LianWangBao chooses WAN or WIFI network, if some PC in the same WAN/WIFI network needs to connect to devices under LianWangBao, the enhanced DMZ function can be enabled. By default, only one host can be specified for DMZ host. The enhanced DMZ allows multiple hosts.
Page 80
PLC-502 User Manual After configuration, save and reboot LianWangBao. Then, PC in the WAN network can access PLC 1 via IP: 192.168.0.190, and PLC 2 with IP: 192.168.0.191. For example, to download/upload PLC program:...
Page 81
PLC-502 User Manual Similarly, in case LianWangBao connects to WIFI network, the DMZ rules are configured below: Attention: In case WAN is specified in the rules, please enable WAN network; and in case WIFI is specified in the rules, please enable WIFI network. Go to Network Settings --> Network Select, and choose WAN or WIFI to enable the corresponding network.
Need help?
Do you have a question about the PLC-501 PLC LianWangBao and is the answer not in the manual?
Questions and answers