关于freemodbus中等待超时的参数不解?
KiraVerSace opened this issue · 0 comments
KiraVerSace commented
我这里所说的超时既不是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 就不会出错,请问如何理解这两个时间的差异??