logo Welcome, Guest. Please Login or Register.
September 25, 2017, 12:28:01 AM
Home Help Search Login Register
 News: You can search the forum for answers to your question in a previous discussion. Please click on the "Search" button above and enter the keyword to search. To get to the full discussion of a listed message, please click on the TITLE of the message listed in the search listing.

  Internet PLC Forum
  General
  Frequently Asked Questions
(Moderator: support)
  Nano Client over few servers
? previous next ?
Pages: [1] Go Down Reply Notify of replies Send the topic Print
   Author  Topic: Nano Client over few servers  (Read 2738 times)
acxysty
Newbie
*

Posts: 28



I'm a llama!

View Profile
Nano Client over few servers
« on: May 07, 2014, 03:26:30 AM »
Reply with quote

Dear all

We are using Nano as client Modbus/TCP and we would like to communicate with several servers without opening and closing the sockets.
Is there a way to do that ?
Regards
TY
Report to moderator   Logged
support
Global Moderator
*****

Posts: 3040





View Profile WWW E-Mail
Re:Nano Client over few servers
« Reply #1 on: May 07, 2014, 03:09:13 PM »
Reply with quote

Since the Nano-10 only has one socket to act as client you do have to close any existing connection before you can open a connection to another server. However, the socket on the Nano-10 allow you to reuse the socket immediately after it has been closed on one server and use it to connect to another server. So there is not too much latency to switch from one server to another especially if it is over a local area network.
Report to moderator   Logged

Email: support@triplc.com
Tel: 1-877-TRI-PLCS
acxysty
Newbie
*

Posts: 28



I'm a llama!

View Profile
Re:Nano Client over few servers
« Reply #2 on: May 08, 2014, 04:53:22 AM »
Reply with quote

Thank you for your answer.  It works fine the way you describe and we use it a lot.

However we never get the Status(3) flag changing according to connect or non-connect.

Any idea why ?

Regards
Report to moderator   Logged
support
Global Moderator
*****

Posts: 3040





View Profile WWW E-Mail
Re:Nano Client over few servers
« Reply #3 on: May 08, 2014, 02:46:11 PM »
Reply with quote

The STATUS(3) will return a 1 when a connection has been made. So if the network is busy or network latency is high it may take a little longer to return a 1. You should wait for  STATUS(3) to return a 1 before sending READMODBUS/WRITEMODBUS etc commands.

When you close a socket, there is a bit of house keeping that the network stack need to do to fully close the socket. Only when the socket is fully closed then STATUS(3) returns a zero.

If you do a round-robin connection to each slave quickly then managing the network connection and disconnection is important, otherwise you may encounter situation where the next connection will fail because the last connection is still open.

Attached sample program "ModbusTCPTest.PC6" file is a good example to follow to prevent your program from getting stuck in inability to close a previous connection properly before making a new connection.
 ModbusTCPTest.PC6
Report to moderator   Logged

Email: support@triplc.com
Tel: 1-877-TRI-PLCS
acxysty
Newbie
*

Posts: 28



I'm a llama!

View Profile
Re:Nano Client over few servers
« Reply #4 on: May 14, 2014, 04:25:08 AM »
Reply with quote

It works now.
Thank you
Regards
Report to moderator   Logged
sebraun
Newbie
*

Posts: 4



Nothing so needs reforming as other peoples habits

View Profile
Re:Nano Client over few servers
« Reply #5 on: June 16, 2015, 11:09:53 AM »
Reply with quote

I would like to resurrect this issue.  Using the Nano with Modbus TCP servers, specifically the ADAM 6051 and a Acromag analog input module: how quickly can the TCP connection be opened and closed?  I need to sample an analog input every second and I need another two digital modules on the network as well that are not time critical.  Currently, my testing with just the Acromag indicates that this is not going to happen.  How do I manage higher speeds on local but remote IO networks? 
Report to moderator   Logged
support
Global Moderator
*****

Posts: 3040





View Profile WWW E-Mail
Re:Nano Client over few servers
« Reply #6 on: June 16, 2015, 12:04:39 PM »
Reply with quote

We have previously did a round-robbin test of a network of several PLCs where a Nano-10  open a connection, send a command and receive data, close the connection and move on to the next Modbus/TCP server within a fraction of a second. We did not specifically measure the time it takes but I believe it is possible to complete a cycle of five network controllers within less than 1 second.
Report to moderator   Logged

Email: support@triplc.com
Tel: 1-877-TRI-PLCS
sebraun
Newbie
*

Posts: 4



Nothing so needs reforming as other peoples habits

View Profile
Re:Nano Client over few servers
« Reply #7 on: June 16, 2015, 12:07:37 PM »
Reply with quote

OK...I'll setup today and give it a go. 

Tnx....S
Report to moderator   Logged
Pages: [1] Go Up Reply Notify of replies Send the topic Print 
? previous next ?
Jump to: 


Login with username, password and session length

Powered by MySQL Powered by PHP Internet PLC Forum | Powered by YaBB SE
© 2001-2004, YaBB SE Dev Team. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!