Summary of the invention
The objective of the invention is to have overcome above-mentioned shortcoming of the prior art, the method that provide a kind of and can realize in the numerically-controlled machine kinetic control system that the motion of accurate backward, processing procedure are simple and convenient, operating process quickness and high efficiency, stable and reliable working performance, the scope of application realizes the backward motion control comparatively widely in the numerically-controlled machine tool system.
In order to realize above-mentioned purpose, realize in the numerically-controlled machine tool system of the present invention that the method for backward motion control is as follows:
Realize the method for backward motion control in this numerically-controlled machine tool system, its principal feature is, be provided with the historical movement log buffer in the described system, described method comprises that operation is handled in the operation of proper motion control and treatment, backward motion control and operation is handled in just capable motion control, and described proper motion control and treatment operation may further comprise the steps:
(11) system enters the normal process operational mode according to user's operation information;
(12) system carries out instruction read operations;
(13) system judges whether this instruction is movement instruction;
(14) if then system sends to the motion-control module of numerically-controlled machine tool system with this movement instruction, and stores this movement instruction into the historical movement log buffer;
(15) if not, then system carries out other processing according to this instruction;
(16) return above-mentioned steps (12);
Described backward motion control is handled operation and be may further comprise the steps:
(21) system enters reverse processing operational mode according to user's operation information;
(22) system carries out the operation of reverse read movement instruction in the historical movement log buffer, specifically may further comprise the steps:
(a) if described read data position pointer record cell pointed is the next unit on the logic negative direction of described first Data Position pointer record cell pointed, and this read data position pointer the last time is to cross first Data Position pointer along the logic negative direction, and then system withdraws from reverse processing operational mode;
(b) system carries out the adjustment of numerically-controlled machine processing multiplying power;
(c) system reads the information in the movement instruction from described read data position pointer record cell pointed;
(23) system is reverse with the direction of the movement instruction that reads, and sends to the motion control hardware module of numerically-controlled machine tool system;
(24) system moves a record cell with described read data position pointer to the logic negative direction;
(25) whether needs withdraw from reverse processing operational mode according to user's operation judges in system;
(26) if then withdraw from reverse processing operational mode; Otherwise, then return above-mentioned steps (22);
Described just capable motion control is handled operation and be may further comprise the steps:
(31) system enters forward processing operational mode according to user's operation information;
(32) system carries out forward and reads movement instruction operation in the historical movement log buffer;
(33) system sends to the movement instruction that reads the motion control hardware module of numerically-controlled machine tool system;
(34) return above-mentioned steps (32).
Be provided with first Data Position pointer, read data position pointer and write data position pointer in the historical movement log buffer in this numerically-controlled machine tool system in the method for realization backward motion control, describedly store this movement instruction into the historical movement log buffer, may further comprise the steps:
(141) if do not store any record in the historical movement log buffer as yet, then first Data Position pointer, read data position pointer and write data position pointer are all pointed to same record cell;
(142) system writes the information in the movement instruction in the described write data position pointer record cell pointed;
(143) if all record cells are all write fullly in this historical movement log buffer, promptly this write data position pointer and described first Data Position pointer record cell pointed is identical, then first Data Position pointer is moved a record cell to the logic positive dirction;
(144) system is with the described write data of described read data position pointed position pointer record cell pointed;
(145) system moves a record cell with described write data position pointer to the logic positive dirction.
System in this numerically-controlled machine tool system in the method for realization backward motion control carries out forward and reads the movement instruction operation in the historical movement log buffer, may further comprise the steps:
(321) if described write data position pointer record cell pointed is the next unit of the logic positive dirction of described read data position pointer record cell pointed, and this read data position pointer is not to be to cross write data position pointer along the logic negative direction the last time, and then system withdraws from forward processing operational mode;
(322) system carries out the adjustment of numerically-controlled machine processing multiplying power;
(323) system moves a record cell with described read data position pointer to the logic positive dirction;
(324) system reads the information in the movement instruction from described read data position pointer record cell pointed, and returns step (33).
Information in the movement instruction in this numerically-controlled machine tool system in the method for realization backward motion control comprises axis information, each single shaft motion impulse number and direction of motion information.
Information in the movement instruction in this numerically-controlled machine tool system in the method for realization backward motion control can also comprise numerically-controlled machine output port switch motion information.
Be provided with the master instruction buffer zone in the system in this numerically-controlled machine tool system in the method for realization backward motion control, described system carries out instruction read operations, may further comprise the steps:
(121) system judges in the described master instruction buffer zone whether have not reading command;
(122) if not, then withdraw from the normal process operational mode;
(123) system carries out the adjustment of numerically-controlled machine processing multiplying power;
(124) system's reading command from described master instruction buffer zone.
User's operation information in this numerically-controlled machine tool system in the method for realization backward motion control can be operated by handwheel control information on the numerically-controlled machine or control command operation information.
The space size L of the historical movement log buffer in this numerically-controlled machine tool system in the method for realization backward motion control determines according to following formula:
L=n×a×(h×3600×1000)/T;
Wherein, n is single shaft motion impulse command pulse number and the occupied byte number of direction of motion, and a is the number of axle, and h is the automatic backward largest motion hourage of supporting of systemic presupposition, and T is the control cycle millisecond number of numerically-controlled machine.
Adopted the method that realizes the backward motion control in the numerically-controlled machine tool system of this invention, because it adopts historical movement log buffer built-in in numerically-controlled machine tool system that the movement instruction information under the normal process operational mode is noted, and after from the historical movement log buffer, taking out the information in the movement instruction oppositely one by one according to the logic negative direction when entering reverse processing operational mode in system, the motion of control numerically-controlled machine, when entering forward processing operational mode, system from the historical movement log buffer, the information in the movement instruction is taken out one by one according to the logic positive dirction, the motion of control numerically-controlled machine, thereby in the numerically-controlled machine kinetic control system, realized accurate backward motion control, not only implementation procedure is simple and convenient, and operating process quickness and high efficiency, under the practical operation situation accurately and reliably, can satisfy the control requirement of carrying out accurate backward motion in the digital control system (as the high-pressure water jet diced system) preferably, not only can apply to high-pressure water jet cutting industry, also can apply in other numerical control industry field, the scope of application is comparatively extensive, for further developing of numerically-controlled machine tool system movement control technology established solid foundation.
Embodiment
In order more to be expressly understood technology contents of the present invention, describe in detail especially exemplified by following examples.
At first the several nouns in the numerically-controlled machine technical field are made an explanation:
A function of breakpoint succession---numerical control Control Software is carried out this function, and system processed interruptions since last time and continues to carry out.
The instruction of numerical control motion impulse---the numerical control Control Software mails to the movement instruction pulse information of motion control card, comprise axis information, each single shaft umber of pulse and direction of motion, wherein direction of motion is represented with sign, in the method for the invention, require its shared memory size constant.
The processing multiplying power---the ratio of current process velocity and normal process speed is called the processing multiplying power.
The abbreviation of handwheel---hand pulse producer, a kind of numerically-controlled machine input equipment, by step-by-step counting, the numerical control control computer with this count value of handwheel of obtaining and last time count value poor, as a kind of control input signals of machine tool motion.
The logic positive dirction---refer to deposit in earlier in the historical movement log buffer data to after deposit the logical direction of in buffer zone, arranging of data in.
The logic negative direction---refer to deposit in earlier in the historical movement log buffer data to after deposit the opposite direction of the logical direction of in buffer zone, arranging of data in.
See also Fig. 1 to shown in Figure 3, realize the method for backward motion control in this numerically-controlled machine tool system, its principal feature is, be provided with the historical movement log buffer in the described system, described method comprises that operation is handled in the operation of proper motion control and treatment, backward motion control and operation is handled in just capable motion control, and described proper motion control and treatment operation may further comprise the steps:
(11) system enters the normal process operational mode according to user's operation information, and this user's operation information can be operated by handwheel control information on the numerically-controlled machine or control command operation information;
(12) system carries out instruction read operations; Be provided with the master instruction buffer zone in this numerically-controlled machine tool system, described system carries out instruction read operations, may further comprise the steps:
(a) system judges in the described master instruction buffer zone whether have not reading command;
(b) if not, then withdraw from the normal process operational mode;
(c) system carries out the adjustment of numerically-controlled machine processing multiplying power;
(d) system's reading command from described master instruction buffer zone;
(13) system judges whether this instruction is movement instruction;
(14) if then system sends to the motion-control module of numerically-controlled machine tool system with this movement instruction, and stores this movement instruction into the historical movement log buffer; Be provided with first Data Position pointer, read data position pointer and write data position pointer in this historical movement log buffer, describedly store this movement instruction into the historical movement log buffer, may further comprise the steps:
(a) if do not store any record in the historical movement log buffer as yet, then first Data Position pointer, read data position pointer and write data position pointer are all pointed to same record cell;
(b) system writes the information in the movement instruction in the described write data position pointer record cell pointed, information in this movement instruction includes axis information, each single shaft motion impulse number and direction of motion information, simultaneously, the information in this movement instruction can also comprise numerically-controlled machine output port switch motion information;
(c) if all record cells are all write fullly in this historical movement log buffer, and this write data position pointer and described first Data Position pointer record cell pointed is identical, then first Data Position pointer is moved a record cell to the logic positive dirction;
(d) system is with the described write data of described read data position pointed position pointer record cell pointed;
(e) system moves a record cell with described write data position pointer to the logic positive dirction;
(15) if not, then system carries out other processing according to this instruction;
(16) return above-mentioned steps (12);
Described backward motion control is handled operation and be may further comprise the steps:
(21) system enters reverse processing operational mode according to user's operation information;
(22) system carries out the operation of reverse read movement instruction in the historical movement log buffer, may further comprise the steps:
(a) if described read data position pointer record cell pointed is the next unit of the logic negative direction of described first Data Position pointer record cell pointed, and this read data position pointer the last time is to cross first Data Position pointer along the logic negative direction, and then system withdraws from reverse processing operational mode;
(b) system carries out the adjustment of numerically-controlled machine processing multiplying power;
(c) system reads the information in the movement instruction from described read data position pointer record cell pointed;
(d) system moves a record cell with described read data position pointer to the logic negative direction, and returns;
(23) system is reverse with the direction of the movement instruction that reads, and sends to the motion-control module of numerically-controlled machine tool system;
(24) whether needs withdraw from reverse processing operational mode according to user's operation judges in system;
(25) if then withdraw from reverse processing operational mode; Otherwise, then return above-mentioned steps (22);
Described just capable motion control is handled operation and be may further comprise the steps:
(31) system enters forward processing operational mode according to user's operation information;
(32) system carries out forward and reads movement instruction operation in the historical movement log buffer, may further comprise the steps:
(a) if described write data position pointer record cell pointed is the next unit of the logic positive dirction of described read data position pointer record cell pointed, and this read data position pointer is not to be to cross write data position pointer along the logic negative direction the last time, and then system withdraws from forward processing operational mode;
(b) system carries out the adjustment of numerically-controlled machine processing multiplying power;
(c) system moves a record cell with described read data position pointer to the logic positive dirction;
(d) system reads the information in the movement instruction from described read data position pointer record cell pointed, and returns;
(33) system sends to the movement instruction that reads the motion-control module of numerically-controlled machine tool system;
(34) return above-mentioned steps (32).
Wherein, size L in the space of described historical movement log buffer determines according to following formula:
L=n×a×(h×3600×1000)/T;
Wherein, n is single shaft motion impulse command pulse number and the occupied byte number of direction of motion, and a is the number of axle, and h is the automatic backward largest motion hourage of supporting of systemic presupposition, and T is the control cycle millisecond number of numerically-controlled machine.
In the middle of reality is used, in order to realize above-mentioned functions of the present invention, need in the Control Software of numerically-controlled machine tool system, open up an internal memory, its data structure is a buffer circle, the pulse direction and the umber of pulse information of a complete numerical control motion impulse instruction can be stored in each unit of this buffer zone, can be during software design according to the motion control cycle of motion control card, estimate a motion expectation maximum duration and will use great buffer zone, and stay suitable surplus, determine the size of this buffer zone with this.
Three position indicator pointers of software set point to the current first Data Position of above-mentioned buffer zone respectively, read data position and write data position, and these three position indicator pointers point to same unit at first.
The numerical control motion impulse instruction that kinetic control system generated when this buffer circle was used for storage system and moves under normal operation mode, software is after the data of a unit of write pointer location storage during storage, current write pointer position is pointed in the read pointer position, and the position that write pointer is moved a unit toward the logic positive dirction.When buffer data is full, then will cover history the earliest data as writing new data again this moment, and will move unit of first data pointer toward the logic positive dirction.
When program enters back read historical movement log buffer pattern, then read a motion metainstruction from this buffer zone read pointer indication position, its numerical control motion impulse command direction is reverse, send to motion control card, move unit of read pointer toward the logic negative direction then, if the backward motion is carried out always, then cross the first Data Position of backward buffer zone until read data position pointer, then system will stop backward, and the state that seizes up, and software can be pointed out the user on the interface.
If program enters when reading the positive row mode of historical movement log buffer, move unit of read pointer to the logic positive dirction, if movement instruction is then read from reading location less than the write pointer logical place in buffer zone read pointer position, directly be sent to motion control card.Read the historical movement log buffer otherwise break away from, enter the normal condition operation.
If withdraw from the backward pattern in the middle of in backward mode operation process, and backward buffer zone forward also has instruction to fail to carry out, the numerical control motion impulse that this moment, system carried out the historical movement log buffer with automatic forward is instructed, and until last instruction, enters the normal condition operation then.
Therefore, numerically-controlled machine at normal runtime system according to process flow operation shown in Figure 1, add the man-hour system according to process flow operation shown in Figure 2 at backward, break away from backward and add the man-hour system according to process flow operation shown in Figure 3, run through the historical movement log buffer, system continues again according to flow process long journey shown in Figure 1.
In order to control the processing multiplying power reposefully, need carry out smoothing processing to the variation of processing multiplying power, can under programme controlled situation, adopt under current processing multiplying power to begin to move closer to the method that target is processed multiplying power, until stablizing processing with target processing multiplying power; Also can guide under the pattern of machine tooling at handwheel, by the purpose that handwheel shakes the speed control process velocity, set up handwheel counted number of pulses historical data, use the mean value control feeding multiplying power of historical data, the handwheel historical data is with periodic refreshing.In this way, just can control process velocity reposefully.
For the estimation of the shared memory size of historical movement buffer zone, can carry out in accordance with the following methods:
If the control cycle of target control system is T, unit is a millisecond, and expectation can support that automatic backward run duration is h, and unit is hour, and single shaft motion impulse command pulse number and direction can be used n bytes store, and the number of axle is a, and then the buffer size computing formula is:
L=n×a×(h×3600×1000)/T;
Wherein, the unit of L is a byte.
With n=2, a=3, h=0.5, T=2.5 is example, and the substitution following formula then can calculate:
The L=4320000 byte.
Adopt method of the present invention, its mode of operation is as follows:
Running in the machine tooling process needs the backward motion to add man-hour, allows lathe enter handwheel backward mode of operation by the operation of numerically-controlled machine control system software interface, and lathe will stop, and handwheel shakes, and then lathe is processed along former track route backward; Handwheel shakes along positive dirction, and then lathe is processed along positive line direction; Handwheel shakes soon more, and machine tooling speed is fast more, and handwheel stops, and then processing stops, and process velocity changes level and smooth; Change mode of operation as the user on operation interface, leave handwheel guiding mode of operation, then job sequence normally moves, along positive line direction processing.
Simultaneously, another kind of backward mode of operation can also be arranged, add the command operation button on numerically-controlled machine control system software interface, one is just capable processing order button, and one is backward processing button.Be in the process at lathe, need will process as the user, can click backward processing button, this moment, system can be in the mode of program setting, backward processing automatically, during do not need aforementioned handwheel mode to shake handwheel like that.If being machined to, user's backward no longer need backward to add man-hour, can be by just going the processing button, and system will just go automatically and process this moment.Standard numerical control instructions such as processing need be suspended or stop as the user, command adapted thereto (normally menu or button mode) can be on software interface, sent out.
In the method for the invention, in order to set up the historical movement log buffer, need take certain internal memory, consider that general processing site processing workman need can more in time find the situation of backward processing, therefore do not need too big backward amount, general tens internal memories are just enough, are complete acceptables concerning the big internal memory of current main-stream computing machine.
Simultaneously, in the method for the invention, can also write down the on-off action of corresponding output end mouth, because in high-pressure water jet cutting industry, the situation that does not cut through material is normally irregular, in reading historical movement record buffer mode, to estimate and find defective and control cutting, this moment, manually each valve of control switching was just passable, do not need autocontrol valve control output end mouth automatic shutter, just do not need to write down the on-off action of output port, can not write down the on-off action of output port in this case.
Adopted the method that realizes the backward motion control in the above-mentioned numerically-controlled machine tool system, because it adopts historical movement log buffer built-in in numerically-controlled machine tool system that the movement instruction information under the normal process operational mode is noted, and after from the historical movement log buffer, taking out the information in the movement instruction oppositely one by one according to the logic negative direction when entering reverse processing operational mode in system, the motion of control numerically-controlled machine, when entering forward processing operational mode, system from the historical movement log buffer, the information in the movement instruction is taken out one by one according to the logic positive dirction, the motion of control numerically-controlled machine, thereby in the numerically-controlled machine kinetic control system, realized accurate backward motion control, not only implementation procedure is simple and convenient, and operating process quickness and high efficiency, under the practical operation situation accurately and reliably, can satisfy the control requirement of carrying out accurate backward motion in the digital control system (as the high-pressure water jet diced system) preferably, not only can apply to high-pressure water jet cutting industry, also can apply in other numerical control industry field, the scope of application is comparatively extensive, for further developing of numerically-controlled machine tool system movement control technology established solid foundation.
In this instructions, the present invention is described with reference to its certain embodiments.But, still can make various modifications and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.