Modbus communication via Wi-Fi network

Forum Home Forums Communicating with Devices Modbus Modbus communication via Wi-Fi network

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #12898
    scr910
    Participant

    I have successfully implemented basic table and scheme views for a locally run project using Modbus values communicated via a direct ethernet connection and via a Wi-Fi access point on my Modbus Gateway module which is connected to my PLC. My goal is to connect this Modbus Gateway to a Wi-Fi network that my localhost (my computer) running the project is also connected to and communicate via this Wi-Fi network.

    I have connected the Modbus Gateway to the network and repeatedly pinged the Modbus Gateway from my computer, establishing that I can at least ping via the Wi-Fi network. However, the Modbus communication is not working. Assuming I have configured the Modbus Gateway properly (which I am not totally sure of but I think everything is okay), is there anything I can change in my RapidScada project that can solve this communication issue?

    I know my call number/host name for the device is correct.
    The communication line parameters are as follows:
    TCP Client
    Host =
    TcpPort = 502
    ReconnectAfter = 5
    StayConnected = True
    Behavior = Master
    ConnMode = Individual

    The Modbus Gateway page states: “Your ACE-PLC is available via Modbus-TCP at the new IP address and Ethernet port 502”

    Any advice at all is appreciated, networking is not my strong suit as you might guess!

    #12899
    Mikhail
    Moderator

    Hello,
    Could you post a part of communication line log from Communicator?

    #12903
    scr910
    Participant

    Here it is:

    2023-06-28 13:01:53 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    2023-06-28 13:01:53 Attempt to establish TCP connection can not be earlier than 5 seconds after the previous.

    2023-06-28 13:01:53 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    2023-06-28 13:01:53 Attempt to establish TCP connection can not be earlier than 5 seconds after the previous.

    2023-06-28 13:01:53 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    2023-06-28 13:01:53 Attempt to establish TCP connection can not be earlier than 5 seconds after the previous.

    2023-06-28 13:01:53 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    2023-06-28 13:01:53 Attempt to establish TCP connection can not be earlier than 5 seconds after the previous.

    2023-06-28 13:01:53 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    2023-06-28 13:01:54 Establish a TCP connection with 192.168.8.1:502

    It says it is looking for the IP which I use for ethernet/direct Wi-Fi access point connection. This is interesting, I have not looked at this page before. Thank you!

    #12904
    scr910
    Participant

    When I restart:

    ——————————————————————————–
    2023-06-28 13:05:46 Initialize communication line 1 “Modbus”
    2023-06-28 13:05:46 Load device template from file KpModbus_FTEG70_Diagnostics.xml
    2023-06-28 13:05:46 Start communication line 1 “Modbus”

    2023-06-28 13:05:47 Establish a TCP connection with 192.168.8.1:502
    Error establishing TCP connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.8.1:502

    2023-06-28 13:06:08 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    2023-06-28 13:06:08 Attempt to establish TCP connection can not be earlier than 5 seconds after the previous.

    2023-06-28 13:06:08 Unable to communicate with Device 1 “Velocio_PLC” because connection is not established

    #12905
    scr910
    Participant

    I created a new communication line and it worked, so I am now communicating via the Wi-Fi network. Thanks again for pointing me towards the log Mikhail!

    #12908
    Mikhail
    Moderator

    I’m glad that now it works.
    Thank you for update.

    #12915
    TDE
    Participant

    Hi,
    I’m a new user of Rapid Scada and I’m still curious about this interesting software.
    I have implemented a communication link with the PLC to track the status of the machine via a Modbus TCP connection.
    ================================================
    The communication line parameters are as follows:
    TCP Client
    Host =
    TcpPort = 502
    ReconnectAfter = 5
    StayConnected = True
    Behavior = Master
    ConnMode = Individual
    ==========================================
    When I tried to send values from the PLC to see how the information is coded. The output was as follows:
    The first element group includes 14 elements. I force the values of the first octet = 16 and second octet = 2 inside the PLC holding registers and I can see that FF and 02 refer to this change.

    My question is:
    1- can you please explain to me why it is coded as FF and 02? why not as F and 2.
    2- What does it mean, Send (12), Receive (7/7), and Receive (54/54)
    3- Why the first two values (03 34) does not change? do they have a relation with communication protocol or what?

    ==============================================================================
    2023-06-29 13:54:06 Session with the device [1] modbus_device
    Request element group “HMI”
    Send (12): 85 DD 00 00 00 06 00 03 00 00 00 1A
    Receive (7/7): 85 DD 00 00 00 37 00
    Receive (54/54): 03 34 FF 02 00 00 00 00 01 80 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 0E E1 A0 E0 05 E1 A0 50 04 E5 1A 60 51 E3 A0 06 95 E0 05 BD 98 E5 9F 60 05 E0 8B
    OK
    ==============================================================================

    Thank you for your understanding.

    #12917
    Mikhail
    Moderator

    Hi,

    1 and 3. Decode the packets using https://rapidscada.net/modbus
    When you copy data to the form, split the received data.

    2. Send and Receive are the operations performed by the driver.
    7/7 means that 7 bytes read and 7 bytes required.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.