| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/09/2009 17:55:46
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
I'm having trouble with modbus requests not timing in the amount of time specified by the timeout field on the modbus data source vo.
It seems they are taking about 20 minutes to time out. In this case I can ping the modbus slave but it is probably locked up or has a 'hung connection' as I can't telnet to port 502 on it and it reports that the modbus socket is connected. the plc modbus socket should have a timeout as well, but in this case it is set to infinity.
A side effect is that I can not disable the modbus data source or say edit the timeout and retries until timeout exception occurs.
It looks like it is up to the senderConnection class to initiate the timeouts. I am unable to capture the traffic at this point as the PLC is on a remote unmanaged switch.
The line at which it hangs appears to be the socket constructor although my modbus4j code seems to be out of step with the jar.
This message was edited 4 times. Last update was at 22/09/2009 18:15:11
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/09/2009 18:11:19
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
This is an IP data source? What are the settings, i.e. timeout, retries, connection type, ...
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/09/2009 18:24:20
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
poll frequency is 10s
timeout is 1s
retries is 2
datasource is modbus TCP, with keepalive.
The data source was disabled, then I enable it:
once it has gone through the retries=2 in establishing the socket, which takes several minutes, mango set datasource to enabled.
It is now throwing not initialized exception at every poll. It doesn't try to initialize the data source again.
This message was edited 1 time. Last update was at 22/09/2009 18:25:20
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/09/2009 20:50:57
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
Good point. I added a connection timeout in the Modbus4J implementation. the new jar will ship with the next version of Mango.
|
Best regards,
Matthew Lohbihler |
|
|
 |
|
|
|
|