Realization of Network Control System of NC Machine Tool

Introduction <br> With the development of network technology, network control technology has increasingly attracted everyone's attention. The network control system combines computer network technology and automation control technology to achieve network control. The network control system integrates machine tool technology, control technology, communication technology, detection technology, image technology, computer software technology and network technology. Remote monitoring of the machine tool via Internet/Intranet can make the machine tool more flexible and controllable. . Many scholars at home and abroad have researched and developed the network control system, some are based on the Web communication platform, some use Windows as the development platform, use VC++ tools, use the Windows Sockets technology, and some are based on the CORBA middleware technology.
This article uses Java Sockets technology to achieve real-time monitoring of machine tools through the network.
1, Java Introduction
For the universal network programming language, the three necessary pillars are: portability, speed, and security. Figure 1 shows the results of comparing Java with other languages.
The performance of the Java language is relatively balanced in all aspects. Through the above comparison and analysis, it is known that using the Java language is a correct choice both in terms of long-term development and current needs. As a network control system developed and used in the network environment, it must have good versatility, cross-platform, stability, and security. Using Java language to achieve network programming can meet its needs in all aspects.
Java provides two powerful network support mechanisms: URL access to network resources and socket communication to meet different requirements. One is the application of URL for accessing Internet resources on the Internet; the other is for client/server (client/server) mode applications and applications that implement certain special protocols. Its communication process is based on the TCP/IP protocol. Transport layer interface socket implementation.
1.1 TCP/IP Protocol The so-called TCP/IP is just an abbreviation. They refer to the Internet Protocol (IP) and the Transmission Control Protocol (TCP). They are two very important communication protocols in the Internet technology and are applicable to any one of them. Group communication on the Internet. And the cost of establishing TCP/IP as a network is relatively small, and the network built with TCP/IP is also more flexible. The TCP/IP architecture is specifically used to describe the TCP/IP protocol family. The TCP/IP architecture divides the network into four layers: application layer, transport layer, network layer, and data link layer.
1.2 Introduction to Java Sockets Sockets is a general-purpose network programming interface. It is an abstraction of communication endpoints and provides a mechanism for sending and receiving data. There are currently two types of sockets: Datagram Sockets and Stream Sockets. We use streaming sockets because streamed sockets can send data to destinations sequentially and without duplication. It provides a reliable connection-oriented data transfer method.
1.2.1 Usage of streaming sockets The use of streaming sockets is based on the connection protocol. Before the data can be transmitted and received, a connection must be established before data can be read from the data stream. First, the server creates a socket for listening. After assigning an address to the socket, it calls the listen( ) function to make it listen. After the client finishes creating the socket, it allocates the socket. The address then calls the connect () function to request a connection with the server socket; after the server socket receives the client's connection request, it calls the accept () function, which creates a socket for the connection. Applying the socket and the connection socket on the client allows data transfer between the server and the client. After the transfer is completed, both parties call the closesocket() function to close the socket. Its use as shown in Figure 2.
2. Implementation of Network Control System 2.1 Principle of Network Control System The network control system software runs on the client, and the client connects to the server through Intranet/Internet. The CNC system of the machine tool runs on the server. First, the server's local CNC system is started. After the initial setup, it enters the network control state, opens the listening socket word, waits for the client's connection request, and waits for the client's connection request. After that, the online information is verified. If the online conditions are met, a connection is established with the client, and both parties can send and receive information or instructions to each other. The server's CNC system can use the camera to collect real-time image and parameters of the machine tool under the state of network control. The image is stored in bitmap format and sent to the client to display the processing status. The status parameters are sent to the client in real time; the server and the client Machines can also communicate via super voice or network intercom. The CNC machining code can be edited in the client's remote control system software, then the CNC code is passed to the server and downloaded to the PMAC for control commands. Send machine control commands from the client to the server, control the operation of the machine, receive the information sent by the server, and dynamically monitor the processing of the machine. Through the remote control program, the client can also modify the machine processing parameters online and can debug the machine.
2.2 Network Control System Hardware Structure This paper designed a set of NC embedded PC type open CNC system. The number of control axes of the system is 3 axes and the number of linkage axes is 2 axes. The industrial PC is used as the host in this system. The CNC kernel adopts the United States DELTATAU to launch the PMAC-LITE programmable multi-axis motion controller. The CPU and PMAC on the PC The CPU of the card constitutes a master-slave dual-microprocessor architecture. The two CPUs implement corresponding functions, among which the PMAC performs interpolation operations, position control, tool compensation, speed processing, and PLC real-time control; the PC then calls the Pcomm32 package function. Corresponding function functions of Curry achieve the basic functions of the numerical control system. In order to realize the PMAC multi-axis motion control function, it is necessary to expand the corresponding I/O board, servo drive unit, servo motor, encoder, etc. on the PMAC board to form a complete control system. The network system adopts the "server + client" mode, the CNC system runs on the server, the network control software runs on the client, the server and client connect to the Intranet/Internet through the network card and communication cable, and the CCD camera is installed on the CNC machine tool. To monitor the machine processing conditions, and through the image acquisition card, the real-time acquisition and preservation of the machine's operation; server and client PC are set on the voice function, so that the two can better communicate through dialogue. The system hardware structure is shown in Figure 3.
2.3 Network Control System Software A friendly human-machine interface is indispensable for any control system. The interface design of this system adopts the separate vision technology in Windows programming and divides the human-machine interface of the numerical control system into two sub-windows. The left window is the image display window, which realizes the image monitoring of the machining process; the right window is the network control window, which realizes the functions of network connection and disconnection, processing code editing and sending, machine tool processing state parameter display, and online machine tool debugging.
The key of software design is the network transmission of data. In order to ensure the timely delivery of data, multithreading technology is adopted in software design, and a thread is specially established to carry out network transmission of acquired machine tool data. The flow chart of this system is shown in Figure 4. After the NC code is edited on the client, it can be passed to the server once. The server saves the NC code to the memory and compiles and executes the NC code. The transfer of control instructions can be passed from the client to the server at any time, and the server immediately executes the instructions. The transfer of machine tool image and state parameters will be more complicated. On the server, the CNC system collects and processes the image in real time through the CCD camera, uses the timer to save the image as a bitmap file in each cycle, and then transmits the bitmap file to the client through the network, and the client receives each bit. After the picture file, the timer is used to refresh and display the picture display window in each cycle so that the processed picture remains continuous. At the same time, the numerical control system on the server collects the machine tool status parameters in real time, uses the timer to transmit the data in a certain format to the client every time, the client analyzes the data after receiving, and then uses the timer to perform the status parameter in one cycle. Update display.
In order to avoid the confusion of bitmap data and parameter data during transmission, an interrupt method is used on the server side to interrupt the transmission of parameter data when transferring image data, and then transfer the parameter data after the image data is transmitted, which is a good solution. The contradiction of the occupied channel in the data transfer process. There is a certain lag in image display and parameter update during the running of the software. This has a certain relationship with the speed of network transmission and the size of data.
3, network security strategy
The security of remote control is a very critical and complex issue. It mainly includes information integrity, confidentiality and availability. The use of encrypted network security technology can provide end-to-end security of network communications. Firewall technology can also improve the server-side security level. In addition, vulnerability scanning and intrusion detection technology also bring benefits to improve system security performance.
4. Summary <br> This article describes in detail a set of network control system applied to CNC machine tools, based on TCP/IP communication protocol, using Java Sockets (sockets) to establish a server/client model, host with a numerical control system As a server, the network console acts as a client. Through the client's network control and debugging of CNC machine tools, the machine can be made more flexible and controllable. The system can remotely operate the machine tool in real time, basically achieving the purpose of dynamic debugging and monitoring the operation of the machine tool. It provides an efficient way for machine tool control and debugging technology, and has certain practicality and value.

Graphite Melting Crucible

Huixian Mishan Graphite Company can produce kinds of Graphite Products. The popular product is Graphite Crucible. The large size graphite crucible is widely used in metallurgy. The diameter can reach 800mm. This type graphite crucible always use the fine grain type graphite material and the electrode type graphite material. Since the size is too large but there is no large size high pure type graphite material and it will be very expensive. Fine grain type graphite material is enough for the use. For smaller type graphite crucible, you can choose the graphite material as need.

Graphite Melting Crucible, Graphite Crucible, Melting Silver Graphite Mold,Raw Graphite Rounds

Huixian City Mishan Graphite Jip Co., Ltd. , https://www.msgraphitemold.com

This entry was posted in on