modbus_new_rtu()
时间: 2023-09-10 13:04:37 浏览: 222
modbus_new_rtu()是一个函数,其作用是创建一个用于RTU通信的modbus_t结构体指针。它的参数包括串口设备文件名、波特率、校验位、数据位和停止位等。通常,你需要在调用modbus_new_rtu()函数之后设置其他的modbus参数,并使用modbus_connect()函数来建立与设备的连接。最后,使用modbus_close()和modbus_free()函数来关闭连接并释放资源。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Modbus学习记录(3)](https://blog.csdn.net/weixin_53811793/article/details/123495984)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [总线/通信笔记1 —— libmdbus库中文说明](https://blog.csdn.net/weixin_43455581/article/details/95073560)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文