Do industrial networks continue to utilize RS-232 and RS-485?
The answer to this one is most certainly yes. Even though Ethernet became the “go to” technology for industrial networking at the turn of the century it is amazing how much equipment with the old RS-232 or RS-485 ports are still in use. A problem we are starting to notice is that the younger engineers are not being taught about these old favourites and many of the old hands are now retiring. With this in mind I thought an article covering some of the basics of serial communications might be helpful.
Designing and installing an RS485 Serial Network
There was a time when every PC and peripheral had an RS-232 port either a 25 or 9 pin D-Sub. The RS-232 port also became standard on virtually every industrial PLC, drive and instrument sold in the 1990s.
The major problem most users would have was knowing whether the port on their equipment was configured as DTE (Data Terminal Equipment) or DCE (Data Communication Equipment). Broadly speaking most PCs and data terminals were DTE and modems or communication equipment would be a DCE. Connecting a DCE to DTE was simple – pin 1 to pin 1, pin 2 to pin 2 etc. The problem would come when you wanted to connect a DTE to DTE – this is when a crossover cable would be needed. In its simplest form there would be 2-3 and 3-2 for the main TD and RD signal and 7-7 for ground. A complication would occur however when a mixture of 9 and 25 pin connectors were used – TD was on pin 2 of 25 pin connector, but pin 3 of the 9 pin version and on the 9 pin signal ground was pin 5. This one has confused many over the years!
Most of the time sorting out the TD, RD and SG connections would be enough to get communications working, but sometimes there would also be the handshaking to deal with. Handshake signals were originally designed to warn a terminal- DTE device that a modem- DCE device was not quite ready to send data or the data buffer was full. When a terminal wants to send data it raises the RTS (Request to Send) line and waits until the modem CTS (Clear To Send) pin becomes high. In many cases a local loop back will do the trick and ensure data is sent.
The main problem with RS232 in an industrial environment was that it was only ever meant to connect devices up to about 15m apart – too close for many industrial applications. As well as this the signal ground was rarely isolated from the device ground so earth loops would often be created between equipment that could affect the data or worst still destroy the equipment. The solution to these problems came with the RS422 and RS485 standards.
RS-422 or RS-485?
The two standards, although separate, were very similar with most equipment supporting both hence you would often see it written RS-422/485. The fundamentals of both standards were that data is encoded differentially between two wires instead of in reference to a signal ground as with RS-232. This method of data communications allowed data to be transmitted reliably up to distances as far as 1.2km and as well as this the transmit circuit could drive many receivers making a multi-drop network a possibility. The most significant difference between RS-422 and RS-485 was that with RS-485 only a single pair of cables was needed for a multi-drop network.
Although up to 32 devices could be multi-dropped onto a single pair of cables only one device could transmit at once and this had to controlled by the protocol between devices – Modbus-RTU or Profinet-DP being the most prevalent in industrial applications.
To gain the most benefit from RS-422/485 communications some simple installation guidance needed to be followed. The twisted pair line needed to be terminated at each end with a 120 Ohm resistor. Experience also showed a simple fail-safe biasing circuit could also hold the line in a known state when no transmitters were active on the lines.
It was very common for a PC or IPC with only an RS-232 port to need to communicate to a network of industrial controllers with only RS-422/485 ports. In this case an RS-232 to RS-422/485 converter would be needed. When using only 2 wires RS-422/485 communications the PC needed to be able to tell the converter whether to transmit or receive and the RTS signal would often be used for this. More advanced converters did not need to be controlled and could recognise the start and end of a character and switch the transmitter on and off accordingly.
Hopefully this article will help someone somewhere out of trouble when confronted with some “old” industrial technology. If you would like to find out more about older communications technology we have put an electronic copy of our old data communications handbook to download.