PLC Network Communication Research
Abstract: This paper introduces the method of multiple PLC network communication based on PC host computer, realizes data sharing and coordinated control between multiple devices, and improves the reliability and flexibility of system control. The networking communication method is simple, highly reliable, and has certain practical application value.
Keywords: PLC; networking; communication; data sharing;
introduction
By connecting PLC and PLC or PLC and computer and other intelligent devices through a transmission medium, you can achieve communication or build a network, thereby forming a PLC network control system with stronger functions and better performance. This can greatly improve the PLC's control range and control scale, achieve data sharing and coordinated control between multiple devices, improve the reliability and flexibility of the control system, increase the system's monitoring and scientific management level, and facilitate the user's Program development and application [1,2]. At the same time, the PC is used as the host computer to realize the monitoring and management of each PLC and the processing of the control data, and also provides a friendly man-machine interface control platform.
1 Communication system networking structure
The programmable controller's networking structure mainly refers to physically connecting each node to form a network, realize communication, and form a more powerful control system. Commonly used connection structures mainly include link structures and network structures. In the communication network, each network node and each user host must communicate in accordance with a set of rules and protocols established in advance. In 1979, the International Organization for Standardization proposed a set of open system interconnection reference models, which defined various devices connected Structural framework for communication.
The controller of the networking control system is a Mitsubishi FX2N-48MR programmable controller. The RS-232C / 485 conversion interface and the FX-485ADP communication module are used to form a 1: 8 networking control system to realize the sending and receiving of control and monitoring data. The upper computer monitors the data communication between PLCs, and the modification of the development program is written and downloaded by the upper computer PCc. The structure diagram of the network communication system between the host computer and PLC is shown in Figure 1.
2 Communication protocol and communication format
1) System communication protocol
The transmission parameters and transmission control protocol of the Mitsubishi FX2N-48MR PLc are set in the internal register D8120. The parameter setting of the register can be set by b0 to set the data length; b1b2 to set the parity; b3 to stop the bit setting; b4-b7 to control the baud rate setting bit ; b13 bit is the check bit; b14 bit is the protocol bit; b15 bit is the transmission control protocol setting. In this networking control system, the communication method uses half-duplex, and the synchronization method uses the start-stop bit method to synchronize, the transmission rate is 9600bps, the start bit is 1 bit, the data length is 7 bits, and the parity check is even check. Stop bit is 1 bit, checksum is used, Mitsubishi special protocol is adopted, D8120 is set to H6082.
2) Setting of station number
The station number of each PLC controller is specified in the network control system, and the number provided by the programmable controller is used to determine which programmable controller the computer is accessing. In the Mitsubishi FX2N-48MR PLC, the station number is determined by the D8121 register, and the instruction MOVE KX D812l can be applied, where x can be from 00H to 0FH. The station number is set to 0-7 in this system. The system uses a character-oriented communication protocol. Data transmission is in units of frames. The host computer and the lower computer only transmit one frame of information at a time. The master station sends a command frame to initiate communication. The PLC of the slave station accessed contains the command of its own slave station , The slave station sends out a response frame, the slave station informs the master station which slave station to communicate with.
The information frame format is shown in Figure 2.
ENQ computer sends a request, ASCII code is 05H: ACK PLc confirms the computer ’s question, ASCII code is 06H; NAK PLC responds to the computer ’s question, ASCII code is 15H; STX information frame start flag, ASCII code 02H; ETX information frame end mark, ASCII code 03H. The command sent from the PC to the PLC is answered by NAK when the PLC does not understand it.
Connector 3.96Mm Pitch,Ressure Welding Bar Connector,Wire To Board Power Connector,Tcj6 Wire-To-Board Connector
YUEQING WEIMAI ELECTRONICS CO.,LTD , https://www.weimaiconn.com