Trying to get data from two rs232 to single rs232 port

241 Views Asked by At

I'm doing a barcode project, The system is having only on single rs232 port only. I have two scanners where the data has to be sent to that one single port of the system.

A-scanner (Output) B-scanner (Output) c-system port (input)

the simultaneous data is not required here. but when the data is received from the scanner, it should sent to input of the system.

Tried in many ways.

But exhausted.

I had tried giving ATX-BRX BTX-CRX CTX-ARX.

In this only one scanner(A scanner) is able to transfer the data.

I expecting a solution for transferring data from two scanner to on single port of rs232.

2

There are 2 best solutions below

1
Oliver Heggelbacher On

It is possible to combine data from two RS232 devices to one physical RS232 port on the computer side.

How it works: Use a modified version of what the great Lammert Bies once described here as Half duplex RS232 spy / monitor / sniffer cable

I made a modified drawing of this, it shows an adapter cable that could be used for connecting two barcode scanners (or other RS232 DB9 devices that "just send data" and don't need any data coming from the computer side). See the drawing included. enter image description here

Limitations:

  • only one device / scanner can transmit at a time
  • only works if no handshake signal lines are required (DCD, DTR, DSR, RTS, CTS)
  • depending on the exact electric characteristics of the RS232 interfaces involved, this may or may not work reliably. In particular there can be problems if the scanners have a very weak/cost optimized RS232 transmit signal.
0
Brendan Townsend On

Assuming no flow control, the reliable way of doing this would be to use a couple of MAX3232 devices 'back-to-back' to mux +/- RS232C levels in the TTL domain. A 3-5V power source would be needed however.

Such devices offer two Rx and two Tx channels supporting flow control, which can interchangeably be used for Tx/Rx data. A single device would therefore support two Tx/Rx pairs.

Resistive pull-up on TTL input, Schottky-OR'ed (common-anode) with TTL outputs, will mux 2-to-1.

You would then fully-support RS232C without analogue caveats.

As a footnote, if you only require to just receive data from two Rx channels, you would only require a single MAX3232 used in this way.