adccommunitymod (AutomationDirect) asked a question.

Modbus timeout

Created Date: November 09,2006

Created By: MKL2

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I connect to a DL-06 with ecom100 module and after 5 seconds of connection it just disconnect independent of the setting in netedit, i use the newest firmware, is this a bug or normal behaviour?


  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: jackson

    Connect what to the ECOM100? What disconnects? DirectSoft? Modbus TCP Client? MOdbus TCP Server?

    Try a simulator tool that runs on a PC. www.modbustools.com has both a Modbus TCP client and a Modbus TCP server simulator. They have demo versions that will run for a few minutes.

  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: MKL2

    This is a modbus client written in visual basic bij a softwarecompany, and we see after every 5 seconds he just disconnect from the plc.

  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: jackson

    What do you mean by 'disconnect '? TCP connection is reset? Do you get an exception before this happens? Do you see an actual Modbus Query go out? Do you see a Modbus reply?

    Did you try using the suggested Modbus simulator?

    Please provide more information.

  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: MKL2

    Yes we used the kepserver with OPC client, but then we cannot see if it is disconnected, and then there's no problem it keeps al the data up to date. but we were wondering is there a standard timeout for modbus? what i mean: i connect to modbus and just read a value and then nothing after that. so not like kepserver is doing poll it. will it then be disconnected after a time? so yes where can i set the time? regards MKL

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: jackson

    It's not uncommon for a TCP server to reset it's connection after a certain amount of idle time but it certainly shouldn't occur after 5 seconds.

    If I wait 10 seconds between polls, I don't see the ECOM100 reset it's connection.

    I believe that the ECOM100 resets it's TCP connection after 1 minute.

    It is usually common practice for a TCP client to check it's connection before sending a request.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: MKL2

    Is the time before the ecom reset the tcp connection configurable in the ecom100?

  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2006

    Created by: jackson

    Not that I know of but maybe one of the HOST guys will see this and chime in.

    Is it not easier to just poll it every few seconds?

  • adccommunitymod (AutomationDirect)

    Created Date: November 16,2006

    Created by: GKiser

    I do not believe the ECOM100 will reset its TCP connections on its own. I believe it might seek to close an open TCP connection that is left open (i.e. by sending a FIN,ACK to the client periodically). However, I'll check with the firmware engineers and make sure. TBA... later

    Greg Kiser

    Host Engineering, Inc.

    support@hosteng.com

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 28,2006

    Created by: GKiser

    As it turns out, the TCP stack we are using in the ECOM100 does have a couple of timeouts depending on the the state of a TCP connection. However, there is nothing in the code that will close a TCP connection that has already been established. The 2 timeouts are:

    (1) TCP FIN WAIT TIMEOUT (20 seconds): This timeout is for when the ECOM100 has been asked to close a TCP connection (FIN) which he FIN,ACKs, and waits for an ACK from the client. If he doesn't get an ACK response from the client, he will wait 20 seconds and FIN,ACK again, requesting for the closure to be complete.

    (2) TCP SYN RCVD TIMEOUT (20 seconds): This timeout is for when the ECOM100 has been asked to open a TCP connection (SYN) which he SYN,ACKs, and waits for an ACK from the client. If he doesn't get an ACK response from the client, he will wait 20 seconds and SYN,ACK again, requesting for the official opening of the TCP connection to be complete.

    But these timeouts are not user configurable.

    Greg Kiser

    Host Engineering, Inc.

    support@hosteng.com

    (Case 654)

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 09,2006

    Created by: MKL2

    I connect to a DL-06 with ecom100 module and after 5 seconds of connection it just disconnect independent of the setting in netedit, i use the newest firmware, is this a bug or normal behaviour?