In recent years, with the rapid development and widespread application of information technology represented by computers and network communications, the manufacturing industry has undergone great changes in both concept and technology. The traditional mass production mode, which is centered on relatively fixed machines and production sites, and is managed and controlled from top to bottom, is gradually shifting to a people-centered, technology-based, advanced manufacturing model.
The idea of ​​global manufacturing is to use remote resources (equipment, knowledge, and manpower) to manufacture the products needed by the market, so that 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 the traditional economical CNC machine tools, through the network to achieve centralized management of centralized NC server program and network communications. To adapt to the development of modern advanced manufacturing technology.
1, demand analysis
1.1 Problems with Traditional Economic CNC Machines
Traditional economical numerical control processing equipment classified by numerical control system mainly includes: FANUC system (including 3T, 7M, HC-6, 6MB, etc.), AB company system, domestic 3B wire cutting system, etc.: Input/output communication interface according to NC program There are three types of categories: one is the RS232/RS422 serial port, the second is the tape reader 8/5 unit parallel port, and the third category includes the first two interfaces. These three kinds of machine tools also have the same problem: they have a small memory capacity and do not adapt to the processing of complex, large-surface, high-precision, and long-program parts: their external interface capability is poor, there is no DNC function, and online processing and networking cannot be realized. Control and other issues.
1.2 The desired solution
In order to meet the most basic application requirements, and to maintain a certain degree of scalability and performance improvement potential, to improve the NC machining technology application environment. In this regard, the following solutions are proposed: hardware modification of the machine tool communication interface, design of the corresponding communication interface card for various types of machine tools: development of communication control software to realize the single machine communication function of each machine tool: development of other auxiliary functions (such as: NC program Extraction of machining information, graphical simulation of NC programs, and on-line processing of long programs, etc., to compensate for and enhance the functions of the original CNC system: the selection of network systems and the definition of communication protocols and the development of network system control software, implementing the central server of NC programs Centralized management and network communications.
2, system structure
2.1 Network System Composition and Function
The entire network system consists of a central server, a network interface, bidirectional data converters, on-site servers, a 1-point N-port parallel data transceiver, data receivers, and economical CNC machine tools.
The central server is the central part of the entire network. It mainly completes the overall control of servers at all levels. It uses the background to interrupt the work mode, does not require human intervention, and its front desk can also perform other work.
The on-site server is a client, which not only serves as the numerical control server but also has powerful network communication functions. It accepts various tasks issued by the central server: it obtains the data information of the NC machining program transmitted from the central server from the network, and The data information is transferred to the NC file library: The processed NC program is fed back to the central server. The corresponding NC code can be extracted from the system's NC file library, and the relevant processed part data and information can be extracted from it, processed, and the NC program can be graphically simulated. In addition, the on-site server also performs on-line processing of long programs for parts that require long programs.
The on-site server can serve multiple numerical control devices at the same time. According to the needs, a network node is set in a certain space of the workshop (for example: a small work room, a small local area), a PC is placed as an on-site server, and a According to the actual needs of the server by selecting 1 minute N-port parallel data transceiver to serve multiple CNC equipment.
2.2 System Network Architecture and Selection of Communication Protocols
All kinds of information in the system are transmitted through the network. In the development of computer networks, the most influential network systems are: OSI Layer 7 Reference Model and TCP/IP Architecture Model. The OSI reference model is the ISO 7498 international standard. The TCP/IP architecture is the current architecture of the popular Internet network. Although it is not an international standard, it occupies a very important position in the computer network architecture. This is because although OSI's architecture is relatively complete in theory and its layers of agreements are also considered very carefully, in fact, commercial products that fully comply with OSI's layers of protocols rarely enter the market and are far from satisfying various requirements. User needs. However, products using the TCP/IP protocol have been flooded into the market. Almost all workstations are equipped with TCP/IP protocols and have become de facto standards for computer networks, commonly known as "industry standards." To this end, we use the TCP/IP network architecture in the network communication system of CNC machine tools. This system divides the computer network into four layers: application layer, transport layer, network layer, and network interface layer.
The TCP/IP architecture defines two protocols for the transport layer: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). UDP provides users with a connection-free datagram protocol. Packets are transmitted as independent packets. The service does not provide error-free guarantees. The data may be lost, duplicated, or out-of-order: The length of the data packet is also limited by the maximum length that can be processed at one time (the default value is 8192 bytes and the maximum value is 32768 bytes). Packets are not split. And reorganization operations: while the TCP protocol is a reliable, full-duplex byte-stream connection-oriented protocol, TCP and UDP are more reliable than the transmission, the data is error-free, and there is no duplication. They can be received in the sending order. The data is in the byte stream. Its length is not limited, providing users with virtual circuit services, and provides reliable inspection of data transmission. According to the characteristics of numerical control processing, although the UDP reliability is better when the data packet is less than 2048 bytes in transmission, the data packet service is single-packet and out-of-order transmission, and the network communication of the system obviously cannot guarantee that all the transmitted information is smaller than 2048 bytes, therefore, can only use TCP as the system's transport layer protocol.
The selection of communication protocols at the application layer must take into account the characteristics of numerical control processing as well as the characteristics of real-time performance, reliability, and large data transmission volume. This system has developed a corresponding protocol based on the TCP/IP protocol family, and has formulated the special meaning of the information transmitted between application processes.
2.3 Implementation of Communication Protocol
The system protocol is to ensure that the client-side and server-side application threads can communicate information with each other accurately, timely, and in an orderly manner, and can parse and interpret 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 client request information, data information, and status information of the central server.
The client's control information is divided into two types: network control information and processing control information: The server-side status information is also divided into two types: connection status information and client status information.
In the system's protocol, the information specifies the corresponding format specifications. The client's network control information is mainly used to establish, maintain, and release the server connection. Processing control information consists of control command words and control parameters. The format of the network communication protocol is: "cmd, 1byte command code, 1 byte command length, command parameter, 4-byte check code (XC)". 'cmd' is the command boot 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, and the check code will be meaningless and not verified, but it must be sent.
The last 4 bytes of the transmitted packet are the checksums. The first three bytes are the sum of all the bytes of the packet, and the fourth byte is the exclusive-or value of all bytes. If there is data error during sending, the 4th byte check code must be incorrect. Therefore, by monitoring the 4th byte check code to ensure the reliability of the communication data.
3, hardware design principles
The system uses a 2/4/8-port RS422A interface card to transfer data on the server side. After entering the site, an RS-422/RS-485 bidirectional data converter is used to transfer to the on-site server. The 2/4/8-port RS422A interface card and the RS-422/RS-485 bidirectional converter use industrial control standard interface cards.
When the on-site server serves multiple CNC machine tools, “1 N-port parallel data transceiver†is used to tap multiple machines. The "data receiver" is designed for machines (such as wire cutters) that only have 8/5 unit parallel ports for tape readers. It completes the communication between the machine tool and the PC and realizes the online processing of the NC program.
When the data receiver is used, corresponding changes shall be made on the wiring of the machine tool, that is, the 3B code data signal is integrated into the output signal line of the paper tape reader through the three-state door, and the original system is sent to the paper tape reader. The step signal serves as a timing signal for writing data into the control system. When the system was designed, a control switch was set to select whether to use a paper tape reader or a data receiver.
4, software development principle
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 of the field server and various types of machine tools.
Network Control System Control Software Development Principle
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 the data packets such as requests, commands, and information sent from each port. When a data packet is received, it will first verify with the check code in the packet whether the packet was in error during the transmission. If an error occurs, it will issue a "reissue" command to the original client: if it is correct, it will be processed accordingly.
Communication software development principle of on-site server and various types of machine tools
For the communication between various types of machine tools and on-site servers, the basic principle of software development is: To transfer the NC program to the CNC machine tool, first convert the NC program to the EIA code or ISO code that the machine tool can recognize, and then read the data package. Into the site server memory, and then sent to the CNC machine control system byte by byte, while the computer constantly monitors the state of the machine tool interface status register. From the machine, 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.
The idea of ​​global manufacturing is to use remote resources (equipment, knowledge, and manpower) to manufacture the products needed by the market, so that 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 the traditional economical CNC machine tools, through the network to achieve centralized management of centralized NC server program and network communications. To adapt to the development of modern advanced manufacturing technology.
1, demand analysis
1.1 Problems with Traditional Economic CNC Machines
Traditional economical numerical control processing equipment classified by numerical control system mainly includes: FANUC system (including 3T, 7M, HC-6, 6MB, etc.), AB company system, domestic 3B wire cutting system, etc.: Input/output communication interface according to NC program There are three types of categories: one is the RS232/RS422 serial port, the second is the tape reader 8/5 unit parallel port, and the third category includes the first two interfaces. These three kinds of machine tools also have the same problem: they have a small memory capacity and do not adapt to the processing of complex, large-surface, high-precision, and long-program parts: their external interface capability is poor, there is no DNC function, and online processing and networking cannot be realized. Control and other issues.
1.2 The desired solution
In order to meet the most basic application requirements, and to maintain a certain degree of scalability and performance improvement potential, to improve the NC machining technology application environment. In this regard, the following solutions are proposed: hardware modification of the machine tool communication interface, design of the corresponding communication interface card for various types of machine tools: development of communication control software to realize the single machine communication function of each machine tool: development of other auxiliary functions (such as: NC program Extraction of machining information, graphical simulation of NC programs, and on-line processing of long programs, etc., to compensate for and enhance the functions of the original CNC system: the selection of network systems and the definition of communication protocols and the development of network system control software, implementing the central server of NC programs Centralized management and network communications.
2, system structure
2.1 Network System Composition and Function
The entire network system consists of a central server, a network interface, bidirectional data converters, on-site servers, a 1-point N-port parallel data transceiver, data receivers, and economical CNC machine tools.
The central server is the central part of the entire network. It mainly completes the overall control of servers at all levels. It uses the background to interrupt the work mode, does not require human intervention, and its front desk can also perform other work.
The on-site server is a client, which not only serves as the numerical control server but also has powerful network communication functions. It accepts various tasks issued by the central server: it obtains the data information of the NC machining program transmitted from the central server from the network, and The data information is transferred to the NC file library: The processed NC program is fed back to the central server. The corresponding NC code can be extracted from the system's NC file library, and the relevant processed part data and information can be extracted from it, processed, and the NC program can be graphically simulated. In addition, the on-site server also performs on-line processing of long programs for parts that require long programs.
The on-site server can serve multiple numerical control devices at the same time. According to the needs, a network node is set in a certain space of the workshop (for example: a small work room, a small local area), a PC is placed as an on-site server, and a According to the actual needs of the server by selecting 1 minute N-port parallel data transceiver to serve multiple CNC equipment.
2.2 System Network Architecture and Selection of Communication Protocols
All kinds of information in the system are transmitted through the network. In the development of computer networks, the most influential network systems are: OSI Layer 7 Reference Model and TCP/IP Architecture Model. The OSI reference model is the ISO 7498 international standard. The TCP/IP architecture is the current architecture of the popular Internet network. Although it is not an international standard, it occupies a very important position in the computer network architecture. This is because although OSI's architecture is relatively complete in theory and its layers of agreements are also considered very carefully, in fact, commercial products that fully comply with OSI's layers of protocols rarely enter the market and are far from satisfying various requirements. User needs. However, products using the TCP/IP protocol have been flooded into the market. Almost all workstations are equipped with TCP/IP protocols and have become de facto standards for computer networks, commonly known as "industry standards." To this end, we use the TCP/IP network architecture in the network communication system of CNC machine tools. This system divides the computer network into four layers: application layer, transport layer, network layer, and network interface layer.
The TCP/IP architecture defines two protocols for the transport layer: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). UDP provides users with a connection-free datagram protocol. Packets are transmitted as independent packets. The service does not provide error-free guarantees. The data may be lost, duplicated, or out-of-order: The length of the data packet is also limited by the maximum length that can be processed at one time (the default value is 8192 bytes and the maximum value is 32768 bytes). Packets are not split. And reorganization operations: while the TCP protocol is a reliable, full-duplex byte-stream connection-oriented protocol, TCP and UDP are more reliable than the transmission, the data is error-free, and there is no duplication. They can be received in the sending order. The data is in the byte stream. Its length is not limited, providing users with virtual circuit services, and provides reliable inspection of data transmission. According to the characteristics of numerical control processing, although the UDP reliability is better when the data packet is less than 2048 bytes in transmission, the data packet service is single-packet and out-of-order transmission, and the network communication of the system obviously cannot guarantee that all the transmitted information is smaller than 2048 bytes, therefore, can only use TCP as the system's transport layer protocol.
The selection of communication protocols at the application layer must take into account the characteristics of numerical control processing as well as the characteristics of real-time performance, reliability, and large data transmission volume. This system has developed a corresponding protocol based on the TCP/IP protocol family, and has formulated the special meaning of the information transmitted between application processes.
2.3 Implementation of Communication Protocol
The system protocol is to ensure that the client-side and server-side application threads can communicate information with each other accurately, timely, and in an orderly manner, and can parse and interpret 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 client request information, data information, and status information of the central server.
The client's control information is divided into two types: network control information and processing control information: The server-side status information is also divided into two types: connection status information and client status information.
In the system's protocol, the information specifies the corresponding format specifications. The client's network control information is mainly used to establish, maintain, and release the server connection. Processing control information consists of control command words and control parameters. The format of the network communication protocol is: "cmd, 1byte command code, 1 byte command length, command parameter, 4-byte check code (XC)". 'cmd' is the command boot 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, and the check code will be meaningless and not verified, but it must be sent.
The last 4 bytes of the transmitted packet are the checksums. The first three bytes are the sum of all the bytes of the packet, and the fourth byte is the exclusive-or value of all bytes. If there is data error during sending, the 4th byte check code must be incorrect. Therefore, by monitoring the 4th byte check code to ensure the reliability of the communication data.
3, hardware design principles
The system uses a 2/4/8-port RS422A interface card to transfer data on the server side. After entering the site, an RS-422/RS-485 bidirectional data converter is used to transfer to the on-site server. The 2/4/8-port RS422A interface card and the RS-422/RS-485 bidirectional converter use industrial control standard interface cards.
When the on-site server serves multiple CNC machine tools, “1 N-port parallel data transceiver†is used to tap multiple machines. The "data receiver" is designed for machines (such as wire cutters) that only have 8/5 unit parallel ports for tape readers. It completes the communication between the machine tool and the PC and realizes the online processing of the NC program.
When the data receiver is used, corresponding changes shall be made on the wiring of the machine tool, that is, the 3B code data signal is integrated into the output signal line of the paper tape reader through the three-state door, and the original system is sent to the paper tape reader. The step signal serves as a timing signal for writing data into the control system. When the system was designed, a control switch was set to select whether to use a paper tape reader or a data receiver.
4, software development principle
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 of the field server and various types of machine tools.
Network Control System Control Software Development Principle
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 the data packets such as requests, commands, and information sent from each port. When a data packet is received, it will first verify with the check code in the packet whether the packet was in error during the transmission. If an error occurs, it will issue a "reissue" command to the original client: if it is correct, it will be processed accordingly.
Communication software development principle of on-site server and various types of machine tools
For the communication between various types of machine tools and on-site servers, the basic principle of software development is: To transfer the NC program to the CNC machine tool, first convert the NC program to the EIA code or ISO code that the machine tool can recognize, and then read the data package. Into the site server memory, and then sent to the CNC machine control system byte by byte, while the computer constantly monitors the state of the machine tool interface status register. From the machine, 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.
HAE floor printer machine can direct to print any format any size machine on wall for decoration and advertising, printing resolution up to 2880dpi
Wuha HAE specializes in R & D and manufacturing of Wall Printing Machine, UV Wall Printer, and direct floor printer, high quality, global services.
Floor Printer, Ground Printer, Direct Floor Printer, Direct Ground Priinter
Wuhan HAE Technology Co., Ltd. , https://www.whwallprinter.com