我正在使用python库最小Modbus读取一个电能表(RS-485)。* functioncode (int): Modbus function code. Can be 3 or 4.instrument = minimalmodbus.Instrument('/dev/ttyUSB1', 7)
#instrument.debug = True #debug modbus
我正在使用以下参数从设备读取和写入寄存器: baudrate - 9600停止位-1 no_of_bits -8奇偶校验 raise IOError('No communication with the instrument (no answer)')我可以使用modbus我也尝试了库modbus_tk,它在这种情况下也失败了。