|
|
有爱心的显示器 · 【黄亲国麒】黄麒Eros20240508个播 ...· 2 年前 · |
|
|
小胡子的小马驹 · 曲靖市安全生产委员会办公室关于开展师宗县玉术 ...· 2 年前 · |
|
|
闷骚的树叶 · Vue.js | ...· 2 年前 · |
|
|
爱逃课的剪刀 · 凯文-加内特的球衣退役仪式上 ...· 3 年前 · |
|
|
从未表白的茄子 · Amazon QuickSight 推出与 ...· 3 年前 · |
发布于 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