Menu

Communication Delay With S7-400 partner

2024-04-22
2024-05-26
  • Cezar Suteu

    Cezar Suteu - 2024-04-22

    Dear All,

    I'm using the snap7 python library to communicate with a S7-300 PN CPU ( rack 0, slot3). My PC system consists of 2 servers PC that each open about 4 S7 client objects (total 8 clients). Out of these, 6 are reading data and 2 are writing data. I'm using synchronous read functions since each client object is in its own process. I'm using the Cli_DBRead every 250ms to poll a "request telegram" and the Cli_DBWrite to write a "response telegram". My process is time sensitive so I'm reading as fast as possible and responing once which the PLC should see as soon as possible.

    From the PC timestamps (the moments db_read and db_write finish) the backend takes between 100 to 500ms. But from the PLC perspective (i'm using internal data structures that measure the PLC CPU time) the roundtrip is sometimes quite big. Between 200 - 3000 ms.

    Where can the variance come from? There is only one instantiation of Cli_Create which remains connected for signifficant periods of time. In the network topology there is at least one L3 router that forwards traffic from back end network to the PLC.

    Average ping time is < 1 ms.
    Regards,
    Cezar Suteu

     
  • Cezar Suteu

    Cezar Suteu - 2024-05-26

    For anyone interested, there isn't any issue with the library. In my measured roundtrip I had overlooked some delays. Getting robust communication!

     

Log in to post a comment.

MongoDB Logo MongoDB