With the advancement of the industrial Internet of Things, the data of RS485 multi-host communication devices in various industries need to be collected to the platform. But many intelligent controllers, such as PLC, inverter. There is only one serial interface, there is no extra communication interface to allow PLC, inverter data pushed to the platform to collect gateway.RS485 bus belongs to the half-duplex interface, the communication protocol is generally a round-trip mode, such as MODBUS communication protocol. At the same moment, only send data or receive data. Then, when RS485 is the master, only one device is allowed to be the master on a bus, and RS485 multi-master communication devices use the bus method of training.
Common RS485 multi-master communication equipment is a wide variety of different manufacturers of PLC, water meters, meters, thermostats, IO controllers transmitters and so on.
Industrial equipment is generally real-time communication, in the interface expansion, can not affect the normal communication of the original equipment, can not affect the production work of the equipment. What is the role of the serial port server?
1. Acquisition protocol requirements
RS485 multi-host communication system, the protocol requirements are not high, as long as it is based on the RS485 bus half-duplex communication protocol, can be achieved to expand, and even RS232 interface half-duplex communication protocol. Such as Omron PLC communication interface supports RS232 interface, but the underlying communication protocol for half-duplex MODBUS communication protocol.
2. According to the needs of the need to meet the two basic requirements: the device supports 485 multi-host communications;
Support multiple RS485 communication interfaces, at least 3 RS485 interfaces are needed, 1 to the original slave device, 1 to the original master device, 1 to the extended master device.
The first step, to solve the 485 multi-master communication, in the communication system, at the same time, more than 2 or more devices at the same time to access the slave device, are able to return real-time valid data data. As shown in Figure 3-1, 2 computers, 1 industrial control screen, through the Shanghai Zoran multi-serial server at the same time to collect RS485 bus on the 10 IO controllers. 3 hosts to collect data complementary conflict, are the original data.
The second step is to solve the RS485 expansion problem. Multi-serial server supports bidirectional conversion of data between serial port and network. Both the serial port to the network, but also the network to the serial port communication.
Four-channel serial to multi-serial server to solve this problem. The fourth channel connects to the original slave device and works in TCP server mode. The first channel connects to the original master device and works in TCP client mode. The second channel connects to the extended RS485 interface, and the extended interface is used for the platform gateway.
The correct wiring for RS485 communication
RS485 has two-wire and four-wire wiring, four-wire system can only achieve point-to-point communication, now rarely used, now more than two-wire wiring system, this wiring system for the bus topology, in the same bus can be connected to a maximum of 32 nodes.
Ideal line for the twisted pair: half-duplex of the two lines is best to use a pair of twisted pair, so that the two lines twisted, plus the interference level on the two lines to achieve the anti-jamming effect of cancellation. Full-duplex when receiving two lines with a pair, send two lines with another pair of RS485 does not have power transmission requirements, so the wire diameter requirements are not high.
En el proyecto real, por lo general procurado cable de par trenzado a prueba de agua al aire libre para garantizar el rendimiento de la protección de la línea. Sin embargo, algunos ingenieros utilizarán cable RVV, que también es posible, pero la lucha contra la interferencia a ser peor. Así que hay ingenieros que utilizan cable RVVP (con blindaje), esto no es bueno, porque el aumento de la capacitancia entre las líneas afectará a la calidad de la transmisión, la necesidad de reducir la velocidad de transmisión.
La configuración de la velocidad en baudios y la longitud del cable (incluida la longitud total de la rama) tiene una cierta correspondencia, cuanto más larga sea la línea, más baja debe ser la velocidad en baudios para que sea más estable.
No matter what kind of cable, as far as possible to use the bus structure, reduce the star connection, branch line as short as possible, as far as possible to use the daisy chain connection, that is, the bus to the first node, and then jump to the next node.
RS485 wiring specification
1. RS485 signal lines and power lines can not be routed together. In the actual construction, due to the alignment are through the pipeline, the construction side sometimes for convenience, directly to the RS485 signal line and the power line tied together, due to the strong power has a strong electromagnetic signal to the weak power interference, which leads to RS485 signal instability, resulting in unstable communications.
2. 485 signal line can use shielded wire as wiring, you can also use unshielded wire as wiring. As the 485 signal is transmitted using differential mode, i.e. by the voltage difference between 485+ and 485- as the signal transmission.
Can the serial server connect to more than one RS485 device?
Yes, serial server can connect multiple RS485 devices. Serial server is a network device which connects serial devices to the network via TCP/IP protocol. With a serial server, you can remotely manage and control multiple RS485 devices for data transfer and communication. Some serial servers support multiple serial ports and can connect multiple RS485 devices at the same time. In addition, some serial servers also support virtual serial port technology, which allows you to simulate multiple virtual serial ports through software, thus expanding the number of connected RS485 devices. Therefore, through the serial port server, you can realise the connection and management of multiple RS485 devices.