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

关于freemodbus中等待超时的参数不解? #4

Open
KiraVerSace opened this issue Nov 27, 2019 · 0 comments
Open

关于freemodbus中等待超时的参数不解? #4

KiraVerSace opened this issue Nov 27, 2019 · 0 comments

Comments

@KiraVerSace
Copy link

我这里所说的超时既不是T35也不是T15,而是从机超时应答的等待时间,可以看到协议栈中有两个这样的参数,不是很理解这两个参数的区别?比如说 读保持寄存器函数
eMBMasterReqErrCode eMBMasterReqWriteHoldingRegister( UCHAR ucSndAddr, USHORT usRegAddr, USHORT usRegData, LONG lTimeOut );
这里最后一个设置为 RT_WAITING_FOEVER,经常会接收错误,但是如果我修改了宏定义中的freemodbus/modbus/include/mbconfig.h中的
`/*! \brief If master send a frame which is not broadcast,the master will wait sometime for slave.

  • And if slave is not respond in this time,the master will process this timeout error.
  • Then master can send other frame */
    #define MB_MASTER_TIMEOUT_MS_RESPOND (100 )
    `
    把100改到1000 就不会出错,请问如何理解这两个时间的差异??
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

1 participant