mecb07 (Customer) asked a question.

Communication Modbus TCP and Modbus RTU between two devices at the same time

Hello everyone, a pleasure to greet you. My name is Manuel and I am currently working with the P1AM-100 arduino based PLC. My application consists of controlling 16 slave devices (servers) under the modbus TCP protocol. Since the P1AM-Eth has a w5500 board, it only lets me control 8 sockets. Observing this problem, I opted to use another PLC so that one PLC controls 8 slaves and another PLC controls the remaining 8 slaves. To communicate between PLC1 and PLC2, I chose to buy serial modules in order to establish a mosbus RTU communication between PLC1 and PLC2. When I make this communication, I am presented with too high a delay in the communication. I was wondering if it was possible to carry out this communication or if someone could help me how to control the 16 slave devices. Beforehand thank you very much. Pdta. I also used serial communication to communicate between PLC1 and PLC2, but by enabling Modbus TCP communication, the port is not able to open.

 

used library

ArudinoModbus.h

ArduinoRS485.h

ethernet.h

P1AM_Serial.h


  • FACTS_AdamC (AutomationDirect)

    Hey @mecb07 (Customer)​ ,

     

    How high is the delay you're seeing?

    Are the comms functional, but just slow?

    Are you using 485 or 232 on the serial comms and at what baud rate?

  • mecb07 (Customer)

    Hello @FACTS_AdamC (AutomationDirect)​, thanks for your prompt response. Answering your questions:

     

    1. The current delay is approx 2 seconds.
    2. Communications work perfectly but the delay is the delay
    3. I use communication RS485 serial to 9600 baud rate. When I change the baud rate, the connection is not made

    Attached codes used

     

     

    Expand Post
    • FACTS_AdamC (AutomationDirect)

      I would recommend reducing your code on both P1AM systems to just the serial to try and determine if that is the source of the delay.

       

      Could you post the code for the second P1AM as well - the one acting as the serial server?