我试图使用异步modbus服务器来传输多个数据值,但我只是看到零。 请帮忙。 我的代码基于
#!/usr/bin/env python
'''
# Pymodbus Asynchronous Server Example
#----------------------------------------------------------------------#----
#The asynchronous server is a high performance implementation using the
#twisted library as its backend. This allows it to scale to many #thousands
#of nodes which can be helpful for testing monitoring software.
'''
#---------------------------------------------------------------------------#
# import the various server implementations
#---------------------------------------------------------------------------#
from pymodbus.server.async import StartTcpServer
from pymodbus.server.async import StartUdpServer
from pymodbus.server.async import StartSerialServer
from pymodbus.device import ModbusDeviceIdentification
from pymodbus.datastore import ModbusSequentialDataBlock
from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext
from pymodbus.transaction import ModbusRtuFramer, ModbusAsciiFramer
#---------------------------------------------------------------------------#
# configure the service logging
#-----------------------------------------------------
在尝试建立一个异步Modbus TCP服务器以传输多个数据值时,遇到问题,服务器无响应,只返回零。代码基于Pymodbus库,通过Twisted库作为后端实现高并发。配置了不同单元ID的Modbus奴隶上下文,但遇到了堆栈内存溢出错误。
最低0.47元/天 解锁文章

2602

被折叠的 条评论
为什么被折叠?



