Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there constraints on a serial port with more than 6 devices connected?

I have a project that uses Rocketport Infinity 16 ports to receive data from 6 different anemometers (wind speed measurement devices) (RS422, 50Hz, 38.4k baud, 47 bytes per record). When I use 32Hz and 9600 baud, everything is alright, however, when I change to 50Hz, some of the data isn't received. I tried to use USB instead of the Rocketport Infinity with no luck.

So, apart from the anemometer failing, I suspect the following explanations for the data loss:

  1. For the Rocketport Infinity, I opened all 16 ports, but only connected 6 of them, I suspect the maximum data throughput is to high when I switch to 50Hz.

  2. The IRQ switch speed is too high for the com port to operate properly.

Is there any other possible reason? Please correct me if I'm mistaken.

Development environment of Receiver : Delphi 6 in Windows XP Professional 32-bit version, with CPort 3.1

like image 500
ykc Avatar asked Oct 24 '22 20:10

ykc


2 Answers

The IRQ rate isn't that high and modern machines should have no trouble keeping up with it. I suspect the real problem is your app not processing the received bytes fast enough. Especially when your code also updates a UI in the same thread that receives the data.

Hard to give specific troubleshooting hints because you neither specify a language nor an operating system. But be sure to get your error handling correct. Distinguish between a buffer overflow (app not reading fast enough) and a character buffer overrun (driver not reading fast enough). On Windows that's CE_RXOVER and CE_OVERRUN.

like image 119
Hans Passant Avatar answered Oct 29 '22 20:10

Hans Passant


Are there constraints on a serial port with more than 6 devices connected?

Yes, there are constrains. I assume that you have differential outputs and an I/O receiver with differential inputs. Please, see Balanced differential signals. It is possible that the maximum voltage ratings of the receiver circuits are exceeded.

Each port speed must match corresponding device speed. Please, see other criterias which must be matched.

The IRQ switch speed is too high for the com port to operate properly.

Why do you assume that it would be a problem with your IRQ switch speed? - I would say that you have only scarce IRQ resources.

like image 24
Léo Léopold Hertz 준영 Avatar answered Oct 29 '22 22:10

Léo Léopold Hertz 준영