Jump to content
KetanW

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...