Disclosure of Invention
The invention aims to provide a method for recording the operation information of a numerical control system of a machine tool and a numerical control machining program correspondingly, and a method for reproducing an operation process in subsequent repeated machining by using the record so as to realize optimization of the machining process.
In order to achieve the above object, the present invention provides a numerical control system for recording and utilizing operation information, which is characterized by comprising an operation behavior monitoring server, an operation behavior backup file processor and an interpolator. Wherein,
the operation behavior monitoring server is used for periodically monitoring operation intervention from a human-computer interaction system, and comprises feeding magnification adjustment operation and main shaft magnification adjustment operation; receiving progress information of a motion instruction from the interpolator; synthesizing the two types of information into operation intervention records, and sending the operation intervention records to the operation behavior backup file processor;
the operation behavior backup file processor is provided with an operation intervention record list, and the operation intervention record list is used for receiving operation intervention records from the operation behavior monitoring server and storing the intervention record list as an operation behavior backup file; in the operation intervention reproduction process, the operation behavior backup file restoration operation intervention record list is used for loading, and after receiving execution progress information from the interpolator and verifying the execution progress information through program line information, an automatic operation intervention instruction is sent to the interpolator to realize reproduction of recording operation intervention;
the interpolator is used for encrypting the motion command interpolation obtained by the program code analyzer into a microscopic command which accords with the physical characteristics of each feed shaft; the interpolator also receives operation intervention information from a human-computer interaction system and also receives automatic operation intervention reproduced by the operation behavior backup file processor; the interpolator is further used for outputting execution progress information of each motion instruction to the operation behavior monitoring server and the operation behavior backup file processor.
Preferably, the motion command is a straight line command, a circular arc command, a NURBS curve command or a spiral command. The operation intervention information is adjustment information of the feeding multiplying power or adjustment information of the main shaft multiplying power. The progress information includes two parts of content: and the text information of the current execution program line and the execution progress of the current program line are used for marking the occurrence time of the operation behavior.
The invention also provides an operation method for recording and utilizing the operation information numerical control system, which comprises the following steps:
s1, when the specific automatic processing program is operated for the first time, the operation behavior monitoring server periodically monitors the operation intervention information from the human-computer interaction system;
s2, the operation behavior monitoring server combines the execution progress information sent by the interpolator to correlate the processing intervention information with the execution progress information to form an operation intervention record, and the operation intervention record is sent to the operation behavior backup file processor;
s3, the operation behavior backup file processor stores the operation intervention records into operation behavior backup files one by one;
s4, when the appointed automatic processing program is operated again, the user selects to reproduce the operation intervention record, the operation behavior backup file processor loads the operation behavior backup file and restores the operation behavior backup file into the operation intervention record list; the operation behavior backup file processor is in a periodic working state and periodically receives the execution progress information of the interpolator; the operation behavior backup file processor extracts program line information in the execution progress information, verifies the program line information with the line information in the operation intervention record list, and monitors the execution progress after the verification is successful; and when the operation behavior backup file processor finds that the current execution progress reaches the progress of the occurrence time of the operation actions recorded in the operation intervention record, the operation behavior backup file processor sends the operation intervention behaviors recorded in the record to the interpolator.
The method for recording and utilizing the operation information of the numerical control system records the operation information of the numerical control system, associates the operation information with a numerical control processing program and stores the operation information as an operation behavior backup file, loads the operation behavior backup file when a user calls the numerical control program again to process the same part, analyzes the file by the numerical control system, automatically reproduces the processing feeding speed, the main shaft multiplying power adjusting operation and the cutter radius compensating operation in the corresponding numerical control track program, and processes the part by reproducing the recorded processing parameters, thereby reducing the repeated setting of the parameters by an operator in the repeated automatic processing of batch parts, improving the processing efficiency and reproducing the operation skills of a skilled operator.
Detailed Description
The technical scheme of the invention is as follows: when an automatic processing program is operated, the operation behavior (including the adjustment of the feeding multiplying power and the multiplying power of a main shaft) of an operator is recorded in the memory and is bound with the operation degree of the numerical control processing program; the records can be synchronously saved in the running process or saved in batch after the program is finished running, and an operation behavior backup file is generated. When the operation adjustment process needs to be reproduced, the operation behavior backup file and the corresponding numerical control machining program are opened simultaneously, the execution progress of the numerical control machining program line is detected line by line, and when the execution progress is matched with the operation adjustment operation occurrence point execution progress recorded by the operation behavior backup file, the numerical control system automatically reproduces corresponding operation without intervention of an operator.
As shown in fig. 1, the above process is mainly implemented by the following parts in the numerical control system:
and operating the behavior monitoring server. The system is responsible for monitoring operation intervention from a human-computer interaction system, including feeding multiplying power adjustment operation and main shaft multiplying power adjustment operation; the progress information is responsible for receiving the motion command from the interpolator; and the processor is responsible for synthesizing the two types of information into operation intervention records and sending the operation intervention records to the operation behavior backup file processor.
The operation behavior backs up the file processor. The operation intervention record list is responsible for receiving operation intervention records from the operation behavior monitoring server and storing the intervention record list as an operation behavior backup file; and in the operation intervention reproduction process, the operation behavior backup file is responsible for loading an operation behavior backup file to restore an operation intervention record list, and after receiving execution progress information from the interpolator and verifying the execution progress information through program line information, an automatic operation intervention instruction is sent to the interpolator to realize the reproduction of the recorded operation intervention.
An interpolator. The micro-control system is responsible for carrying out interpolation and densification on the motion commands (straight lines, circular arcs, NURBS curves and spiral lines) obtained by the program code analyzer into micro commands conforming to the physical characteristics of each feed shaft. The interpolator also receives operation intervention information (including adjustment of feed multiplying power and adjustment of main shaft multiplying power) from a human-computer interaction system and also receives automatic operation intervention reproduced by an operation behavior backup file processor. The interpolator disclosed by the invention also outputs execution progress information of each motion instruction to the operation behavior monitoring server and the operation behavior backup file processor, wherein the information comprises two parts of contents: the text information of the current program line, the execution progress (from 0 to 100%) of the current program line is used to mark the occurrence time of the operation behavior.
The invention also discloses a method for recording, storing and reusing the operation behaviors in the automatic processing by the numerical control system, which comprises the following steps:
and S1, when the specific automatic processing program is operated for the first time, the operation behavior monitoring server periodically monitors the operation intervention information from the human-computer interaction system.
And S2, the operation behavior monitoring server combines the execution progress information sent by the interpolator to correlate the processing intervention information with the execution progress information to form an operation intervention record, and the operation intervention record is sent to the operation behavior backup file processor.
And S3, the operation behavior backup file processor stores the operation intervention records in the operation behavior backup file one by one.
And S4, running the specific automatic processing program again, and after the user selects to reproduce the operation intervention record, loading the operation behavior backup file by the operation behavior backup file processor and restoring the operation behavior backup file into an operation intervention record list. The operation behavior backup file processor is in a periodic working state and periodically receives the execution progress information of the interpolator. And the operation behavior backup file processor extracts the program line information in the execution progress information, verifies the program line information with the line information in the operation intervention record list, and monitors the execution progress after the verification is successful. And when the operation behavior backup file processor finds that the current execution progress reaches the progress of the occurrence time of the operation actions recorded in the operation intervention record, the operation behavior backup file processor sends the operation intervention behaviors recorded in the record to the interpolator.
System example 1:
the shadow file scheme provided by the invention has various implementation modes according to different operating systems and development tools selected by a numerical control system. Fig. 2 shows an embodiment of the present invention. The numerical control system is composed of three major parts, namely numerical control system hardware, a real-time operating system and numerical control system software.
The numerical control system hardware can be formed by various computer systems, such as an X86PC framework, an ARM processor framework, a DSP processor framework, a singlechip framework and a multi-CPU framework formed by a plurality of the processors. The CPU is connected with other devices through an internal computer bus, including a real-time clock, a servo and I/O device interface, a storage medium, a display device and an input device which are necessary for numerical control. The hardware system adopting the X86PC framework can use the built-in 8253 or a compatible clock system thereof as a real clock; the servo and I/O equipment interface can be realized by an analog quantity output card and a digital quantity input/output card of a PCI bus or ISA bus interface, and for the servo and I/O equipment of a field bus interface, a corresponding field bus communication interface card can be adopted to realize the servo and I/O equipment interface; hard disk, SD card, CF card can be used as storage medium of file system.
The real-time operating system can be selected from professional real-time operating systems such as VxWorks and RTLinix, or from operating systems with certain soft real-time characteristics such as Windows combined with real-time extended RTX, or Windows CE when the system performance requirement is low. Besides supporting conventional file management and storage medium drive and Graphical User Interface (GUI), the real-time operating system mainly realizes periodic real-time task scheduling by a real-time clock timing interrupt handler. The numerical control equipment driver can adopt a standard driver development framework provided by a real-time operating system to package data operation on the servo and I/O equipment interfaces, wherein the data comprise instructions for the servo and instructions for the I/O, and the data comprise feedback data and I/O data collected from the servo.
The numerical control system software can be developed by using an application program development tool supported by a real-time operating system, for example, a GCC development environment supported by an RTLinux operating system, and the numerical control system software is developed in a VC development environment selected from Windows + RTX as the real-time operating system. The numerical control system software mainly comprises a plurality of real-time tasks: program code analyzer, interpolator, PLC subsystem. According to different working modes of the real-time operating system, the real-time task can be a real-time thread or a cyclic function body which can be loaded and run by the real-time task scheduling system. The principle of implementation of each part mainly related to the invention in numerical control software is as follows:
and the numerical control machining program file operator is responsible for opening the selected file from the file system obtained by the numerical control system. The numerical control machining program mostly takes the carriage return line-changing character as a line ending mark. Generally, a numerical control machining program file operator is in a called operation mode and does not have the requirement of autonomous operation, and the numerical control machining program file operator can be realized in the form of a group of service functions and can also be realized by an object with a group of service interfaces.
The numerical control man-machine interaction subsystem is responsible for receiving user operation information from input equipment such as a keyboard and the like, and also comprises operation intervention (comprising feeding multiplying power adjustment and main shaft multiplying power adjustment machine tool compensation parameter adjustment) from a user related by the invention; and simultaneously, the information display of other constituent units of the numerical control system is realized. Under the support of an operating system graphical user interface, the numerical control man-machine interaction subsystem can be realized in a process mode and performs information interaction in a process communication mode with other components of numerical control system software, wherein the information interaction mode comprises shared memory, pipelines, sockets and the like; the numerical control man-machine interaction subsystem can also share a process with other parts of the numerical control system software, is realized in a thread form in the process, and shares a process memory space with other parts. Under the support of a Windows family operating system, the numerical control man-machine interaction subsystem can be developed and realized by adopting a Doc/View mode provided by an MFC. In any mode, the numerical control human-computer interaction subsystem adopts an active operation mode, including query operation input and periodic data display refreshing. Under the support of Windows family operating system, the input can be realized by Windows message, and the data display refresh can realize refresh trigger in the periodic task of timer or multimedia timer. The numerical control human-computer interaction subsystem as an active running subsystem can not be included in real-time task scheduling generally or participate in task scheduling with lower priority because of lower real-time requirement.
The program code parser is mainly responsible for calling a file operator service interface of the numerical control machining program, providing macroscopic data for the interpolator, and meeting the requirement of real-time output, and generally, the program code parser is incorporated into real-time task scheduling in the form of a real-time thread or a real-time task with lower priority. The program code analyzer acquires a numerical control machining program in a unit of a line; the character string type numerical control machining program is analyzed by a lexical method (Lex can be selected). The instruction type discriminator performs classification processing on each parsed keyword on the basis of syntactic analysis (Yacc may be selected), for example, processing the G code one by one, processing the coordinate point one by one, and processing the M, S, T code one by one. And converting the motion request represented by the G code into a data structure appointed with the interpolator by combining coordinate information, and calling an interface of the program code analyzer through the interpolator to send the data structure into the interpolator. As an actively running subsystem, the program code parser has certain real-time requirements, and can be generally incorporated into real-time task scheduling to participate in task scheduling at a lower priority.
And the interpolator is responsible for manually operating the motion service request from the program code analyzer and the interface. These sports service requests include: straight lines, circular arcs, and the like. In order to support the operation intervention method disclosed by the invention, the motion service request needs to include the corresponding line text information of the motion in the original numerical control machining program. The interpolator interpolates the motion command into a micro incremental command which can be executed by the servo equipment, and the micro incremental command is output to the servo equipment interface through the digital control equipment drive in a strict period (1ms, 2ms, 4ms and the like). The core interpolation algorithm of the interpolator may be a classical point-by-point comparison method, a numerical score method, or other algorithms with a differentiation function, such as a parametric equation. In addition, the interpolator has an interface for receiving operation intervention, and for an operation intervention request of feed magnification adjustment, the interpolator can perform secondary interpolation on the basis of a theoretical result (output increment micro-displacement sequence) obtained by interpolation calculation, and the algorithm flow is shown in fig. 3-4. For the main shaft speed multiplying power adjusting request, the interpolator can follow the acceleration and deceleration curve applicable to the main shaft and gradually realize the main shaft speed multiplying power adjusting request in a plurality of cycles, and fig. 5 shows a main shaft adjusting algorithm flow according to linear acceleration and deceleration. In order to support operation intervention recording and recurrence, the interpolator disclosed by the invention comprises an execution progress server, and is mainly responsible for periodically sending execution progress information to an operation behavior monitoring server and an operation behavior backup file processor. The information includes two parts of content: the text information of the current program line, the execution progress of the current program line (from 0 to 100%), is used to mark the time when the operation action occurs. The interpolator is used as an active subsystem, has high real-time requirement, is usually included in real-time task scheduling, and is executed strictly periodically. The execution progress server also runs in the interpolator operation period, and the running algorithm flow is shown in fig. 6. Because the execution progress server is embedded in the periodical task of the interpolator to run, the operation behavior monitoring server and the operation behavior backup file processor do not need to independently and actively run under the calling of the execution progress server.
The monitoring server is responsible for monitoring operation intervention from the human-computer interaction system, including feeding multiplying power adjustment operation and main shaft multiplying power adjustment operation; the progress information is responsible for receiving the motion command from the interpolator; and the processor is responsible for synthesizing the two types of information into operation intervention records and sending the operation intervention records to the operation behavior backup file processor. The operation behavior monitoring server is realized by a group of function interfaces, mainly comprises an interface function for receiving operation intervention information, and the function can record the type and the intervention degree of the transferred intervention action in a module, and set up a mark which is marked with a new adjustment request. Another important interface of the operation behavior monitoring server is the execution progress request notification interface function. The interface function is periodically called by the interpolator execution progress server. The main behavior is to detect whether there is a new unresponsive operation intervention request, if so, combine it with the execution progress information sent by the interpolator to form an operation intervention record, call the interface of the operation behavior backup file processor, and store it in the operation behavior backup file processor list. Since the execution progress server itself runs in a periodic task embedded in the interpolator, the operation behavior monitoring server does not need to run actively under its call. The algorithm flow for executing the progress request notification interface function is shown in fig. 7.
The operation behavior backup file processor is responsible for recording the operation intervention record list and storing the operation intervention record list as an operation behavior backup file; and when the operation behavior is reproduced, the operation behavior backup file is responsible for loading and restoring the operation behavior backup file into an operation intervention record list. The processor has an intervention record receiving interface, which is called by the monitoring server (see fig. 7), and is responsible for saving the intervention record sent by the monitoring server to the operation intervention record list. The processor is also provided with an intervention record list saving interface and an operation behavior backup file restoration intervention record list interface. When the operation behavior is reproduced, the execution progress server in the interpolator calls the execution progress request notification interface function of the operation behavior backup file processor. In the interface function, program line information currently being interpolated and executed and program line information stored in an operation intervention record at the head of an operation intervention record list are verified; once the verification is successful, the operation intervention behavior exists in the program line, namely, the execution progress of the program line is matched; and when the execution progress reaches the progress saved in the operation intervention record, sending an operation intervention request to the interpolator. The execution progress request of the operation behavior backup file processor informs the execution process of the interface function as shown in fig. 8. Since the execution progress server is embedded in the periodical tasks of the interpolator to run, the behavior backup file processor operating under the calling of the execution progress server does not need to independently and actively run.
Method example 1: the feeding speed of the program automatic processing is written in the F value of the program in a programming mode, an operator selects a proper feeding speed by adjusting a feeding multiplying factor switch according to the actual cutting state, the speed adjusting operation of the operator can be recorded and stored in an operation behavior backup file, the operation behavior backup file of the recording operation is automatically opened while the processing program is opened when the next reprocessing is carried out, and the numerical control system automatically adjusts the feeding multiplying factor according to the recorded information without manually adjusting the feeding multiplying factor by the operator.
Method example 2: the main shaft rotating speed during program automatic processing is specified by an S instruction in a numerical control processing program, and an operator adjusts the main shaft rotating speed by adjusting a main shaft multiplying factor switch according to an actual cutting state and stores the main shaft rotating speed in an operation behavior backup file. When the same part is machined next time, the machining program is opened, the operation behavior backup file is automatically opened, and the numerical control system automatically adjusts the multiplying power of the main shaft according to the recorded information without manually adjusting the multiplying power of the main shaft by an operator.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to cover the technical solutions and the inventive concepts of the present invention within the technical scope of the present invention.