Взял рту запрос с BaseBlock ComTest
Скорость конфигуратором поменял на 115200
Код:import serial ser = serial.Serial(None, 115200, timeout=1, rtscts=True) ser.port='COM5' print ser, ser.dtr, ser.rts #ser.write(':100300010001D68B\r\n') ser.open() ser.read() ser.write('\x10\x03\x00\x00\x00\x06\xC6\x89') print repr(ser.read(1000)) # Read 1000 bytes, or wait for timeout ser.close()Код:C:\Python27\python.exe C:/Users/Danil/PycharmProjects/modbus/serialtest.py Serial<id=0x2ace0b0, open=False>(port='COM5', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1, xonxoff=False, rtscts=True, dsrdtr=False) True True '' Process finished with exit code 0




Ответить с цитированием
