-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModbusTCP timeout settable #892
Comments
artisan/src/artisanlib/modbusport.py Line 269 in 075b54c
and artisan/src/artisanlib/modbusport.py Line 287 in 075b54c
would both just need to be changed to timeout=min((self.aw.qmc.delay/2000), self.timeout) # the timeout should not be larger than half of the sampling interval
|
Added an explicit MODBUS IP (TCP/UDP) timeout (and retry) parameter to the MODBUS tab for a cleaner solution to reusing the MODBUS serial timeout. Will close your PR as well. Does this work for you? |
That's an even better solution, of course. Thank you. I can't test it at the moment but will get back to you once I can. |
I'm implementing a client device for Artisan as a ModbusTCP slave and sometimes my device doesn't respond quite fast enough for Artisan, as its read timeout is fixed to be min(0.2s, samplingtime/2) - so basically always 200ms. Setting the timeout to something like 0.5s fixes this problem for me and communication works well with fewer interruptions.
Allowing the timeout for ModbusTCP to be set from the "Config>Port" dialog would fully solve my problem. The timeout field that is there is currently only used for SerialModbus connections, but could be used for the same purpose without the need to change anything else.
The text was updated successfully, but these errors were encountered: