How to realize the communication of Mitsubishi FX5U PLC-Ethernet-DTU-wireless network-computer-dual server mode

How to realize the communication of Mitsubishi FX5U PLC-Ethernet-DTU-wireless network-computer-dual server mode

Software and hardware used for communication

Hardware: FX5U-64M, Ethernet cable, USR-G781 4GLTE DTU, PC
software: GX Works3 (FX5U-64M compilation software), USR-G781-setup-V1.0.0.0 product setting software, peanut shell, Ethernet Debugging assistant

Connection and test steps

  1. Write Passive TCP program in GX Works3
    Program code reference: Mitsubishi FX5U User Manual-Ethernet Communication
    Write Unpassive TCP program
  2. Configure the Ethernet port in GX Works3, and burn the parameters and programs into the PLC to
    set the IP address, subnet mask, default gateway, add Unpassive connection equipment, and set the programmable controller port (1111)
     Set IP address, subnet mask, default gateway, add Unpassive connection device, set programmable controller port (1111)
  3. Set the connection server A and connection server B in the USR-G781-setup-V1.0.0.0 product setting software. The address of server A is the public network IP, the port is the public network port, and the address of server B is the PLC IP and address. After setting, click to enter the configuration state, and send the commands AT+SOCKPIPEEN=ON and AT+SOCKPIPE=SOCKA,SOCKB through the serial port
    Set up connection server A and connection server B in the product setting software of USR-G781-setup-V1.0.0.0
  4. Set and save all parameters-software restart-enter the communication stateSet and save all parameters-software restart-enter the communication state
  5. Map the public IP and port to the local IP (192.168.31.185) and port (8001) of the PC in the peanut shellMap the public IP and port to the local IP (192.168.31.185) and port (8001) of the PC in the peanut shell
  6. Open the Ethernet debugging assistant in the PC, create a TCP Server, and set the listening port to the PC's local port 8001. At this time, the listening port will automatically pop up the IP and port of a device, and the device is DTU Open the Ethernet debugging assistant in the PC, create a TCP Server, and set the listening port to the PC's local port 8001
  7. After connecting the PLC to the DTU’s LAN through the Ethernet cable, start to test
    the connection between DTU and PLC (the LINKA of DTU is always on, indicating that the PC has been connected to the DTU, and the LINKB of DTU is always on, indicating that the PLC has been connected to the DTU. Connected) There is
    Connection between DTU and PLC
    no need for the PLC to send a handshake request. When the PLC sends data directly, the PC can receive the data
    No need for PLC to send handshake request, when PLC sends data directly, PC can receive data

Guess you like

Origin blog.csdn.net/weixin_41492657/article/details/109401236