Menu

Connection reset by Peer

Velkumar
2016-11-12
2016-12-01
  • Velkumar

    Velkumar - 2016-11-12

    Hi,

    I have Logo 8 PLC and made connection with cilentdemo.exe. The problem is initially I can read my Logo DB data. After some time application throws error as Connection Reset by peers. So I need to reset my connection with PLC to read data. Help me to fix this. Thanks in advance.

     

    Last edit: Velkumar 2016-11-12
  • Davide Nardella

    Davide Nardella - 2016-11-12

    The LOGO has not a Communication Processor, everything is managed by the (small) CPU.
    The communication is quite instable with this object.
    Last day we restarted a plant for electrical maintenance, after a year of h24/7 our server reported 0 comm. errors (S7315 2PN/DP CPU).
    You should adopt the HMI philosophy: close and reopen the communication after an error, there is no other way.

     
  • Dima Kosiachenko

    Hm it is little different. Logo 8 sends exactly after 10 seconds TCP RESET , if in these 10 seconds no information was sent or recieved. That mean you should only send continuation data every 8-9 seconds. I use Java and Moka7, in Java there is a method for Socket Object - sendUrgentData(int Data). I use this method in extra thread and i have a stabile connection with Logo8.

    On the screenshot you can see that time difference between packet number 103 and number 120(TCP RESET ) is 10 seconds.
    I think this little improvement should be added in next version of Moka7,just as suggestion.

     

    Last edit: Dima Kosiachenko 2016-11-15
  • Davide Nardella

    Davide Nardella - 2016-11-15

    Seems that LOGO (at least the last one 8) acts like some Modbus slaves, resets the connection if there is no network usage after a timeout.

    IMHO you have 3 ways:
    1) Send urgent data as you are doing.
    2) Read DB1.DBB0 in another thread after a timeout of 5 sec.but remember to semaphorize the client.
    3) Close the connection after a transacion and reopen it before the next, but this slows the overall time of the communication.

     
  • Dima Kosiachenko

    Yes , if you continiusly communicate with Logo with ReadArea or WriteArea then you dont need sendUrgentData() method at all.

     
  • Rahul Harmalkar

    Rahul Harmalkar - 2016-11-30

    Hello sir,
    After i connect and disconnect to logo once, if i try to connect to it again it says TCP Connection timed out in VB.net
    Cant seem to know where im wrong. if its connecting once and then disconnecting also properly why isnt it connecting again?
    kindly help, Thank you

     
  • Dima Kosiachenko

    Hello ,if you ask me :). I have no expirience with VB.Net only with VBA. But if you poste your connect method here , maybe we can find the solution.

     

    Last edit: Dima Kosiachenko 2016-12-01

Log in to post a comment.

MongoDB Logo MongoDB