HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Self-made PLC programming cable

2011-09-07View Original

Thread Content

Since the programming cables for PLCs from different brands are not interchangeable, and the original programming cables are expensive, this poses difficulties for those who are learning to use PLCs as well as for those who already use them. In fact, by analyzing the various communication interface standards and physical structures of PLC programming ports, it is possible to create custom programming cables. These cables are inexpensive to produce and easy to manufacture, while still being able to fulfill all the functions of the original cables. With the widespread use of programmable logic controllers (PLCs) in industrial control, PLC programming has become a professional skill that electrical engineering technicians must master. There are many brands of programmable controllers; PLCs from Europe, the United States, Japan, South Korea, and Taiwan have all entered the Chinese market. While this provides users with a variety of options, it also presents them with some minor difficulties. Since there is no unified standard for PLCs, just like the charger interfaces for mobile phones, different manufacturers act in their own interests, which is why the programming cables for PLCs from various brands are not compatible with each other. Buying an original cable can cost thousands of dollars. For technicians whose main purpose is learning* and who frequently deal with PLCs of different brands, having a way to manufacture a programming cable at a low cost would undoubtedly be very convenient for them. Although there are many brands of PLCs, the programming interfaces for these various brands fall into just a few categories. The technical manuals that come with the PLCs usually provide information on the pin definitions of these programming interfaces, which makes it possible to create custom programming cables. Below, the various serial communication interface standards and physical structures for PLC programming ports are explained in detail to show how to build a suitable programming cable on your own. One end of the programming cable is connected to the COM port of the PC, while the other end is connected to the programming port of the PLC. The COM ports on the PC side are all RS232C interfaces with DB-9 pin plugs. According to interface standards, the programming interfaces for PLCs can generally be divided into three types: RS232, RS485, and RS422. Based on their physical structure, they can be divided into five types: the 8-pin round connector (DIN-8), the 9-pin D-shaped connector (DB-9), the 25-pin D-shaped connector (DB-25), the RJ11 connector, and specialized connectors. The first two types are the most commonly used; the pin arrangements for each connector are shown in the figures. http://b38.photo.store.qq.com/http_imgload.cgi?/rurl4_b=2e5baba4d95362eba63817b5edbc849911921ae0f8f5f67bc2eb39c2f56b69215592cdd8b3c38004eb8bf0b46078a0455f98657ce72eaead8af6553a94350a48c540c20056281b9cb5ca6ad0e5e68bfb23a9fb1b&a=32&b=38 To develop programming cables, it is first necessary to have a basic understanding of these three serial communication interface standards. RS-232, RS-422, and RS-485 are three serial data interface standards. Interface standards specify only the electrical characteristics of the interface, without addressing connectors, cables, or protocols; as a result, the same interface standard can have different physical configurations, such as DB-9 and DB-25. RS-232 is the most widely used serial interface in PCs and the communications industry. The RS-232C bus standard features 25 signal lines, including a primary channel and an auxiliary channel. In most cases, only the main channel is used, with nine signal lines (a 9-pin D-sub connector) being common, and the definition of each pin is shown in Table 1. For standard duplex communication, only a few signal lines are required, such as the transmit data line TXD, the receive data line RXD, and the ground line GND. RS232C allows only point-to-point communication, has a short transmission distance, and poor common-mode rejection capability. RS-485 uses balanced transmission and differential reception, thus it has the ability to suppress common-mode interference. It uses a pair of twisted pairs, with one defined as A (TXD-/RXD-) and the other as B (TXD+/RXD+); no digital ground wire is required. At a rate of 100kbps and below, the communication distance exceeds 1200 meters. RS-485 can be networked to form a distributed system, allowing up to 32 drivers and 32 receivers in parallel. RS-485 can only achieve half-duplex communication. RS-232 interface pin definitions: 25-pin and 9-pin versions. Brief descriptions: 2, 3 – TXD for transmitting data; 3, 2 – RXD for receiving data; 4, 7 – RTS for requesting transmission; 5, 8 – CTS for allowing transmission; 6, 6 – DSR to indicate that the communication device is ready; 7, 5 – GND for the signal ground; 8, 1 – CD for carrier detection; 20, 4 – DTR to indicate that the data terminal is ready; 22, 9 – RI for the ring indicator. The RS-422 interface standard was developed primarily to overcome the limitations of the RS-232 standard, such as its short communication range and low transmission speed. The RS-422 standard is a transmission standard that uses a balanced approach, employing two pairs of twisted pairs; each signal is transmitted over two wires – namely the transmit data lines TXD+ and TXD-, and the receive data lines RXD+ and RXD-. The logic level is determined by the potential difference between these two transmission lines. Thanks to the use of dual-wire transmission, **the ability to resist common-mode interference is enhanced, allowing a maximum data transfer rate of 10 MbPs (over a distance of 15 meters). If the transmission rate is reduced to 90 kbps, the maximum distance can reach 1200 m, allowing for full-duplex communication. The function of the programming cables provided by various manufacturers is to convert data in RS485 or RS422 format at the PLC end into data in RS232C format at the PC end. If the PLC end uses RS232, then a direct connection according to the relevant rules is sufficient. Therefore, to create custom PLC programming cables, it is necessary to convert the RS485 and RS422 signals on the PLC side into RS232C signals that the PC can recognize, so that the PC can communicate with the PLC and carry out tasks such as downloading, uploading, and monitoring. This involves the issue of converting interface standards. There are several ways to achieve interface conversion: one is to use a simple level conversion circuit, but such a circuit can only be used with one specific type of PLC, has limited functions, is not very reliable in performance, and may even damage the PC’s serial port ; The second approach is to use a dedicated interface conversion IC, but it is relatively complex to implement on a hobbyist level and not suitable for home fabrication. Here we use a ready-made communication interface converter that can perform conversions between RS232/RS485/RS422. As it is a dedicated communication interface converter, it is easy to use, offers reliable performance, and is also relatively inexpensive. There are many such products available on the market. I recommend the ADAM-4520 converter from Advantech; this converter is used for converting signals from RS232 to RS485/RS422. It has a compact size, and as it is an industrial-grade product, it boasts strong interference resistance, allowing it to be used in complex environments. It requires a 24-volt DC power supply. Passive converters are not recommended due to their poor interference resistance, which often leads to communication interruptions. The RS232 end features a DB-9 connector that can be plugged directly into the COM port of a PC. The RS485/RS422 ends use standard wiring terminals; since most computers no longer come equipped with serial ports, a USB-to-serial cable is required. As it is to be used in industrial environments, a cable with strong interference resistance should be chosen. When making the connections, select the appropriate pins based on whether the PLC side uses RS485 or RS422, and connect them following the rule of \"send to receive, receive to send, positive to positive, negative to negative\". As shown in the link http://b38.photo.store.qq.com/http_imgload.cgi?/rurl4_b=2e5baba4d95362eba63817b5edbc8499fabae5cb7d543072e7419e9516c5bbf02d0b53d513fcce2270ad2ec873b379d26413cdbe5d2aab188486d18660d80eceec7d79bdcd1b6606964c6beba369cfe39f3f44c8&a=38&b=38, to create a proper programming cable, it is necessary not only to carry out interface conversion between RS232/RS485/RS422 but also to understand the function of each pin on the PLC’s programming port; even when using the same interface standard, different manufacturers’ PLCs have different pin arrangements. Below are the pin definitions for several popular PLCs, provided for reference when building your own. For PLCs that are not listed, one can look up random technical manuals, or search the internet for instructions related to general-purpose HMI units; the connection instructions between the HMI and PLCs from various manufacturers will provide the pin definitions for the vast majority of PLCs available on the market. Definition of some PLC programming port pins: PLC model, interface standard, interface shape, and pin definitions. S7-200: RS485, DB-9, 3B/8A; TIWDO/NEZA: RS485, DIN-8, 1A/2B; LS MASTER K series: RS232, DB-9, 2RXD/3TXD/5GND; FX2N/FX0N: RS422, DIN-8, 1RXD-/2RXD+/4TXD-/7TXD+; OMRON CH200HS: RS232, DB-9, 2TXD/3RXD/7GND/4RTS/5CTS; KOYO DIRECT DL: RS232, RJ11, 4TXD/3RXD/1GND. An original cable can only be used with one specific PLC, while an interface converter combined with different connectors can form a programming cable that can be used with almost any brand of PLC. Interface converters and connectors are available in the communication market at low prices; the total cost is only about one-tenth of that of original cables, and they are also very easy to manufacture. The self-made programming cable enables functions such as program uploading, downloading, and online monitoring between a PC and a PLC, and its performance in terms of functionality and reliability is comparable to that of original cables. Of course, the best solution would be to standardize all programming cables, just as we standardize phone charger interfaces. However, the chances of this happening are slim, as China still doesn’t have any say in this matter – control lies in the hands of the imperialists. Domestic products need to strengthen themselves; we look forward to that day……

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.