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

The set response timeout is 200ms, but the actual time is 400ms #608

Open
teaczjf opened this issue Nov 26, 2021 · 2 comments
Open

The set response timeout is 200ms, but the actual time is 400ms #608

teaczjf opened this issue Nov 26, 2021 · 2 comments

Comments

@teaczjf
Copy link

teaczjf commented Nov 26, 2021

hi!
i set the timeout
modbus_set_response_timeout(pObj->m_modbus, 0,200* 1000); //timeout=200ms
but the result turn out is 400ms

this is my code

LOG(WARNING) << "#######################开始读取"<< "modbusid_cur= " << modbusid_cur;
ret = modbus_read_registers(pObj->m_modbus, item->second.address(), 8, checkbuff);
LOG(WARNING) << "#######################结束读取" << "modbusid_cur= " << modbusid_cur ;

this is my log

2021-11-26 10:39:45,317 #######################开始读取modbusid_cur= 2 slave_id_cur= 2
2021-11-26 10:39:47,719 #######################结束读取modbusid_cur= 2 slave_id_cur= 2

libmodbus version

<#define LIBMODBUS_VERSION 3.1.6>

OS and/or distribution

< Linux>

Environment

<e.g. CPU architecture,64 bit...>

Description

<The set response timeout is 200ms, but the actual time is 400ms>

@Jasper-Bai
Copy link

same problem for me. have u solved it ? could u tell me?

@teaczjf
Copy link
Author

teaczjf commented Nov 9, 2022 via email

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

No branches or pull requests

2 participants