Page 1 of 1

Serial troubles

Posted: 18 Dec 2023, 19:18
by rob083
Hi,

I'm controlling various drives with a revpi connect as a modbus RTU master (/dev/ttyRS485). I want to connect a HMI using a simple serial connection (/dev/ttyUSB0). when I do this I lose all connections (modbus and serial). Is it possible to use two ports at the same time?

The configuration is the same for modbus and serial (baudrate, bits etc)

Re: Serial troubles

Posted: 19 Dec 2023, 16:04
by u.biakoup
Hello robo83,
Yes, it is generally possible to use multiple serial ports simultaneously on a device, including the Revolution Pi Connect. However, the issue you are facing could be related to how the serial ports are configured or how the communication is being managed in your code.
  • Ensure that the configuration settings (baud rate, data bits, stop bits, etc.) are the same for both the modbus (/dev/ttyRS485) and serial (/dev/ttyUSB0) connections.
    Avoid conflicting configurations that might disrupt communication.
  • Make sure that your code is not opening the serial ports exclusively, preventing other connections from being established. Ensure that the ports are being closed properly after use.
  • Set appropriate timeouts for both serial ports. Too short timeout could lead to communication issues.
Best Regards

Ulrich Kouatang Biakoup | Technical Support