Seems, this:

> qt.modbus: (RTU server) QSerialPort error: QSerialPort::SerialPortError(ResourceError) "Операция ввода/вывода была прервана из-за завершения потока команд или по запросу приложения."

It is an 'ERROR_OPERATION_ABORTED', that can be caused by ::CancelIo() (e.g. when the serial port closes) or by a HW problems.

BR,

Denis


31.05.2016 12:23, Dmitry Shapovalov пишет:
Thanks for reply Ralf. Email more preferable for me.

Can you tell me what type of adapter you are using? Which version of qtserialport are you using? Maybe my problem is related to the type of serial port adapter. I tried use arduino with different usb-uart chips(ch430 and pl2303), but unsuccessfully.

Here is output of qt modbus master example

Запускается C:\Qt\Examples\Qt-5.6\qtserialbus\serialbus\modbus\build-master-Desktop_Qt_5_6_0_MinGW_32bit-Debug\debug\modbusmaster.exe...
qt.modbus: (RTU client) Sent Serial PDU: 0x0400000001
qt.modbus.lowlevel: (RTU client) Sent Serial ADU: 0x01040000000131ca
qt.modbus: (RTU client) Send failed: 0x0400000001
qt.modbus: (RTU server) QSerialPort error: QSerialPort::SerialPortError(ResourceError) "Операция ввода/вывода была прервана из-за завершения потока команд или по запросу приложения."
qt.modbus.lowlevel: (RTU client) Response buffer: "01"
qt.modbus: (RTU client) Modbus ADU not complete
qt.modbus.lowlevel: (RTU client) Response buffer: "0104024c494c06"
qt.modbus: (RTU client) Received ADU: "0104024c494c06"
qt.modbus: (RTU client) Cannot match response with open request, ignoring

Look like it actually sends request, but qtserialport reports error, so qtserialbus(modbus) ignores response.


2016-05-31 11:59 GMT+05:00 Ralf Nolden <[email protected] <mailto:[email protected]>>:

    Am Dienstag, 31. Mai 2016, 09:34:19 schrieb Dmitry Shapovalov:
    > Hello,
    > can someone confirm that modbus over serial port is working on
    windows ?
    I have tested modbus over serial port on windows with two
    Schneider Electric
    PLCs, a Twido and a Premium, both with TCP and RS485. We could
    evaluate your
    problems on IRC if you want.


    > all my experiments led me to the thought that it is absolutely
    broken.
    > i am using arduno as a modbus device. i tested it with qmodbus
    and modbus
    > poll. works great. but when i try to use modbus examples from
    > qt(qtserialbus/examples/serialbus/modbus/master), look like it
    can not send
    > request.
    > i tried release(5.6) and git version of qtserialbus and qtserialport
    > modules with no luck.
    >
    > i am using windows 7 on virtualbox.
    > arduino modbus library from here
    > https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino
    > arduino sketch http://pastebin.com/FHW3B7TX
    >
    > it's me or it's really broken ?

    --
    Kind regards,

    Ralf Nolden

    _______________________________________________
    Development mailing list
    [email protected] <mailto:[email protected]>
    http://lists.qt-project.org/mailman/listinfo/development




--
--
With Best Regards
Dmitry Shapovalov


_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to