Serial communication with multiple devices

Altabaie

Member
Join Date
Jul 2003
Location
GA
Posts
3
I need to establish communication with several MFCs using serial communication (i.e. RS232). Each device has its own address and it is connected to a hub and the hub is connected to the PLC via RS232 cable. To communicate with a device, a trasmitted "command" string begins with the address of the device and each received string also starts with the address of the device. I have no problem using instructions such as AWA and RDL to Tx/Rx to one device, however, my program falls out of sync. when try to communicate to more than one device. I believe the culprit is the RDL or Read instructions that required more than one scan to completely read the buffer.

I was wondering if anyone out there has developed similar PLC software and if they ran into similar situation and how they resolved it.

Thank you.
 
RS232 is used to connect two devices together only.
you need to use either RS422 or more commonly RS485
these are multidrop comunication systems
 
I believe he is describing a system for multi-drop RS232. He is just having problems with the communication instructions.

One way RS232 can be multidropped is the transmit line from the master goes into the first slave's receive. If the slave doesn't see its address in the first part of the communication then it re-transmits the entire message out ITS transmit line to the next slave's receive and so on until the last slave connects back to the master. Whichever slave sees its address transmits the appropriate response instead of the original message with the address of the master leading. It's a little slower but it can work.
 
Rs232 comm.

Mr. Bernie,

You are correct. Each device's RS232 cable is connected to a hub and then only one cable connects the hub to the PLC. The issue is with either AWA or most likely with ARD (read) commands where it takes more than one scan to read (receive) the buffer. I just can't find a way to establish some sort of synchronization between each device read and when I need to change the address of command line to move to next device. So, I was wondering if anyone out there has done any PLC coding to resolve an issue similar to this one.
 
Thanks, Bernie for that explanation. I wouldn't have thought that an RS-232 only device would have provision for an address. Something new every day . . .
 
I would transmit the ARD command and setup a timer to track how long until you get a response. Then just take that response time, give it a safety factor of say, 1.5x and just use a timer to increment the address. That way you are giving the devices a chance to respond to the command.

If you need a positive confirmation of communication, can't you look at the address you're reading to and make sure it changed before sending the next command?
 
@Danw and others. That is the difference between the transmission media (RS232 electrical signaling specification) and the protocol (how the messaging is established, addressing, error checking, content of the message).
 
Thank you ... I have done something similar where I let a timer let me know when to change the address (i.e. go through each address) and at about 1/5 of the timer.acc, I send a set point to device and at 1/3 of the timer.acc I send the POLL command and I use the remaining time to read the return "message". The problem, as I see it, it takes PLC numerous scans, which varies, to read each message from each device. Therefore, not all messages can be read which causes other issues. Right now, I have the timer set at 0.5 seconds for each device and it seems like all is OK, but I only have 2 out of 6 devices online. I, most likely, have to twick the code once I have all devices running and responding.

Again, thank you for your help and suggestions.
 

Similar Topics

Currently,we are facing the communication go through with 422 tx+ and tx-. Mitsubishi fx5u series is used and using command rs2. But the package...
Replies
0
Views
106
I have wasted a week trying to figure out how to connect an SLC5/03 with my laptop. I do not have and can not Buy the 1747 UIC and PC3 cables. I...
Replies
14
Views
2,560
MELSEC A RS422 (25pin) <> iQR C24 Serial RS232 (9pin) - Simple PLC Communication Communication from a MELSEC-A Series CPU (RS-422 – DB 25 Pin)...
Replies
4
Views
1,048
Hey guys, I have a problem reading weighing data from AND AD4406 with OP-05 RS-232C Relay and Control input using Rockwell PLC Micro820. I already...
Replies
0
Views
946
I have a zebra barcode scanner connected to a ******* device master UP. They are connected by RS232. By checking the serial logs on the device...
Replies
3
Views
1,139
Back
Top Bottom