> Now, I need something to comunicate by rs422 and rs485 modbus rtu too.
> QextSerialPort can do this?
> Do you have any examples about this?
>
speaking from my experiences with RS4xx on embedded Linux 2.6 systems
(which may not be valid in general), there's no rs4xx flag in the
standard kernel interface. This means there's no canonical way to
configure RS4xx mode for a serial device, and QextSerialPort can't
support an interface to this feature because it depends on how the
serial driver you use handles this.
However, once you've set the RS4xx mode for your serial device it should
be transparent to QextSerialPort and I would expect that you will be
able to use the classes as usual, but perhaps some advanced features
won't work due to driver limitations. YMMV, so try yourself. Good luck!
Martin
> Do you know something about using QextSerialPort in rs485 or rs422
> mode on Windows - mingw system?
sorry, I've never developed in a MinGW environment. My best guess is
that, being a gcc/glibc environment on top of a Windows OS, you'll have
to use the Windows specific interface to the driver. Perhaps looking
into the QextSerialPort sources could make this clearer, and there
should be more knowledgable people on this list that can answer this.
> I need to read a ModBus RTU instrument (rs485) and some other
> instrument by rs422. It is possible by QextSerialPort? I saw an old
> forum on QtCenter but there are no sample to learn how do this :(
I can give you a hint what I would try in this case:
1. Make sure the serial controller/UART you're using on your
workstation supports RS422/485 at all. Try connecting to/reading
from the instruments from console, e. g. using TeraTerm, and
setting RS4xx mode by the frontend that should be part of the
Windows driver of that specific controller.
2. If it doesn't you'll need a RS232-to-422/485 converter like an
ADAM-4520, and in this case you'll be using the serial port as usual.
3. If it does, find out how to change to RS4xx mode using the
driver's API.
4. In your application, set the RS4xx mode and use QextSerialPort to
establish a connection to your instrument(s) and communicate with
them.
HTH.
Martin