EDITING PROGRAM EDITING DEVICE
Patent Information
- Application Number
- DE102019106590
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-03-22
- Filing Date
- 2019-03-15
- Publication Date
- 2025-03-20
- Estimated Expiration
- 2039-03-15
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
RELATED APPLICATIONS
[0001] This application claims priority from Japanese Patent Application No. 2018-054594, filed on March 22, 2018. BACKGROUND OF THE INVENTIONField of the invention
[0002] The present invention relates to a machining program editing apparatus, and more particularly to a machining program editing apparatus capable of editing a machining program currently being executed. Description of related technology
[0003] A numerical control system performs numerical control processing based on a machining program and controls a machine tool based on the result of this processing to machine a workpiece as commanded. When machining a workpiece based on a machining program, operators previously set machining conditions such as spindle speed and feed rate while performing trial machining in the machining program, so that the machined workpiece reached a target machining state, and caused the adjustment result to be reflected in the machining program.In addition, such a method is adopted that when an error is found in the machining program during a machining operation based on the machining program, the operation of the machining program is continued after the machining operation is interrupted and the machining program is corrected (see JP H07-311612 A).
[0004] In such a case as described above, if the machining program can be edited without interrupting the machining process and the editing result is caused to be reflected in the process immediately, there will be no time loss due to the interruption of the machining process, so tasks can be performed efficiently. However, a typical numerical control system cannot edit the machining program during the machining process. This is because when a control unit of the numerical control reads out sections that are currently being edited while the machining program is undergoing editing such as writing or deleting, a memory stored with the machining program may sometimes be in an incomplete state during the readout, thus generating an alarm such as "incorrect checksum."
[0005] While some numerical controls have the function of editing the machining program during machining, this function is also designed to copy the machining program used for the machining operation to another memory location so that the copied machining program can be edited. To ensure that the editing result is reflected in the machining operation, procedures such as interrupting the currently executed machining operation, writing the edited machining program back to an original memory location, and resuming the machining operation must be followed. Consequently, this type of method has the problem of not ensuring satisfactory operating efficiency.
[0006] EP 2 916 218 A1 discloses an NC program generation and editing device configured to update basic data in accordance with the editing content when editing an NC program only refers to a preset NC code. DE 10 2017 004 591 A1 relates to a numerical control system that enables highly accurate prediction of a machining time taking into account a machine deceleration occurring in a machine. An acceleration / deceleration frequency prediction unit predicts the number of acceleration / deceleration operations of the axis in machining based on the machining program, and based on this, a correction time for correcting a reference machining time is calculated. SUMMARY OF THE INVENTION
[0007] Accordingly, it is the object of the present invention to provide a machining program editing apparatus capable of editing a machining program executed during a machining operation and causing the result of the editing to be reflected in the machining program without interrupting the machining operation.
[0008] According to the present invention, the problems described above are solved by predicting an editable time before a block of a machining program is read out for execution, so that the block can be edited during the editable time.
[0009] A machining program editing device according to the present invention is configured to control a machine based on a command from a block of a machining program, and includes: a machining time prediction unit configured to predict a machining time for each block of the machining program based on the command of the block; a lookahead block number calculation unit configured to calculate, for each block of the machining program, the number of blocks that have been prefetched while the block is being executed; an editable time calculation unit configured to calculate an editable time for the block of the machining program; a program editing unit configured to display the machining program to accept a user's editing and write the result of the editing into a machining program used for control;and an editable time display unit configured to display an editable time for a block to be edited. The program editing unit makes only those blocks in the machining program that have the remaining editable time editable, and locally writes only edited sections to the machining program used for control.
[0010] The editable time calculation unit may calculate, as the editable time, a time obtained by subtracting a preset tolerance time from a time required for a specified block to be read out for execution from the current time point.
[0011] According to the present invention, a machining program can be edited without interrupting a machining operation by a controller during the machining operation, and the result of the machining can be immediately reflected in the operation, so that there is no loss of time due to the interruption of the machining operation, and therefore tasks can be performed efficiently. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic diagram of a hardware configuration of a machining program editing apparatus according to an embodiment; Fig. 2 is a schematic functional block diagram of the machining program editing apparatus according to the one embodiment; Fig. 3 is a diagram illustrating a block information table; and Fig. 4 is a diagram showing the relationships between a block of a machining program being executed, a specified block, and a range of blocks used to calculate an editable time. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Fig. 1 is a schematic diagram of a hardware configuration illustrating main parts of a machining program editing device according to an embodiment of the present invention. A machining program editing device 1 can be mounted as a controller for controlling a manufacturing machine such as a machine tool.
[0013] A CPU 11 of the machining program editing device 1 according to the present embodiment is a processor for generally controlling the machining program editing device 1. The CPU 11 reads a system program stored in a ROM 12 via a bus 20 and controls the entire machining program editing device 1 according to this system program. A RAM 13 is temporarily stored with temporary calculation data and display data, various data input by an operator via an input unit (not shown), and the like.
[0014] A non-volatile memory 14 is constructed as a memory backed up by, for example, a battery (not shown) so that its storage state can be maintained even when the machining program editing device 1 is turned off. The non-volatile memory 14 stores machining programs read from an external device 72 through an interface 15 and input via a display / MDI unit 70, and various data (e.g., various signals indicating the execution states of commands from the machining programs and the operating state of the machine tool, the positions, rotational speeds, and current and voltage values of a servo motor 50 and a spindle motor 62, machining conditions, and tool and workpiece information) acquired from various parts of the machining program editing device 1, the machine tool, sensors, and the like.The machining program and various data stored in the non-volatile memory 14 can be developed during execution and use in the RAM 13. In addition, various system programs, such as conventional analysis programs, are previously written into the ROM 12.
[0015] The interface 15 is an interface for connecting the machining program editing device 1 and the external device 72, such as an adapter. Programs, various parameters, and the like are read from the external device 72 side. Furthermore, the programs, various parameters, and the like edited in the machining program editing device 1 can be stored in an external storage medium by the external device 72. A programmable machine controller (PMC) 16 controls the machine tool and its peripheral devices (e.g., an actuator such as a robot hand for tool change and sensors installed on the machine tool) by outputting signals thereto via an I / O unit 17 according to a sequence program incorporated in the machining program editing device 1.In addition, when the PMC 16 receives signals from various switches on an operation panel on the main body of the machine tool and the peripheral devices, it processes these signals as needed and then supplies them to the CPU 11.
[0016] The display / MDI unit 70 is a manual data input device equipped with a display, a keyboard, and the like. An interface 18 receives commands and data from the keyboard of the display / MDI unit 70 and delivers them to the CPU 11. An interface 19 is connected to a control panel 71 equipped with a manual pulse generator and the like used for manually driving axes.
[0017] An axis control circuit 30 for controlling axes of the machine tool receives a set of movement commands for each axis from the CPU 11 and outputs a command for the axis to a servo amplifier 40. Upon receiving this command, the servo amplifier 40 drives a servo motor 50 to move the axis of the machine tool. The servo motor 50 for the axis has a built-in position / speed detector and feeds a position / speed feedback signal from this position / speed detector back to the axis control circuit 30, thereby performing position / speed feedback control.
[0018] In the hardware configuration display from Fig. In Figure 1, the axis control circuit 30, the servo amplifier 40, and the servo motor 50 are each shown as a single number. However, these elements are actually provided according to the number of axes of the machine tool to be controlled.
[0019] A spindle control circuit 60 receives a spindle rotation command and outputs a spindle speed signal to a spindle amplifier 61. Upon receiving this spindle speed signal, the spindle amplifier 61 rotates a spindle motor 62 of the machine tool at a commanded speed, thereby driving a tool. A position encoder 63 is connected to the spindle motor 62. The position encoder 63 outputs feedback pulses synchronously with the rotation of a spindle, and the feedback pulses are read by the CPU 11.
[0020] Fig. 2 is a schematic functional block diagram of the machining program editing apparatus 1 according to the embodiment.
[0021] Function blocks that are Fig. 2 are implemented as the CPU 11 of the machining program editing device 1 shown in Fig. 1, executing their respective system programs and controlling operations of various parts of the machining program editing apparatus 1.
[0022] The machining program editing device 1 of the present embodiment includes a control unit 100, a machining time prediction unit 110, a look-ahead block number calculation unit 120, an editable time calculation unit 130, a program editing unit 140, and an editable time display unit 150. The control unit 100 controls a manufacturing machine 2 based on a machining program. The machining time prediction unit 110 predicts a machining time for each block of the machining program. The look-ahead block number calculation unit 120 calculates the number of blocks prefetched during the execution of each block of the machining program. The editable time calculation unit 130 calculates an editable time for the block of the machining program. The program editing unit 140 displays the machining program to accept a user's edits.The editable time display unit 150 displays the editable time for the block of the machining program.
[0023] The control unit 100 reads a block of the machining program stored in the non-volatile memory 14 (or the machining program developed in the RAM 13) and controls the manufacturing machine 2 based on a command from the read block. The control unit 100 has a general function of controlling various parts of the manufacturing machine 2, for example, outputting a movement amount for each control period to the servo motor 50 for driving an axis of the manufacturing machine 2 when the machining program block commands this axis to move, or outputting an output command to a peripheral device (not shown) attached to the manufacturing machine 2 when the machining program block commands this peripheral device to operate.The control unit 100 may be configured to write information capable of uniquely identifying the block of the currently executing machining program into the non-volatile memory 14.
[0024] The machining time prediction unit 110 predicts the machining time for each block of the machining program using a conventional technique (e.g., JP 2012-93975 A or JP 2017-207823 A) for predicting the machining time of a block of a machining program, and writes the predicted machining time for each block into a block information table in the nonvolatile memory 14 (or the RAM 13). Since such a technique for predicting a machining time of a block of a machining program is already known, a detailed description thereof will be omitted here.
[0025] Fig. 3 is a diagram showing an example of the block information table in the memory of the machining program editing apparatus 1.
[0026] The block information table is a table that stores, for each block of the machining program, at least the machining time predicted by the machining time prediction unit 110 and the maximum number of look-ahead blocks 120 calculated by the look-ahead block number calculation unit in association with each other. In the block information table, each block of the machining program is managed so that it can be uniquely identified, for example, by the block number of the block or the like. Furthermore, the block information table should preferably be managed so that its execution order can be determined for each block of the machining program (e.g., by analyzing a jump instruction or the like in advance).In such a case, the block information table may be designed to store information regarding the blocks in the actual execution order or to be managed in conjunction with information regarding the execution order for each block.
[0027] The lookahead block count calculation unit 120 calculates the maximum number of blocks prefetched in a lookahead buffer during the execution of an instruction for each block of the machining program, and writes the calculated maximum number of lookahead blocks to the block information table in the nonvolatile memory 14 (or RAM 13). The maximum number of lookahead blocks for a particular block is determined by the block's instructions and by the blocks already executed.
[0028] Typically, there are multiple lookahead blocks. However, if a high-speed, high-precision machining mode is commanded, the number of lookahead blocks is changed or significantly increased by the command, for example. Furthermore, if a prefetch suppression command is issued, prefetching is not performed for the commanded block and its subsequent blocks.
[0029] In an actual editing operation, to calculate the number of blocks prefetched at the time of execution of each block, time constraints such as the time required to read the program and the time required to analyze the program must be considered. However, in the lookahead block number calculation unit 120, it is assumed that blocks of the maximum number of lookahead blocks are prefetched based on the instructions without considering these time constraints.
[0030] The processing for calculating the maximum number of lookahead blocks for each block of the machining program by the lookahead block number calculation unit 120 can be executed at the time the machining program is selected or at any time during the machining process according to the selected machining program. However, it is preferable that the calculation processing be executed in the background so that an operator is not aware of it.
[0031] The editable time calculation unit 130 calculates the editable time for a specified block of the machining program based on the currently executing block and the block information table. The editable time for the specified block calculated by the editable time calculation unit 130 is the time required for the specified block to be read out (or prefetched) from the current time in order to be executed. A method for calculating the editable time for the specified block by the editable time calculation unit 130 will now be described with reference to Fig. 4 described.
[0032] Fig. 4 is a diagram showing the relationships between the block of the machining program currently being executed, the specified block, and the range of blocks in which the machining time is accumulated.
[0033] When the block of the editing program is specified, the editable time calculation unit 130 identifies a block to be executed at the time when the block immediately preceding the specified block is prefetched in the lookahead buffer by referring to the maximum number of lookahead blocks for each block written in the block information table (Procedure 1).
[0034] If the specified block is N890, in the example from Fig. 4, it can be identified that a block N880, which immediately precedes the specified block, is prefetched into the lookahead buffer while a block N780 is being executed (since the maximum number of lookahead blocks is 10). At this time, the blocks that have then been buffered in the lookahead buffer are N790 to N880.
[0035] When the block to be executed at the time the block immediately preceding the specified block is prefetched in the lookahead buffer is identified, the editable time calculation unit 130 uses the blocks ranging from the currently executing block to the identified block as blocks for calculating the total processing time and for calculating the total processing time as the editable time for the specified block. In the example of FIG. 4, the total processing time for blocks N060 to N780 is calculated as the editable time for the specified block N890 (Procedure 2).
[0036] The editable time calculation unit 130 may also be configured to calculate the editable time shorter by a preset margin time in order to complete the editing in time without consuming the time required for the specified block to be read out (or prefetched) for execution from the current time point.
[0037] The program editing unit 140 displays the editing program to accept a user's edits. The program editing unit 140 may also be configured, when displaying the editing program on the display / MDI unit 70, to cause the editable time calculation unit 130 to calculate the editable time for each block as the specified block and to display those blocks with the remaining editable time and those without remaining editable time in a color-coded form based on the calculated editing time for each block. Furthermore, the program editing unit 140 may be configured to update the editable time for each block every predetermined period or each completion of the execution of each block with the progress of the editing operation and to update the color-coded display of each block.
[0038] The program editing unit 140 accepts editing of the machining program based on the operator's editing operation on the display / MDI unit 70. Typical editing operations include cursor movement and character editing at the cursor position. The program editing unit 140 causes edited contents based on the operator's operation to be reflected in the machining program stored in the non-volatile memory 14 (or developed in the RAM 13). When the program editing unit 140 causes the edited contents to be reflected in the machining program used for the machining operation, it does not write the entire machining program, but locally writes only those sections (e.g., blocks) that are edited by the operator.
[0039] The program editing unit 140 may also be configured such that, if the editable time for a block has expired (or is reduced to 0 or less) while the operator is editing that block, a message is displayed to prompt the operator not to write any edited content. In this case, the editing process continues and the content edited by the operator is discarded. On the other hand, the program editing unit 140 may also be configured to stop the editing process and cause the edited content to be reflected in the editing program if the editable time for the block has expired while the operator is editing that block.In this case, the program editing unit 140 may also be configured to ask the operator whether or not to stop the editing operation and to cause the edited contents to be reflected in the editing program, and to do so if the operator permits it.
[0040] The editable time display unit 150 displays the editable time for the block of the machining program currently being edited. Typically, the editable time display unit 150 displays, on a screen, the editable time for the block (block at the cursor position) being edited by the program editing unit 140. The editable time display unit 150 may also be configured to update the display of the editable time for the block of the machining program currently being edited every predetermined period when a timer (not shown) built into the machining program editing device 1 advances, or with the progress of the machining operation.Alternatively, the editable time display unit 150 may be configured to instruct the editable time calculation unit 130 to update the editable time for each block every predetermined period, each completion of execution of each block, or each completion of execution of a predetermined number of blocks, as the editing process progresses. Furthermore, the editable time display unit 150 may be configured to display a warning when the editable time for the block (block at the cursor position) being edited by the program editing unit 140 becomes shorter than a predetermined time.
[0041] While an embodiment of the present invention has been described herein, the invention is not limited to the above-described embodiment and can be appropriately modified and embodied in various forms.
[0042] For example, in the embodiment described above, the machining program editing device is shown implemented as the controller. Alternatively, however, the machining program editing device 1 may be mounted on, for example, a personal computer connected to the controller, or on a computer, such as a cell computer or a host computer, connected to the controller via a wired or wireless network.In such a case, it is only necessary that the machining time prediction unit 110, the look-ahead block number calculation unit 120, the editable time calculation unit 130, the program editing unit 140, and the editable time display unit 150 be mounted on the personal computer or the computer, and that the above-described processing be performed by exchanging data through communication between the controller and these functional means or the like. If the machining program editing device 1 and the controller are constructed as two different devices, a time for communication or the like is required to cause the result of the machining program editing to be reflected in the machining program currently being executed.Therefore, the time for reflection should be measured in advance by an experiment or the like and previously set as a tolerance time for the editable time calculated by the editable time calculation unit 130.
Claims
[1] A machining program editing device (1) configured to control a machine based on a command from a block of a machining program, the machining program editing device (1) comprising: a machining time prediction unit (110) configured to predict a machining time for each block of the machining program based on the command of the block; a lookahead block number calculation unit (120) configured to calculate, for each block of the machining program, the number of blocks that have been prefetched while the block is being executed; an editable time calculation unit (130) configured to calculate an editable time for the block of the machining program; a program editing unit (140) configured to display the machining program, accept the editing of a user, and write the result of the editing into a machining program used for control; and an editable time display unit (150) configured to display an editable time for a block to be edited, wherein the program editing unit (140) makes only those of a plurality of blocks in the machining program editable which have the remaining editable time, and locally writes only edited sections into the machining program used for control. [2] The machining program editing apparatus (1) according to claim 1, wherein the editable time calculating unit (130) calculates, as the editable time, a time obtained by subtracting a preset tolerance time from a time required for a specified block to be read out for execution from the current time point.
Citation Information
Patent Citations
Numerical control
DE102017004591A1
Apparatus for generating and editing NC program
EP2916218A1
Method and device for editing machining program of numerical controller
JP1995311612A
Machining time prediction device of numerical control machine tool
JP2012093975A
Numerical controller having servo control and machining time prediction function that takes into account delay in machine motion
JP2017207823A