In recent years, with the rapid development and widespread application of information technology represented by computers and network communications, both concepts and technologies in the manufacturing industry have undergone great changes. The traditional mass manufacturing production model centered on relatively fixed machines and production sites and managed and controlled from top to bottom is gradually shifting to a human-centered, technology-based advanced manufacturing production model. The idea of global manufacturing is to use remote resources (equipment, knowledge, manpower) to manufacture the products required by the market, and the remote monitoring technology of the processing unit becomes an important part of it. To realize the remote monitoring of the processing unit, the first problem to be solved is the network communication and control technology of the CNC machine tool.
This project is to solve the network communication and control technical problems of traditional economical CNC machine tools, and realize the centralized management and network communication of the central server of NC programs through the network. So as to adapt to the development of modern advanced manufacturing technology.
1. Demand analysis
1.1 Problems of
traditional economical CNC machine tools. Traditional economical CNC machining equipment is classified according to the CNC system: FANUC system (including 3T, 7M, HC-6, 6MB, etc.), AB company system, domestic 3B Wire cutting system, etc.: According to the type of CNC program input/output communication interface, there are three types: one type is only RS232/RS422 serial port, the second type is only paper tape reader 8/5 unit parallel port, and the three types include both The first two types of interfaces. These three types of machine tools also have the same problem: the memory capacity is small, and it is not suitable for the processing of complex, large-scale, high-precision, and long-program parts: they have poor external interface capabilities, no DNC function, and cannot realize online processing and network. Control and other issues.
1.2 The desired solution
On the premise of meeting the most basic application requirements, and leaving a certain degree of scalability and performance improvement potential, to improve the application environment of CNC machining technology. In this regard, the following solutions are proposed: the hardware transformation of the communication interface of the machine tool, the corresponding communication interface board is designed for various types of machine tools: the development of communication control software to realize the single-machine communication function of each machine tool: the development of other auxiliary functions (such as: CNC program Extraction of processing information, graphic simulation of CNC programs, online processing of long programs, etc.), to make up for and enhance the original CNC system functions: the choice of network system, the definition of communication protocols and the development of network system control software, to realize the central server of CNC programs Centralized management and network communication.
2. System structure
2.1 Network system composition and functions The
entire network system is composed of a central server, network interface, two-way data converter, field server, 1 minute N port parallel data transceiver, data receiver and economical CNC machine tools.
The central server is the central part of the entire network, and it mainly completes the overall control of servers at all levels. It adopts the background interrupt working mode, without human intervention, and its front desk can also perform other tasks.
The field server is a client, which not only serves as a CNC server, but also has a powerful network communication function. It accepts various tasks from the central server: obtains the data information of the CNC machining program from the central server from the network, and Send these data information to the NC file library: feedback the processed NC programs to the central server. It can extract the corresponding numerical control code from the NC file library of the system, and extract the relevant processing part data and information from it, process it, and realize the graphic simulation of the NC program. In addition, for parts processing that require long programs, the on-site server also completes online processing tasks for long programs.
The field server can serve multiple CNC equipment at the same time. According to the needs, set up network nodes in a certain space of the workshop (for example: a small workshop, a small local area), place a PC as the field server, and one The server selects 1 minute N port parallel data transceiver to serve multiple numerical control equipment according to actual needs. 2.2 The choice of system network architecture and communication protocol
All kinds of information in the system are transmitted through the network. In the development of computer networks, the major network systems that have a greater impact include: the OSI seven-layer reference model and the TCP/IP architecture model. The OSI reference model is the ISO7498 international standard. The TCP/IP system structure is the system structure used by the current popular Internet network. Although it is not an international standard, it occupies a very important position in the computer network system structure. This is because although the OSI system structure is relatively complete in theory, and its various layers of protocols are also well considered, in fact, commercial products that fully comply with OSI’s various layers of protocols rarely enter the market, which is far from satisfying various requirements. The needs of users. However, products that use the TCP/IP protocol have flooded into the market in large numbers. Almost all workstations are equipped with the TCP/IP protocol, and have become the de facto standard for computer networks, commonly known as “industrial standards.” For this reason, in the network communication system of CNC machine tools, we use the TCP/IP network architecture, which divides the computer network into four layers, namely the application layer, the transmission layer, the network layer and the network interface layer.
The TCP/IP architecture has developed two protocols for the transport layer, namely: Transmission Control Protocol (TCP) and User Data Packet Protocol (UDP). UDP provides users with a connectionless datagram protocol, and data packets are transmitted in the form of independent packets. , The service does not provide error-free guarantee, data may be lost, duplicated or out of sequence: the length of the data packet is also limited by the maximum length of one processing (the default value is 8192 bytes, the maximum value is 32768 bytes), and no packet splitting is performed And reassembly operation: The TCP protocol is a reliable full-duplex byte stream connection-oriented protocol. Compared with UDP, TCP has reliable transmission, no errors and no repetition of data, and can be received in the order of sending, and the data is a byte stream. , Its length is not limited, provides virtual circuit services for users, and provides verification for reliable data transmission. According to the characteristics of CNC machining, although UDP is more reliable when the transmission volume of data packets is less than 2048 bytes, the data packet service is single-packet and out-of-order transmission, and system network communication obviously cannot guarantee that all transmitted information is less than 2048 bytes, therefore, TCP can only be selected as the transport layer protocol of the system.
The choice of the communication protocol of the application layer should take into account the characteristics of CNC machining, but also have the characteristics of real-time, reliability and large data transmission. This system has separately developed corresponding protocols based on the TCP/IP protocol suite, and formulated the special meaning of the information transmitted between application processes.
The system protocol is to ensure that the application threads of the client and the server can accurately, timely, and orderly transmit information to each other, and can perform grammatical analysis and interpretation of the information without error.
For the network control system, its transmission information has its own unique meaning. The information transmitted between the client and the central server mainly includes the client’s request information, data information, and the state information of the central server.
Client control information is divided into two types: network control information and processing control information: server-side state information is also divided into two types: connection state information and client state information.
In the protocol of the system, these information stipulate the corresponding format specification, and the network control information of the client is mainly used for the establishment, maintenance and release of the connection with the server. Processing control information consists of control command words and control parameters. The network communication protocol format is: “cmd, 1byte command code, 1byte command length, command parameters, 4 bytes check code (XC)”. ‘cmd’ is the command leading code, used to identify the start of the command:’command length’ only includes the length of the command parameters and check code. If there is no command parameter, it is 4, the check code will be meaningless and will not be checked, but it must be sent.
The last 4 bytes of the transmitted data packet are the check code. The first 3 bytes are the sum of all bytes in the packet, and the fourth byte is the exclusive OR value of all bytes.
If there is a data error during the sending process, the check code of the 4th byte must be incorrect. Therefore, the reliability of the communication data is ensured by monitoring the 4th byte check code. The system uses the 2/4/8 port RS422A interface card to switch on the server side, and uses the RS-422/RS-485 bidirectional data converter to switch to the on-site server after entering the scene. The 2/4/8 port RS422A interface card and the RS-422/RS-485 bidirectional converter adopt industrial control standard interface cards.
When the on-site server serves multiple CNC machine tools, it is connected to multiple machine tools by using a “1 minute N port parallel data transceiver”. “Data Receiver” is specially designed for machine tools (such as wire cutting machines) that only have 8/5 unit parallel ports for paper tape readers. It completes the communication between the machine tool and the PC and realizes the online processing of CNC programs.
When using the data receiver, corresponding changes should be made to the wiring of the machine tool, that is: the output signal line of the original paper tape reader is combined with the corresponding 3B code data signal through the three-state gate, and the original system is sent to the paper tape reader. The step signal is used as a timing signal for the control system to write data. When the system is designed, a control switch is set to select whether to use the original paper tape reader or the data receiver.
The software of the system consists of two parts, one is the control software of the network control system, and the other is the communication software between the field server and various machine tools.
The control software of the network control system is installed in the central server. The design principle is that the central server continuously receives and analyzes data packets such as requests, commands, and information sent from each port. When a data packet is received, it will first use the check code in the packet to verify whether the packet is in error during transmission. If there is an error, it will issue a “re-send” command to the original client: if it is correct, the corresponding processing will be carried out.
For the communication between various types of machine tools and on-site servers, the basic principle of software development is: to transfer the CNC program to the CNC machine tool, first convert the CNC program into the code EIA code or ISO code that the machine tool can recognize, and then read it in the form of data packets. Enter the on-site server memory, and then send it byte by byte to the CNC machine tool control system. At the same time, the computer continuously monitors the status of the status register of the machine tool interface. When sending data from the machine tool, the communication control software always starts from the end of its program code to the top of conventional memory (0A0000H) as a buffer for receiving data.
This research solves the network communication and control technical problems of economical CNC machine tools, and realizes the centralized storage, management, network query and download functions of the central server of CNC machining programs. It solves the problem of numerical control program input and online processing of numerical control machine tools that do not have the direct communication interface function. Practice has proved that the system has the characteristics of simple operation, convenient use, stable and reliable operation, and excellent performance. Its use has greatly improved the storage, management and transmission conditions of CNC machining programs, thereby effectively improving the actual production efficiency. It has important significance and reference value for the transformation of similar CNC machine tools that do not have remote monitoring and online capabilities.
Link to this article：The difference between ordinary asynchronous motor and variable frequency motor
Reprint Statement: If there are no special instructions, all articles on this site are original. Please indicate the source for reprinting:Alloy Wiki，thanks