Jump to content

Communication to 4 devices using 1 port


Recommended Posts

I have multiple devices such as printers(2) and scanners(2) that I want to communicate to using only 1 COM port in V1040 PLC. Printers and scanners support RS232/RS485 protocols. Can someone suggest on how can I achieve this?

I looked at options with Modbus protocols, but I didn't understand how can I assign network id's to my printers and scanners. If I am required to have any additional hardware, please suggest.

Link to comment
Share on other sites

  • MVP 2023

This is not a Modbus application.

To talk to multiple serial devices you will have to use RS485.  The device must be capable of having a device ID assigned to it.  You will have to use the Protocol block to create the commands your device needs.

For starters, do you have the make and model of the devices you want to use?

Joe T.

Link to comment
Share on other sites

Hi Joe, thanks for the reply. Devices I am using are Citizen P291 printer and Zebra DS3678 scanner. I have the protocol block for the printer and I can communicate with them when they are connected to separate COM ports.

I doubt that these devices are capable of having a device id assigned to it. If they are, I am not sure how to assign these ID's.

If they are not capable of having device ID's, is it possible to have any additional hardware to be able to assign these devices an ID?

Link to comment
Share on other sites

  • MVP 2023

Looked at the data sheets - all these are RS232 devices only so you'll need a port multiplexer- Google "RS232 port multiplexer".  You're going to have to add code to select which port you're using. 

I'd also add an Ethernet card so you use the other serial port.  The tricky thing is going to be your barcode reader.  It just returns a string of the barcode and doesn't tell you which port it came from.  This is another reason to use both ports instead of one - you'll know from the scan block which reader triggered it.

Since you are using a dedicated output device (printer) and a dedicated input device (scanner) it may be possible using both ports to only connect the TX line to the printer and the RX line to the scanner using custom cables, one on port 1 and one on port 2.  Use the Ethernet port for programming.

This is not a trivial application.  

Joe T.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.