Skip to content
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

Closed
tofublock opened this issue May 31, 2022 · 3 comments
Closed

ModbusTCP timeout settable #892

tofublock opened this issue May 31, 2022 · 3 comments
Milestone

Comments

@tofublock
Copy link

tofublock commented May 31, 2022

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.

@tofublock
Copy link
Author

tofublock commented May 31, 2022

timeout=min((self.aw.qmc.delay/2000), 0.2) # the timeout should not be larger than half of the sampling interval

and
timeout=min((self.aw.qmc.delay/2000), 0.2) # the timeout should not be larger than half of the sampling interval

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

@MAKOMO MAKOMO added this to the v2.6.2 milestone Jun 19, 2022
MAKOMO added a commit that referenced this issue Jun 19, 2022
- adds MODBUS IP timeout and retry parameters (Issue #892)
- fixed autoDROP precision (Issue #859)
- adds Loring CSV importer (Issue #902)
@MAKOMO
Copy link
Member

MAKOMO commented Jun 21, 2022

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?

@tofublock
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants