In industrial control applications, the RS485 bus is widely used due to its simple interface, convenient networking, and long transmission distance.
RS485 and RS232 are all based on the serial port communication interface. The operation of data transmission and reception is the same, so the same underlying driver of WinCE is used. However, they have a very different communication mode in practical applications. The RS485 interface is a half-duplex data communication mode, and the RS232 interface is a full-duplex data communication mode. Data can not be transmitted and received at the same time. In order to ensure the data transmission and reception do not conflict Hardware is achieved through direction switching. Correspondingly, software must also strictly separate the process of sending and receiving.
The half-duplex network composed of RS485 interfaces is generally a two-wire system (previously, four-wire system is used, and only peer-to-peer communication can be implemented, and it is rarely used), and multiple shielded twisted pair transmissions are used. This connection mode is a bus topology that can connect up to 32 nodes on the same bus. Generally used in the RS485 communication network is the master-slave communication mode, that is, a host with multiple slaves.
RS485 features:1. RS-485 electrical characteristics: logic "0" to the voltage difference between the two lines is + (2-6) V said; logic "1" to the voltage difference between the two lines - (2-6) V said . The interface signal level is lower than that of RS-232, it is not easy to damage the chip of the interface circuit, and this level is compatible with the TTL level and can be easily connected with the TTL circuit.
2. The maximum data rate of RS-485 is 10Mbps.
3. The RS-485 interface is a combination of a balanced driver and a differential receiver, which is resistant to common-mode interference, that is, has good noise immunity.
4. The maximum transmission distance standard value of the RS-485 interface is 4000 feet (about 1219 meters), in fact, up to 3000 feet. In addition, the RS-232 interface allows only one transceiver to be connected on the bus, that is, a single station capability. The RS-485 interface allows up to 128 transceivers to be connected on the bus. That is, it has multi-station capability, so that users can easily establish a network of devices using a single RS-485 interface.
Modbus was invented by Modicon (now a brand of Schneider Electric) in 1979 and is the world's first bus protocol that is truly used in industrial sites.
The ModBus network is an industrial communication system that consists of programmable controllers and computers with intelligent terminals connected via public lines or local dedicated lines. Its system structure includes both hardware and software. It can be applied to various data acquisition and process monitoring.
ModBus features:(1) Standard, open, users can use the Modbus protocol free of charge, with no need to pay licensing fees, and will not infringe intellectual property rights. Currently, there are more than 400 manufacturers that support Modbus and more than 600 products that support Modbus.
(2) Modbus can support a variety of electrical interfaces, such as RS-232, RS-485, etc., and can also be transmitted on various media, such as twisted pair, optical fiber, and wireless.
(3) Modbus frame format is simple, compact and easy to understand. Users are easy to use, and vendor development is simple.
MODBUS communication transmission mode:Communication transmission is divided into independent information headers and transmitted coded data. The following definition of the communication transmission mode is also compatible with the MODBUS RTU communication protocol:
Initial structure = ≥ 4 bytes of time
Address code = 1 byte
Function code = 1 byte
Data area = N bytes
Error check = 16-bit CRC code
End structure = ≥ 4 bytes of time
Address Code: The address code is the first byte of the communication transmission. This byte indicates that the slave set by the user to set the address code will receive the message sent by the master. And each slave has a unique address code, and the response loopback starts with the respective address code. The address code sent by the master indicates the slave address to be sent to, and the address code sent by the slave indicates the slave address returned.
Function code: The second byte of communication transmission. The ModBus communication protocol defines function numbers 1 to 127. This instrument uses only some of its function codes. As the host requests the sending, the function code is used to tell the slave what to do. As a slave response, the function code sent by the slave is the same as the function code sent from the master and indicates that the slave has responded to the master for operation. If the highest bit of the function code sent by the slave is 1 (for example, the function code is large at the same time 127), it means that the slave does not respond to the operation or send an error.
Data area: The data area differs depending on the function code. The data area can be the actual value, the set point, the address the host sends to the slave or the slave sends to the host.
CRC code: Two-byte error detection code.
RS485 is a physical interface, simply hardware.
MODBUS is an international standard communication protocol for exchanging data between devices from different vendors (usually for industrial use); the so-called protocol can also be understood as the “language†mentioned above, simply software.
Under normal circumstances, two devices transmit data through the MODBUS protocol:
The earliest use of RS232C as a hardware interface, (that is, ordinary computer serial communication port (serial port)); also useful RS422, there are commonly used RS485, this interface transmission distance, used in the general industrial field more.
MODBUS protocol is divided into MODBUS RTU, MODBUS ASCII and later developed MODBUS TCP three modes: The first two (MODBUS RTU, MODBUS ASCII) use the physical hardware interface is a serial communication port (RS232, RS422, RS485 ).
And MODBUS TCP is in order to comply with the current development trend of the world, and anything can be connected with Ethernet network or the Internet to transmit data. So MODBUS TCP mode, the hardware interface of this mode is the Ethernet port, which is the common network port on our computer.
Vacuum Tube Solar Water Heater
Vacuum Tube Solar Water Heater,Evacuated Tube Solar Water Heater,Solar Water Heater For Households,Pipe Solar Water Heater For Households
Shandong Sangle Group Co.,Ltd. , https://www.sangle-group.com