METHOD OF PROTECTING FILE OF NUMERICAL CONTROL

Abstract: A numerical control apparatus is provided with a processor (102a), a control program memory (102b), a mem­ ory (102c) holding files, and an input means (102d) for ac­ cessing the files, and the processor (102a) arithmetically processes control data supplied from outside according to a control program, so that a machine connected to the apparatus is numerically controlled. The names of files which are to be protected are stored in the memory (102c) of the numerical control apparatus, and when a modification command and the name of a desired file are supplied through the input means (102d), the name of the desired file and the names of the files being protected are compared with each other. When the name of the desired file is the same as that of a file being protected, the modification of the file is executed only on condition that a processing con­ firmation input is supplied through the input means (102d).

Description: This invention relates to a computerized numerical control unit for numerically controlling a machine tool or the like, and more particularly to a numerical control unit file protection method capable of protecting a file stored in a memory against an erroneous updating operation. Numerical control units (hereafter referred to as "NC units") find use in applying NC techniques to a variety of machines, and the field of application thereof is ever widening. These NC units are now constituted by computers and are capable of implementing various functions by means of software. Recent NC units have a parameter control function in addition to the basic control software and are adapted so as to be able to store several files, with file names affixed thereto, in a submemory. By way of example, diagnosis and production management are facilitated if such information as the change in status of a machine with time, as well as the operating time, is filed. Files of this kind are capable of being modified by deletions, substitutions and changes in file name, though the files also contain information which is desired to be left unchanged. The operation of NC units has become ever more simplified by adopting operator guidance and the like, and even an individual who does not possess a full understanding of NC units is capable of readily altering a file. Consequently, there are instances where important files that are not to be altered are deleted by an erroneous operation, such as by entering a file name incorrectly. A solution to this problem is desired. The Radio Shack TRS-80 Model II Operation Manual published in 1979 addresses the problem of protecting files against deletion in a PC. However, there is a no list of protected files and the deletion of individual named files is not protected against erroneous operation. The VAX/VMS Command Language User's Guide dated August 1978 discloses a file protection method for a data processing system having a processor, memory for storing a control program and files, and input means for accessing those files, the processor processing externally entered data in accordance with the control program. When a deletion command is entered from the input means, processing for deleting a file is executed on condition that there is a deletion confirmation input from the input means. According to the present invention there is provided a numerical control unit file protection method for a numerical control unit controlling a machine tool or the like connected thereto, the numerical control unit having a processor, a memory for storing a control program and files, and input means for accessing said files, said processor processing externally entered control data in accordance with said control program to numerically control said machine tool or the like, said method including presetting in a data memory the names of specified files which are to be protected and, when a file modification command together with the name of an object file to be modified by said command are entered from said input means, comparing the name of the object file with the preset file names, the modification command being executed if the object file name does not agree with a preset file name, whereas if the object file name does agree with one of the preset file names then the processing for modifying said object file is not executed unless there is a processing confirmation input from said input means. According to the present invention, a file which is to be protected, among files which undergo modification processing, is prevented from being manipulated incorrectly by an operator. Brief Description of the Drawings Fig. 1 is a block diagram illustrating an embodiment utilising the present invention, Fig. 2 is a flowchart of processing embodying the present invention, and Fig. 3 is a flowchart of processing according to another version of the present invention. Fig. 1 is a block diagram illustrating an embodiment utilising the present invention and shows a numerical control unit applied to a die-milling electric discharge machine. In the Figure, numeral 101 denotes a paper tape bearing punched numerical control (NC) command data. Specifically, the paper tape 101 stores NC command data such as positioning information for machining and M-, S- and T-function information. Numeral 102 denotes a numerical control (NC) apparatus which causes a tape reader, described below, to read in the NC data from the paper tape 101, and which decodes the read NC data, delivering, e.g., M, S and T function instructions to the machine side through a magnetics panel, not shown, when the data is indicative of such instructions, and a move command Z c to a pulse distributor, which is the succeeding stage, when the data is indicative of such a command. The NC apparatus 102 is composed of a processor 102a for executing processing in accordance with a control program, a program memory 102b for storing a prescribed control program, a data memory 102c for storing data, an operator's panel 102d for operator control, a tape reader/puncher 102e, a submemory 102f for storing files, an input/output port 102g, a present position counter 102h, a display unit 102i, and an address/data bus 102j interconnecting the foregoing items. The program memory 102b is constituted by a read-only memory (ROM) or by a non-volatile memory and stores a numerical control programe for numerically controlling a machine. By way of example, for an electric discharge machine, the program memory 102b would store a machining control program for controlling machinining electrode feed, table feed and machining voltage, etc. The data memory 102c is composed of a non-volatile memory which, in addition to storing NC data (such as machining position data) from the paper tape 101, stores a programme machining program in an area PM in the form of parameters or user macro. Numeral 103 denotes a pulse distributor which executes well-known pulse distribution computations on the basis of the move command Z c , and generates distributed pulses P s at a frequency corresponding to a commanded speed. Numeral 104 designates a known accelerator/decelerator circuit which generates a train of pulses P i by rectilinearly accelerating the pulse rate of the train of distributed pulses P s at the occurrence of this pulse train, and by rectilinearly decelerating the same at the end thererof. Numeral 105 indicates a D.C. motor by which an electrode EP is fed for machining. Numeral 106 denotes a pulse coder which generates one feedback pulse FP each time the DC motor rotates by a predetermined amount. Numeral 107 denotes an error calculating and storing unit which is constructed of, for example, a reversible counter, and which stores a difference E r between the number of the input pulses P i generated by the accelerator/decelerator circuit 104 and that of the feedback pulses FP. This error calculating and storing unit may be constructed, as shown in the Figure, of an arithmetic circuit 107a for calculating the difference E r between P i and FP, and an error register 107b for storing E r . More specifically, assuming that the DC motor 105 is rotating in the forward direction in accordance with a command causing the DC motor 105 to rotate in this direction, the error calculating and storing unit 107 operates in such a manner that each time the input pulse P i is generated, said pulse is counted up, while each time the feedback pulse FP is generated, the content is counted down, and that the difference E r between the number of input pulses and the number of feedback pulses is stored in the error register 107b. Numeral 108a denotes a digital-analog DA converter for generating an analog voltage proportional to the content of the error register 107b. Numeral 109 denotes a speed control circuit. It should be noted that 108, 109 construct a motor drive circuit. The operation of the arrangement embodied in Fig. 1 will now be described. First, prior to machining, NC data is read from the paper tape 101 by the tape reader/puncher 102e, and the NC data from the paper tape 101 is stored in the data memory 102c via the bus 102j. Next, when a start command is applied to the processor 102a via the bus 102j by manipulating the operator's panel 102d, the processor 102a successively reads and executes the machining control program stored in the program memory 102b. Specificaly, required parameters (NC parameters, feed speed, machining voltage, etc.) are read out of the data memory 102c together with the NC data, an X-axis move command X c and Y-axis move command Yc are created for moving a table (not shown) in X and Y directions, and these commands are delivered to a table drive unit through an input/output port (not shown), whereby the table is positioned. It should be noted that an arrangement equivalent to the route extending from the input/output port 102g to the servomotor 105 is provided for each of the X and Y axes, though not shown in Fig. 1. The Z-axis move command Z c is created in similar fashion, and the M-, S- and T-functions are delivered to the machine side through the input/output port 102f. The move command Z c is delivered to the input/output port 102g via the bus 102j. When the move command is applied to the pulse distributor 103 from the input/output port 102g, the pulse distributor 103 produces distributed pulses P s by performing a pulse distribution operation based on the move command Z c . Upon receiving the pulses P s , the accelerator/decelerator circuit 104 accelerates and decelerates the pulse rate thereof and applies the train of command pulses P i to the error calculating and storing circuit 107. Thus, the content of the error register 107b becomes non-zero, so that the DA converter 108 provides a voltage and the motor 105 is driven by the speed control unit 109 so as to move the electrode EP. When the motor 105 has rotated by a predetermined amount, the feedback pulse FP is generated by the pulse coder 106 and is applied to the error calculating and storing unit 107. The difference Er between the number of commanded pulses Pi and the number of feedback pulses FP is stored in the error register 107b. Thenceforth, the motor 105 is servo-controlled so as to make the error E r approach zero, whereby the electrode EP is fed for machining and moved toward a target position. A variety of files, of which the following are examples, are registered in the submemory 102: I. Feed velocity conforming to workpiece material II. Applied current conforming to workpiece material III. Override quantity conforming to workpiece material IV. Machine status information V. Operating time for each process Items I through III are stored beforehand as files in the submemory 102 and are called to a screen for reference when data are entered. Items IV, V are created as the machine is operated and are called to the screen for confirmation when necessary. The files are stored in the submemory 102f upon being provided with file names, and the files are accessed by entering the filenames. Among the files there are those that are to be left unchanged. Such files require protection. To this end, according to the present invention, among the files F1, F2, F3 ... that are stored in the submemory 102f, files f1, f2 that are to be protected are preset as system parameter data in the parameter area PM of the data memory 102c. When the next operation is carried out, it is confirmed whether there is protected file stored in the parameter area PM, followed by executing the following operations: (a) file deletion (b) file substitution (c) file name change Fig. 2 is a flowchart of processing embodying the present invention. (1) To access a file in the submemory 102f, an operation command and the name of the object file are entered from the operator's panel 102d. These are transmitted to the processor 102a via the bus 102j. (2) As a result, the processor 102a is placed under the control of a file processing program in the program memory 102b and determines whether the operation command is one of the aforementioned modification commands (a), (b), (c). If the command is not a modification command, the processing designated is executed. (3) If the command is a modification command, then the file name entered is compared with protected file names f1, f2 stored in the parameter area PM of the data memory 102, whereby it is determined whether the file is a protected file. If it is not, the designated modification process is executed. (4) If the file is a protected file, then the processor 102a causes the display device 102i to display an inquiry via the bus 102j. Specifically, the display device 102i will present a display reading "OK TO MODIFY ENTERED FILE?". (5) In response, the operator verifies the entered file name, checks to determine whether there is an error, and enters "NO" from the operator's panel 102d, whereby the processor 102a ends processing without executing the designated modification process. (6) If there is no error, on the other hand, then "OK" is entered from the operator's panel 102d, upon which the processor 102a executes the modification process for the file in the submemory 102f corresponding to the entered file name. Fig. 3 is a flowchart of processing according to another embodiment of the present invention. This embodiment differs from that of Fig. 2 in that confirmation of the modification process is performed by keyword entry and collation rather than by an inquiry. That is, entry of a keyword from the operator's panel 102d is set as a condition in addition to entry of the operation command and object file name. After steps (2), (3) identical to those in Fig. 2 are executed, (7) the processor 102a determines whether a keyword is registered in the parameter area PM of the data memory 102c. If no keyword is registered, processing ends without execution of the designated process. (8) If a keyword is registered, on the other hand, the processor 102a determines whether a keyword has been entered from the operator's panel 102d. If no keyword has been entered, processing ends without execution of the designated process. (9) If a keyword has been entered, on the other hand, the processor 102a compares the entered keyboard with the keyword stored in the parameter area PM of the data memory 102c. The processor ends processing without executing the designated process if the two keyboards fail to agree, and executes the designated modification process when the key-words do agree. The foregoing relates to a case where the invention is applied to a die-milling electric discharge machine. However, the present invention can also be applied to an NC automatic programming apparatus or the like, in which case the files would be (i) material files specifying cutting conditions conforming to various workpiece materials (iron, aluminum, stainless steel ...), and (ii) files used to enter quadrants drawn on a design drawing. According to the embodiments as described above, in a numerical control unit having a processor, a memory and input means, files and the name of a file to be protected are stored in the memory, a comparison is made with the name of the protected file in the memory in accordance with a modification command and a file name entered from the input means, and file modifiation processing is permitted when the entered file name is the protected file and, further, on the condition that there is a processing confirmation input from the input means. Accordingly, the embodiments prevent modification of a protected file in response to erroneous entry of a file name or an erroneous operation command input from the input means. In addition, a protected file can be modified with ease upon entry of a processing confirmation input, and modification of an unprotected file can be performed exactly as in the prior art. In other words, among files which are to undergo modification processing, a request for a prescribed confirmatory operation is made with respect to a protected file, thus to protect against an erroneous operation by the operator. The present embodiments therefore have important practical advantages. It should be noted that while the present invention has been described in accordance with embodiments thereof, the present invention is not limited to the above-described embodiments but can be modified in various ways in accordance with the gist thereof, and that such modifications will not depart from the scope of the claim. Industrial Applicability According to the present invention, a file which is to be protected, among files which undergo modification processing, is prevented from being manipulated incorrectly by an operator. Accordingly, the present invention may be applied to protection of data in a computerized numerical control unit.

Claims: A numerical control unit file protection method for a numerical control unit controlling a machine tool or the like connected thereto, the numerical control unit having a processor (102a), a memory (102b,102f) for storing a control program and files, and input means (102d) for accessing said files, said processor (102a) processing externally entered control data in accordance with said control program to numerically control said machine tool or the like, said method including presetting in a data memory (102c) the names of specified files which are to be protected and, when a file modification command together with the name of an object file to be modified by said command are entered from said input means (102d), comparing the name of the object file with the preset file names, the modification command being executed if the object file name does not agree with a preset file name, whereas if the object file name does agree with one of the preset file names then the processing for modifying said object file is not executed unless there is a processing confirmation input from said input means (102d). A numerical control unit file protection method according to claim 1, wherein there is provided a display device (102i) which, when said entered object file name agrees with a name preset in said data memory (102c), indicates the need to enter confirmation of the modification processing for said file from the input means (102d). A numerical control unit file protection method according to claim 1, wherein when said entered object file name agrees with a name preset in said data memory (102c), modification processing for said file is executed by entry of a keyword from the input means (102d) and comparison and agreement of said entered keyword with a stored keyword.

Inventors: KISHI HAJIMU, MATSUMURA TERUYUKI, TANAKA KUNIO, YUKUTOMO MASASHI, KISHI, HAJIMU, MATSUMURA, TERUYUKI, TANAKA, KUNIO, YUKUTOMO, MASASHI
Applicants: FANUC LTD, FANUC LTD.
Application year: 1983
Main classification: G05B9
IPC codes: G05B9, G05B19, G06F21, B25J9