![]() |
紧张的柠檬 · 大模型落地,百度智能云的关键一步|甲子光年_ ...· 1 月前 · |
![]() |
打酱油的小虾米 · webSDK ...· 1 月前 · |
![]() |
求醉的小狗 · 口 内打√,“一键全选” ...· 1 月前 · |
![]() |
个性的树叶 · Java8的NIO新文件I/O到底有多好用? ...· 1 月前 · |
![]() |
俊逸的罐头 · CVE-2023-21839漏洞本地简单复现 ...· 1 月前 · |
![]() |
飞翔的雪糕 · DataIntegrityViolation ...· 1 年前 · |
![]() |
谦和的番茄 · TypeScript中的泛型 - 知乎· 1 年前 · |
![]() |
高大的柳树 · Qt取消graphicsView滚动栏_qg ...· 1 年前 · |
![]() |
有腹肌的竹笋 · vue unable to ...· 1 年前 · |
发布于 2020-05-28 08:35:22
通过将modbus-tk作为
execute
方法的可选参数,可以使用不同类型的数据格式。
# Read and write floats
# master.execute(1, cst.WRITE_MULTIPLE_REGISTERS, starting_address=0, output_value=[3.14], data_format='>f')
# logger.info(master.execute(1, cst.READ_HOLDING_REGISTERS, 0, 2, data_format='>f'))
data_format基于python
struct
模块。这里列出了期望值。
https://docs.python.org/3.7/library/struct.html#format-characters
我希望它能帮上忙
https://stackoverflow.com/questions/60085935
复制相似问题
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2023 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号: 粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287