Several commonly used communication methods for PLC networksIssuing time:2024-07-29 16:54 The PLC network is composed of several levels of subnets, and the communication process of each level of subnet is determined by the communication protocol, with the communication method being the core content of the communication protocol. Communication methods include access control methods and data transmission methods. The so-called access control (also known as access control) method refers to the issue of how to obtain the right to use shared communication media, while the data transmission method refers to the issue of how a station transmits data after obtaining the right to use communication media. 1. Periodic I/O communication method
The periodic I/O communication method is commonly used in remote I/O links of PLCs. The remote I/O link operates in a master-slave mode, with the PLC remote I/O master unit being the master station and other remote I/O units being slave stations. Set up a "remote I/O buffer" in the master station, using a mailbox structure, divided into several sub boxes corresponding to each slave station, and each sub box is further divided into two compartments, one for sending and one for receiving. The communication processor in the master station adopts a periodic scanning method to exchange data with each slave station in sequence, and sends the data sent in the corresponding sub box to the slave station. The data is read from the slave station and placed in the receiving sub box of the corresponding sub box. This cycle repeats itself, causing the 'remote I/O buffer' in the main station to be refreshed periodically. The CPU unit of the PLC in the main station is responsible for scanning user programs, and it processes them in a cyclic scanning manner. Each cycle has a period of time for centralized I/O processing, during which it performs read and write operations on local I/O units and remote I/O buffers. The CPU unit of the PLC performs periodic cyclic scanning of user programs, and the communication processor of the PLC performs asynchronous periodic scanning of various remote I/O units. Although the CPU unit of the PLC does not directly operate the remote I/O unit, due to the periodic refresh of the remote I/O buffer, the CPU unit of the PLC's read and write operations on the remote I/O buffer are equivalent to directly accessing the remote I/O unit. This communication method is simple and convenient, but it occupies the I/O area of the PLC, so it is only suitable for communication of a small amount of data. 2.Global I/O communication method The global I/O communication method is a serial shared storage area communication method, mainly used for communication between PLCs with link areas.
The communication principle of global I/O mode is shown in the above figure. Draw a link area in the I/O area of each PLC in the PLC network, and each link area adopts a mailbox structure. The sending and receiving areas with the same number have the same size and occupy the same address range, with one being the sending area and the others being the receiving area. Communicate through broadcasting. PLC1 broadcasts the data from the 1 # sending area on the PLC network, and PLC2 and PLC3 receive it and store it in their respective 1 # receiving areas. PLC2 broadcasts the data from the 2 # sending area on the PLC network, while PLC1 and PLC3 receive it and store it in their respective 2 # receiving areas. PLC3 broadcasts the data from the 3 # sending area on the PLC network, while PLC1 and PLC2 receive it and store it in their respective 3 # receiving areas. Obviously, through the above broadcast communication process, the data in each link area of PLC1, PLC2, and PLC3 is the same, and this process is called the equalization process. By using equivalent communication, the data in the link area of each PLC in the PLC network is kept consistent. It contains both the data sent out by itself and the data sent by other PLCs. Since each PLC has the same link area size and occupies the same address segment, as long as each PLC accesses its own link area, it is equivalent to accessing the link areas of other PLCs and exchanging data with them. In this way, the link area becomes a true shared storage area, and the shared area becomes an intermediary for data exchange among PLCs. The link area can be refreshed asynchronously (equivalently) or synchronously. Asynchronous refresh is independent of user programs in the PLC, and is broadcast and communicated in sequence by the communication processors of each PLC, repeating the process to maintain equivalence in all link areas; Synchronized refresh is initiated by sending instructions to the link area in the user program. This method only refreshes when the data in the link area's sending area changes. In the global I/O communication mode, PLC directly uses read and write instructions to perform read and write operations on the link area, which is simple, convenient, and fast. However, it should be noted that writing operations to a certain address in one PLC can only be read operations to the same address in other PLCs. Like the periodic I/O method, the global I/O method also occupies the I/O area of the PLC, so it is only suitable for communication of a small amount of data. 3.Master-slave bus communication mode The master-slave bus communication method, also known as 1: N communication method, refers to N stations on the PLC subnet of the bus structure, of which only 1 is a master station and the rest are slave stations. 1: The N communication method adopts centralized access control technology to allocate bus usage rights, usually using the polling table method. The so-called polling table is a sequence table of slave numbers, which is configured in the master station. The master station queries the slave stations in the order of the polling table to see if they want to use the bus, in order to allocate bus usage rights. For stations with high real-time requirements, the slave number can be added several times in the rotation table to give the station higher communication priority. In some 1: N communications, the polling table method is combined with the interrupt method, allowing emergency tasks to interrupt normal periodic polling and gain priority. 1: There are two data transfer methods in N communication mode when the slave station obtains the bus usage right. One approach is to only allow master-slave communication and not allow slave communication. To exchange data between slave stations, it must be relayed through the master station; Another approach is to allow both master-slave communication and slave communication. After obtaining the bus usage rights, the slave station arranges master-slave communication first, and then arranges its own communication with other slave stations. 4.Token bus communication method
The token bus communication method, also known as N: N communication method, refers to N stations on the PLC subnet of the bus structure, with equal status and no distinction between master and slave stations. It can also be said that all N stations are master stations. N: The N communication method adopts token bus access control technology. Forming a logical loop on a physical bus, allowing a token to flow in a certain direction in the logical loop, and the station that obtains the token gains access to the bus. The token bus access control method limits the token holding time for each station, ensuring that every station has the opportunity to obtain bus usage rights and provide priority services during the token cycle. Therefore, the token bus access control method has good real-time performance. There are two types of data transmission methods for obtaining tokens, namely non responsive data transmission and responsive data transmission. When using the non responsive data transmission method, the station that obtains the token can immediately send data to the destination station, and the communication process is completed when the sending is completed; When using the response data transmission method, the communication is not considered complete after the station that obtains the token sends the data to the destination station. The entire communication process must wait for the destination station to obtain the token and send the response frame to the sending station before it ends. The latter shows a significant increase in response time and a decrease in real-time performance compared to the former. 5.Floating main station communication method
The floating master station communication method, also known as N: M communication method, is suitable for PLC networks with bus structures. It refers to M stations on the bus, where N (N<M=) are master stations and the rest are slave stations. N: The M communication method adopts a combination of token bus and master-slave bus access control technology. Firstly, N master stations are formed into a logical ring, and tokens flow sequentially in the logical ring to allocate bus usage rights among the N master stations. This is the meaning of floating master stations. The master station that obtains the right to use the bus determines which stations to communicate with during its token holding time in a master-slave manner& nbsp; Generally, there is a polling table configured in the main station, which can be used to poll other main station numbers and slave station numbers arranged on the polling table. The main station that obtains the token can prioritize communication tasks randomly proposed by users before or after polling. The master station that has obtained the right to use the bus can communicate with the destination station using various data transmission methods, among which the non response and non connection method has the fastest speed. 6.CSMA/CD communication method The CSMA/CD communication method is a random communication method suitable for PLC networks with bus structures. Each station on the bus has an equal status and no master-slave distinction. It adopts the CSMA/CD access control method, which means "listen first, then speak, and listen while speaking". The CSMA/CD access control method cannot guarantee that every station on the PLC network can obtain bus usage rights within a certain period of time, so this is an access control method that cannot guarantee real-time performance. However, it adopts a random method, which is simple and takes advantage of every opportunity. As long as the bus is idle, it rushes to the internet, and the utilization rate of communication resources is high. Therefore, CSMA/CD communication method is suitable for upper level production management subnets in PLC networks. The data transmission method of CSMA/CD communication can be selected from any of connected, unconnected, responsive, unresponsive, and broadcast communication, and can be chosen according to the requirements for communication speed and reliability. The above are commonly used communication methods in PLC networks, and there are also a few PLC networks that use other communication methods, such as token ring communication. In addition, in some PLC networks, multiple communication methods are often integrated and configured on a certain level of subnet, which is the trend of future technological development. |