FreeModbus_Slave-Master-RTT-STM32 icon indicating copy to clipboard operation
FreeModbus_Slave-Master-RTT-STM32 copied to clipboard

Add master mode to FreeModbus. | 在 FreeModbus 中添加主机模式

Results 35 FreeModbus_Slave-Master-RTT-STM32 issues
Sort by recently updated
recently updated
newest added

原代码如下: vMBMasterPortSerialEnable( TRUE, FALSE ); eSndState = STATE_M_TX_XFWR; 这种情况会在接收函数xMBMasterRTUReceiveFSM()触发断言 RT_ASSERT(( eSndState == STATE_M_TX_IDLE ) || ( eSndState == STATE_M_TX_XFWR )); 修改如下解决: eSndState = STATE_M_TX_XFWR; vMBMasterPortSerialEnable( TRUE, FALSE ); //eSndState =...

### 库版本:2020-5-11版 错误提出: 1. vMBMasterCBRequestScuuess函数单词错误success 2. mb_m.c中没有实现eMBMasterRegisterCB函数 疑问: 1. 根据Modbus协议规范,主机广播后,从机不用应答; 而在eMBMasterPoll函数中的case EV_MASTER_EXECUTE分支中为何检测到主机为广播时,要为所有从机地址执行(对应功能码的注册函数)? 2. vMBMasterSetCBRunInMasterMode和xMBMasterGetCBRunInMasterMode是否仅用于如下情况: 同一功能码对应的同一处理函数被同时注册到了主机库和从机库中,在执行该注册函数时,需要判断主调者的(主机/从机)身份? 3. xMBMasterRunResTake和xMBMasterRunResRlease函数使用了Semaphore机制,是否仅用于如下情况: 在多个任务同时使用Modbus-Master库时,实现该库资源的锁,保证同一时刻仅有一个任务可以使用Master库 建议: 1. 应该很少能遇到同一终端同时使用Master和Slave模式吧,是否可以将Master和Slave库分成两个独立的库,这样使用和分析时都更简洁 2. 我看该版本库使用STM3210x单片机; STM32的UART_Rx_DMA有Idle中断,可以直接接收不定长bytes,同时STM32有UART_Tx_DMA. 因此(xMBMasterPortSerialPutByte/GetByte, xMBRTUReceiveFSM/TransmitFSM状态机)都可不用. 将UART_Tx_DMA和UART_Rx_DMA的buffer都指向ucRTUBuf帧缓冲后. 使能Tx_DMA即可发出帧. 在Rx_DMA中断中发出EV_MASTER_FRAME_RECEIVED事件,就可去驱动eMBMasterPoll处理接收到的帧 [email protected]...

Next modbus ops may failed if we received some data before operation starting. Signed-off-by: Xia Haiqiang

Master模式下,接收缓冲区的索引在“接收到第一个字节”时重置修改为“开启发送”时重置

Does anybody have tcp port for master? Because I want to try modbus with lwip,.... slave is working, and master not.

I want to transplant the modbus host to my project, but I can't some of the defines ,like "eMBException"、"MB_EX_ILLEGAL_FUNCTION"、"MB_PDU_DATA_OFF"……

Hi. How are you? It’s me again!!! In slave mode implementation, I want to define 10 registers in the program, so master reads the registers. The registers are not constant,...

Hi Thanks for your open source code. That’s very helpful. I want to use Modbus/slave (ASCII and RTU) on STM32f103VET6. Actually, I’m new to ARM, and really confused. There is...