Remote monitoring and program download of PLC based on VPN network


Overview

     4G LTE DTU has 10 / 100MB Ethernet port and has VPN communication function. It can realize data communication through VPN network based on Internet. It is especially suitable for field equipment with network port, such as S7-200 smart PLC of Siemens. It can cooperate with Scada software to realize remote monitoring, and also cooperate with PLC programming software to complete PLC program download.


VPN network

     VPN network needs a server based on public network fixed IP (install VPN hub software). DTU and computer (install dc-vpn software) can access VPN network by setting relevant parameters. At this time, DTU and computer become a node of VPN network, which can connect devices distributed in different subnets to an Internet-based "virtual LAN" through VPN network, as shown in the figure below.


comway
 
Implementation of VPN communication
  1. Establish VPN server
  2. When there is a public fixed IP, open a communication port for the vpn-hub software on the ECS console or gateway to install the vpn-hub software and set relevant parameters.

    When there is only public network dynamic IP, open a communication port for vpn-hub software at the gateway, contact the company's technical support to apply for comway dynamic domain name, and then install vpn-hub software and set relevant parameters。

  3. Set DTU access to VPN network
  4. As shown in the figure below, set the public IP or dynamic domain name (888. Comway. Com) + port (1276) of VPN server and VPN IP (172.16.12.99) in DTU configuration software to access VPN network。


    comway

  5. Install Dc-vpn software and add DTU
  6. As shown in the figure below, install Dc-vpn software and set relevant VPN parameters. When adding DTU, input its VPN IP and display online, which means that DTU is connected to VPN network and the communication connection is normal。


    comway

  7. Add S7-200 TCP device in Scada software
  8. Create a new IO device in Scada software---PLC Siemens S7-200 (TCP). Take the VPN IP of DTU as the IP of IO device and the port number mapped by the port set by DTU as the communication port of IO device to establish communication.

Remote download of PLC program

    Taking Siemens S7-200 smart PLC as an example, run step 7 PLC programming program on the computer side to add PLC, as shown in the figure below. Click communication - select virtual network card (tap-windows adapter V9 TCPIP. 1), and then add PLC by adding, as shown in the figure below.

 
comway
 

   When the VPN communication is established, the STEP7 status bar will display connected. At this time, click download to realize the remote download of PLC program.