Support the numerically controlled machine remote control method of multi-point cross-platform communication
Technical field
The present invention relates to fields of numeric control technique, specifically a kind of numerically controlled machine remote control method of supporting multi-point cross-platform communication.
Background technology
Along with continuous progress and the industrial standardization of scientific and technological level, a large amount of numerically-controlled machines are applied to production practices, and this just needs the technician with skilled operation lathe ability more.Improved the human cost of enterprise on the one hand, operating personnel's technical merit has determined the work efficiency of numerically-controlled machine to a great extent on the other hand, and then has increased industrial uncertainty.The numerically controlled machine remote control technology can be separated operation, the monitoring of numerically-controlled machine with this locality processing, integrate by remote technology by the man-machine interface with a plurality of numerically-controlled machines, by technician's unified management of skilled operation, farthest save human cost, improve commercial production efficient.
Existing numerically controlled machine remote control method can not satisfy the demand of modern processing fully.One not with Long-distance Control scale to greatest extent, only supports single man-machine interface to the control of numerically-controlled machine; They are two years old, can not control the action of numerically-controlled machine in the monitoring numerically-controlled machine, can only the status information that numerically-controlled machine is limited be presented on long-range single man-machine interface, the condition monitoring of realization to numerically-controlled machine, the major part action of numerically-controlled machine still will be controlled to complete by this locality, has weakened man-machine interface as the control action of an operating terminal to numerically-controlled machine; Its three, there is no unified interface, its realization depends on concrete operating system platform, needs on stream to solve the difference in the telecommunication that brings due to the operating system difference.Publication number is that the patent document of CN101196738A is prior art.
In sum, the numerically controlled machine remote control technology faces problems such as how solving multiple spot connection, cross-platform communication and the two-way control of numerically-controlled machine.
Summary of the invention
The process control far away for numerically-controlled machine in prior art can only realize the weak points such as the unidirectional control of single-point, the technical problem to be solved in the present invention has been to provide a kind of numerically controlled machine remote control method of supporting multi-point cross-platform communication, the method can realize a plurality of long-range man-machine interface edge of different operating system platform to the control of remote numerical control lathe, and operating personnel can control the remote numerical control lathe as the local numerically-controlled machine of operation.
For solving the problems of the technologies described above, the present invention by the following technical solutions:
The present invention supports the numerically controlled machine remote control method of multi-point cross-platform communication to comprise the following steps:
Numerically-controlled machine tool system is divided into based on client's HMI end with based on the NC end two parts of serving;
With NC end be divided into the machine control unit of controlling the numerically-controlled machine operation and with the local service end of long-range man-machine interface communication be the SVR end;
Hold the buffer zone of setting up respectively based on communication, i.e. HMI buffer zone and SVR buffer zone at HMI end and SVR;
The SVR end is divided into SVR message layer, SVR network control layer and SVR system platform relevant layers;
The HMI end is divided into client layer, HMI message layer, HMI network control layer and HMI system platform relevant layers;
The instruction that the HMI end produces sends the SVR end to the form of synchronizeing with buffer zone, and the SVR end sends with the same form of synchronizeing with buffer zone the numerically-controlled machine status data that machine control unit produces to the HMI end;
HMI end takes out the conditions of machine tool data by HMI message layer, client layer from the HMI buffer zone, be presented on HMI end subscriber interface;
The SVR end takes out user instruction by the SVR message layer from the SVR buffer zone, pass to machine control unit, controls the lathe action.
The control procedure of described client layer, HMI message layer, HMI network control layer and HMI system platform relevant layers is as follows:
The client layer of HMI end produces user instruction, will be presented at from the message of message layer on man-machine interface;
The HMI message layer takes out status information by the read-write mechanism of setting up and is packaged into message and passes to client layer from the block of information of HMI buffer zone, client layer message is write the command area of HMI buffer zone;
The HMI network layer becomes the socket based on ICP/IP protocol to flow the data encapsulation in the HMI buffer zone, passes to HMI platform relevant layers, will write the HMI buffer zone from the data that HMI platform relevant layers obtains;
HMI platform relevant layers is called unified network-driven interface, and data are delivered to the NC end from the HMI network layer by Ethernet, reads the NC end data from Ethernet and passes to the HMI network layer;
The control procedure of described SVR message layer, SVR network control layer and SVR system platform relevant layers is as follows:
SVR platform relevant layers is called unified network-driven interface, to the SVR network layer, the data of SVR network layer is delivered to the HMI end by Ethernet from the Ethernet read data transfer;
The SVR network layer becomes the socket based on ICP/IP protocol to flow the data encapsulation in the SVR buffer zone, passes to SVR platform relevant layers, will write the SVR buffer zone from the data that SVR platform relevant layers obtains;
The SVR message layer is packaged into message with command messages from the command area taking-up of SVR buffer zone by the read-write mechanism of setting up and passes to machine control unit, status information is write the block of information of buffer zone;
HMI buffer zone and SVR buffer zone all are divided into two, i.e. block of information and command area, and wherein the block of information is the continuum without the read-write restriction, is used for a storage user lathe point information, warning message, I/O information state information; The command area is limited read-write, can only store an order.
Status information is taken out the process that is packaged into message from the block of information of HMI buffer zone as follows:
Message layer obtains data from buffer zone, creates the object based on classes of messages;
Whether the data that judgement is obtained are the command area data;
If the data of obtaining are not the command area data, type of message is set to 1, namely putting type of message is information type;
Information is write the object variable range pointed of classes of messages;
This message encapsulation process finishes.
Command messages is as follows from the process that the command area taking-up of SVR buffer zone is packaged into message:
Message layer obtains data from buffer zone, creates the object based on classes of messages;
Whether the data that judgement is obtained are the command area data;
If the data of obtaining are command area data, type of message is set to 0, namely putting type of message is command type;
Order is write the object variable range pointed of classes of messages;
This message encapsulation process finishes;
The process that the SVR message layer takes out from SVR buffer zone command area by the read-write mechanism set up is:
Judge whether the data that the SVR message layer reads are the order data type;
If the order data type judges whether the command area is readable;
If the command area is readable, reading order;
Be packaged into message by the SVR message layer;
The command area is set to can write state;
Withdraw from this read operation.
If the command area is not readable, withdraw from this read operation.
The HMI message layer takes out status information by the read-write mechanism of setting up from the block of information of HMI buffer zone process is:
Judge whether the data that the HMI message layer reads are the order data type;
If not the order data type, whether type is read in judgement is the conditions of machine tool type;
If the conditions of machine tool type reads conditions of machine tool;
Be packaged into message by message layer;
Withdraw from this read operation.
If not the conditions of machine tool type, prompting is read and is made mistakes;
Withdraw from this read operation.
The HMI message layer by the process that the read-write mechanism of setting up writes client layer message the command area of HMI buffer zone is:
The HMI message layer obtains message from client layer;
Judge whether type of message is 0, whether is namely order;
If type of message is 0, judge whether the command area is to write state;
If the command area is for can write state, the variable range data that message is pointed write the command area;
Be set to the command area state readable;
This write operation finishes.
If the command area is for can not write state, this write operation finishes.
The SVR message layer by the process that the read-write mechanism of setting up writes status information the block of information of buffer zone is:
The SVR message layer obtains message from machine control unit;
If type of message is 1, be the numerically-controlled machine information type, the variable range data that message is pointed write the address space corresponding to block of information of SVR buffer zone;
This write operation finishes.
If type of message is not 1, prompting is write message and is made mistakes;
This write operation finishes.
The present invention has the following advantages and beneficial effect:
1. support transmitted in both directions.The numerically-controlled machine of application the inventive method both can have been accepted the order from long-range man-machine interface, the running status of self can be presented on long-range man-machine interface in real time again.
2. the multiple spot of network enabled connects.The inventive method can be connected with a plurality of long-range man-machine interface edges a number of units controlled machine, and any long-range man-machine interface instruction of end all will be responded in the multiple spot connection procedure, and the numerically-controlled machine status data is open to all long-range man-machine interfaces.
3. support cross-platform connection.Adopt the inventive method not rely on specific operating system platform to the Long-distance Control of numerically-controlled machine, can realize interconnected between Windows operating system, (SuSE) Linux OS, Vxworks operating system.
4. individual packages, interface opening is convenient to secondary development.The inventive method can make the developer needn't consider the details that realizes of Long-distance Control, only need call unified open interface, and exploitation meets the man-machine interface program of demand separately.
Description of drawings
Fig. 1 is the overall construction drawing of the inventive method;
Fig. 2 is the buffer zone structural drawing of the inventive method;
Fig. 3 is the message encapsulation process process flow diagram of the inventive method;
Fig. 4 is that the inventive method is carried out the process flow diagram of read operation to buffer zone;
Fig. 5 is that the inventive method is carried out the process flow diagram of write operation to buffer zone;
Fig. 6 is the data flow diagram of numerically-controlled machine and the long-range man-machine interface alternation of the inventive method.
Embodiment
The present invention supports the numerically controlled machine remote control method of multi-point cross-platform communication to comprise the following steps:
Numerically-controlled machine tool system is divided into based on client's HMI end with based on the NC end two parts of serving;
With NC end be divided into the machine control unit of controlling the numerically-controlled machine operation and with the local service end of long-range man-machine interface communication be the SVR end;
Hold the buffer zone of setting up respectively based on communication, i.e. HMI buffer zone and SVR buffer zone at HMI end and SVR;
The SVR end is divided into SVR message layer, SVR network control layer and SVR system platform relevant layers;
The HMI end is divided into client layer, HMI message layer, HMI network control layer and HMI system platform relevant layers;
The instruction that the HMI end produces sends the SVR end to the form of synchronizeing with buffer zone, and the SVR end sends with the same form of synchronizeing with buffer zone the numerically-controlled machine status data that machine control unit produces to the HMI end;
HMI end takes out the conditions of machine tool data by HMI message layer, client layer from the HMI buffer zone, be presented on HMI end subscriber interface;
The SVR end takes out user instruction by the SVR message layer from the SVR buffer zone, pass to machine control unit, controls the lathe action.
As shown in Figure 1, for implementing the overall construction drawing of the inventive method.The HMI end is connected by Ethernet with the NC end.The present invention sends with the synchronous form of buffer zone the instruction that HMI end produces to the SVR end, is used for the action of operating numerical control lathe.The SVR end sends with the synchronous form of same buffer zone the numerically-controlled machine status data that machine control unit produces to the HMI end, is used for being shown to operating personnel.This data interaction is held four-layer structure jointly to coordinate with the SVR three-decker by HMI and is completed, finally reach the purpose of Long-distance Control numerically-controlled machine.
Described HMI buffer zone and SVR buffer zone structure are as shown in Figure 2.The HMI end has been set up respectively the identical core buffer of structure with the SVR end, and buffer zone is divided into block of information and command area.The status informations such as data area stores user lathe point position information, warning message, I/O information are not continuums of read-write restriction; The order that command area storage operation personnel send, for guaranteeing order and the promptness of command execution, an order can only be stored in the command area.Only taken away from the command area when an order, just allow new order to write the command area.The present invention realizes the transmission of data by controlling the synchronous of these two buffer zones.
Described client layer is and unique interface layer of operating personnel's direct interaction that this layer produces user instruction, and shows a numerically-controlled machine point information, peripherals status information, prompt messages etc.
Described HMI message layer and SVR message layer are packaged into message (containing type of message and variable range) with all show states of numerically-controlled machine, user instruction, and set up message layer for the read-write interface of HMI, SVR buffer zone.
As shown in Figure 3, status information is taken out the process that is packaged into message from the block of information of HMI buffer zone as follows:
Message layer obtains data from buffer zone, creates the object based on classes of messages;
Whether the data that judgement is obtained are the command area data;
If the data of obtaining are not the command area data, type of message is set to 1, namely putting type of message is information type;
Information is write the object variable range pointed of classes of messages;
This message encapsulation process finishes.
Order is as follows from the process that the command area taking-up of SVR buffer zone is packaged into message:
Message layer obtains data from buffer zone, creates the object based on classes of messages;
Whether the data that judgement is obtained are the command area data;
If the data of obtaining are command area data, type of message is set to 0, namely putting type of message is command type;
Order is write the object variable range pointed of classes of messages;
This message encapsulation process finishes;
As shown in Figure 4, the inventive method to the concrete execution in step of process flow diagram that buffer zone carries out read operation is:
Judge whether the reading out data type is the order data type;
The process of taking out from SVR buffer zone command area by the read-write mechanism set up as the SVR message layer is:
Judge whether the data that the SVR message layer reads are the order data type;
If the order data type judges whether the command area is readable;
If the command area is readable, reading order;
Be packaged into message by the SVR message layer;
The command area is set to can write state;
Withdraw from this read operation;
If the command area is not readable, withdraw from this read operation.
The HMI message layer takes out status information by the read-write mechanism of setting up from the block of information of HMI buffer zone process is:
Judge whether the data that the HMI message layer reads are the order data type;
If not the order data type, whether type is read in judgement is the conditions of machine tool type;
If the conditions of machine tool type reads conditions of machine tool;
Be packaged into message by message layer;
Withdraw from this read operation;
If not the conditions of machine tool type, prompting is read and is made mistakes;
Withdraw from this read operation.
As shown in Figure 5, the HMI message layer by the process that the read-write mechanism of setting up writes client layer message the command area of HMI buffer zone is:
The HMI message layer obtains message from client layer;
Judge whether type of message is 0, whether is namely order;
If type of message is 0, judge whether the command area is to write state;
If the command area is for can write state, the variable range data that message is pointed write the command area;
Be set to the command area state readable;
This write operation finishes;
If the command area is for can not write state, this write operation finishes;
The SVR message layer by the process that the read-write mechanism of setting up writes status information the block of information of buffer zone is:
The SVR message layer obtains message from machine control unit;
If type of message is 1, be the numerically-controlled machine information type, the variable range data that message is pointed write the address space corresponding to block of information of SVR buffer zone;
This write operation finishes;
If type of message is not 1, prompting is write message and is made mistakes;
This write operation finishes.
Described HMI network control layer and SVR network control layer are processed the synchronous of based on network remote buffer.All data of buffer zone are packaged into web socket data stream based on ICP/IP protocol at this one deck, transmit by Ethernet and reach the synchronous of remote buffer, thereby realize the data transmission of HMI Long-distance Control.
Described HMI system platform relevant layers and SVR system platform relevant layers are to mainstream operation system, as the Windows system, linux system, the network-driven of Vxworks system encapsulates, unified the relevant interface of system call, the implementation procedure relevant to platform called with the upper strata separated, thereby realize the cross-platform access that numerically controlled machine remote is controlled.
The numerically-controlled machine of the inventive method and the data flow diagram of long-range man-machine interface alternation are as shown in Figure 6.Data stream mainly comprises user command transmitting data stream and numerically-controlled machine state transfer data stream.The user command transmitting data stream is that operating personnel are sent to the SVR end in the operation of long-range man-machine interface edge with the form of ordering, and allows numerically-controlled machine complete relevant action according to operating personnel's instruction; Numerically-controlled machine state transfer data stream is that the information such as a numerically-controlled machine point information, peripheral I/O state are fed back in time on the display terminal of long-range man-machine interface, allow operating personnel understand timely the machining state of today's numerical control lathe, numerically-controlled machine ruuning situation is carried out Real Time Monitoring.Concrete reciprocal process is as follows:
Described user command hop has been introduced operating personnel's long-range man-machine interface operation order and how by network, numerically-controlled machine have been controlled.Operating personnel's the corresponding a piece of news of each operation, when operating personnel carried out an operation, the client layer of HMI end produced user instruction, i.e. a piece of news.The HMI message layer writes this message the command area of buffer zone by the writing mechanism of setting up, and data new in buffer zone flow by the web socket that the HMI network layer is packaged into based on ICP/IP protocol.Call by the unified network-driven interface of HMI platform relevant layers, data stream is sent to the SVR end by Ethernet.The platform relevant layers of SVR end is called unified network-driven interface data stream is taken out, and transfers to the SVR network layer data stream is write the SVR buffer zone.The SVR message layer is read instruction by read operation from the buffer zone command area, be packaged into message, and passes to machine control unit and operate accordingly.Completed an instruction from producing the whole process of final execution by long-range control method provided by the invention.
Described numerically-controlled machine state transfer introduced various information that numerically-controlled machine produces in operational process how by network-feedback to long-range man-machine interface operation personnel.In the numerically-controlled machine operational process, machine control unit produces a some information, warning message etc.The SVR message layer becomes message to write in the block of information of SVR buffer zone the Information encapsulation that produces, and data new in buffer zone flow by the web socket that the SVR network layer is packaged into based on ICP/IP protocol.Call by the unified network-driven interface of SVR platform relevant layers, data stream is sent to the HMI end by Ethernet.The platform relevant layers of HMI end is called unified network-driven interface data stream is taken out, and transfers to the HMI network layer data stream is write the HMI buffer zone.The HMI message layer is read information by read operation from the buffer zone block of information, be packaged into message, passes to client layer.Client layer is presented at message on long-range man-machine interface terminal, feeds back to the man-machine interface operating personnel.Completed the remote monitoring of numerical tool operation personnel to the numerically-controlled machine state by long-range control method provided by the invention.
For test the inventive method with and multi-point cross-platform connect characteristics, embodiment configures as follows:
Digital control system: LT-GJ301 digital control system, hardware platform are VIA C3533ACPU, 256 MB of memory;
Numerically-controlled machine: model is CAK6116
Long-range man-machine interface edge 1: based on the industrial computer of (SuSE) Linux OS, hardware platform is
Long-range man-machine interface edge 2: based on the PC of Windows Xp operating system, hardware platform is Intel Core22.10GHz CPU, the 1GB internal memory.
Described digital control system part is completed as the LT-CNC platform of NC end employing based on the RTLinux real time operating system.The machine control unit of this platform is comprised of task controller, motion controller and the Programmable Logic Controller of LT-CNC, and SVR end is as completing the functional module of communication with long-range man-machine interface, by completing based on unified interface exploitation provided by the invention.
Described man-machine interface control end is based on the functional module that the exploitation of QT graphic development library is completed, and its Long-distance Control part is completed based on unified interface exploitation provided by the invention.
Long-range man-machine interface edge 1 and long-range man-machine interface edge 2 connect with the NC end simultaneously, and numerically-controlled machine is carried out the order that any one terminal is sent, and the state of numerically-controlled machine operation feeds back to the man-machine interface operating personnel simultaneously on two terminals.
Method actual use operation in this aspect is specially:
The order that sends on any man-machine interface terminal comprises: press " illumination " button on any man-machine interface active station, light the light fixture of numerically-controlled machine; Open the work procedure of NC end, send fill order, numerically-controlled machine is completed process to workpiece according to the work procedure order; In the process that work procedure is carried out, control each axle movement velocity of numerically-controlled machine by " multiplying power " knob on the man-machine interface active station.
In the numerically-controlled machine operational process, the state that feeds back to two personal-machine interface terminals specifically comprises: the some position information of the current operational mode of numerically-controlled machine, each axis servomotor, the implementation progress of work procedure, the operating warning message of numerically-controlled machine, peripheral I/O information etc.