Current location - Trademark Inquiry Complete Network - Tian Tian Fund - RS485 standard
RS485 standard

intelligent instruments developed with the maturity of single chip microcomputer technology in the early 198s, and now the world instrument market is basically monopolized by intelligent instruments. The reason is the need of enterprise informatization, and one of the necessary conditions for enterprise instrument selection is to have a networked communication interface. At first, it is a simple process of data analog signal output, and then the instrument interface is RS232 interface, which can realize point-to-point communication, but this method can not realize networking function. Then RS485 solved this problem.

RS485 interface

RS485 adopts differential signal negative logic,+2v ~+6v means "" and-6V~- 2V means "1". RS485 has two wiring modes: two-wire system and four-wire system. The four-wire system can only realize point-to-point communication, which is rarely used now. Now, the two-wire system is mostly used. This wiring mode is a bus topology structure, and at most 32 nodes can be hung on the same bus. In RS485 communication network, the master-slave communication mode is generally adopted, that is, a master with multiple slaves. In many cases, when connecting the RS-485 communication link, simply connect the "A" and "B" terminals of each interface with a pair of twisted pairs. Ignoring the connection of signal ground, this connection method can work normally in many occasions, but it has buried great hidden dangers. There are two reasons: (1) * * mode interference problem: RS-485 interface uses differential mode to transmit signals, and it is not necessary to detect signals relative to a reference point. The system only needs to detect the potential difference between two lines. However, people often ignore that the transceiver has a certain * * * mode voltage range, and the * * * mode voltage range of RS-485 transceiver is-7 ~+12 V. Only when the above conditions are met can the whole network work normally. When the * * * mode voltage in the network line exceeds this range, it will affect the stability and reliability of communication and even damage the interface. (2)EMI problem: The * * mode part of the output signal of the transmitter driver needs a return path. If there is no low-resistance return path (signal ground), it will return to the source in the form of radiation, and the whole bus will radiate electromagnetic waves like a huge antenna.

because PC only has RS232 interface by default, there are two ways to get the RS485 circuit of PC host computer: (1) The RS232 signal of PC serial port is converted into RS485 signal by RS232/RS485 conversion circuit, and it is best to choose the products with anti-surge isolation for complicated industrial environment. (2) Through PCI multi-serial card, you can directly choose an expansion card whose output signal is RS485 type.

RS485 cable

Ordinary twisted-pair cable can be used in general occasions, and coaxial cable with shielding layer can be used in demanding environment. When using RS485 interface, for a specific transmission line, the maximum cable length allowed for data signal transmission from RS485 interface to load is inversely proportional to the baud rate of signal transmission, and this length data is mainly affected by signal distortion and noise. Theoretically, the longest transmission distance of RS485 can reach 12m, but in practical application, the transmission distance is shorter than 12m, depending on the surrounding environment. In the transmission process, the signal can be amplified by adding relays, and at most eight relays can be added, which means that the maximum transmission distance of RS485 can reach 9.6 axiom in theory. If long-distance transmission is really necessary, optical fiber can be used as the transmission medium, and a photoelectric converter is added at both ends of the transceiver. The transmission distance of multimode fiber is 5~1 kilometers, while that of single-mode fiber can reach 5 kilometers.

RS485 network

The network topology generally adopts the bus structure with terminal matching, and does not support ring or star networks. When building a network, we should pay attention to the following points:

(1) Use a twisted pair cable as the bus to connect all nodes in series, and the length of the outgoing line from the bus to each node should be as short as possible, so as to minimize the influence of the reflected signal in the outgoing line on the bus signal. Although some network connections are incorrect, they may still work normally at short distance and low speed, but with the extension of communication distance or the increase of communication speed, their adverse effects will become more and more serious. The main reason is that the signal reflected at the end of each branch will be superimposed with the original signal, which will cause the signal quality to decline.

(2) Attention should be paid to the continuity of bus characteristic impedance, and signal reflection will occur at the point of impedance discontinuity. This kind of discontinuity is easy to occur in the following situations: different cables are used in different sections of the bus, or too many transceivers are installed close to each other in a certain section of the bus, and too long branch lines are led out to the bus.

in short, a single, continuous signal channel should be provided as a bus.

another problem that needs to be considered in the networking process of RS485 is the terminal load resistance. The whole network can work well without terminal load resistance in the case of few devices and short distance, but the performance will decrease with the increase of distance. Theoretically, when sampling at the midpoint of each received data signal, matching can be ignored as long as the reflected signal attenuates sufficiently at the beginning of sampling. However, this is difficult to grasp in practice. An article by MAXIM Company in the United States mentions an empirical principle that can be used to judge what kind of data rate and cable length need to be matched: when the signal conversion time (rising or falling time) exceeds more than three times the time required for the one-way transmission of the electric signal along the bus, it can not be matched.

generally, the terminal resistance method is adopted for terminal matching, and the RS-485 should connect the terminal resistance in parallel at the beginning and end of the bus cable. The termination resistance is 12Ω in RS-485 network. The resistance is equivalent to the characteristic impedance of the cable, because the characteristic impedance of most twisted-pair cables is about 1 ~ 12 Ω. This matching method is simple and effective, but it has a disadvantage that the matching resistor consumes a lot of power, which is not suitable for systems with strict power consumption restrictions. Another power-saving matching method is RC matching. Using a capacitor C to cut off the DC component can save most of the power. However, it is difficult to choose the value of capacitor C, which requires a compromise between power consumption and matching quality. There is also a matching method using diodes. Although this scheme does not realize the real "matching", it can quickly weaken the reflected signal by using the clamping effect of diodes to achieve the purpose of improving the signal quality, and the energy-saving effect is remarkable.

in recent two years, based on the fact that some enterprises have completed the implementation of informatization, and the local area network (LAN) extending to every office and control room in the workshop has been laid in the factory, some companies have introduced a serial server to replace the multi-serial card, which mainly uses the existing LAN resources of enterprises to reduce the line investment and save costs, which is equivalent to putting the multi-serial card on the spot through tcp/ip.

the difference between RS485 and other bus networks:

We classify industrial networks into three categories: RS485 networks, HART networks and field bus networks.

HART network: HART is a transitional bus standard put forward by Emerson. It mainly superimposes digital signals on 4 ~ 2mA current signals, and BELL22 frequency shift keying technology is adopted in the physical layer to realize the functions of some intelligent instruments. However, this protocol is not an open standard in a real sense, so it can only be obtained by joining his foundation, and it will cost a part to join the foundation. Technology is mainly monopolized by several large foreign companies, and some domestic companies have done it again in the past two years, but it has not reached the level of foreign companies. At present, a large number of intelligent instruments are equipped with HART round cards, all of which have HART communication function. However, from the domestic point of view, this part of its function has not been really utilized, and at most, it is only used to set its parameters, which does not give full play to the proper function of HART intelligent instrument and does not monitor the equipment through networking. In the long run, due to the low communication rate of HART and the difficulty in networking, the purchase volume of HART instruments will decline. However, due to the history of HART instruments for more than ten years, there is still a lot of room for some system integrators to use.

Fieldbus network: Fieldbus technology is one of the hotspots in the field of automation technology, and it is known as the computer local area network in the field of automation. Its appearance marks the beginning of another new era of automation control technology. Fieldbus is a digital, serial and multi-station communication network connecting the instruments set in the control field and the control equipment set in the control room. Its key symbol is that it can support bidirectional, multi-node and bus-based all-digital communication. Fieldbus technology has become a hot spot in the development of automation and instrumentation in the world in recent years. Its appearance has revolutionized the structure of the traditional control system, and made the automatic control system move in the direction of intelligence, digitalization, informationization, networking and decentralization, forming a new network-integrated fully distributed control system-Fieldbus control system (FCS). However, various standards of fieldbus exist in parallel and have their own living fields, and a truly unified standard has not yet been formed. The key point is that it is impossible to see when a unified standard can be formed and the technology is not mature enough. In addition, there are few types of field bus instruments, and the price is also high. From the end user's point of view, most of them are still in a wait-and-see state, and they all want to wait until the technology is mature before considering it, but few of them are implemented now.

RS485 network: RS485/MODBUS is a popular network layout method, which is characterized by simple and convenient implementation, and there are many instruments that support RS485 now, especially in the oil industry. Now instrument manufacturers have turned to support RS485/MODBUS for the simple reason that it is very difficult and expensive for the original HART instrument to buy a conversion port, so the RS485 conversion interface is much cheaper and various.