WO1990015373A1 - Nc data edition - Google Patents

Nc data edition Download PDF

Info

Publication number
WO1990015373A1
WO1990015373A1 PCT/JP1990/000745 JP9000745W WO9015373A1 WO 1990015373 A1 WO1990015373 A1 WO 1990015373A1 JP 9000745 W JP9000745 W JP 9000745W WO 9015373 A1 WO9015373 A1 WO 9015373A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
conversion
command
matrix
mirror
Prior art date
Application number
PCT/JP1990/000745
Other languages
English (en)
French (fr)
Inventor
Masaki Seki
Takashi Takegahara
Takeshi Arakaki
Original Assignee
Fanuc Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority claimed from JP14310589A external-priority patent/JPH039404A/ja
Priority claimed from JP17409089A external-priority patent/JPH0340109A/ja
Application filed by Fanuc Ltd filed Critical Fanuc Ltd
Priority to US07/646,736 priority Critical patent/US5297023A/en
Publication of WO1990015373A1 publication Critical patent/WO1990015373A1/ja

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical 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/4093Numerical 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 part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine
    • G05B19/40931Numerical 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 part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine concerning programming of geometry
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present invention relates to an NC data editing method, and more particularly, to a method for quickly and accurately editing NC data for correcting a movement path of a control object.
  • NC data created in advance is executed by a numerical controller to generate a control output corresponding to the target movement path of a control target such as a tool, and a servo system that responds to this control output
  • the drive mechanism is controlled to move the controlled object along the target path.
  • edit the NC data to modify the related coordinate data in the NC data.
  • coordinate data representing each group of points specifying a desired movement route is referred to as coordinate data representing each of a group of points specifying the original movement route.
  • the NC data created for one of the robots It is known to edit NC data that has already been created in order to perform a conversion process and create NC data for the other robot.
  • the coordinate value data after the mirror conversion is manually calculated based on the coordinate value data constituting the created NC data and the data specifying the mirror plane.
  • the NC data is edited using the calculated coordinate value data. For this reason, the same problem as in the case of editing the NC data for correcting the movement route occurs.
  • An object of the present invention is to provide an NC data editing method capable of quickly and accurately editing NC data for correcting a movement route of a control object.
  • the NC data editing method of the present invention includes a step ( a ) of programming by adding a conversion command to the created NC data, and a conversion cancel command in the NC data.
  • (B) a step of automatically calculating and defining a conversion matrix when a conversion command is read from NC data, and (c) a step of canceling the conversion after defining the conversion matrix.
  • a movement command is read from the NC data before the command is read, a point related to the movement command is converted using a conversion matrix to automatically obtain the converted point (d).
  • E automatically rewriting the NC data using the converted points.
  • the conversion command is a position conversion command code, coordinate value data representing a group of reference points that can be arbitrarily set, and coordinate values representing a group of corresponding points respectively corresponding to the group of reference points.
  • a coordinate value data representing each of two points that specify a straight line on which a mirror plane is arranged at the midpoint, extending at the midpoint, and the dimensions of each coordinate value data match the dimensions of the NC data This is the mirror conversion command.
  • the position conversion matrix or mirror When reading the position conversion command code or mirror conversion command code from the NC data, the position conversion matrix or mirror automatically calculated based on the coordinate value data Using the transformation matrix, automatically find the point after position transformation or mirror transformation corresponding to the point related to the movement command. Also, preferably, a plurality of conversion commands are programmed in the NC data, and each time the latest conversion matrix is calculated in response to reading of the conversion command, the conversion matrix calculated sequentially up to that time. The product is multiplied by the latest transformation matrix to automatically obtain the latest composite transformation matrix, and the latest composite transformation matrix is used instead of the previous composite transformation matrix to convert points related to the movement command. Is defined as Then, each time the conversion cancel command is read, the composite transformation matrix defined immediately before the last defined transformation matrix is replaced with the composite transformation matrix defined last.
  • the NC data consists of a main program and a group of sub-programs, and the conversion command programmed in the main program is a main program. And a group of sub-programs are enabled, and the conversion command programmed in the sub-program is enabled for the sub-program.
  • the movement path of the controlled object is graphically displayed according to the NC data rewritten in the step (e), and the operator can modify the rewritten NC data. I do.
  • NC data can be automatically edited simply by adding a conversion command and a conversion cancel command in the NC data and programming. This eliminates the need for complicated manual calculations for editing NC data, greatly reducing the time required for editing work, and improving the reliability of edited NC data.
  • the position conversion command code included in the conversion command or the position conversion automatically calculated based on the coordinate value data included in the conversion command when reading the mirror conversion command code.
  • the point after position transformation or mirror transformation corresponding to the point related to the movement command is automatically determined, so the command code and coordinate data Position and mirror conversions can be performed automatically simply by adding a programmer to the NC data and programming.
  • the product of the conversion matrices calculated so far is multiplied by the latest conversion matrix to obtain the latest composite conversion matrix.
  • This transformation matrix is defined as a transformation matrix used for transformation of points related to the movement command, and each time a transformation cancellation command is read, it is defined one time before the last defined transformation matrix.
  • the defined composite conversion matrix is defined as a conversion matrix used for conversion of points related to the movement command, so a plurality of conversion commands and conversion cancellation commands are added at appropriate places in the NC data to create a professional conversion matrix.
  • the conversion command programmed in the main program of the NC data is made effective for the main program and a group of subprograms. Each defined tool path can be modified while maintaining the positional relationship between these tool paths.
  • each toolpath can be modified so that more parts can be manufactured from the workpiece.
  • the movement path of the controlled object is graphically displayed according to the rewritten NC data, and the rewritten NC data is allowed to be modified by an operation. Therefore, the operator can modify the NC data that has been changed to obtain the desired movement route when the movement route displayed graphically is not the desired one.
  • FIG. 1 is a schematic block diagram showing a main part of an automatic programming device for performing an NC data editing method according to an embodiment of the present invention.
  • FIG. 2 is a flowchart showing an NC data editing process executed by the programming device of FIG. 1,
  • FIG. 3 is a flowchart showing the data conversion process of FIG. 2 in detail.
  • FIG. 4 is a diagram illustrating an example of the original NC data to be edited obtained by executing the data correction process of FIG. 1,
  • Fig. 5 is a schematic diagram showing the operation of the position conversion matrix obtained during the data editing process in Fig. 2,
  • Figure 6 is a schematic diagram showing the operation of the mirror transformation matrix obtained during the data editing process.
  • Fig. 7 is a schematic diagram showing the operation of the composite transformation matrix obtained during the data editing process.
  • Fig. 8 shows the converted data during the data editing process. A diagram illustrating the contents
  • Fig. 9 is a diagram showing a modification of the original NC data
  • Fig. 10 shows the NC data after editing corresponding to the original data in Fig. 9,
  • FIG. 11 is a diagram showing another modified example of the original data
  • Fig. 12 is a diagram showing the NC data after editing corresponding to the original data in Fig. 11;
  • FIG. 13 is a diagram showing still another modified example of the original data
  • FIG. 14 is a diagram showing the NC data after editing corresponding to the original data in FIG. 13,
  • FIG. 15 is a diagram showing the tool trajectory generated according to the NC data of FIGS. 13 and 14.
  • FIG. 16 is a diagram showing still another modified example of the original data
  • FIG. 17 is a diagram showing the NC data after editing corresponding to the original data in FIG. 16, and
  • FIG. 18 is a view showing a tool trajectory generated according to the NC data in FIGS. 16 and 17.
  • an automatic programming device includes a processor (CPU) 1 for executing a control program, and a read-only memory storing the control program.
  • Memory (R0M) 2 for storing system program, operation results by CPU 1, etc., and NC data.
  • It has a memory 4 for storing, a keyboard 5, a disk controller 6 and a A graphic display unit (CRT) 7 is provided.
  • the disk controller 6 is a first floppy disk storing various system programs for creating and modifying NC data and editing NC data.
  • FIG. 1 the NC data editing processing by the automatic programming device will be described with reference to FIGS. 2 and 3.
  • FIG. 2 the NC data editing processing by the automatic programming device will be described with reference to FIGS. 2 and 3.
  • the CPU 1 After turning on the power of the automatic programming device, when the first floppy disk FL1 is mounted on the disk controller 6, the CPU 1 is connected to R0M2. Execute the stored control program to display the system program selection screen on the CRT 7 display screen.
  • the operator automatically inputs the system program for editing the NC data and the program number for specifying the NC data to be edited via the keyboard 5 through the automatic program.
  • CPU 1 transfers the NC data editing system program from the first floppy disk FL 1 to RAM 3 and inputs the program number using the program number.
  • the specified original data is transferred from the NC data storage memory 4 to the RAM 3 (step S101 in FIG. 2). If the original data is not stored in the memory 4, the operator mounts the second floppy disk FL2 storing the original data on the disk controller 6 and the CPU 1 From disk FL 2 W
  • step S102 Transfer the original data to RAM3.
  • step S102 CPU 1 displays a message on the CRT screen asking whether the original data needs to be corrected, and then displays the message. Enter the standby state.
  • the operator may, for example, correct the data content of the original data or program the original data by adding various conversion commands and conversion cancellation commands described later in detail with reference to FIG. Then, when it is determined that the original data should be corrected and the correction execution key of keyboard 5 is operated, CPU 1 converts flag F into data.
  • step S104 the data correction processing is executed (step S104). This data correction processing is performed by the editing function of the automatic programming device in a known manner, and the corrected original data is stored in RAM3. Finish data correction processing
  • step S102 Upon completion, the process returns to step S102 and CPU1 enters the standby state again. Therefore, if necessary, the original data can be repeatedly corrected.
  • the CPU 1 determines whether or not the flag F is set to the value "1 J" indicating the completion of the data conversion process (step Since the flag F is reset to "0" at step S103, the judgment result at step S105 is negative. No,
  • the corrected original data shall include the data contents shown in Fig. 4.
  • the corrected original data includes various data blocks included in the original data before the correction and various data ports that have been added to the original data and programmed by, for example, the above data correction. It is made up of a stick.
  • the numerical code “012345” represents a program number for identifying the original data, and the data including this program number.
  • Tab blocks are initially included in the original data before correction.
  • the code “G 0,1” represents a conventionally known linear interpolation code that defines a linear interpolation between two points on an XYZ three-dimensional coordinate system, and characters X, X represent control axes, respectively. It is applied modally to blocks consisting of Y, Z and numerical data following each character (hereinafter referred to as movement command blocks). The movement command block is included in the original data before correction.
  • the code “G98” is added to the original data during the data correction process, for example, to specify various conversion processes unique to the method of the present embodiment, and the modified code “PO” "P4" is appended. That is, the code “G98P01” is a mirror conversion code, and the following dimension words are characters X, ⁇ , ⁇ , I, and J. , K, and numerical data following each character (indicated by symbols xd, yd, zd, id, jd, and kd in Fig. 4, respectively).
  • reference point and corresponding point Move any point to the next specified point (hereinafter referred to as reference point and corresponding point, respectively), for example, move reference point (Xa, ya, za) to corresponding point (ia, ja, ka)
  • the reference point may be, for example, a point that specifies a part of a tool path generated by the original data before correction, in which case the corresponding point is moved.
  • the code “G99” is a conversion cancel command code specific to the method of the present embodiment, and cancels the conversion processing specified by the code “G98J”. Define.
  • the CPU 1 stores, for example, a unit matrix in a memory M provided in a predetermined storage area of the RAM 3. E is set, and the index i is reset to the value “0” (step S201). Next, the first block “0
  • This data block is a block containing a code indicating the end of the original data, a conversion command block containing the code "G98", and a dimension.
  • (1) It is sequentially determined whether or not it is a movement command block including the command “X—Y—Z—” or a conversion command cancel block including the code “G99”. (Steps S203 to S206) o Here, the judgment result in each of these steps is negative, so that CPU 1
  • the data block read in step S202 is written to the converted data storage area of RAM 3 as the data after the overnight conversion processing (step S207) , And go to step S202.
  • step S202 the next data block "G98P1XxaYyaZzaliaJjaKka;" is read, and in step S203, the data block is read. It is determined whether or not the end of the original data is indicated. Since the determination result is negative, it is further determined in step S204 whether or not this data block is a conversion command block. Since the block includes the code “G98”, the judgment result is affirmative. Therefore, it is sequentially determined whether or not the data block includes the modification code “P0” or “P3” (steps S208 and S209). Here, both discrimination results are negative.
  • step S210 the process proceeds to step S210, where the code “G988P1J” described in the data block, the coordinate values “Xa, ya, za” and the reference point representing the reference point are added.
  • the coordinate values “ia, ja, ka” representing the corresponding points and the corresponding points are temporarily stored in registers built in the CPU 1, respectively.
  • the process returns to step S202.
  • the third data block “G98P2XbYybZzbIibJjbKkb;” read in step S202 indicates the end of the original data. If it does not include the code, it is determined in step S203 that the data block contains the code "G98” in step S204. Then, in steps S208 and S209, it is determined that this overnight block does not include any of the codes "P0" and "P3". Therefore, as in the case of the second data block, the CPU 1 calculates the code “G98P2” described in the third data block and the coordinate value “xb” representing the reference point. , Yb, zb ”and the coordinate value“ ib, jb, kb ”representing the corresponding point are respectively stored in the register, and the process returns to step S202.
  • 3 and S204 are negative and positive, respectively, and the results of steps S208 and S209 relating to the block are negative and positive, respectively.
  • CPU 1 determines the coordinate values “xa, ya, za”, “xt>, yb, zb”, “xc, yc, zc”, and 3x representing the three reference points, respectively.
  • the coordinate values “ia, ja, ka”, “ib, jb, 1 ⁇ ⁇ ” and “1 (:, jc, kc)” respectively representing the three corresponding points are read, and a position conversion matrix M a is calculated based on these coordinate values.
  • the position transformation matrix M a is generally based on a combination of translation and rotation (Fig. 5) for associating each of the three reference points with its corresponding corresponding point on a one-to-one basis.
  • the three-dimensional coordinate system is uniquely defined from three reference points and three corresponding points. For any point on the system, a point that has the same positional relationship as the one established between the three reference points and the three corresponding points can be obtained.
  • the positional relationship between the arbitrary coordinate value (x, y, z) and the coordinate value ( ⁇ ', y', z) obtained by multiplying by the position transformation matrix M a is defined between the reference point and the corresponding point. It is equal to the positional relationship that holds.
  • step S212 CPU 1 converts the position transformation matrix Ma calculated in step S211 into memory Mi corresponding to index i (here, memory MO). To memorize.
  • step S201 a matrix obtained by multiplying the matrix stored in memory M by the matrix stored in memory Mi (here, the identity matrix E and the position transformation matrix Ma A matrix M a) that is equal to the product of the two, ie, a composite transformation matrix is stored in the memory M (step S 2 13). Then, after incrementing the index i by "1", the process returns to step S202.
  • Step S202 relating to the fifth data block “G98P0XdYydZzdIidJJ_dKJLL;” to be read next in step S202.
  • the result of the determination in step 3 is negative, and the result of the determination in steps S204 and S208 for the block is affirmative.
  • step S215 CPU 1 calculates a mirror transformation matrix Mb based on the numerical data included in the fifth data block. More specifically, CPU 1 has two data blocks included in the fifth data block additionally programmed in the NC data.
  • a straight line connecting the two points represented by the coordinate values (xd, yd, zd) and (id, jd, kd) is determined, and a mirror plane orthogonal to the straight line at the midpoint of the straight line is determined.
  • a mirror transformation matrix M b uniquely determined by the mirror plane ⁇ is determined.
  • the points are transformed into points ( ⁇ .yl '.), (' 2 ',', '2') and ( ⁇ 3 ', 3', ⁇ 3 ').
  • XI ", yl", ⁇ ) (x2 ", y2", x2 ") and (x3".
  • CPU 1 multiplies the matrix stored in memory M (composite transformation matrix) by the matrix stored in memory M i, and replaces the resulting matrix with the previously stored matrix. And store it in memory M.
  • a composite transformation matrix equal to the product M a -M b of the position transformation matrix M a and the mirror transformation matrix M b that simultaneously defines the position transformation and the mirror transformation is stored in the memory M.
  • step S203 and S204 concerning the sixth data block "G01XX1Yy1Zz1;" to be read next in step S202. are negative in both cases, and in step S205, the same block Is determined, and the process proceeds to step S217.
  • step S217 the CPU 1 executes a conversion process for a point represented by the movement command data "xl, yl. Zl" included in this data block. That is, the CPU 1 multiplies the movement command data “xl, yl, zl” by the composite conversion matrix stored in the memory M at the time of the conversion processing, and the coordinate value “ ⁇ . Yl” representing the converted point. , zl "".
  • the composite transformation matrix multiplied by the movement command data is equal to the product Ma ⁇ Mb of the position transformation matrix Ma and the mirror transformation matrix Mb, and therefore, the position transformation for the movement command point is performed. And mirror-conversion are performed simultaneously.
  • the point (xl, yl, zl) shown in FIG. 7 is first converted to a point (xl'.yl'. ⁇ ) by a position conversion process using a matrix M a, and further, the matrix M b is The mirror transformation used converts the point ( ⁇ , yl * . ⁇ ) to a point ( ⁇ ⁇ , yl ", zl") that is symmetric with respect to the mirror plane ⁇ .
  • step S207 CPU 1 converts the coordinate values "xl", yl ", zl" of the converted point after executing the conversion processing. Write to RAM 3 as data for.
  • step S202 the CPU 1 reads the data block next to the original data.
  • Step S203 to S205, S217 and S207 are executed sequentially.
  • data “x2”, y2 ”, z2” representing the converted point corresponding to the point represented by the movement command data “x2, y2.
  • Z2” is loaded into the RAM 3.
  • the converted data “x3”, y3 ”, z3” corresponding to the movement command data “x3, y3, z3J” is written to RAM 3.
  • Fig. 8 shows the data valleys stored in the converted data storage area of RAM 3 up to this point.
  • step S202 determines the type of the next data block read in step S202.
  • the data block “G99;” since the data block “G99;” is read, all the determination results in steps S203 to S205 become negative, and step S205 In step 6, it is determined that the block is a conversion command cancel block.
  • the process proceeds to step S218.
  • step S219 The index i is decremented by "1 J, that is, the memory M i-1 is made to be able to store the next defined transformation matrix, and then the process proceeds to step S202. .
  • the CPU 1 executes steps S203 to S206 to execute the relevant data block. Determines that the data block is a conversion command cancel block, and therefore stores it in the conversion matrix stored in memory M and in memory M i-1 corresponding to index i. The result is multiplied by the inverse matrix of the conversion matrix described above, and the resulting conversion matrix is stored in the memory M (step S218).
  • the CPU 1 executes a process corresponding to the above series of steps.
  • the data block does not indicate the end of the original data If (S203), whether the block is a position conversion command block, a mirror conversion command block, a movement command block, or a conversion command cancel block (Steps S204 to S206, S208, S209) 0 If the data block is not one of the above four types, convert that block to the converted data. And writes it to RAM 3 (step S207).
  • the position conversion command block it is based on one set of coordinate value data representing the reference point and corresponding point read from the same block and two sets of coordinate value data read in the same manner.
  • the position transformation matrix Ma is calculated (step S211).
  • a mirror conversion matrix Mb is calculated based on the coordinate value data representing two points read from the block (step S215).
  • the conversion matrix is stored in the latest area Mi of the memory for storing the conversion matrix (step S21).
  • S 2 13, S 2 16) and the transformation matrix is equal to the product of the transformation matrices calculated so far (initially the unit matrix E) and stored in the memory M.
  • the coordinate data representing the movement command point read from the block is multiplied by the transformation matrix stored in memory M, and the resulting converted data is written.
  • Conversion command cancel block In the case of, the matrix obtained by multiplying the inverse matrix of the latest transformation matrix by the matrix in the memory M is stored in the memory M (S 2 18), whereby the latest transformation matrix is obtained. Only the conversion process related to is released.
  • a program code for example, code "M02" indicating the end of the original data is issued. If it is included, CPU 1 determines that data conversion processing for all blocks in the original data has been completed (FIG. 3), and sets flag F to a value indicating the completion of data conversion processing. Set to "1" (step S220), and then proceed to step S107 of the NC data editing process (Fig. 2).
  • step S107 the tool path is drawn on the CRT screen under the control of CPU 1 based on the converted data stored in the converted data storage area of RAM 3, and thereafter, the CPU 1 enters the standby state (step S108).
  • the operator considers whether or not the drawn tool imprint is the desired one, and if it is not the desired tool path, further modifies the NC data to generate the desired tool path. Operate the keyboard 5 retry key.
  • the CPU 1 displays a message on the CRT screen asking whether the original data needs to be corrected, and then enters a standby state (step S102).
  • the operator operates the correction execution key to correct the original data so that the desired tool impression can be generated.
  • the CPU 1 resets the flag F to a value “0” indicating that the data conversion process has not been completed (step S103), and then corrects the data described above.
  • the process starts (step S104).
  • the operator performs necessary keyboard operations to correct the original data, and the CPU 1 corrects the original data according to the cow-board operation and stores it in the RAM 3.
  • CPU 1 enters the standby state again (step S102).
  • step S105 The operator operates the keyboard 5 escape key after repeatedly performing the data correction process of step S102 as necessary.
  • CPU 1 determines whether or not flag F is a value “1” indicating the completion of the data conversion process (step S105). Since the flag F is reset to the value “0” in step S103, the process proceeds to step S106, and the above-described data conversion is performed on the corrected original data. Processing is executed by CPU 1. Then, based on the original data on which the data conversion processing has been performed, the corresponding tool path is drawn on the CRT screen (step S107). If the desired tool path has not been obtained yet, the above-described data correction processing is executed again.
  • Step S110 the CPU 1 resets the flag F to the value “0” in step S111, and ends the NC data editing processing.
  • step S106 Immediately after the data conversion processing in step S106, it is determined that the tool path drawn on the CRT screen is not the desired one, and even though the operator has operated the retry key, the operator determines that the original data need not be modified and operates the non-correction execution key ( ⁇ scape key). Then, the CPU 1 determines whether or not the value of the flag F is "1" (step S105). Immediately after the data conversion processing, Flag F is set to the value “1”, so CPU 1 asks whether correction of the data after the conversion processing is necessary or not. ⁇ Displays a message on the CRT screen. Then, the apparatus enters a standby state (step S109).
  • the CPU 1 enters a data correction process in accordance with the key operation (step S10). Four ) .
  • the tool imprint is drawn again under the control of the CPU 1 (step S107).
  • the edited data is stored in the NC data storage area. Store in the memory 4 or the second floppy disk FL2 and finish the NC data editing process (Steps S110, S111) o
  • FIG. 10 shows the contents of the edited NC data corresponding to the original data in Fig. 9.
  • coordinate values ( ⁇ , yl ', ⁇ ), ( ⁇ 2', yl ', ⁇ 2'), ( ⁇ 3 ⁇ , y3, ⁇ 3 ') represent the movement command points after position conversion.
  • the present invention is also applicable to NC data consisting of a main program and a group of sub-programs.
  • the main program of this kind of NC data includes a program block "00001;” for specifying a program number and a subprogram.
  • a conversion command block ⁇ specific to the present invention for example, a position conversion command block “G98P1 1;”, “G98P2 ⁇ ;”, “G98P3 ⁇ ;” (where the symbol “ ⁇ ” indicates coordinate value data, etc.) and the conversion command cancel block “G99;” are added to the main program. Is programmed.
  • each of the sub-programs is required to have a data block “00002;”, “00003;”, or “00004;” for specifying the subprogram number. Number of movement command blocks " ⁇ ;” and a data block containing the code "M99" indicating the end of the subprogram. I have.
  • each of the NC data was converted using the position conversion matrix M a1 calculated in the same manner as in the above embodiment based on the description contents of the three position conversion command blocks.
  • the position conversion processing is sequentially performed on all the movement command blocks included in the sub-program.
  • Fig. 14 shows the NC data after editing corresponding to the original data in Fig. 13.
  • the tool trajectory generated according to the contents of the movement command block of the sub-program of the original NC data is shown in the left half of Fig. 15, and the edited data is shown in the right half of Fig. 15 after editing. A similar tool trajectory corresponding to the NC data is shown.
  • the tool locus defined by the subprogram of the original NC data for example, the part shape
  • the position conversion block is simply defined in the main program, so that the main program can be used.
  • the same position conversion processing can be applied to all specified sub-programs.
  • FIG. 16 shows another example of NC data composed of a main program and a group of sub-programs.
  • the main program is the same as the main program in Fig. 13 except that it does not include the position conversion command block and the conversion command cancel block. Has been created.
  • Each of the subprograms like the subprogram in Fig. 13, represents the data block for specifying the subprogram number, the movement command block, and the end of the subprogram.
  • Each subprogram includes a position conversion command block “G98P1 G;”, “G98P2 ⁇ ;”, “G98P3 ⁇ ” unique to the present invention. (Where the symbol “ ⁇ ” indicates coordinate value data, etc.) and a conversion command cancel block “G99;” are added and programmed.
  • Fig. 18 shows the tool path generated according to the contents of the movement command block of the subprogram of the original NC data
  • the right half of Fig. 18 shows the edited tool path.
  • a similar tool trajectory corresponding to the NC data is shown.
  • the position conversion command block of each subprogram in Fig. 16 defines a matrix Ma2 or Ma4 for translating the tool path.
  • each subprogram of the original NC data for example, the part shape
  • the tool path defined by each subprogram of the original NC data is at the required rotational position and the required position area independently of each other by the above-mentioned position conversion processing. Are each moved.
  • each subprogram of the original NC data is defined. using the coordinate value data as defined movement command block of gram-, t still be generating a new NC data capable of realizing a component placement utilization of the material is not high, further examples of the first 6 Figure
  • By transformation it is possible to define only the mirror transformation or both the position transformation and the mirror transformation in the main program.
  • the present invention is also applicable to 2D NC data.
  • the force included in each position conversion command block includes the position conversion command code “G98” with the modification codes “P1" to "P3".
  • the code “G98” is included only in the required position conversion command block in the NC data, and the code “G98” is modally changed like the code "G01". It may be specified to work.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Description

明 細 書
N C データ編集方法
技 術 分 野
本発明は、 N Cデータ編集方法に関し、 特に、 制御対 象物の移動経路の修正等を行うための N C デー タ の編集 を迅速かつ正確に行える方法に関する。
背 景 技 術
数値制御においては、 予め作成した N C データ を数値 制御装置によ り実行して工具等の制御対象物の目標移動 経路に対応する制御出力を発生させ、 こ の制御出力に応 動するサーボ系によ り駆動機構を制御して制御対象物を 目標経路に沿って移動させている。 このため、 作成済み の N C デー タ に従って生成される移動経路を修正する必 要が生 じた場合には、 N Cデータ 中の座標値データの関 連する ものを修正すべく、 N Cデー タの編集を行わねば な らない。 従来の N Cデー タの編集においては、 所望の 移動経路を特定する一群の点の夫々 を表す座標値デ- タ を、 元の移動経路を特定する一群の点の夫々 を表す座標 値デー タ と元の経路から所望の経路への所要シフ ト量と に基づいて手計算で夫々求め、 次いで、 元の座標値デ- 夕 に代えて新たに算出した座標値データを設定している c しか しながら、 新たな座標値デー タ を求めるための手計 算は複雑で、 膨大な時間と労力を要し、 しかも、 誤りが 生じ易 く、 編集 した N C デー タ の信頼性が低い。
また、 ワ ー ク の軸線に関して互いに対称に配した 2 つ のロ ボ ッ トを用いて 2 つの工具を ワ ー ク軸線に関して互 いに対称な移動経路に沿つて移動させ、 所要の加工作業 を行う場合、 一方のロボ ッ ト について作成した N Cデー タ に ミ ラ —変換処理を施して他方のロボッ ト についての N Cデー タを作成すべく、 作成済みの N Cデータを編集 する こ とが知られている。 この場合、 従来は、 作成済み の N C デ― タを構成する座標値デー タ と ミ ラ ー平面を特 定する データ と に基づいて ミ ラ ー変換後の座標値データ を手計算で夫々求め、 斯 く 算出した座標値データを用い て N C データを編集している。 こ のため、 上記移動経路 修正のための N Cデータ編集の場合と同様の不具合が生 しる。
発 明 の 開 示
本発明の目的は、 制御対象物の移動経路の修正等を行 うための N Cデータの編集を迅速かつ正確に行える N C データ編集方法を提供する こ とにある。
:上述の目的を達成するため、 本発明の N Cデータ編集 方法は、 作成済みの N C データ中に変換指令を追加して プロ グラ ムする工程 ( a ) と、 N Cデータ 中に変換解除 指令を追加してプロ グラ ムする工程 ( b ) と、 N Cデ— 夕から変換指令を読取っ たと きに変換行列を自動的に算 出し定義する工程 ( c ) と、 変換行列の定義後でかつ変 換解除指令の読取り前において、 N Cデー タ から移動指 令を読取る度に、 変換行列を用いて移動指令に関連する 点を変換 して変換後の点を自動的に求める工程 ( d ) と. 変換後の点を用いて N C データを自動的に書換える工程 ( e ) とを備える。
好ま し く は、 変換指令は、 位置変換指令コ 一 ドと任意 に設定可能な一群の基準点を夫々表す座標値データ と一 群の基準点に夫々対応する一群の対応点を夫々表す座標 値デー タ とからなる と共に一群の基準点を成す基準点の 数を N C データ の次元に一致する よ う に選択した位置変 換指令、 或は、 ミ ラ 一変換指令コ ー ドと ミ ラ ー平面に直 交して延び中点に ミ ラ ー平面が配される直線を指定する 2 つの点の夫々 を表す座標値デー タ とからなる と共に各 座標値デー タ の次元を N C データ の次元に一致させた ミ ラ ー変換指令である。 そ して、 N Cデータ からの位置変 換指令コ 一 ド又は ミ ラ 一変換指令コ ー ドの読取り時、 座 標値デ - 夕 に基づいて自動的に算出 した位置変換行列又 は ミ ラ ー変換行列を用いて移動指令に関連する点に対応 する位置変換後又は ミ ラ ー変換後の点を自動的に求める。 また、 好ま し く は、 N C データ中に複数の変換指令をプ ロ グラ ム し、 変換指令の読取り に応じて最新の変換行列 が算出される度に、 それま でに順次算出された変換行列 の積に最新の変換行列を乗じて最新の合成変換行列を自 動的に求め、 最新の合成変換行列をそれま での合成変換 行列に代えて移動指令に関連する点の変換に用いる変換 行列と して定義する。 そ して、 変換解除指令が読取られ る度に、 最後に定義した合成変換行列に代えて、 最後に 定義した変換行列の一回前に定義された合成変換行列を 移動指令に関連する点の変換に用いる変換行列と して定 義する。 また、 好ま し く は、 N C データ はメ イ ンブロ グ ラ ム と一群のサ ブプロ グラ ム と よ り な り、 メ ィ ンプロ グ ラ ム中にプロ グラ ム した変換指令はメ イ ン プロ グラ ム及 び一群のサブプロ グラ ムについて有効にされ、 サブプロ グラ ム中にプロ グラ ム した変換指令は当該サブプロ グラ 厶につ いて有効にされる。 好ま し く は、 工程 ( e ) にお いて書換えた N Cデ-タ に従って制御対象物の移動経路 をグラ フ ィ ッ ク 表示し、 又、 書換えた N C デー タ のオペ レ―タ による修正を許容する。
上述のよ う に、 本発明によれば、 作成済みの N Cデー 夕から変換解除指令を読取るまでは、 N C データから移 動指令を読取る度に、 N C データ か らの変換指令の読取 り時に自動的に算出, 定義した変換行列を用いて移動指 令に関連する点を変換して変換後の点を自動的に求め、 斯く 求めた変換後の点を用いて N Cデータ を自動的に書 換える よ う に したので、 N Cデー タ中に変換指令と変換 解除指令とを追加してプロ グラ ムするだけで、 N Cデー 夕の編集を自動的に行える。 このため、 N C データの編 集の.ための複雑な手計算が不要とな り、 編集作業の所要 時間を大幅に短縮でき、 しかも、 編集した N Cデー タ の 信頼性が向上する。
好ま し く は、 変換指令に含まれた位置変換指令コ ー ド 又は ミ ラ ー変換指令コ ー ドの読取り時に変換指令に含ま れた座標値デー タ に基づいて自動的に算出 した位置変換 行列又は ミ ラ ー変換行列を用いて、 移動指令に関連する 点に対応する位置変換後又は ミ ラ 一変換後の点を自動的 に求めるよ う に したので、 指令コ ー ド及び座標値デー タ を N C データ中に追加してプロ .グラ ムするだけで、 位置 変換及び ミ ラ ー変換を自動的に行える。 また、 好ま し く は、 変換指令の読取り に応じて最新の変換行列が算出さ れる度に、 それまでに順次算出された変換行列の積に最 新の変換行列を乗じて最新の合成変換行列を求め、 こ の 変換行列を移動指令に関連する点の変換に用いる変換行 列と して定義する と共に、 変換解除指令が読取られる度 に、 最後に定義した合成変換行列の一回前に定義された 合成変換行列を移動指令に関連する点の変換に用いる変 換行列と して定義するよ う に したので、 N Cデー タ中の 適所に複数の変換指令及び変換解除指令を追加してプロ グラ ムするだけで、 移動指令に関連する点の夫々 につい て一つの変換を施せる と共に所要の 2 つ以上の変換を施 すこ と もでき る。 また、 好ま し く は、 N C データのメ イ ンプロ グ ラ ム中にプロ グラ ム した変換指令をメ イ ンプロ グラ ム及び一群のサブプ ロ グラ ムについて有効と したの で、 夫々 のサブプロ グラ ムに夫々定義した工具軌跡をこ れら工具軌跡相互間の位置関係を保持したま ま修正でき る。 更に、 サブプロ グラ ム中にプロ グラ ム した変換指令 を当該サブプロ グ ラ ム について有効と したので、 夫々の サブプロ グラ ムで定義されかつ夫々 に関連する部品加工 形状を表す工具軌跡を互いに別個独立に修正でき る。 従 つて、 例えば、 ワークか らよ り多 く の部品を製造可能な よ う に夫々の工具軌跡を修正でき る。 好ま し く は、 書換 え済みの N Cデ - タ に従って制御対象物の移動経路をグ ラ フ ィ ッ ク表示する と共に書換え済みの N Cデー タのォ ペ レ一 夕 による修正を許容するよ う に したので、 ォペ レ ータ はグラ フ ィ ッ ク表示された移動経路が所望のもので ない場合に所望の移動経路を得るべ く睿換え済みの N C デ— 夕 を修正でき る。
図 面 の 簡 単 な 説 明
第 1 図は本発明の一実施例の N Cデータ編集方法を実 施するための自動プロ グラ ミ ン グ装置の要部を示す概略 ブロ ッ ク図、
第 2 図は第 1 図のプロ グラ ミ ング装置によ り実行され る N C データ編集処理を示すフ ロ ーチ ヤ 一 ト、
第 3 図は第 2 図のデー タ変換処理を詳細に示すフ ロー チ ャ ー ト、
第 4 図は第 1 図のデー タ修正処理を実行 して得た編集 対象と しての元の N Cデータを例示する図、
第 5 図は第 2 図のデー タ編集処理中に得た位置変換行 列の作用を示す模式図、
第 6 図はデー タ編集処理中に得た ミ ラー変換行列の作 用を示す模式図、
第 7 図はデー タ編集処理中に得た合成変換行列の作用 を示す模式図、
第 8 図はデー タ編集処理途中での変換済みデータ の内 容を例示する図、
第 9 図は元の N Cデー タ の変形例を示す図、
第 1 0 図は第 9 図の元データ に対応する編集後の N C データ を示す図、
第 1 1 図は元データの別の変形例を示す図、
第 1 2 図は第 1 1 図の元データ に対応する編集後の N Cデー タ を示す図、
第 1 3 図は元デー タ の更に別の変形例を示す図、 第 1 4 図は第 1 3 図の元データ に対応する編集後の N Cデー タ を示す図、
第 1 5 図は第 1 3 図及び第 1 4 図の N C デー タ に従つ て生成される工具軌跡を示す図、
第 1 6 図は元データ の更に別の変形例を示す図、 第 1 7 図は第 1 6 図の元データ に対応する編集後の N Cデー タ を示す図、 および
第 1 8 図は第 1 6図及び第 1 7 図の N C データ に従つ て生成される工具軌跡を示す図である。
発明を実施するための最良の形態
第 1 図を参照する と、 自動プロ グラ ミ ン グ装置は、 制 御プロ グラ ムを実行する ためのプロ セ ッ サ ( C P U ) 1 と、 制御プロ グラ ムを格納した リ ー ドオ ン リ メ モ リ ( R 0 M ) 2 と、 シ ス テ ムプロ グラ ム, C P U 1 によ る演算 結果等を記億するための ラ ンダム ア ク セ ス メ モ リ ( R A M) 3 と、 N C デー タ を記憶する ためのメ モ リ 4 とを備 え、 更に、 キー ボー ド 5 , ディ ス ク コ ン ト ロ ー ラ 6 及び グラ フ ィ ッ ク ディ スプレイ装置 ( C R T ) 7 を備えてい る。 デ ィ ス ク コ ン ト ロ ー ラ 6 は、 N Cデー タ の作成, 修 正用及び N Cデ— 夕編集用の各種シ ス テ ム プ ロ グラ ムを 格納した第 1 フ ロ ッ ピー デ ィ ス ク F L 1 と、 作成済みの N Cデ一 夕を格納した第 2 フ ロ ッ ピー デ ィ ス ク F L 2 と を装塡自在にされている。 要素〜 7 はバス 8 を介して C P U 1 に接铳されている。
以下、 第 2 図及び第 3 図を参照して、 自動プロ グ ラ ミ ン グ装置による N Cデー タ編集処理を説明する。
自動プロ グラ ミ ン グ装置の電源を投入後、 ディ スク コ ン ト ロ ー ラ 6 に第 1 フ ロ ッ ピー デ ィ ス ク F L 1 を装塡す る と、 C P U 1 が R 0 M 2 に格納 した制御プ ロ グラ ムを 実行して C R T 7 の表示画面にシ ス テ ムプロ グラ ム選択 画面を表示させる。
選択画面を参照して、 オ ペ レー タが N C データ編集用 シ ス テ ムプロ グラ ムと編集すべき N Cデ一 夕 を特定する プロ グラ ム番号とをキー ボー ド 5 を介して自動プロ グラ ミ ン グ装置に入力する と、 C P U 1 は、 第 1 フ ロ ッ ピー デ ィ ス ク F L 1 から R A M 3 に N C デー タ編集用シ ス テ ム プロ グラ ムを転送する と共にプ ロ グラ ム番号で特定さ れる元データを N Cデー タ記億メ モ リ 4 か ら R A M 3 に 転送する (第 2 図のス テ ッ プ S 1 0 1 ) 。 元データがメ モ リ 4 に格納されていない場合、 オペレー タ は元データ を格納 した第 2 フ ロ ッ ビーディ ス ク F L 2 をディ ス ク コ ン ト ロ ー ラ 6 に装塡し、 C P U 1 はディ ス ク F L 2 から W
R A M 3 に元データを転送する。 ス テ ッ プ S 1 0 1 に続 く ス テ ッ プ S 1 0 2 において、 C P U 1 は、 元デー タ の 修正の要否を問 う メ ッセ— ジを C R T画面上に表示させ、 次いで、 待機状態に入る。
5 オペ レータが、 例えば元デー タ のデータ 内容を訂正し 或は第 4 図を参照して後で詳述する各種変換指令と変換 解除指令とを元データ に追加してプロ グラ ムするために、 元デー タ を修正すべき と判断してキ— ボー ド 5 の修正実 行キー を操作する と、 C P U 1 はフ ラ グ F をデータ変換
10 処理未了を表す値 「 0 」 に リ セ ッ ト した後 (ステ ッ プ S 1 0 3 ) 、 デー タ修正処理を実行する (ス テ ッ プ S 1 0 4 ) 。 こ のデー タ修正処理は自動プロ グラ ミ ング装置の エディ 夕機能によ り従来公知のよ う に行われ、 修正後の 元デー タ は R A M 3 に格納される。 データ修正処理を終
15 了する と、 ス テ ッ プ S 1 0 2 に戻り、 C P U 1 は再び待 機状態に入る。 従って、 必要な らば元デー タ を繰り返し 修正でき る。
元データ の修正が不要であるか或は元デー タの修正が 完了 したと判断して、 オ ペ レータ がキーボー ド 5 の修正
20 不実行キー (エ ス ケー プキー) を操作する と、 C P U 1 はフ ラ グ Fがデ一 タ変換処理完了を表す値 「 1 J にセ ッ 卜 されているか否かを判別する ( ス テ ッ プ S 1 0 5 ) 。 ス テ ッ プ S 1 0 3 でフ ラ グ F力 S 「 0 」 に リ セ ッ ト されて いるので、 ステ ッ プ S 1 0 5 での判別結果が否定とな り、
25 ステ ッ プ S 1 0 6 のデー タ変換処理に入る。 こ こで、 修 正済みの元デー タが第 4 図に示すデータ内容を含むもの とする。 修正済みの元デー タ は、 修正前の元データ に含 まれていた各種データプロ ッ ク と、 例えば上記データ修 正によ り元デー タ に追加 してプロ グラ ムされた各種デー タ ブ口 ッ ク とか らなる。
詳し く は、 第 4 図に示す修正済みの元データ において、 数値コ ― ド 「 0 1 2 3 4 5 」 は元データを特定するプロ グラ ム番号を表 し、 このプロ グラ 厶番号を含むデー タ ブ ロ ッ ク は修正前の元デー タ に最初から含まれる。 コ ー ド 「 G 0, 1 」 は、 X Y Z 3 次元座標系上の 2点間の直線補 間を定義する従来公知の直線補間コ - ドを表し、 制御軸 を夫々表すキャ ラ ク タ X, Y , Z と各キャ ラ ク タ に続く 数値デー タ とからなるブロ ッ ク (以下、 移動指令ブロ ッ ク と云う) に対 してモー ダルに適用される。 移動指令ブ ロ ッ ク は修正前の元デー タ に含まれる。 コ — ド 「 G 9 8 」 は、 本実旌例の方法に特有の各種変換処理を指定すべく 例えばデータ修正処理中に元デー タ に追加される もので、 修飾コ ー ド 「 P O 」 〜 「 P 4」 が付される。 即ち、 コ ー ド 「 G 9 8 P 0 1 」 は ミ ラ ー変換コ ー ドで、 これに続く ディ メ ン ジ ョ ン ワ ー ドは、 キャ ラ ク タ X, γ, ζ, I , J, K と各キ ャ ラ ク タ に続く数値デー タ (第 4 図中、 記 号 x d , y d, z d, i d, j d , k dで夫々示す〉 と からな る。 この ミ ラ一変換コ ー ドは、 任意の 2点 (例え ば、 点 ( X d, y d, z d ) と点 ( i d, j d , k d ) ) とを結ぶ直線の中点においてこの直線と直交して配され る ミ ラ ー平面による ミ ラ ー変換を定義する。 また、 コ ー ド 「 G 9 8 P 1 」 〜 「 G 9 8 P 3 J は位置変換指令コ ー ドで、 これに続く ディ メ ン ジ ョ ン ヮ ー ドによ り最初に指 定される任意の点を次に指定される任意点に (以下、 夫 々基準点及び対応点と云う) 、 例えば、 基準点 ( X a , y a , z a ) を対応点 ( i a, j a , k a ) に移動させ る位置変換を定義する。 基準点は例えば修正前の元デ— 夕 によ り生成される工具軌跡の一部区問を特定する点で あって も良く、 こ の場合、 対応点は移動先の点を表す。 更に、 コ ー ド 「 G 9 9 」 は本実施例の方法に特有の変換 解除指令コ ー ドで、 コ ー ド 「 G 9 8 J で指定された変換 処理の解除を定義する。
第 3 図に詳細に示すデー タ変換処理 (第 2 図のステ ツ プ S 1 0 6 に対応) において、 C P U 1 は、 例えば R A M 3 の所定記億領域に設けたメ モ リ Mに単位行列 Eをセ ッ トす る と共に指標 i を値 「 0 」 に リ セ ッ トする (ス テ ッ プ S 2 0 1 ) 。 次に、 元データ の最初のブロ ッ ク 「 0
1 2 3 4 5 ; 」 を R A M 3 から読出し (ス テ ッ プ S 2 0
2 ) 、 こ のデー タ ブロ ッ クが、 元データの終了を表すコ ー ドを含むブロ ッ ク, コ ー ド 「 G 9 8」 を含む変換指令 ブロ ッ ク, ディ メ ン ジ ョ ン ヮ 一 ド 「 X— Y— Z―」 を含 む移動指令プロ ッ ク又はコ ー ド 「 G 9 9 」 を含む変換指 令キ ヤ ンセルプロ ッ クであるか否かを順次判別する (ス テ ツ プ S 2 0 3 〜 S 2 0 6 ) o こ こでは、 これら ス テ ツ プでの判別結果がいずれも否定であるので、 C P U 1 は. ス テ ッ プ S 2 0 2 で読出 したデー タ ブロ ッ ク をデ一夕変 換処理後のデー タ と して R A M 3 の変換済みデータ記憶 領域に書込み ( ス テ ッ プ S 2 0 7 ) 、 ス テ ッ プ S 2 0 2 に る。
ステ ッ プ S 2 0 2 で次のデータ ブロ ッ ク 「 G 9 8 P 1 X x a Y y a Z z a l i a J j a K k a ; 」 が読出され、 ステ ップ S 2 0 3 で当該データブロ ッ クが元データの終 了を表すか否かが判別される。 判別結果が否定であるの で、 こ のデータ ブロ ッ ク が変換指令ブロ ッ ク であるか否 かがス テ ッ プ S 2 0 4 において更に判別される。 デー ブロ ッ クがコ ー ド 「 G 9 8 」 を含むので、 こ こ での判別 結果は肯定になる。 従って、 デ—夕 ブロ ッ ク が修飾コ ー ド 「 P 0 」 又は 「 P 3 」 を含むか否かが順次判別される (ステ ッ プ S 2 0 8 , S 2 0 9 ) 。 こ こ では、 両判別結 果がいずれ 'も否定になる。 この場合、 ステ ッ プ S 2 1 0 に移行して、 デー タ プロ ッ ク に記述された コ 一 ド 「 G 9 8 P 1 J , 基準点を表す座標値 「 X a, y a , z a」 及 び対応点を表す座標値 「 i a, j a , k a 」 を C P U 1 に内蔵の レ ジス タ に夫々 一時記億する。 次いで、 ス テ ツ プ S 2 0 2 に戻る。
C P U 1 は、 ステ ッ プ S 2 0 2 で読出した第 3番目の データ ブロ ッ ク 「 G 9 8 P 2 X b Y y b Z z b I i b J j b K k b ; 」 が、 元データの終了を表すコー ドを含 まないと ス テ ッ プ S 2 0 3 で判別し、 ス テ ッ プ S 2 0 4 で当該データ ブロ ッ クがコ ー ド 「 G 9 8」 を含むと判別 し、 更に、 ステ ッ プ S 2 0 8, S 2 0 9 においてこのデ 一夕 ブロ ッ クがコ ー ド 「 P 0 」 , 「 P 3 」 のいずれをも 含まないと判別する。 従って、 第 2 番目のデー タ ブロ ッ ク の場合と同様、 C P U 1 は第 3 番目のデータ ブロ ッ ク に記述されたコ ー ド 「 G 9 8 P 2 」 , 基準点を表す座標 値 「 x b, y b , z b」 及び対応点を表す座標値 「 i b, j b, k b」 を レ ジスタ に夫々記億させた後、 ス テ ッ プ S 2 0 2 に戻る。
ス テ ッ プ S 2 0 2で次に読出される第 4 番目のデータ ブロ ッ ク 「 G 9 8 P 3 X X c Y y c Z z c I i c J ,j c K K c ; 」 に関するステ ッ プ S 2 0 3 及び S 2 0 4 での 判別結果は夫々否定及び肯定とな り、 又、 同ブロ ッ ク に 関する ス テ ッ プ S 2 0 8 及び S 2 0 9 での判別結果は夫 々否定及び肯定となり、 ス テ ッ プ S 2 1 1 に移行する。 ステ ッ プ S 2 1 1 において、 C P U 1 は、 3 つの基準点 を夫々表す座標値 「 x a , y a, z a 」 , 「 x t>, y b, z b」 及び 「 x c , y c , z c」 な らびに 3 つの対応点 を夫々表す座標値 「 i a, j a , k a 」 , 「 i b, j b, 1^ ゎ」 及び 「 1 (:, j c , k c」 を読出し、 これら座標 値に基づいて位置変換行列 M a を算出する。 位置変換行 列 M a は、 3 つの基準点の各々を これに関連する対応点 に一対一に対応づけるための、 一般には並進移動と回転 移動と の組合せ (第 5 図〉 からな り、 3 つの基準点及び 3 つの対応点か ら一義的に定義される。 しかも、 こ の位 置変換行列 M a を用いる こ と によ り、 X Y Z 3 次元座標 系上の任意の点に対して、 上記 3 つの基準点と 3 つの対 応点と の間に成立する位置関係と同一の位置関係にある 点を求める こ とができる。 即ち、 任意の座標値 (x, y, z) に位置変換行列 M a を乗じて得た座標値 (χ' , y', z ) と の間の位置関係は、 基準点と対応点間に成立する 位置関係に等しい。
ス テ ッ プ S 2 1 2 において、 C P U 1 は、 ス テ ッ プ S 2 1 1 で算出した位置変換行列 M a を指標 i に対応する メ モ リ M i (こ こではメ モ リ MO) に記憶させる。 次に、 ス テ ッ プ S 2 0 1 でメ モ リ Mに格納した行列にメ モ リ M i に格納した行列を乗じて得た行列 (こ こでは単位行列 E と位置変換行列 M a と の積に等しい行列 M a ) 、 すな わち合成変換行列をメ モ リ Mに記憶させる (ス テ ッ プ S 2 1 3 ) 。 そ して、 指標 i を 「 1 」 だけイ ンク リ メ ン ト した後、 ステ ッ プ S 2 0 2 に戻る。
ステ ッ プ S 2 0 2で次に読出される第 5 番目のデータ ブロ ッ ク 「 G 9 8 P 0 X d Y y d Z z d I i d J J_d K JL L; 」 に関する ス テ ッ プ S 2 0 3 での判別結果は否 定とな り、 又、 同ブロ ッ ク に関する ステ ッ プ S 2 0 4及 び S 2 0 8 での夫々 の判別結果は肯定とな り、 従って、 ス テ ッ プ S 2 1 5 に移行する。 ス テ ッ プ S 2 1 5 におい て、 C P U 1 は、 第 5番目のデー タ ブロ ッ ク に含まれる 数値データ に基づいて ミ ラ ー変換行列 M b を算出する。 詳し く は、 C P U 1 は、 N Cデー タ中に追加してプロ グラ ム した第 5 番目のデー タ プロ ッ ク に含まれる 2 つの 座標値 ( x d, y d, z d ) , ( i d, j d, k d ) で 夫々表される 2 つの点を結ぶ直線を決定し、 次いで、 こ の直線の中点において該直線と直交する ミ ラ ー平面 Πを 決定する。 さ ら に、 ミ ラ ー平面 Π によって一義的に決定 される ミ ラ ー変換行列 M b を決定する。 第 6 図に示すよ う に、 行列 M b を用いて点 (χΓ . yl' . ζΓ ) , (χ2' , ' , ζ2' ) 及び (χ3' , 3' , ζ3' ) に ミ ラ ー変換を施す と、 上記 3 つの点は ミ ラ ー平面 Π に関して これらの点と 対称な点 (XI", yl", ζΓ) , ( x2", y2", ζ2") および (x3". y3", ζ3") に夫々変換される。
ス テ ッ プ S 2 1 5 に続く ス テ ッ プ S 2 1 6 において、 ミ ラ ー変換行列 M b は C P U 1 の制御下で指標 i ( = 1 ) に対応する メ モ リ M i ( M l) に格納される。 次に、 C P U 1 は、 メ モ リ Mに記憶した行列 (合成変換行列) に メ モ リ M i に格納した行列を乗じ、 この結果得た行列を それま で記億されていた行列に代えてメ モ リ Mに格納す る。 こ こ では、 位置変換と ミ ラー変換とを同時に定義す る位置変換行列 M a と ミ ラ ー変換行列 M b との積 M a - M b に等しい合成変換行列がメ モ リ Mに格納される。 次 いで、 C P U 1 により指標 i がイ ンク リ メ ン ト された後、 ス テ ッ プ S 2 0 2 に移行する。
ステ ッ プ S 2 0 2で次に読出される第 6 番目のデータ ブロ ッ ク 「 G 0 1 X X 1 Y y 1 Z z 1 ; 」 に関する ス テ ッ プ S 2 0 3, S 2 0 4 での判別結果は双方共に否定と な り、 又、 ステ ッ プ S 2 0 5 で同ブロ ッ ク が移動指令ブ ッ ク である と判別され、 ステ ッ プ S 2 1 7 に移行する。 ステ ッ プ S 2 1 7 において、 C P U 1 は、 こ のデータ ブ ロ ッ ク に含まれる移動指令データ 「xl, yl. zl」 によ り 表される点についての変換処理を実行する。 即ち、 C P U 1 は、 移動指令データ 「xl, yl, zl」 に メ モ リ Mに変 換処理時点で記憶されている合成変換行列を乗じて変換 後の点を表す座標値 「χΓ. yl", zl"」 を求める。 こ こ では、 移動指令デー タ に乗じ られる合成変換行列は位置 変換行列 M a と ミ ラ ー変換行列 M b との積 M a · M b に 等し く、 従って、 移動指令点についての位置変換と ミ ラ -変換とが同時に実行される。 例えば、 第 7 図に示す点 (xl, yl, zl) が行列 M a を用いた位置変換処理によ つ て点 ( xl' . yl' . ζΓ ) に先ず変換され、 更に、 行列 M b を用いた ミ ラ ー変換処理によって ミ ラ ー平面 Πに関して 点 (χΓ , yl* . ζΓ ) と対称な点 (χΓ, yl", zl") に変 換される。 但し、 実際には、 移動指令デー タ 「xl, yl. zl」 と行列 M a と M b との積に等しい行列 M a ' M b と に基づいて、 座標値 「 xl", yl", ζΓ」 が C P U 1 によ り直ちに算出される。 そ して、 ス テ ッ プ S 2 1 7 に続く ステ "ノ ブ S 2 0 7 において、 C P U 1 は、 変換後の点の 座標値 「xl", yl", zl"」 を変換処理実行後のデータ と して R A M 3 に書込む。
次いで、 C P U 1 は元データ の次のデー タ ブロ ッ ク を 読込む (ス テ ッ プ S 2 0 2 ) 。 こ こでは移動指令ブロ ッ クが読込まれる ので、 ス テ ッ プ S 2 0 2 に続いて一連の ステ ッ プ S 2 0 3 〜 S 2 0 5 , S 2 1 7及び S 2 0 7 力 S 順次実行される。 この結果、 移動指令デー タ 「x2, y2. z2」 で表される点に対応する変換後の点を表すデータ 「x2", y2", z2"」 が R A M 3 に窨込まれる。 次の移動 指令ブロ ッ ク の場合も同様で、 移動指令デー タ 「x3, y3, z3J に対応する変換後のデー タ 「x3", y3", z3"」 が R A M 3 に書込まれる。 第 8図は、 この時点までに R A M 3 の変換済みデータ記憶領域に格納されたデー タ内 谷を不す o
その後、 C P U 1 は、 ス テ ッ プ S 2 0 2 で読込んだ次 のデー タ ブロ ッ ク の種別を判別する。 こ こ では、 デー タ ブロ ッ ク 「 G 9 9 ; 」 が読込まれるので、 ステ ッ プ S 2 0 3 〜 S 2 0 5 での判別結果がいずれも否定となり、 ス テ ツ プ S 2 0 6 で同ブロ ッ クが変換指令キ ャ ンセ ルブロ ッ ク である と判別される。 この場合、 ステ ッ プ S 2 1 8 に移行する。 ス テ ッ プ S 2 1 8 において、 C P U 1 は、 当該移行時点においてメ モ リ Mに格納されている変換行 列に、 指標 i に対応する メ モ リ M i-1にこ の時点で格納 されている変換行列の逆行列を乗 じ、 この結果得た変換 行列をそれまで記億されていた変換行列に代えてメ モ リ Mに格納する。 こ こでは、 メ モ リ M, メ モ リ M i-1 ( = Ml) に変換行列 M a · M b及び M bが夫々格納されて お り、 ス テ ッ プ S 2 1 8 において変換行列 M a ( = M a • M b · M b -1) が算出, 記億される。 即ち、 ミ ラ ー変 換のための定義が解除される。 こ の様に、 変換解除指令 ブロ ッ ク が元データから読取られる度に、 最後に定義さ れた変換指令が解除される。 そ して、 解除された変換指 令に関連する変換行列のメ モ リ M i-1における記憶を実 質的に ク リ アすべく、 C P U 1 は、 ス テ ッ プ S 2 1 9 で、 指標 i を 「 1 J だけディ ク リ メ ン ト し、 すなわち、 メ モ リ M i-1を次に定義される変換行列を記憶自在に した後、 ス テ ッ プ S 2 0 2 に移行する。
ステ ッ プ S 2 0 2で R A M 3 から次のデー タ ブロ ッ ク 「 G 9 9 ; 」 を読込むと、 C P U 1 は、 ス テ ッ プ S 2 0 3 〜 S 2 0 6 を実行して当該デー タ プロ ッ ク が変換指令 キ ャ ン セ ルブロ ッ クである と判別し、 従って、 メ モ リ M に格納されている変換行列に、 指標 i に対応する メ モ リ M i-1に格納されている変換行列の逆行列を乗じ、 こ の 結果得た変換行列を メ モ リ Mに格納する ( ス テ ッ プ S 2 1 8 ) 。 こ こでは メ モ リ M, メ モ リ M i-1 ( = M 0) に変 換行列 M a が夫々格納されており、 単位行列 E ( = M a • M a —1) が算出され、 メ モ リ Mに記億される。 即ち、 位置変換のための定義が解除される。 また、 指標 i がデ ィ ク リ メ ン 卜 されて位置変換行列のメ モ リ M0における 記憶がク リ アされ (ス テ ッ プ S 2 1 9 ) 、 ス テ ッ プ S 2 0 2 に移行する。
そ の後、 C P U 1 は、 ス テ ッ プ S 2 0 2 に おいて R A M 3 か ら元デー タ の次のブロ ッ ク を読出す度に、 上記一 連のス テ ッ プの対応する ものを実行する。 繰り返して述 ベる と、 データ ブロ ッ ク が元デー タの終了を示していな ければ ( S 2 0 3 ) 、 同ブロ ッ ク が位置変換指令ブロ ッ ク, ミ ラ ー変換指令ブロ ッ ク, 移動指令ブロ ッ ク 又は変 換指令キ ヤ ンセ ルプロ ッ ク のいずれであるかを判別する (ステ ッ プ S 2 0 4〜 S 2 0 6 , S 2 0 8 , S 2 0 9 ) 0 データ ブロ ッ ク が上記 4 種類のいずれでもない場合、 同 ブロ ッ ク を変換済みデー タ と して R A M 3 に書込む (ス 'テ ツ プ S 2 0 7 ) 。 位置変換指令プロ ッ ク の場合、 同ブ ロ ッ ク から読取った基準点及び対応点を表す 1 組の座標 値デ— 夕 と これと同様に読取った 2組の座標値デー タ と に基づいて位置変換行列 M a を算出する ( ス テ ッ プ S 2 1 1 ) 。 ミ ラ ー変換指令ブロ ッ ク の場合は、 同ブロ ッ ク から読取った 2 点を表す座標値データ に基づいて ミ ラ ー 変換行列 M b を算出する (ステ ッ プ S 2 1 5 ) 。 そ して、 ステ ッ プ S 2 1 2又は S 2 1 5 で変換行列を算出する度 に、 算出 した変換行列を変換行列格納用メ モ リ の最新の 領域 M iに記憶させ (ス テ ッ プ S 2 1 3, S 2 1 6 ) 、 又、 当該変換行列をそれまでに夫々算出された変換行列 の積 (初めは単位行列 E ) に等し く かつメ モ リ Mに格納 されている行列に乗じ、 この結果得た行列、 すなわち、 任意の数のかつ任意の種類の変換行列を合成したものに 等価な行列をメ モ リ Mに格納する (ステ ッ プ S 2 1 3 ) c 移動指令プロ ッ ク の場合には、 同ブロ ッ ク から読取った 移動指令点を表す座標値デー タ に メ モ リ Mに格納した変 換行列を乗じ、 この結果得た変換後のデー タ を書込む ( S 2 1 7 , S 2 0 7 ) 。 変換指令キ ャ ン セ ルブロ ッ ク の場合は、 最新の変換行列の逆行列をメ モ リ M内の行列 に乗じて得た行列をメ モ リ Mに格納し ( S 2 1 8 ) 、 こ れによ り、 最新の変換行列に関連する変換処理のみを解 除する。
その後、 ステ ッ プ S 2 0 2 で R A M 3 か ら読出したデ 一タブ口 ッ ク中に元デー タ の終了を表すプロ グラ ムェ ン ドコー ド (例えば、 コ — ド 「 M 0 2 」 ) が含まれている と、 C P U 1 は、 元デ一 夕 の全ブロ ッ ク についてのデー タ変換処理 (第 3 図) を完了した と判別し、 フ ラ グ Fを データ変換処理完了を表す値 「 1 」 にセ ッ ト し (ステ ツ プ S 2 2 0 ) 、 N Cデー タ編集処理 (第 2 図) のステ ツ プ S 1 0 7 に移行する。
ス テ ッ プ S 1 0 7 において、 R A M 3 の変換済みデー タ記億領域に格納した変換後のデータ に基づいて C R T 画面上に工具軌跡が C P U 1 の制御下で描画され、 その 後、 C P U 1 は待機状態に入る ( ス テ ッ プ S 1 0 8 ) 。 オペ レータは、 描画された工具執跡が所望の ものである か否かを検討し、 所望の工具軌跡でなければ、 所望のェ 具軌跡を生成するために N Cデー タを更に修正すべく、 キー ボー ド 5 の リ ト ラ イ キーを操作する。 こ の牛—操作 に応じて、 C P U 1 は元データの修正の要否を問う メ ッ セー ジを C R T画面上に表示させた後、 待機状態に入る (ステ ッ プ S 1 0 2 ) 。
こ こ では、 所望の工具執跡を生成可能なよ う に元デー タを修正すべく、 オペ レー タ によ り修正実行キーが操作 され、 C P U 1 は、 これに応じてフ ラ グ F をデータ変換 処理未了を表す値 「 0」 に リ セ ッ ト し (ス テ ッ プ S 1 0 3 ) 、 次いで、 上述のデー タ修正処理に入る (ステ ッ プ S 1 0 4 ) 。 データ修正処理中、 オペ レー タ は元データ 修正のため所要のキーボー ド操作を行い、 C P U 1 は牛 —ボー ド操作に応じて元データを修正しこれを R A M 3 に格納する。 データ修正処理の終了後、 C P U 1 は再び 待機状態に入る (ステ ッ プ S 1 0 2 ) 。
オペ レータ は、 必要に応じてス テ ッ プ S 1 0 2 のデー タ修正処理を繰り返し行わせた後、 キ—ボー ド 5 のエ ス ケープキーを操作する。 こ のキー操作に応 じて、 C P U 1 はフ ラ グ Fがデータ変換処理完了を表す値 「 1 」 であ るか否かを判別する (ス テ ッ プ S 1 0 5 ) 。 ステ ッ プ S 1 0 3 でフ ラ グ Fが値 「 0 」 に リ セ ッ ト されているので、 ス テ ッ プ S 1 0 6 に移行して、 修正した元データ につい て上述のデータ変換処理が C P U 1 によ り実行される。 そ して、 デー タ変換処理を施した元データ に基づいてこ れに対応する工具軌跡が C R T画面上に描画される (ス テ ツ プ S 1 0 7 ) 。 所望の工具軌跡が依然と して得られ なければ、 上述のデータ修正処理を再度実行する。
その後、 所望の工具執跡が得られたと判別する と、 ォ ペ レ— タ はキー ボー ド 5 の編集終了キーを操作する。 C P U 1 はこのキ一操作に応じて、 R A M 3 の変換済みデ -夕記憶領域に書き込まれ所望の工具軌跡を生成可能な N Cデー タを、 編集済みデータ と して、 R A M 3 から N Cデー タ記億メ モ リ 4 に転送, 格納し、 或は、 R A M 3 からディ ス ク コ ン ト ロー ラ 6 を介して第 2 フ ロ ッ ピ一デ イ ス ク F L 2 に転送, 格納する ( ス テ ッ プ S 1 1 0 ) 。 次いで、 C P U 1 はステ ッ プ S 1 1 1 においてフ ラ グ F を値 「 0 」 に リ セ ッ ト して N Cデータ編集処理を終了す O
ステ ッ プ S 1 0 6 でのデータ変換処理直後に C R T画 面上に描画された工具軌跡が所望の ものでないと判断し て、 オ ペ レータ が リ ト ラ イ キーを操作したに もかかわら ず、 元デー タ の修正の要否を問う メ ッ セー ジの表示に応 じてオ ペ レータ が元デー タ の修正が不要である と判断し て修正不実行キー (ヱス ケープキー) を操作する と、 C P U 1 はフ ラ グ Fの値が 「 1 」 であるか否かを判別する (ステ ッ プ S 1 0 5 ) 。 データ変換処理直後はフ ラ グ F は値 「 1 」 にセ ッ ト されているので、 C P U 1 は、 変換 処理後のデータ の修正の要否を問 ぅ メ ッセー ジを C R T 画面上に表示させ、 次いで待機状態に入る (ステ ッ プ S 1 0 9 ) 。 ォペ レ—夕がデータを修正すべきである と判 断して修正実行キーを操作する と、 C P U 1 は、 このキ 一操作に応じてデータ修正処理に入る (ス テ ッ プ S 1 0 4 ) 。 一方、 オ ペ レータ がデータ修正不要と判断してェ スケー プキーを操作する と、 C P U 1 の制御下で工具執 跡が再度描画される (ステ ッ プ S 1 0 7 ) 。 その後、 所 望の工具軌跡が得られたと判断してオ ペ レー タが編集終 了キー を操作する と、 編集済みデー タを N Cデータ記億 メ モ リ 4又は第 2 フ ロ ッ ピ一ディ ス ク F L 2 に格納して N Cデー タ編集処理を終了する ( ス テ ッ プ S 1 1 0 , S 1 1 1 ) o
本発明は上記実施例に限定されず、 種々 の変形が可能 でめ o
例えば、 上記実施例では、 位置変換指令ブロ ッ ク及び ミ ラ ー変換指令プロ ッ ク の双方を元データ 中に追加して プロ グラ ム した場合について説明 したが、 これに代えて、 元デー タ中に位置変換指令ブロ ッ ク のみを、 或は、 ミ ラ 一変換指令ブロ ッ ク のみを追加して も良い。
第 9 図に示すよ う に、 位置変換指令ブロ ッ ク のみを追 加した場合は、 上記実施例についての説明から明らかな よ う に、 3 つの基準点 (xa. ya, za) , ( xb, yb, zb) , ( xc, yc, zc) と 3 つの対応点 ( ia, ja, ka) , ( ib, jb, kb) , (ic. jc, kc) とから算出した位置変換行列 M a を用いて、 移動指令点 (xl, yl, zl) , (x2, y2, z2) , (x3, y3, z3) の夫々 に位置変換処理が施される。 第 9 図の元デー タ に対応する編集後の N C データの内容 を第 1 0 図に示す。 第 1 0 図中、 座標値 ( χΓ , yl' , ζΓ ) , ( χ2' , yl' , ζ2' ) , (χ3· , y3,, ζ3' ) は位置 変換後の移動指令点を夫々表す。
第 1 1 図に示すよ う に、 ミ ラ—変換指令ブロ ッ ク のみ を追加 した場合は、 同ブロ ッ ク中に記述した 2 つ座標値 (xd, yd, zd) , ( id. jd, kd) から算出 した ミ ラ —変 換行列 M b を用いて移動指令点 ( χΓ , yl' , zl' ) , (χ2' , y2' , ζ2· ) , ( χ3' , y3" . ζ3' ) の夫々 に ミ ラ ー 変換処理が施される。 第 1 1 図の元データ に対応する編 集後の N Cデー タ の内容を第 1 2 図に示す。 第 1 2 図中、 座標値 ( xl", yl", zl" ) , (x2", y2", ζ2") , ( χ3". y3". ζ3") は ミ ラ ー変換後の移動指令点を夫々表す。
又、 本発明は、 メ イ ンプロ グラ ム と一群のサブプロ グ ラ ムとからなる N Cデー タ にも適用可能である。
この種の N C データ の メ イ ンプロ グラ ム は、 例えば第 1 3 図に示すよ う に、 プロ グラ ム番号を特定するための デ一 夕 ブロ ッ ク 「 0 0 0 1 ; 」 と、 サブプロ グラ ムを呼 び出すためのコ ー ド 「Μ 9 8」 と呼び出すべきサブプロ グラ ムを指定するためのサブプロ グラ ム番号 「 Ρ 0 0 2」 〜 「 Ρ 0 0 4 」 とを含むデー タ ブロ ッ ク と、 メ イ ンプロ グラ ムのプロ グラ ムェ ン ドを表すコ ー ド 「 Μ 3 0」 を含 むデー タ ブロ ッ ク とを含んでいる。 そ して、 上記実施例 の場合と同様、 本発明に特有の変換指令ブ π ッ ク例えば 位置変換指令ブロ ッ ク 「 G 9 8 P 1 〜 ; 」 , 「 G 9 8 P 2〜 ; 」 , 「 G 9 8 P 3 〜; 」 (こ こで、 記号 「〜」 は 座標値データ等を表す) 及び変換指令キ ャ ン セルブロ ッ ク 「 G 9 9 ; 」 がメ イ ンプロ グラ ム中に追加 してプロ グ ラ ム される。 ま た、 サブプロ グラ ムの各々 は、 サブプロ グラ ム番号を特定するためのデー タ プロ ッ ク 「 0 0 0 2 ; 」 , 「 0 0 0 3 ; 」 又は 「 0 0 0 4 ; 」 と、 所要数の 移動指令ブロ ッ ク 「〜; 」 と、 サ ブプロ グラ ムの終了を 表すコ — ド 「M 9 9」 を含むデー タ ブロ ッ ク とを含んで いる。
第 1 3 図の N Cデータ に関するデータ変換処理におい て、 3 つの位置変換指令ブロ ッ ク の記述内容に基づいて 上記実施例の場合と同様に算出した位置変換行列 M a 1 を用いて、 夫々 のサブプロ グラ ムに含まれる全ての移動 指令ブロ ッ ク について位置変換処理が順次施される。 第 1 4 図は第 1 3 図の元デー タ に対応する編集後の N Cデ 一夕を示す。 又、 第 1 5 図の左半部に、 元の N Cデータ のサブプロ グラ ムの移動指令プロ ッ ク の内容に従って生 成される工具軌跡を示し、 第 1 5 図の右半部に、 編集後 の N Cデータ に対応する同様の工具軌跡を示す。 結局、 元の N Cデータ のサブプロ グラ ムによって定義されたェ 具軌跡例えば部品形状は、 上記位置変換処理によ り、 こ れら工具軌跡相互間の位置関係を保ったま ま、 所要の位 置領域に夫々平行移動される。 こ の様に、 第 1 3 図の N Cデー タ に本発明を適用する と、 単にメ イ ンプロ グラ ム 中に位置変換ブロ ッ ク を定義する こ とによ り、 メ イ ンプ ロ グラ ムで指定したサブプロ グラ ムの全てに同様の位置 変換処理を施すこ とができ る。
メ イ ンプロ グラ ム中に位置変換のみを定義した第 1 3 図の例を更に変形して、 メ イ ンプロ グラ ム中に ミ ラ —変 換のみを或は位置変換及び ミ ラ -変換の双方を定義可能 である。 この場合の自動プロ グラ ミ ング装置の作動は上 記実施例および第 1 3 図についての説明から明かなので, その説明を省略する。 第 1 6 図は、 メ イ ンプロ グラ ム と一群のサブプロ グラ ムとからなる N Cデータ の別の例を示す。 第 1 6 図にお いて、 メ イ ンプロ グラ ム は、 位置変換指令ブロ ッ ク及び 変換指令キ ヤ ン セルプロ ッ クを含まない点を除いては第 1 3 図のメ イ ンプロ グラ ム と同様に作成されている。 サ ブプロ グラ ムの各々 は、 第 1 3 図のサブプロ グラ ム と同 様、 サブプロ グラ ム番号を特定するためのデータ プロ ッ ク と、 移動指令ブロ ッ ク と、 サブプロ グラ ムの終了を表 すデー タ ブロ ッ ク とを含んでいる。 そ して、 各サ ブプロ グラ ム には、 本発明に特有の位置変換指令ブロ ッ ク 「 G 9 8 P 1 〜 ; 」 , 「 G 9 8 P 2〜 ; 」 , 「 G 9 8 P 3〜 ; 」 ( こ こで、 記号 「〜」 は座標値デー タ等を表す) 及 び変換指令キャ ンセルブ b ッ ク 「 G 9 9 ; 」 が追加して プロ グラ ム されている。
第 1 6 図の N Cデータ に関するデータ変換処理におい て、 サブプロ グラ ム番号 「 0 0 0 2 」 で特定されるサブ プロ グラ ムが呼び出される と、 同サブプロ グラ ムに含ま れる 3 つの位置変換指令プロ ッ ク の記述内容に基づいて 位置変換行列 M a 2が算出され、 次いで、 こ のサブプロ グラ ムに含まれる全ての移動指令プロ ッ ク について行列 M a 2 を用いて位置変換処理が順次施される。 又、 次の サブプロ グラ ムの呼び出 し時、 位置変換行列 M a 3 が同 様に算出され、 行列 M a 3 を用いて同サブプロ グラ ム中 の全ての移動指令プロ ッ ク についての位置変換処理が行 われる。 更に、 最後のサブプロ グラ ムの呼び出し時には 同様に算出された位置変換行列 M a 4 を用いて同様の位 置変換処理が行われる。 第 1 7 図は第 1 6 図の元デー タ に対応する編集後の N C データを示す。 又、 第 1 8 図の 左半部に、 元の N Cデー タ のサブプロ グラ ムの移動指令 ブロ ッ ク の内容に従って生成される工具軌跡を示し、 第 1 8 図の右半部に、 編集後の N Cデータ に対応する同様 の工具軌跡を示す。 第 1 8 図から明らかなよ う に、 第 1 6 図の各々 のサ ブプロ グラ ムの位置変換指令プロ ッ ク は、 工具軌跡を平行移動させ るための行列 M a 2又は M a 4 を定義する座標値データ或は工具軌跡を平行移動及び回 転移動させるための行列 M a 3 を定義する座標値データ を含む。
結局、 元の N Cデー タ の夫々のサブプロ グラ ムによつ て定義された工具軌跡例えば部品形状は、 上記位置変換 処理によ り、 互いに別個独立に所要の回転位置にかつ所 要の位置領域に夫々移動される。 こ の様に、 第 1 6 図の N Cデータ に本発明を適用する と、 夫々のサブプロ グラ ム中に位置変換ブロ ッ ク を定義する こ とによ り、 元の N C デー タ の夫々 のサブプロ グラ ムの移動指令ブロ ッ ク に 定義した座標値データを利用して、 素材の使用効率が高 い部品配置を実現可能な新たな N Cデータ を生成できる t なお、 第 1 6 図の例を更に変形して、 メ イ ンプロ グラ ム 中に ミ ラ ー変換のみを或は位置変換及び ミ ラ ー変換の双 方を定義可能である。
更に、 上記実施例及び各種変形例では 3 次元 N Cデー L O 夕 について説明 したが、 本発明は 2次元 N C データ に対 しても適用可能である。 この場合、 各々、 基準点及び対 応点を表す座標値データ を含む 2 つの位置変換指令プロ ッ クを N Cデー タ中にプロ グラムすれば足り る。 すなわ ち、 3 組の基準点及び対応点に基づいて位置変換行列を 算出する上記実施例とは異なり、 2 次元 N Cデータ の場 合は、 2組の基準点及び対応点に基づいて位置変換行列 を算出できる。 又、 ミ ラ ー変換指令ブロ ッ ク 中の 2 つの 点の各々 を表す座標値データを 3 次元デー タ で構成した 上記実施例とは異なり、 各座標値データを 2 次元データ で構成すれば足り る。
上記実施例及び各種変形例では、 修飾コ ー ド 「 P 1 」 〜 「 P 3 」 を付 した位置変換指令コ ー ド 「 G 9 8」 を各 々 の位置変換指令ブロ ッ ク に含めた力 N Cデータ中の 所要の位置変換指令プロ ッ ク のみに コ ー ド 「 G 9 8」 を 含める と共に、 コ ー ド 「 G 9 8」 が、 コー ド 「 G 0 1 」 と同様に、 モー ダルで作用するよ う に規定しても良い。

Claims

請 求 の 範 囲
1. 作成済みの N Cデー タ中に変換指令を追加してプロ グラ ムする工程 ( a ) と、 前記 N Cデー タ中に変換解 除指令を追加 してプロ グ ラ ムする工程 ( b ) と、 前記 N C データから前記変換指令を読取った と きに変換行 列を自動的に算出し定義する工程 ( c ) と、 前記変換 行列の定義後でかつ前記変換解除指令の読取り前にお いて、 前記 N Cデータ から移動指令を読取る度に、 前 記変換行列を用いて前記移動指令に関連する点を変換 して変換後の点を自動的に求める工程 ( d ) と、 前記 変換後の点を用いて前記 N Cデー タを自動的に書換え る工程 ( e ) とを備える N Cデータ編集方法。
2. 前記変換指令は、 位置変換指令コー ドと、 任意に設 定可能な一群の基準点を夫々表す座標値データ と、 前 記一群の基準点に夫々対応する一群の対応点を夫々表 す座標値デー タ とからなる位置変換指令を含み、 前記 —群の基準点を成す基準点の数を前記 N Cデー タ の次 元に一致する よ う に選択した請求の範囲第 1 項記載の N C デー タ編集方法。
3. 前記変換指令は、 ミ ラ ー変換指令コー ドと、 ミ ラ ー 平面に直交して延び中点に前記 ミ ラ ー平面が配される 直線を指定する 2 つの点の夫々 を表す座標値データ と からなる ミ ラ ー変換指令を含み、 各前記座標デー タ の 次元を前記 N Cデー タ の次元に一致させた請求の範囲 第 1 項記載の N Cデー タ編集方法。
4 . 前記変換指令は、 位置変換指令コ - ド, 任意に設定 可能な一群の基準点を夫々表す座標値デー タ及び一群 の基準点に夫々対応する一群の対応点を夫々表す座標 値デー タからなる と共に前記一群の基準点を成す基準 点の数を前記 N Cデー タ の次.元に一致するよ う に選択 した位置変換指令と、 ミ ラ ー変換指令コ ー ド及び ミ ラ 一平面に直交して延び中点に前記 ミ ラ—平面が配され る直線を指定する 2 つの点の夫々を表す座標値データ からなる と共に各前記座標値デー タ の次元を前記 N C デー タ の次元に一致させた ミ ラ ー変換指令とを含む I青 求の範囲第 1 項記載の N Cデー タ編集方法。
5 . 前記 N Cデー タから の前記位置変換指令コ ー ドの読 取り時、 前記基準点及び対応点を表す座標値デ- タ に 基づいて自動的に算出 した位置変換行列を用いて、 移 動指令に関連する点に対応する位置変換後の点を自動 的に求める請求の範囲第 2項記載の N C データ編集方 法 0
6 . 前記 N Cデー タからの前記ミ ラ ー変換指令コ ー ドの 読取り時、 前記 2 つの点を表す座標値デー タ に基づい て自動的に算出した ミ ラ ー変換行列を用いて、 移動指 令に関連する点に対応する ミ ラ ー変換後の点を自動的 に求める請求の範囲第 3 項記載の N Cデー タ編集方法 c
7 . 前記 N Cデータからの前記位置変換指令コ ー ド又は 前記 ミ ラ -変換指令コ - ドの読取り時、 前記基準点及 び対応点を表す座標値デー タな らびに前記 2 つの点を 表す座標値データの対応する も の に基づいて自動的に 算出 した位置変換行列又は ミ ラ ー変換行列を用いて、 移動指令に関連する点に対応する位置変換後又は ミ ラ 一変換後の点を自動的に求める請求の範囲 4項記載の N C データ編集方法。
. 前記 N Cデー タ中に複数の変換指令をプ ロ グラ ム し、 前記複数の変換指令のいずれか一つの読取り に応じて 最新の変換行列が算出される度に、 それま でに順次算 出された変換行列の積に最新の変換行列を乗じて最新 の合成変換行列を自動的に求め、 前記最新の合成変換 行列をそれまでの合成変換行列に代えて移動指令に関 連する点の変換に用いる変換行列と して定義する請求 の範囲第 1 項記載の N Cデータ編集方法。
. 前記変換解除指令が読取られる度に、 最後に定義し た合成変換行列に代えて、 前記最後に定義した合成変 換行列の一回前に定義された合成変換行列を前記移動 指令に関連する点の変換に用いる変換行列と して定義 する請求の範囲第 8項記載の N Cデータ編集方法。
0 . 前記 N C データ はメ イ ンプ ロ グラ ム と一群のサブ プロ グ ラ ムと よ り なり、 前記メ イ ンプロ グ ラ ム中にプ ロ グ ラ ム した変換指令を前記メ ィ ンブロ グ ラ ム及び前 記一群のサブプロ グラ ムについて有効にする請求の範 囲第 1 項記載の N Cデータ編集方法。
1 . 前記 N C データ はメ イ ンプロ グラ ム と一群のサブ プロ グラ ムと よ り なり、 各前記サブプロ グラ ム中にプ ロ グラ ム した変換指令を当該サ ブプロ グラ ムについて 有効にする請求の範囲第 1 項記載の N C データ編集方 法 0 "
2 . 前記工程 ( e ) において書換えた N Cデー タ に従 つて制御対象物の移動経路をグラ フ ィ ッ ク表示し、 前 記書換えた N Cデータ のオペ レータ によ る修正を許容 する請求の範囲第 1 項記載の N Cデータ編集方法。
PCT/JP1990/000745 1989-06-07 1990-06-07 Nc data edition WO1990015373A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US07/646,736 US5297023A (en) 1989-06-07 1990-06-07 NC data editing method using transformation matrix and conversion command

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP14310589A JPH039404A (ja) 1989-06-07 1989-06-07 Ncデータ編集方式
JP1/143105 1989-06-07
JP1/174090 1989-07-07
JP17409089A JPH0340109A (ja) 1989-07-07 1989-07-07 Ncデータ編集方式

Publications (1)

Publication Number Publication Date
WO1990015373A1 true WO1990015373A1 (en) 1990-12-13

Family

ID=26474906

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1990/000745 WO1990015373A1 (en) 1989-06-07 1990-06-07 Nc data edition

Country Status (3)

Country Link
US (1) US5297023A (ja)
EP (1) EP0433460A1 (ja)
WO (1) WO1990015373A1 (ja)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0160672B1 (ko) * 1995-02-13 1999-03-20 김광호 미러 이미지 제어를 위한 수치 제어 방법 및 장치
US20030122584A1 (en) * 2001-07-02 2003-07-03 Boehm Fritz A. Software program that transforms an N-dimensional matrix of integers to a linear index
DE10157577A1 (de) * 2001-11-23 2003-12-24 Heidenhain Gmbh Dr Johannes Vorrichtung und Verfahren zur Erstellung und/oder Änderung von NC-Programmen oder NC-Tabellen
US8863398B2 (en) 2011-04-01 2014-10-21 Lockheed Martin Corporation Feature-based coordinate reference
US11524360B2 (en) * 2018-07-10 2022-12-13 Shutterfly, Llc Marking system for decorating workpieces

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57182205A (en) * 1981-03-26 1982-11-10 Yaskawa Electric Mfg Co Ltd Controlling system of robot's locus
JPS62130405A (ja) * 1985-11-30 1987-06-12 Fanuc Ltd Ncデ−タ修正方法
JPS63159906A (ja) * 1986-12-24 1988-07-02 Fanuc Ltd Ncパ−トプログラム作成方法
JPH0620207A (ja) * 1992-07-01 1994-01-28 Matsushita Electric Ind Co Ltd テープレコーダ
JPH0631609A (ja) * 1992-07-21 1994-02-08 Nippon Electric Glass Co Ltd 湾曲面を有する硝子物品の研磨装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3809868A (en) * 1971-01-13 1974-05-07 Hughes Aircraft Co System for generating orthogonal control signals to produce curvilinear motion
JP2701022B2 (ja) * 1984-05-22 1998-01-21 ファナック 株式会社 プログラマブルミラーイメージ機能を有する数値制御装置
JPS6225302A (ja) * 1985-07-25 1987-02-03 Fanuc Ltd 数値制御装置
JPS6318404A (ja) * 1986-07-09 1988-01-26 Fanuc Ltd 位置制御方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57182205A (en) * 1981-03-26 1982-11-10 Yaskawa Electric Mfg Co Ltd Controlling system of robot's locus
JPS62130405A (ja) * 1985-11-30 1987-06-12 Fanuc Ltd Ncデ−タ修正方法
JPS63159906A (ja) * 1986-12-24 1988-07-02 Fanuc Ltd Ncパ−トプログラム作成方法
JPH0620207A (ja) * 1992-07-01 1994-01-28 Matsushita Electric Ind Co Ltd テープレコーダ
JPH0631609A (ja) * 1992-07-21 1994-02-08 Nippon Electric Glass Co Ltd 湾曲面を有する硝子物品の研磨装置

Also Published As

Publication number Publication date
US5297023A (en) 1994-03-22
EP0433460A1 (en) 1991-06-26

Similar Documents

Publication Publication Date Title
JPS62267804A (ja) Ncデ−タ変更方法
JPH02100704A (ja) ロボットプログラミングチェック方式
JP3407490B2 (ja) 数値制御方法及びその装置
WO1990015373A1 (en) Nc data edition
JPH04181403A (ja) 対話形数値制御装置
US5600759A (en) Robot capable of generating patterns of movement path
JP2701022B2 (ja) プログラマブルミラーイメージ機能を有する数値制御装置
EP0060039B1 (en) Numerically controlled machine tool system
JP4036151B2 (ja) 数値制御装置及び数値制御方法
JPH0219975A (ja) Cadシステムにおける操作復元処理方式
JP2843641B2 (ja) 多面加工の描画方法
JPH0981227A (ja) 産業用ロボットの動作プログラム作成方法
JPH08339215A (ja) 数値制御装置
JPS63148307A (ja) Nc情報作成装置
JPH04157505A (ja) 斜め面加工指令方法
JPH0340108A (ja) Ncデータ編集方式
JP2752784B2 (ja) ロボットの姿勢修正方法
WO1992011590A1 (en) Instruction method for robot operation program
WO1997035240A1 (fr) Systeme de programmation pour controleur de deplacement
JPH03294906A (ja) 加工プログラムの編集方式
JPH0563749U (ja) 加工時間算出機能を有する数値制御装置
JPS6359604A (ja) 数値制御装置の加工径路変更方法
JPH0659720A (ja) バリ取りロボットプログラム生成方法
JPH039404A (ja) Ncデータ編集方式
JPS61260307A (ja) ロボツト群デ−タ処理方式

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FR GB IT LU NL SE

WWE Wipo information: entry into national phase

Ref document number: 1990908650

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 1990908650

Country of ref document: EP

WWW Wipo information: withdrawn in national office

Ref document number: 1990908650

Country of ref document: EP