Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus/TCP problem for connecting with moltiple slave

I'm using Modbus/TCP Driver for communicate with my RTU's with Modbus/TCP. I want to connect with multiple slave(up to 100).

when all of my slaves exist, the drivers in lookout work well with no ploblem. but when one of my slaves if off or disconnect, lookout is disconnected from other slaves randomely.

what is the problem? and what should i do?

0 Kudos
Message 1 of 12
(8,566 Views)

Log the Modbus Ethernet communication. Option->Modbus Ethernet Option, enable it, and input a file path.

The communication on different modbus driver will be logged into different files. After your problem happens next time, give me the log file of disconnected driver, and the one which has problem randomly.

 

I will set up some tests here if this problem is easily reproduced.

Ryan Shi
National Instruments
0 Kudos
Message 2 of 12
(8,552 Views)
Thanks for your interest. I send 2 Log file for you. if i set the Timeout about 1000ms, when the first module is disconnected, the second is disconneted too. but when i set the timeout 3000ms, the second connection is not disconnected, but the connection work slowley. i'm wait for your reply. thanks very much.
0 Kudos
Message 3 of 12
(8,550 Views)

Could you give another log for the "slow" connection with 3000ms timeout?

 

Will the communication resume after you connect that device?

Ryan Shi
National Instruments
0 Kudos
Message 4 of 12
(8,544 Views)

Thanks very much for your interest. I send for you the log files with 3000ms timeout. with 1000ms the connection not resume when i connect the device. i shoude close and open lookout to connection established. i'm wait for your reply. thenk you very much

Download All
0 Kudos
Message 5 of 12
(8,542 Views)

compare these two files, I get some clue.

See that the disconnected driver has open socket error on 13:05:41, 13:05:48 and 13:05:55.

In another file,

2009-01-12 13:05:38 - Modbus_TCP_Istgah3 ->

[00][A7][00][00][00][06][01][03][00][00][00][06]

2009-01-12 13:05:41 - Modbus_TCP_Istgah3 <-

 

2009-01-12 13:05:45 - Modbus_TCP_Istgah3 ->

[00][B9][00][00][00][06][01][03][00][00][00][06]

2009-01-12 13:05:48 - Modbus_TCP_Istgah3 <-

 

2009-01-12 13:05:52 - Modbus_TCP_Istgah3 ->
[00][CB][00][00][00][06][01][03][00][00][00][06]
2009-01-12 13:05:55 - Modbus_TCP_Istgah3 <-

 

The communication is waiting for the "socket" response on the disconnected device. After the disconnected one gets timeout on waiting for socket, the communication on live device restart working.

I will look into it.

Ryan Shi
National Instruments
0 Kudos
Message 6 of 12
(8,539 Views)

thank you for your interest. so, what should i do? i want to connect up to 100 slave to lookout. and at the same time some of these may be disconnected.

by this, the speed of my monitoring software will be very slow. and this is not good!!.

0 Kudos
Message 7 of 12
(8,537 Views)

I checked the source code, but don't have much idea.

 

How many slaves have you already connected? I tried several slaves but could not reproduce.

 

The modbus driver skips every 4 poll after comm failure by default. You can set it in Modbus property->Advanced. Set it to 20 for example, let's see if the speed will improve. We can check if it is the retry that slows down the communication.

 

As I mentioned in last post, the modbus driver took 3 seconds to response. It is equal to the timeout you set. And it just happened when the disconnected modbus driver retried. Maybe it's not coincidence. Could you set the timeout to 5 seconds and log the communication again? I'd like to see if the response will take 5 seconds then.

Ryan Shi
National Instruments
0 Kudos
Message 8 of 12
(8,511 Views)

Thank you for your intereset. i send log files with 5000ms timeout for you. when i disconnect a slave, i unpluge it's cable. so it can not disturb another communication!!

i set the modbus skip 20 and 100 poll after failure, but only effect is that take longer time to disconnect another slave, but stil disconnect. now i test system with 2 slave. but i want to connect up to 100 slave to my network. i'm wait for your reply. thanks

 

 

0 Kudos
Message 9 of 12
(8,508 Views)

Thank you. So, you can reproduce the problem with just two modbus slaves? I'm doing some tests but don't have the problem here when one slave disconnected.

Could you give me you test process file? If I can reproduce it, it will be easier to debug.

Till now, I don't have idea about why the good modbus slave takes 3 seconds to response when the bad one retries. It doesn't make sense.

By the way, do you use ethernet/serial modbus converter?

Ryan Shi
National Instruments
0 Kudos
Message 10 of 12
(8,485 Views)