CN111367234B - Hand wheel trial cut rollback control method based on three-ring queue - Google Patents
Hand wheel trial cut rollback control method based on three-ring queue Download PDFInfo
- Publication number
- CN111367234B CN111367234B CN201811600725.9A CN201811600725A CN111367234B CN 111367234 B CN111367234 B CN 111367234B CN 201811600725 A CN201811600725 A CN 201811600725A CN 111367234 B CN111367234 B CN 111367234B
- Authority
- CN
- China
- Prior art keywords
- queue
- program
- hand wheel
- rollback
- bkq
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
- G05B19/19—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path
- G05B19/21—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path using an incremental digital measuring device
- G05B19/25—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path using an incremental digital measuring device for continuous-path control
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Numerical Control (AREA)
Abstract
The invention relates to a hand wheel trial cut rollback control method based on three annular queues, which adopts three annular queues to store a user programming track program segment, and controls the switching operation among the three queues through variables to realize that each shaft of a machine tool forwards moves along the programming track when the hand wheel is shaken in the forward direction and backwards moves along the track direction when the hand wheel is shaken in the reverse direction; the method does not depend on a specific software and hardware machine tool structure, and can be widely applied to numerical control systems such as a numerical control turn-milling system, an electric machining system, laser machining and the like.
Description
Technical Field
The invention relates to the field of numerical control systems, in particular to a hand wheel trial cut rollback control method based on a three-ring queue.
Background
In numerical control machining, a hand wheel trial cutting function is often used for trial machining of a workpiece program and checking of a machining track. The hand wheel trial cut function collects pulses of hand wheel shaking to control the speed multiplying power of machining, the faster the hand wheel shaking is, the larger the multiplying power is, the larger the machining speed is, the hand wheel stops shaking, the speed multiplying power is changed into 0, and a program is also paused.
The machining magnification of the program is controlled through shaking of the hand wheel, so that the workpiece program can move forwards along a programming track easily, but the moved track needs to be checked sometimes when the hand wheel is in trial cut, and the program is required to be executed in a backing way along the track. Therefore, a control method for trial cutting and rollback of the hand wheel needs to be designed.
Disclosure of Invention
The invention provides a method for detecting program error or test processing by using manual hand wheel to shake forward and backward in automatic running program to make program move forward or backward, and executing mechanical action.
The technical scheme adopted by the invention for realizing the purpose is as follows: a hand wheel trial cut rollback control method based on a three-ring queue comprises the following steps: the method comprises the steps of storing program segments of user programming tracks by three annular queues with head and tail pointers, controlling to switch back and forth among the three queues by setting variables of an interpolator, reading different program segments to enter the interpolator, enabling each shaft of the machine tool to move forward along the programming tracks when a hand wheel shakes forwards, enabling each shaft of the machine tool to move backwards along the track when the hand wheel shakes backwards, and therefore repeatedly meeting the requirement that the numerical control machine tool conducts machining trial cutting through shaking of the hand wheel.
The method for storing the numerical control program section by adopting three annular queues with head and tail pointers comprises the following steps:
setting a program queue TPQUEUE for storing a user programming track program segment, a forward queue HW _ FWQ for storing a hand wheel trial cutting forward track program segment and a rollback queue HW _ BKQ for storing a hand wheel trial cutting rollback track program segment;
the program segments that have already been executed in the program queue TPQUEUE and the program segments that are being executed when the interpolator takes out a segment from the TPQUEUE and the hand wheel is shaken in the reverse direction are added to the forward queue HW _ FWQ and the backward queue HW _ BKQ, respectively.
For the executed program segments in the program queue TPQUEUE:
adding the program segments which are completely executed in the program queue TPQUEUE to the tail part of the forward queue HW _ FWQ in sequence;
the program segments whose execution of the program queue TPQUEUE has been completed are subjected to reverse processing, and then sequentially added to the head of the rollback queue HW _ BKQ.
For the program segment being executed in the program queue TPQUEUE, if the hand wheel is detected to shake reversely at this time:
forming a program segment by the executed length of the program segment being executed in the program queue TPQUEUE and adding the program segment to the tail of the forward queue HW _ FWQ;
the remaining length of the program segment being executed in the program queue TPQUEUE is formed into a program segment and processed in reverse, and then added to the head of the retirement queue HW _ BKQ.
When the rollback queue HW _ BKQ and the forward queue HW _ FWQ are switched with each other and when the program queue TPQUEUE is switched to the rollback queue HW _ BKQ, the distance that a currently executed program segment has moved is Lcur, the total length of the current program segment is Ltotal, and the length corresponding to the program segment after switching is Ltotal-Lcur.
And the reverse processing is to interchange the processing start coordinate and the processing terminal coordinate of the program segment.
The queue length len is increased by 1 when a program segment is added to the forward queue HW _ FWQ and the rollback queue HW _ BKQ; the circular queue means that the forward queue HW _ FWQ and the rollback queue HW _ BKQ both adopt a circular covering mode to add program segments.
The reading of the program segment into the interpolator by switching back and forth between three queues under the control of the variable of the interpolator is realized by setting control marks inQueuBack and hwCuttingDir for segment taking of the interpolator, and specifically comprises the following steps:
step 1: if the trial cutting function of the hand wheel is not started or the trial cutting function of the hand wheel is started but the hand wheel is not shaken reversely, inQueueBack is set to be 0, hwCuttingDir is invalid, and the interpolator continuously takes out the numerical control program section from the program queue TPQUEUE until the execution is finished; otherwise, executing step 2;
and 2, step: setting inQueueBack to be 1, setting hwCuttingDir to be-1, and taking a numerical control program section from a rollback queue HW _ BKQ by an interpolator and executing; if the hand wheel is shaken in the positive direction, the step 3 is executed; otherwise, returning to the step 2 to continuously take the numerical control program section from the return queue HW _ BKQ until the execution is finished;
step 3; setting inQueueBack to be 1, setting hwCuttingDir to be 1, and taking a numerical control program segment from a forward queue HW _ FWQ by an interpolator and executing; if the hand wheel is shaken reversely, returning to the step 2; otherwise, returning to step 3 to continuously take the numerical control program segment from the forward queue HW _ FWQ, returning to step 1 after the execution is finished, and switching the return sequence queue TPQUEUE to continue the execution.
When the program queue TPQUEUE is switched to the rollback queue HW _ BKQ, the program segment is fetched from the head of the rollback queue HW _ BKQ to be executed:
when the return queue HW _ BKQ is switched to the forward queue HW _ FWQ, if the return queue HW _ BKQ is executed to the nth program segment, the program segment is fetched from the len-n segment of the forward queue HW _ FWQ for execution;
when the forward queue HW _ FWQ is switched to the back-off queue HW _ BKQ, if the forward queue HW _ FWQ is executed to the nth program segment, the program segment is fetched from the len-n segment of the back-off queue HW _ BKQ for execution.
The invention has the following beneficial effects and advantages:
1. the structure is simple. The method of the invention controls the operation of adding and taking the section through the queue and the variable, realizes simple and low requirements on software and hardware of the system, and can be implemented in various numerical control systems.
2. And (5) trial cutting is repeated. The device can repeatedly carry out forward and reverse operation on the program section through forward and reverse shaking of the hand wheel; the assurance program can be repeatedly verified.
3. The universality is good. The method of the invention is not dependent on a specific machine tool structure, is suitable for various numerical control machining control systems, and can be widely used in numerical control machining.
Drawings
FIG. 1 is a general flow diagram of the process of the present invention;
fig. 2 shows the method of the invention from queue TPQUEUE to queue HW _ FWQ and queue HW _ BKQ at a time.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
The general flow diagram of the process of the present invention is shown in FIG. 1. Starting a trial cutting and returning function of a hand wheel, and initializing a control variable;
entering an interpolator to acquire a program section flow from a program queue TPQUEUE;
when the hand wheel is judged to shake in the reverse direction (the direction is anticlockwise, and the forward direction is clockwise), entering an interpolator and obtaining a program section flow from a rollback queue HW _ BKQ;
when the program queue TPQUEUE is empty, ending the segment taking;
repeatedly executing the process of fetching the section from the queue TPOUEUE in the interpolator;
if the interpolator takes the program section from the backward queue HW _ BKQ, when the hand wheel shakes reversely, the flow of taking the program section from the forward queue HW _ FWQ by the interpolator is entered;
stopping taking the section when judging that the rollback queue HW _ BKQ is empty;
repeatedly executing the program segment fetching process in the rollback queue HW _ BKQ;
if the interpolator takes a program segment from the forward queue HW _ FWQ, when the hand wheel shakes reversely, the flow of taking the segment from the backing queue HW _ BKQ by the interpolator is entered;
when the forward queue HW _ FWQ is judged to be empty, entering a slave program queue TPQUEUE queue segment taking process;
the process of fetching the section from the forward queue HW _ FWQ by the interpolator is repeatedly executed.
A one-time add-segment flow from the program queue TPQUEUE to the forward queue HW _ FWQ and the back-off queue HW _ BKQ is shown in fig. 2. The method comprises the following specific steps:
adding the executed program segments (gray parts) in the program queue TPQUEUE into a forward queue HW _ FWQ and a rollback queue HW _ BKQ respectively;
deleting the executed program segments in the program queue TPQUEUE;
the executed program segments in the program queue TPQUEUE are sequentially added to the tail of the forward queue HW _ FWQ one by one;
the program segments which have been executed in the program queue TPQUEUE are sequentially added to the head of the rollback queue HW _ BKQ one by one;
in order to test the actual operation effect and performance of the invention, the method is realized on a numerical control system GJ610 of Shenyang high-precision numerical control intelligent technology corporation, and is actually processed and applied on a machine tool of Jiangsu Boshang machine tool corporation, so that the function accuracy and the effect are good.
The test environment of the invention: a high-precision numerical control GJ610 numerical control system, jiangsu Boshang machine tool Co., ltd; and (3) executing a result test mode: after the functional method is started, the hand wheel is shaken in the forward and reverse directions, and the actual operation condition of the machine tool is observed.
Claims (7)
1. A hand wheel trial cut rollback control method based on a three-ring queue is characterized by comprising the following steps: storing a user programming track program segment by adopting three annular queues with head and tail pointers, and switching back and forth between the three queues by setting a variable of an interpolator to read different program segments to enter the interpolator, so that each shaft of the machine tool forwards along the programming track when a hand wheel is shaken in the forward direction, and each shaft of the machine tool backwards along the track direction when the hand wheel is shaken in the reverse direction, thereby repeatedly meeting the requirement of the numerical control machine tool on processing trial cutting through shaking of the hand wheel;
the numerical control program segment is stored by three annular queues with head and tail pointers, and the numerical control program segment comprises the following steps:
setting a program queue TPQUEUE for storing a user programming track program segment, a forward queue HW _ FWQ for storing a hand wheel trial cut forward track program segment and a rollback queue HW _ BKQ for storing a hand wheel trial cut rollback track program segment;
adding the program segments which are executed in the program queue TPQUEUE and the program segments which are executed when the interpolator takes the segments from the TPQUEUE queue and the handwheel shakes reversely into a forward queue HW _ FWQ and a backward queue HW _ BKQ respectively;
for the program segment being executed in the program queue TPQUEUE, if the hand wheel is detected to shake backwards at this time:
forming a program segment by the executed length of the program segment being executed in the program queue TPQUEUE and adding the program segment to the tail of the forward queue HW _ FWQ;
the remaining length of the program segment being executed in the program queue TPQUEUE is formed into one program segment and is processed in reverse, and then added to the head of the retirement queue HW _ BKQ.
2. A hand wheel trial cut rollback control method based on a triple ring queue as claimed in claim 1, wherein for the executed program segments in the program queue TPQUEUE:
adding the program segments of which the program queue TPQUEUE is completely executed to the tail part of the forward queue HW _ FWQ in sequence;
the program segments of the program queue TPQUEUE that have been executed are processed in reverse, and then added to the head of the rollback queue HW _ BKQ in sequence.
3. The hand wheel trial cut rollback control method based on the three-ring queue as claimed in claim 1, wherein: when the rollback queue HW _ BKQ and the forward queue HW _ FWQ are switched with each other, and when the program queue TPQUEUE is switched to the rollback queue HW _ BKQ, the distance that a currently executed program segment has moved is Lcur, the total length of the current program segment is Ltotal, and the length corresponding to the program segment after switching is Ltotal-Lcur.
4. The trial-cut rollback control method for the hand wheel based on the triple-ring queue as claimed in claim 1 or 2, wherein said reverse processing is to interchange the machining start coordinates and the machining end coordinates of the program segment.
5. The trial-cut rollback control method for a handwheel based on a triple-ring queue as claimed in claim 1, wherein the queue length len is increased by 1 for each added program segment of the forward queue HW _ FWQ and the rollback queue HW _ BKQ; the circular queue means that the forward queue HW _ FWQ and the rollback queue HW _ BKQ both adopt a circular covering mode to add program segments.
6. The hand wheel trial cut rollback control method based on the three circular queues as claimed in claim 1, wherein the step of switching back and forth the read program segment into the interpolator by setting the variable of the interpolator is realized by setting interpolator segment taking control flags inQueuBack and hwCuttingDir, which specifically comprises:
step 1: if the trial cutting function of the hand wheel is not started or the trial cutting function of the hand wheel is started but the hand wheel is not shaken reversely, inQueueBack is set to be 0, hwCuttingDir is invalid, and the interpolator continuously takes out the numerical control program section from the program queue TPQUEUE until the execution is finished; otherwise, executing step 2;
and 2, step: setting inQueueBack to be 1, setting hwCuttingDir to be-1, and taking a numerical control program section from a rollback queue HW _ BKQ by an interpolator and executing; if the hand wheel is shaken in the positive direction, the step 3 is executed; otherwise, returning to the step 2 to continuously take the numerical control program segment from the rollback queue HW _ BKQ until the execution is finished;
step 3; setting inQueueBack to be 1, setting hwCuttingDir to be 1, and taking a numerical control program segment from a forward queue HW _ FWQ by an interpolator and executing; if the hand wheel is shaken reversely, returning to the step 2; otherwise, returning to step 3 to continuously take the numerical control program segment from the forward queue HW _ FWQ, returning to step 1 after the execution is finished, and switching the return sequence queue TPQUEUE to continue the execution.
7. The hand wheel trial cut rollback control method based on the three-ring queue as claimed in claim 6, wherein:
when the program queue TPQUEUE is switched to the rollback queue HW _ BKQ, a program segment is taken from the head of the rollback queue HW _ BKQ for execution:
when switching from the back-off queue HW _ BKQ to the forward queue HW _ FWQ, if the back-off queue HW _ BKQ is executed to the nth program segment, taking the program segment from the len-n segment of the forward queue HW _ FWQ for execution;
when the forward queue HW _ FWQ is switched to the back-off queue HW _ BKQ, if the forward queue HW _ FWQ is executed to the nth program segment, the program segment is fetched from the len-n segment of the back-off queue HW _ BKQ for execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811600725.9A CN111367234B (en) | 2018-12-26 | 2018-12-26 | Hand wheel trial cut rollback control method based on three-ring queue |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811600725.9A CN111367234B (en) | 2018-12-26 | 2018-12-26 | Hand wheel trial cut rollback control method based on three-ring queue |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111367234A CN111367234A (en) | 2020-07-03 |
CN111367234B true CN111367234B (en) | 2022-12-27 |
Family
ID=71208370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811600725.9A Active CN111367234B (en) | 2018-12-26 | 2018-12-26 | Hand wheel trial cut rollback control method based on three-ring queue |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111367234B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1636172A (en) * | 2001-10-04 | 2005-07-06 | 约翰尼斯海登海恩博士股份有限公司 | Method for continuous-path control |
CN101846991A (en) * | 2010-04-26 | 2010-09-29 | 成都华远焊割设备有限公司 | Non-trailing quick rollback processing method for numerical control cutting machine |
CN103273374A (en) * | 2013-05-03 | 2013-09-04 | 陈洪铎 | Reversible trial cut control method for numerical control system |
CN104122840A (en) * | 2014-07-17 | 2014-10-29 | 西安交通大学 | Standard track test analysis system for numerically-controlled machine tool |
CN105676775A (en) * | 2016-01-13 | 2016-06-15 | 厦门理工学院 | Method based on double track cache regions for controlling rollback and machining continuing of original path of numerical control machining |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6850806B2 (en) * | 1999-04-16 | 2005-02-01 | Siemens Energy & Automation, Inc. | Method and apparatus for determining calibration options in a motion control system |
US6934601B2 (en) * | 1999-09-20 | 2005-08-23 | Hitachi, Ltd. | Numerically controlled curved surface machining unit |
CN100451891C (en) * | 2005-11-18 | 2009-01-14 | 中国科学院沈阳计算技术研究所有限公司 | Dynamic forward-looking processing method of small program segment and implementing device |
JP5357082B2 (en) * | 2010-02-23 | 2013-12-04 | スター精密株式会社 | Machine tool control device and operation control method |
-
2018
- 2018-12-26 CN CN201811600725.9A patent/CN111367234B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1636172A (en) * | 2001-10-04 | 2005-07-06 | 约翰尼斯海登海恩博士股份有限公司 | Method for continuous-path control |
CN101846991A (en) * | 2010-04-26 | 2010-09-29 | 成都华远焊割设备有限公司 | Non-trailing quick rollback processing method for numerical control cutting machine |
CN103273374A (en) * | 2013-05-03 | 2013-09-04 | 陈洪铎 | Reversible trial cut control method for numerical control system |
CN104122840A (en) * | 2014-07-17 | 2014-10-29 | 西安交通大学 | Standard track test analysis system for numerically-controlled machine tool |
CN105676775A (en) * | 2016-01-13 | 2016-06-15 | 厦门理工学院 | Method based on double track cache regions for controlling rollback and machining continuing of original path of numerical control machining |
Also Published As
Publication number | Publication date |
---|---|
CN111367234A (en) | 2020-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109719702B (en) | Robot system, robot controller, and robot retreat method | |
US9639080B2 (en) | Controller for controlling machine tool and robot | |
JP4374045B2 (en) | Numerical control device with program restart function | |
US10338570B2 (en) | Numerical controller | |
US9310799B2 (en) | Numerical controller having function of operation based on table format data | |
CN108037737B (en) | Quick-response point-to-point S-shaped speed planning method | |
CN111367234B (en) | Hand wheel trial cut rollback control method based on three-ring queue | |
JP2008524734A (en) | Control unit of machine with debug function | |
JP2019149047A (en) | Controller | |
TWI554856B (en) | Apparatus and method for transforming nc programs | |
CN111045395A (en) | Numerical controller | |
US20190107820A1 (en) | Controller | |
CN108334042A (en) | Numerical control device | |
US10671053B2 (en) | Numerical controller and machine tool system | |
CN110968045B (en) | Speed control method and device for moving target and readable storage medium | |
CN112910332A (en) | Method and device for determining initial electrical angle of permanent magnet synchronous motor and storage medium | |
WO2022244072A1 (en) | Numerical control device and computer-readable storage medium | |
Yang et al. | Design and implementation of engraving machine controller | |
CN116237653B (en) | Point selection processing method and device of laser cutting system | |
WO2022219701A1 (en) | Numerical control device | |
US20230350375A1 (en) | Numerical control device and control method | |
US20150241867A1 (en) | Numerical controller configured for operation based on tabular data | |
CN116707379A (en) | Servo motor control method and system for reverse input learning | |
JPS6063605A (en) | Numerical controller with composite skipping function | |
CN117206707A (en) | Processing method for improving material pulling linkage efficiency in laser processing numerical control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: No. 16-2, Nanping East Road, Dongling District, Shenyang City, Liaoning Province, 110168 Patentee after: Shenyang Zhongke CNC Technology Co.,Ltd. Address before: No. 16-2, Nanping East Road, Dongling District, Shenyang City, Liaoning Province, 110168 Patentee before: Shenyang Golding Nc Intelligence Tech.co.,ltd. |
|
CP01 | Change in the name or title of a patent holder |