-
Hi, my target are ~ 30 Registers, but I started with just a few. Even with more than ~8 Registers I run into Connection timed out.
Is this correct? What can I do else? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
Options array should be created like that $client = new NonBlockingClient([
'readTimeoutSec' => 1.5, // timeout when waiting response from server
'connectTimeoutSec' => 1.5, // timeout when establishing connection to the server
]);
$responseContainer = ($client)->sendRequests($fc3); How many requests are sent? I recommend trying to send same requests (same start addres + quantity + ip + unitID) with https://www.modbusdriver.com/modpoll.html and see how it behaves. It could be that your devices behaves. |
Beta Was this translation helpful? Give feedback.
-
thank you, now the paramter works! :) Good hint with the count: It seems to me, that my device answers really quick up to 4 requests (even w/o increasing the timeout value). with a 5th I get a connect timeout (even with 10sec timeout) How are the requests are build? Can I control the count of addresse per request? |
Beta Was this translation helpful? Give feedback.
-
Ok, good informantion. I just request 1 IP+ID: I've a gap beween almost any address. In any case it's not much data at all, but spreaded... Just for an impression for you: e.g. 14 Addresse (each 4Bytes) lead to 5 requests... which seems to be a magic limit of my device.
Even with sortingen I may have to split it up into chunks and request them seperatly. Trying serial. My target was just one call per IP+ID with many requests but maybe it's not possible that way. |
Beta Was this translation helpful? Give feedback.
-
I solved it by now with chunks - even with timeout-limit = 0.5... as long as I stay below request_max = 5:
I would appreciate to get answers to my message before anyway. Maybe there are better options for device specific request restrictions... :) |
Beta Was this translation helpful? Give feedback.
-
ok. Understood. Thank you. Maybe it makes sense to implement the request sorting (to keep request count as small as possible) and the chunks into the library? But maybe that would be more handsome and an inprovement for "Register-Junkies"... |
Beta Was this translation helpful? Give feedback.
Options array should be created like that
How many requests are sent?
$x = count($fc3);
are all sent to same IP, same unitID?I recommend trying to send same requests (same start addres + quantity + ip + unitID) with https://www.modbusdriver.com/modpoll.html and see how it behaves. It could be that your devices behaves.