Nhà> Blog> Real - time Communication Design and Realization of Electric Valve Performance Test System

Real - time Communication Design and Realization of Electric Valve Performance Test System

March 01, 2023
Abstract: This paper presents a real-time communication system based on 485 bus, which consists of a control center PC and a number of single-chip microcomputer control systems, and focuses on the use of VB to realize the real-time communication program between PC and a number of single chip microcomputer control system The design method realizes the real-time control and management of multiple remote units by the PC. 1 Introduction In many real-time monitoring systems, often need to receive data from remote control points, how to quickly and reliably remote data transmission is that these monitoring systems must be addressed The problem. In the monitoring site, in order to reduce the cost of the system, SCM system is often used as a data acquisition and recording unit. In central control centers, PCs are often used to complete human-machine conversations and communicate with the monitoring site. This article presents a practical Master / Slave remote real-time communication system for the performance test system of electric devices. The lower computer of the detection system is controlled by 32-bit ARM microcontroller (L PC2214) and two CPLD (XC95108) expansion I / O ports for peripheral devices such as loading motor, unloading motor, photoelectric encoder and AD converter SCM system, and a keyboard for data input and LCD display of the various functional interface, and printer print test performance parameters of qualified products record. The PC's management platform is based on Visual Basic 610. The system through the performance parameters of the product testing, strictly avoid unqualified products factory, improve product quality and enhance the market competitiveness of products. The communication system takes the twisted pair of the production site as the communication medium. The upper computer realizes the remote real-time communication with the lower computer by the communication control MSComm of VB 610, and the lower computer is used in the production workshop and achieved satisfactory results. 2 system structure and working principle 2.1 Structure Network system consists of a control center and a number of remote units RTU (Remote Terminal Unite) (Figure 1). Control center by the host computer and RS232 / 485 converter, the remote unit is based on the ARM microcontroller as the core of the electric device performance testing system (Figure 2). 2.2 Working Principle As a system of data terminal equipment DTE (Da2ta Terminal Equipment), the control center is responsible for the realization of the remote electric device performance testing system for the detection of data discrimination, storage and so on. PC through the 485 communication cable and remote electric device performance testing system, the transfer rate of 9 600 bps, port data transfer rate can be set according to system requirements for the 1200 bps ~ 19 200 bps [1]. The remote electric device performance testing system through optical encoder and AD converter on the field performance parameters of the device data acquisition, the use of MAX1480 chip and PC data transmission, and through the two CPLD data input and output switching, in order to achieve On-site equipment control and parameter measurement. Electric device performance testing system also reset, fault alarm and chip normal work detection system. <BR> Communication system to control center PC and remote SCM control system through 485 communication cable to the same frequency asynchronous half-duplex mode for data transmission, the PC sends a token to the remote unit through the serial port , The remote unit to send their own token to send data to the PC, PC after receiving the data back to the correct information. In order to achieve the control center of the remote device control and data acquisition. 3 real-time serial communication programming 3.1 Communication Protocol (1) a frame of data from a start bit, 8 data bits, a parity bit, a stop bit 11 in total. (2) The baud rate is 9 600 bps. The serial port of the microcontroller of the electric device test system selects UART0 for data sending and receiving. In order to get the accurate baud rate, the ARM microcontroller adopts a crystal oscillator with an oscillation frequency of 111059 2 MHz. The baud rate of PC serial port is set by the setting property of MSComm of VB communication control. To ensure the accuracy of data transmission, the baud rate of both must be the same. (3) The system adopts asynchronous communication mode, the host computer communicates with the remote unit via token - passing bus [2]. The information sent by the PC is fixed 4 bytes. The first byte and the second byte, respectively, for the initial identifier and remote unit specific address number, the first three bytes that send a token or command, the first four bytes for the end of the identifier. (4) After receiving the token, the remote unit judges the token as the unit according to the address number of the token and the address of the unit, and the bus is in the state of receiving data. The unit starts sending messages, sending a total of 158 bytes of information. The first byte and the second byte, respectively, that the starting identifier and command symbol, the first three bytes that the number of data, the first four to 157 bytes of collected test data, the first 158 ​​words The section indicates the end marker. If the address does not match, the token is forwarded to the next cell [3]. The communication method shown in Figure 3. 3.2 Remote SCM control system serial communication program design Remote ARM microcontroller interrupt data reception, based on software ADS112 programming and PC communication, PC communication subroutine flow chart and sub-machine interrupt subroutine flow chart shown in Figure 4 And Figure 5 shows. The host PC in the control center always sends the token in a loop. When the remote unit receives the same token as the local address, it receives the data token. After receiving the token, the remote unit starts to upload the data to the host PC, At the same time, the PC stops sending the token and is in the receiving data state. After receiving the data and verifying the data, the PC sends a confirmation command to the remote unit. If no data is received or the data is not qualified, an error flag is sent to the remote unit. If the received token differs from the local address, the program returns to the interrupt entry and continues with the rest of the operations. This ensures that the remote unit sends the data to the host PC accurately. 3.3 Host PC serial communication program design PC using VB 610 programming, with VB 610 development of serial communication program commonly used in two ways: one is to use Windows API functions; the other is the use of VB communication controls MSComm. The use of API functions to write serial communication program more complicated, you need to call many cumbersome API functions, and VB610 MSComm communication controls provide standard event handling functions, events and methods, users do not have to understand the communication process of the underlying operations and API functions [ 4〕, which is relatively easy and efficient serial communication. Control provides two functions of a complete serial data receiving and sending functions: one is the query method, the value of Com2mEvent to poll (polling) events and communication status, you can use the timer and DO. Loop program to achieve; the other Event - driven, the use of MSComm control OnComm events to capture serial communication errors or events, and write procedures in the OnComm event for the corresponding treatment [5]. The software system uses a timer to send the token and receive remote microcontroller receipt information, so that PC to make a faster response. Software timer Timer1 control to achieve the token sent by the cycle. Which set the timer response time is 10ms (Timer11Internal = 10). 3.4 Lower computer ARM2210 series microcontroller serial communication programming method Lower computer software ADS112 programming, this software is designed for ARM microcontroller developed a software similar to the C language language, has good applicability. 4 Conclusion The system used in the remote monitoring of the equipment, the communication network part of the smooth operation of the data transmission error rate is low, the transmission speed to meet the requirements of high efficiency, easy operation, networking convenient to meet the production site data detection and control Claim. The system can be widely used in high-precision industrial measurement and control and data acquisition and other fields.
Liên hệ chúng tôi

Author:

Ms. Lucia Peng

Phone/WhatsApp:

+8613531888018

Sản phẩm được ưa thích
You may also like
Related Categories

Gửi email cho nhà cung cấp này

Chủ đề:
Thư điện tử:
Tin nhắn:

Your message must be betwwen 20-8000 characters

We will contact you immediately

Fill in more information so that we can get in touch with you faster

Privacy statement: Your privacy is very important to Us. Our company promises not to disclose your personal information to any external company with out your explicit permission.

Gửi