1. RS485 interface is a serial communication protocol. Allow multi-address communication.
2. Multiple RS485 ports are used for communication. First, set the main communication port, and then set different communication addresses for other ports, and set the communication timing. A 485 bus communication network can be built.
RS485 how to achieve multiple RS485 communication:
RS485 adopts differential signal negative logic, where + 2V ~ + 6V represents "0" and -6V ~ -2 V represents "1". RS485 has two kinds of connections: two-wire system and four-wire system. Four-wire system is full-duplex communication mode, and two-wire system is half-duplex communication mode.
RS485 and RS232 are both communication interfaces based on serial port to ethernet converter, and the operation of data sending and receiving is the same, so they use the same underlying driver of WinCE.But they have very great difference in that communication mode in practical application, RS232 interface is a full duplex data communication mode, and RS485 interface is a half duplex data communication mode, the sen and receiving of the data can't go on at the same time, in ord to guarantee the sending and receiving of the data does not conflict, Correspondingly, the process of sending and receiving must be strictly separated in software.
The half-duplex network composed of RS485 interface is generally a two-wire system (in the past, there was a four-wire system connection method, which could only realize point-to-point communication, but now it is rarely used), and shielded twisted pair transmission is mostly used. In the RS485 communication network, the master-slave communication mode is generally used, that is, a master with multiple slaves.In many cases, an RS-485 communication link is simply connected by using a twisted pair to connect the "A" and "B" ends of each interface. The RS485 interface connector adopts the DB-9 9-core socket, the interface with the intelligent terminal RS485 adopts DB-9 (hole), and the keyboard interface RS485 connected with the keyboard adopts DB-9 (pin).
RS485 adopts the single-duplex working mode. In order to prevent the competition on the bus, there is only one master, and the mode of one master inquiry and one slave response is adopted. But sometimes, we really need multiple hosts to monitor RS485 devices, for example, three computers can monitor the same RS485 devices, and it is better to share the RS485 bus.Although this problem is often encountered in practice, it has not been well solved. The difficulty is that the two hosts are completely independent, so they have no coordination mechanism. If the two hosts ask the slave device at the same time, it will inevitably cause data conflict on the RS485 bus.
1. The RS485 signal line cannot be wired together with the power line. In the actual construction, because the wiring is through the pipeline, the construction party sometimes directly ties the 485 signal line and the power line together for convenience. Because the strong current has a strong electromagnetic signal to interfere with the weak current, the 485 signal is unstable, resulting in unstable communication.
2. The 485 signal line may use a shielded wire or a non-shielded wire as a wiring. The 485 signal is transmitted in differential mode, that is, the voltage difference between 485 + and 485- is used as the signal transmission.
The ideal line is twisted-pair: it is better to use one pair of twisted-pair for the two half-duplex lines, so that the two lines are twisted, and the interference level added to the two lines is offset to achieve the anti-interference effect. One pair is used for receiving two lines and the other pair is used for transmitting two lines in full duplex. RS485 has no power transmission requirements, so the requirements for wire diameter are not high.
In practical engineering, the outdoor water-blocking twisted pair is usually purchased to ensure the protection performance of the line. But some engineers will use RVV cable, which is also possible, but the anti-interference is worse. In this way, some engineers use RVVP cable (with shield), which is not good, because the increase of capacitance between lines will affect the transmission quality, and the baud rate of transmission needs to be reduced.
The setting of the baud rate has a certain corresponding relationship with the length of the cable (including the total length of the branch). The longer the line is, the lower the baud rate should be set to be more stable.
No matter what kind of cable is chosen, bus architecture should be adopted as far as possible, star connection should be reduced, branch lines should be as short as possible, and daisy-chain connection should be adopted as far as possible, that is, the bus is connected to the first node and then jumped to the next node.
It is better to remove the branch line of the unconnected equipment from the bus, otherwise it is easy to cause interference. At the end of the bus, if the received signal is not good, a 120 ohm wire resistor can be added across the signal line. Do not add intermediate equipment, otherwise it will increase the line loss and reduce the number and distance of equipment.
The RS485 chips of different devices are usually different, and there are different types of chips with different loads, which are usually not directly visible to engineers. So that is to say, the maximum number of devices connected to different devices on the bus is uncertain. For the same number of devices connected, see the requirements of the device description.
In the field of industrial automation, RS485 communication serial port servers are widely used for data acquisition, monitoring, and control of production lines. By connecting various sensors, actuators, PLCs, and other devices, remote management and automated control of equipment can be achieved, improving production efficiency and product quality. For example, in factory automation systems, RS485 communication serial port servers can collect real-time status data from production equipment and transmit it to the monitoring center via the network, enabling real-time monitoring and fault warning of the production process.
In intelligent building systems, RS485 communication serial port servers also play an important role. By connecting lighting control, air conditioning control, security systems and other subsystems, intelligent management and energy-saving control of buildings can be achieved. Its long-distance transmission and multi-point communication features enable intelligent building systems to cover large buildings and facilitate expansion and upgrades.
In the remote monitoring system, the RS485 communication serial port server is responsible for transmitting real-time data from the field to the central monitoring room, facilitating remote monitoring and management. For example, in the traffic management system, the RS485 communication serial port server can connect traffic lights, surveillance cameras and other devices to achieve traffic flow monitoring and control. In the security system, data transmission and remote control are achieved by connecting cameras, video recorders, access control controllers and other devices to ensure safety and stability.
In the medical field, RS485 communication serial port server also plays an important role. By connecting medical monitoring devices such as electrocardiograms and blood pressure monitors, real-time monitoring and data recording of patients' vital signs can be achieved. This is of great significance for improving the quality of medical services and ensuring patient safety.
USR-TCP232-304:1-port RS485 to Ethernet converters USR-TCP232-304 can transmit data transparently between TCP/IP and RS485. RS485 to Ethernet converters USR-TCP232-304 are widespread required in industrial automation. Simple configuration and easy to use.
USR-DR132/USR-DR134:USR-DR132/134 is a new ultra-small size rail-type serial device server launched by PUSR. It realizes the two-way transparent data transmission between RS485/RS232 and Ethernet, integrates 1 serial port and 1 Ethernet port with a rate of 10/100Mbps.