WO2023007581A1 - 数値制御装置 - Google Patents

数値制御装置 Download PDF

Info

Publication number
WO2023007581A1
WO2023007581A1 PCT/JP2021/027719 JP2021027719W WO2023007581A1 WO 2023007581 A1 WO2023007581 A1 WO 2023007581A1 JP 2021027719 W JP2021027719 W JP 2021027719W WO 2023007581 A1 WO2023007581 A1 WO 2023007581A1
Authority
WO
WIPO (PCT)
Prior art keywords
setting
data
unit
item
code
Prior art date
Application number
PCT/JP2021/027719
Other languages
English (en)
French (fr)
Inventor
兆甲 劉
巧 大橋
Original Assignee
ファナック株式会社
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
Application filed by ファナック株式会社 filed Critical ファナック株式会社
Priority to PCT/JP2021/027719 priority Critical patent/WO2023007581A1/ja
Priority to JP2023537785A priority patent/JPWO2023007581A1/ja
Priority to CN202180100789.6A priority patent/CN117716305A/zh
Priority to DE112021007661.2T priority patent/DE112021007661T5/de
Publication of WO2023007581A1 publication Critical patent/WO2023007581A1/ja

Links

Images

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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/35Nc in input of data, input till input file format
    • G05B2219/35216Program, generate nc program, code from cad data

Definitions

  • the present invention relates to a numerical controller.
  • a machine tool maker prepares a custom macro program and its own custom G code (for example, "G100" etc.) to be used for calling the macro program.
  • G code for example, "G100" etc.
  • a technique is known that allows a macro program to be easily called from a unique custom G-code customized by . See Patent Document 1, for example.
  • an image indicating the function of the G code and what data must be input when executing the function of the G code is displayed on the display screen. Techniques for creating data are known. See Patent Document 2, for example.
  • Patent Documents 1 and 2 it is necessary to directly input numerical values for each item related to shape in the normal G-code or unique custom G-code, and it takes time and effort to create a program.
  • One aspect of the numerical control device of the present disclosure is a uniquely customized custom G code, at least one item set in the custom G code, a shape type set for each item, and extracted from the shape.
  • a G-code registration section for registering linking information linked with the type of extracted data to be extracted, a linking information storage section for storing the registered linking information, and a CAD data displayed on the CAD data display section.
  • a selected shape receiving unit that receives a shape selected by the user from among the shapes shown, and an inquiry to the linking information storage unit using the selected shape to acquire items and types of extracted data for the selected shape.
  • a data type acquisition unit a setting data calculation unit that calculates setting data based on the acquired items and types of extracted data and the selected shape; and the setting data calculated by the setting data calculation unit. and an item data setting unit for setting the acquired item.
  • each item related to the shape of the custom G-code can be input easily and quickly.
  • FIG. 1 is a functional block diagram showing a functional configuration example of a numerical controller according to an embodiment
  • FIG. FIG. 4 is a diagram showing an example of the data structure of linking information registered by a G-code registration unit; It is a figure which shows an example of the CAD data of a gear.
  • FIG. 10 is a diagram showing an example of linking information in the case of a custom G-code that calls a gear machining program;
  • FIG. 4 is a diagram showing an example of CAD data of a work in which a plurality of holes are created on the circumference;
  • FIG. 10 is a diagram showing an example of linking information in the case of a custom G code that calls a program for drilling a plurality of holes at equal intervals on the circumference;
  • FIG. 10 is a diagram showing an example of linking information of custom G-code “G100”;
  • FIG. 10 is a diagram showing an example of linking information of custom G-code “G100”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200”;
  • FIG. 10 is a diagram showing an example of a registration screen when registering
  • FIG. 10 is a diagram showing an example of a registration screen when registering a custom G-code "G200";
  • FIG. 10 is a diagram showing an example of a setting screen for custom G code “G100”;
  • FIG. 10 is a diagram showing an example of a setting screen for custom G code “G100”;
  • FIG. 10 is a diagram showing an example of a setting screen for a custom G code “G200”;
  • FIG. 10 is a diagram showing an example of a setting screen for a custom G code “G200”;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • FIG. 10 is a diagram showing an example of setting of setting items;
  • 4 is a flowchart for explaining registration processing of a numerical control device;
  • 4 is a flowchart for explaining program generation processing of a numerical control device;
  • FIG. 10 is a diagram showing an example of a setting screen when the priority is "currently selected item";
  • FIG. 10 is a diagram showing an example of setting of setting items when the priority is "manual selection of setting items”;
  • FIG. 10 is a diagram showing an example of setting of setting items when the priority is "manual selection of setting items”;
  • FIG. 10 is a diagram showing an example of setting of setting items when the priority is "manual selection of setting items”;
  • FIG. 10 is a diagram showing an example of setting of setting items when the priority is "manual selection of setting items";
  • FIG. 10 is a diagram showing an example of setting of setting items when the priority is "manual selection of setting items”;
  • FIG. 10 is a diagram showing an operation example in which a custom G-code calls a macro program;
  • FIG. 1 is a functional block diagram showing a functional configuration example of a numerical controller according to one embodiment.
  • the numerical controller 10 is a numerical controller known to those skilled in the art, generates an operation command based on control information, and outputs the generated operation command to a machine tool (not shown). Thereby, the numerical controller 10 controls the operation of the machine tool (not shown). If the machine tool (not shown) is a robot or the like, the numerical controller 10 may be a robot controller or the like.
  • the numerical controller 10 may be directly connected to a machine tool (not shown) via a connection interface (not shown).
  • the numerical controller 10 and the machine tool (not shown) may be connected to each other via a network (not shown) such as a LAN (Local Area Network) or the Internet.
  • the numerical controller 10 has a communication section (not shown) for mutual communication through such connection.
  • machine tools are, for example, machine tools, robots, peripheral devices, and the like.
  • Machine tools are not limited to machine tools, robots, and peripheral devices, and can be widely applied to industrial machines in general.
  • Industrial machinery includes various machines such as, for example, machine tools, industrial robots, service robots, forging machines and injection molding machines.
  • the numerical controller 10 has a control section 11, an input section 12, a display section 13, and a storage section .
  • the control unit 11, the input unit 12, the display unit 13, and the storage unit 14 are communicably connected via a bus (not shown).
  • the control unit 11 also includes a G-code registration unit 110, a setting screen control unit 111 as a setting order display unit, a CAD data analysis unit 112, a selected shape reception unit 113, a data type acquisition unit 114, a setting data calculation unit 115, an item It has a data setting section 116 , a G-code designation section 117 , a G-code input section 118 and a program generation section 119 .
  • the input unit 12 is, for example, a keyboard or a touch panel arranged on the display unit 13, which will be described later, and receives input from the user such as designation of a G code used for a machining program of a machine tool (not shown).
  • the display unit 13 is, for example, a liquid crystal display or the like, and displays a registration screen for registering a custom G-code based on a control instruction from the G-code registration unit 110, which will be described later. Further, the display unit 13 serves as a CAD data display unit to display the CAD data of the work generated using the custom G-code based on the control instruction of the setting screen control unit 111, which will be described later, and automatically set the custom G-code setting items. to display the setting screen to select and set. Note that the registration screen, the setting screen, and the like will be described later.
  • the storage unit 34 is a ROM (Read Only Memory), HDD (Hard Disk Drive), or the like, and has a shape information storage unit 141 , a linking information storage unit 142 , and an analysis element storage unit 143 .
  • the shape information storage unit 141 stores CAD data or the like indicating the shape of a work to be produced by machining a machine tool (not shown).
  • the linking information storage unit 142 sets the numerical values of a plurality of parameters (hereinafter also referred to as “setting items”) of the custom G code used in generating the machining program using the CAD data of the work generated by the machining program.
  • a custom G code a plurality of setting items, types of shapes (hereinafter also referred to as "selected shapes") selected from CAD data for each setting item, and selected shape data extracted from CAD data.
  • Linking information in which a type (hereinafter also referred to as an "extracted data type”) and another setting item set from the same selection shape are linked in advance is stored for each custom G-code.
  • another setting item set from the same selection shape will be described.
  • FIG. 2 is a diagram illustrating an example of the data structure of linking information. As shown in FIG. 2, the linking information has a data structure with three layers.
  • a custom G-code registered by a G-code registration unit 110 which will be described later, is stored in the first hierarchy.
  • the second hierarchy stores n setting items 1 to n (n is an integer equal to or greater than 1) set in the custom G-code registered in the first hierarchy.
  • the third hierarchy for each setting item in the second hierarchy, the selection shape type, extraction data type, and other setting items set from the same selection shape are stored.
  • priority information indicating the order in which the setting items are set may be stored in the second hierarchy. The setting order will be described later. Below, more specifically, (a) linking information in the case of a custom G code that calls a program for machining gears, and (b) linking information in the case of a custom G code that calls a program that drills multiple holes on the circumference Information and describes.
  • FIG. 3 is a diagram showing an example of CAD data of a gear.
  • the left side of FIG. 3 shows, for example, the CAD data of the gear on the XY plane viewed from the Z-axis direction, and the diameter of the circle C1 of the gear (hereinafter also referred to as "work outer diameter") is set to 130 mm, for example. be done.
  • the right side of FIG. 3 shows, for example, the CAD data of the gear on the XY plane viewed from the Z-axis direction, and the diameter of the circle C1 of the gear (hereinafter also referred to as "work outer diameter") is set to 130 mm, for example. be done.
  • FIG. 3 shows, for example, the CAD data of the gear on the ZX plane (or ZY plane) viewed from the Y-axis (or X-axis) direction, and the tooth width of the straight line L1 of the gear (hereinafter referred to as "work face width ”) is set to 16 mm, for example.
  • FIG. 4 is a diagram showing an example of linking information in the case of a custom G-code that calls the program for machining the gear shown in FIG.
  • the first layer of the linking information stores, for example, a custom G code "G100" for calling a gear machining program.
  • the second hierarchy of the linking information there are set items such as "work outer diameter D” indicating the diameter of the circle C1 of the gear, "work face width W” indicating the face width of the straight line L1 of the gear, and is stored. "D” and “W” indicate address names (custom G-code variable names). Also, in the third layer of the linking information, there is a “circle” of the circle C1 as a selection shape type selected from the CAD data for the setting item "workpiece outer diameter D", and a “circle” extracted from the CAD data. The “diameter” of the circle C1 is stored as the extraction data type.
  • straight line L1 is stored as the type of selection shape selected from the CAD data for the setting item "work face width W”
  • "width” of the straight line L1 is stored as the type of extraction data extracted from the CAD data. be done. As shown in FIG. 3, the selected shape “circle” for the setting item “workpiece outer diameter D” and the selected shape “straight line” for the setting item "workpiece face width W" are different. Another setting item that is set from the third same selection shape of the attachment information is not set.
  • FIG. 5 shows an example of CAD data for a workpiece in which multiple holes are created at equal intervals on the circumference.
  • FIG. 4 is a diagram showing;
  • FIG. 5 shows, for example, CAD data of a workpiece in which six holes H1 to H6 are formed at equal intervals on the circumference of a circle C2 with a radius of 40 mm on the XY plane viewed from the Z-axis direction.
  • FIG. 6 is a diagram showing an example of linking information in the case of a custom G code that calls a program for drilling a plurality of holes at equal intervals on the circumference of FIG. As shown in FIG.
  • the first layer of the linking information stores, for example, a custom G code "G200" for calling a program for drilling a plurality of holes at equal intervals on the circumference.
  • the second layer of the linking information there are set items of "center coordinate X” indicating the center coordinate of the circle C2 in the X-axis direction and "center coordinate Y” indicating the center coordinate of the circle C2 in the Y-axis direction. "Radius R" indicating the radius of circle C2 is stored.
  • the straight line in the X-axis direction is L20
  • the second layer of the linking information includes the angle formed by the straight line L20 and the straight line L21 connecting the center point and the first hole H1 as a setting item.
  • a “end angle E” indicating an angle (e.g., 210°) formed by a straight line L20 and a straight line L26 connecting the center point and the last hole H6, "Angular interval I” indicating the angle (for example, 30°) between the straight line L21 and the straight line L22 between the hole H1 and the hole H2 is stored.
  • the third layer of the linking information there are “circle” as the selection shape type selected from the CAD data for the setting item "center coordinate X”, and “circle” as the extraction data type extracted from the CAD data.
  • a “center point” is stored.
  • the same “circle” as the selection shape type selected from the CAD data and the extraction data type "center point” extracted from the CAD data are stored for the setting item "center coordinate Y”.
  • "Center coordinate X" is stored in another setting item set from the shape.
  • the analysis element storage unit 143 stores configuration elements of shapes that make up the CAD data by analyzing CAD data stored in the shape information storage unit 141 by the CAD data analysis unit 112, which will be described later.
  • the control unit 11 has a CPU (Central Processing Unit), a ROM, a RAM (Random Access Memory), a CMOS (Complementary Metal-Oxide-Semiconductor) memory, etc., which are configured to communicate with each other via a bus. , are known to those skilled in the art.
  • the CPU is a processor that controls the numerical controller 10 as a whole.
  • the CPU reads the system program and application program stored in the ROM through the bus and controls the entire numerical controller 10 according to the system program and application program.
  • item data setting unit 116 As shown in FIG. , item data setting unit 116 , G-code specifying unit 117 , G-code input unit 118 , and program generation unit 119 .
  • CMOS memory is backed up by a battery (not shown), and configured as a non-volatile memory that retains the stored state even when the power of the numerical controller 10 is turned off.
  • the G-code registration unit 110 When generating a machining program, the G-code registration unit 110 includes a custom G-code uniquely customized by a machine tool manufacturer or the like, at least one setting item set in the custom G-code, and a shape setting for each setting item. Linking information linking the type and the type of extraction data to be extracted from the shape is registered. Specific registration operations of the G-code registration unit 110 will be described below with respect to (a) the case of a custom G-code for calling a program for machining a gear shown in FIG. A case of a custom G code that calls a program for drilling is exemplified and explained.
  • FIG. 7 is a diagram showing an example of a registration screen for registering the custom G-code "G100".
  • the G-code registration unit 110 displays a registration screen 200 on the display unit 13 as shown in FIG. As shown in FIG. 7, the registration screen 200 has a G-code 210, setting items 220, setting data 230, a setting button 250, and a cancel button 260.
  • FIG. The G-code registration unit 110 calls a custom G-code 210 corresponding to the first hierarchy of the linking information in FIG. Accepts input of code "G100".
  • the G-code registration unit 110 registers a custom G code input by the G-code 210 in the setting item 220 corresponding to the second layer of the linking information in FIG. Input of the item name of the setting item set by the code "G100" and the address name (variable name of the custom G code) corresponding to the item name is accepted.
  • the setting item 220 includes the item name of "work outer diameter", the address name of "D”, the item name of "work face width” and " W" address name is entered by the user.
  • the G-code registration unit 110 in the setting data 230 corresponding to the third layer of the linking information in FIG. receives the input of the type of selected shape and the type of extraction data.
  • the user sets the selection shape type "circle” and the extraction data type "diameter” for the setting item "work outer diameter D" of the setting item 220.
  • the user sets the selection shape type "straight line” and the extraction data type "width” for the setting item "work tooth width W" of the setting item 220. be.
  • the G-code registration unit 110 registers the custom data shown in FIG.
  • the linking information of the G code “G100” is registered and stored in the linking information storage unit 142 .
  • the G-code registration unit 110 when the user presses the cancel button 260 based on the input operation of the input unit 12, cancel the registration of the linking information for the custom G-code "100".
  • the G-code registration unit 110 sets "center coordinates" in the setting item 220 corresponding to the second layer of the linking information in FIG. and the address name of "X”, the item name of "center coordinates", the address name of "Y”, the item name of "radius”, the address name of "R”, and the item name of "start angle” and "S” address name, "end angle” item name and "E” address name, and "angle interval” item name and "I” address name.
  • the G-code registration unit 110 for example, based on the input operation of the input unit 12 by the user, in the setting data 230 corresponding to the third layer of the linking information in FIG.
  • the selection shape type "circle” and the extraction data type "center point” are set for the setting item 220 "center coordinate X".
  • the user sets the selection shape type "circle” and the extraction data type "center point” for the setting item "center coordinate Y" of the setting item 220.
  • the user sets "center coordinate X" as another setting item set from the same selection shape.
  • the user sets the selection shape type "circle” and the extraction data type "radius” for the setting item "radius R" of the setting item 220.
  • "Center coordinate X" is set by the user as another setting item set from the same selected shape.
  • the user sets the selection shape type "two straight lines” and the extraction data type “angle” for the setting item "start angle S" of the setting item 220. be.
  • the user sets the selection shape type "two straight lines” and the extraction data type “angle” for the setting item "end angle E” of the setting item 220. be.
  • the selection shape type "two straight lines” and the extraction data type “angle” are set by the user for the setting item "angular interval I" of the setting item 220. be.
  • the G-code registration unit 110 sets the priority order 240 for setting the setting items "start angle S", "end angle E", and "angle interval I". may be displayed on the registration screen 200 . Then, the G-code registration unit 110 may accept an input of priority such as “item display order” in the priority 240 based on the input operation of the input unit 12 by the user. Then, when the setting button 250 is pressed, the G-code registration unit 110 registers the linking information of FIG.
  • the setting screen control unit 111 automatically selects and sets custom G-code setting items in order to generate a machining program using the custom G-code based on the input operation of the input unit 12 by the user, for example. is displayed on the display unit 13 .
  • the display operation of the setting screen of the setting screen control unit 111 will be described for (a) the case of a custom G code that calls a program for machining gears, and (b) the case of a custom G code that calls a program for machining a plurality of holes on the circumference. Each case will be described.
  • (a) Custom G code for calling gear machining program The setting screen control unit 111 instructs generation of a machining program for gear machining based on the CAD data shown in FIG. is received, a setting screen 300 including a CAD data display screen for displaying CAD data of gears and a G code selection screen for selecting a custom G code is displayed on the display unit 13 as shown in FIG.
  • the setting screen control unit 111 displays the screen shown in FIG. Based on the linking information of the custom G code "G100", as shown in FIG. 16, a CAD data display screen and a G code input screen for setting the setting items "work outer diameter D" and "work face width W" , is displayed.
  • the setting items "center coordinate Y" and “radius R” are related to another setting item "center coordinate X" set from the same selection shape "circle”. Therefore, the setting screen control unit 111 displays the same mark (for example, "*" etc.) and an explanation of the mark. By doing so, the user can know that the setting items are set from the same selection shape.
  • the setting items "start angle S”, “end angle E”, and “angle interval I” are the selected shape type "two straight lines” and the extraction data type "angle ' is the same. Therefore, based on the priority order of the linking information (for example, the order of item display) in FIG. are displayed on the display unit 13 with marks such as "1", “2", and “3” in the order of display and a description of the marks. By doing so, the user can know the setting order of the setting items.
  • the CAD data analysis unit 112 for example, analyzes the CAD data stored in the shape information storage unit 141 and displayed on the setting screen 300 of FIG. 16 or FIG. or "straight line", etc.).
  • the CAD data analysis unit 112 stores the extracted shape as an analysis element in the analysis element storage unit 143 .
  • the selected shape receiving unit 113 receives, as a selected shape, a shape selected by the user from among the shapes indicated by the CAD data displayed on the display unit 13, using the analytical elements of the analytical element storage unit 143, for example. Specifically, for example, the selected shape receiving unit 113 selects a circle C1 representing the outer diameter of the gear from among the shapes of the CAD data on the setting screen 300 of FIG. accept as Further, the selected shape receiving unit 113 may receive from the user the straight line L1 indicating the face width of the gear among the shapes of the CAD data on the setting screen 300 of FIG. 16 as the selected shape.
  • the selected shape receiving unit 113 selects a circle C2 in which the holes H1 to H6 are generated on the circumference from among the shapes of the CAD data on the setting screen 300 of FIG. It may be accepted as a shape. 18, the selected shape receiving unit 113 selects the two straight lines L20 and L21 that form the starting angle, the two straight lines L20 and L26 that form the ending angle, or the angle Two straight lines L21 and L22 forming an angle of separation may be received from the user as the selected shape.
  • the data type acquisition unit 114 inquires of the linking information storage unit 142 with the selected shape received by the selected shape receiving unit 113, and acquires setting items and extraction data types for the selected shape. Specifically, for example, when the data type obtaining unit 114 receives a circle C1 indicating the outer diameter of the gear from the selected shape receiving unit 113 as the selected shape on the setting screen 300 of FIG. Based on the stored linking information of FIG. 4, the setting item "work outer diameter D" and the extraction data type "diameter” are acquired for the accepted selected shape "circle". Further, when the data type acquiring unit 114 accepts the straight line L1 indicating the face width of the gear from the selected shape accepting unit 113 as the selected shape on the setting screen 300 of FIG. The setting item "work face width W" and the extraction data type "width” may be acquired for the shape "straight line”.
  • the setting data calculation unit 115 calculates setting data based on the setting item and extraction data type acquired by the data type acquisition unit 114 and the selected shape received by the selected shape receiving unit 113 . Specifically, for example, when the selected shape receiving unit 113 receives the circle C1 indicating the outer diameter of the gear as the selected shape from the user on the setting screen 300 of FIG. , the setting item “workpiece outer diameter D” and the extraction data type “diameter” are acquired. In this case, the setting data calculation unit 115 calculates the setting value (for example, “130 mm”) of the diameter set for the circle C1 of the CAD data as the setting data.
  • the setting data calculation unit 115 may calculate the setting value (for example, “16 mm”) of the tooth width set on the straight line L1 of the CAD data as the setting data.
  • the selected shape receiving unit 113 receives from the user a circle C2 in which holes H1 to H6 are formed on the circumference on the setting screen 300 of FIG.
  • the setting items "center coordinate X", “center coordinate Y” and “radius R”, and the extraction data types "center point” and "radius” are acquired.
  • the setting item "center coordinate X” is registered in the linking information of FIG. 6 as another setting item set from the same selection shape as the setting items "center coordinate Y" and "radius R".
  • the setting data calculation unit 115 may calculate the setting values (for example, the center coordinates (0, 0) and the radius "40 mm") set for the circle C2 of the CAD data as the setting data.
  • the selected shape receiving unit 113 receives two straight lines L20 and L21 as selected shapes from the user on the setting screen 300 of FIG. ”, “End angle E”, “Angle interval I”, and the extraction data type “Angle”.
  • the setting items "start angle S", “end angle E”, and “angle interval I” are the same with the selected shape type being "two straight lines” and the extraction data type being "angle”. Therefore, the order of priority (for example, order of item display, etc.) is registered in the linking information shown in FIG. For this reason, the setting data calculation unit 115, based on the priority of the linking information in FIG. , may be calculated as the setting data of the setting item “start angle S” in the first setting order.
  • the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the setting item acquired by the data type acquisition unit 114 among the setting items on the setting screen 300 .
  • the setting data calculation unit 115 acquires the work outer diameter D” and the extraction data type “diameter”, and calculates the setting value (for example, “130 mm”) of the diameter set for the circle C1 of the CAD data as the setting data. .
  • the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the setting item “work outer diameter D” acquired by the data type acquisition unit 114, as shown in FIG.
  • the selected shape receiving unit 113 receives a straight line L1 as a selected shape from the user on the setting screen 300 of FIG. 19, for example, as shown in FIG. Width W” and the extracted data type “width” are obtained, and the setting data calculation unit 115 calculates the tooth width setting value (for example, “16 mm”) set for the straight line L1 of the CAD data as setting data.
  • the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the setting item “work face width W” acquired by the data type acquisition unit 114, as shown in FIG.
  • the selected shape receiving unit 113 receives the circle C2 as the selected shape from the user as shown in FIG. 21 on the setting screen 300 of FIG.
  • "center coordinate Y” and “radius R” and the extracted data types "center point” and “radius”
  • the setting data calculation unit 115 calculates the setting values ( For example, center coordinates (0, 0) and radius "40 mm") are calculated as setting data.
  • the setting items "center coordinate Y” and “radius R" are related to another setting item "center coordinate X" set from the same selection shape.
  • the setting data calculated by the setting data calculation unit 115 are collectively set in the setting items "center coordinate X", “center coordinate Y", and "radius R" acquired by the data type acquisition unit 114. .
  • the setting data calculation unit 115 calculates, for example, the setting value of the angle between the two straight lines L20 and L21 of the CAD data (for example, "60°") based on the priority of the linking information in FIG. is calculated as the setting data for the setting item "start angle S" in the first display order.
  • the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the setting item "start angle S" acquired by the data type acquisition unit 114, as shown in FIG.
  • the selected shape receiving unit 113 receives two straight lines L20 and L26 as selected shapes from the user as shown in FIG. 23 on the setting screen 300 of FIG. "Start angle S”, "end angle E", “angle interval I”, and the extraction data type "angle” are acquired. Based on the priority order of the linking information in FIG. is calculated as the setting data for the setting item "end angle E".
  • the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the setting item "end angle E" acquired by the data type acquisition unit 114, as shown in FIG.
  • the selected shape receiving unit 113 receives two straight lines L21 and L22 as selected shapes from the user as shown in FIG. 24 on the setting screen 300 of FIG. "Start angle S”, "end angle E”, “angle interval I”, and the extraction data type "angle” are acquired.
  • the setting data calculation unit 115 sets the setting value (for example, “30°”) of the angle between the two straight lines L21 and L22 of the CAD data to the third display order. is calculated as the setting data for the setting item "Angle interval I”.
  • the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the setting item "angle interval I" acquired by the data type acquisition unit 114, as shown in FIG.
  • the G-code specifying unit 117 is configured by the user input unit 12 on a setting screen 300 displayed on the display unit 13 for automatically selecting and setting custom G-code setting items. Specify a custom G-code based on the input operation of .
  • the G-code input unit 118 inputs, for example, the custom G-code specified on the setting screen 300 shown in FIG. 20 or FIG.
  • the program generation unit 119 generates a machining program using, for example, the custom G-code input by the G-code input unit 118 and the setting data of each setting item.
  • FIG. 25 is a flowchart for explaining registration processing of the numerical controller 10. As shown in FIG. The flow shown here is executed each time a custom G-code registration instruction is received from the user.
  • step S ⁇ b>41 the G-code registration unit 110 receives a custom G-code registration instruction based on the user's input operation on the input unit 12 and displays the registration screen 200 on the display unit 13 .
  • step S42 the G-code registration unit 110 accepts a custom G-code to be registered in the G-code 210 of the registration screen 200 based on the input operation of the input unit 12 by the user.
  • step S43 the G-code registration unit 110 registers the item name and address name of the custom G-code setting item input in step S42 in the setting item 220 of the registration screen 200 based on the input operation of the input unit 12 by the user. Accept (custom G-code variable name).
  • step S44 the G-code registration unit 110, based on the input operation of the input unit 12 by the user, sets the type of selected shape, the type of extraction data, and Sets another setting item that is set from the same selection shape.
  • step S45 the G-code registration unit 110 determines whether or not there are a plurality of setting items with the same selection shape type and extraction data type. If there are a plurality of setting items with the same selected shape type and extraction data type, the process proceeds to step S46. On the other hand, if there are no multiple setting items with the same selection shape type and extraction data type, the process proceeds to step S47.
  • step S46 the G-code registration unit 110 sets each of a plurality of setting items having the same selection shape type and extraction data type in the priority order 240 of the registration screen 200 based on the input operation of the input unit 12 by the user. Set priorities.
  • step S47 the G-code registration unit 110 registers the custom G-code linking information and stores it in the linking information storage unit 142 when the setting button 250 is pressed based on the input operation of the input unit 12 by the user. do.
  • FIG. 26 is a flowchart for explaining program generation processing of the numerical controller 10.
  • FIG. The flow shown here is executed each time a machining program generation instruction is received from the user.
  • the setting screen control unit 111 includes a CAD data display screen for displaying CAD data and a G code input screen when receiving an instruction to generate a machining program based on an input operation of the input unit 12 by the user.
  • a setting screen 300 is displayed on the display unit 13 .
  • step S52 the G-code specifying unit 117 specifies a custom G-code based on the input operation of the input unit 12 by the user.
  • step S53 the selected shape receiving unit 113 receives the selected shape in the CAD data displayed in step S51 based on the input operation of the input unit 12 by the user.
  • step S54 the data type acquisition unit 114 inquires of the linking information storage unit 142 using the selected shape received in step S53, and acquires setting items and extraction data types for the selected shape.
  • step S55 the setting data calculation unit 115 calculates setting data based on the selected shape accepted in step S53 and the setting items and extraction data types acquired in step S54.
  • step S ⁇ b>56 the item data setting unit 116 sets the setting data calculated in step S ⁇ b>55 to the setting item acquired in step S ⁇ b>54 among the setting items on the setting screen 300 .
  • step S57 the item data setting unit 116 determines whether or not all setting items have been set. If all setting items have been set, the process proceeds to step S58. On the other hand, if all setting items have not been set, the process returns to step S53.
  • step S58 the G-code specifying unit 117 determines whether or not all custom G-codes have been specified. If all custom G-codes have been specified, the process proceeds to step S59. On the other hand, if not all custom G-codes have been specified, the process returns to step S52.
  • step S59 the G-code input unit 118 inputs the specified custom G-code and the setting data of the set setting items to the program generation unit 119.
  • step S60 the program generation unit 119 generates a machining program using the input custom G-code and setting data of each setting item.
  • the numerical control device 10 at least associates a setting item for each custom G code, a selection shape type for each setting item, an extraction data type, and another setting item set from the same selection shape. Register in advance as attached information.
  • the numerical control device 10 can easily and quickly input each item related to the shape of the custom G-code, saving the labor of inputting the custom G-code.
  • the numerical control device 10 can shorten the generation time of the machining program.
  • the numerical control device 10 is not limited to the above-described embodiment, and includes modifications, improvements, etc. within a range that can achieve the purpose.
  • the numerical controller 10 registers linking information for a custom G code that calls a program for machining gears and a custom G code that calls a program for machining a plurality of holes on the circumference. is not limited to For example, the numerical controller 10 may register any custom G-code linking information.
  • the setting screen control unit 111 selects "start angle S" and "end angle E” among the setting items of the custom G code "G200" for calling a program for drilling a plurality of holes on the circumference. , and “angular interval I” are displayed with marks of “1”, “2”, and “3” according to the display order in order to set the setting items, but the present invention is not limited to this.
  • the setting screen control unit 111 sets the currently selected setting item based on the input operation of the input unit 12 by the user. As shown in FIG.
  • FIG. 27 is a diagram showing an example of the setting screen 300 when the priority is "currently selected item".
  • the selected shape receiving unit 113 receives two straight lines L21 and L22 as the selected shapes from the user on the setting screen 300.
  • the data type acquisition unit 114 acquires the setting items “start angle S”, “end angle E”, and “angle interval I”, and the extraction data type “angle”.
  • the setting data calculation unit 115 calculates the setting value (for example, “30°”) of the angle formed by the two straight lines L21 and L22 of the CAD data. It is calculated as the setting data of the setting item "angular interval I". As shown in FIG. 27, the item data setting unit 116 sets the setting data calculated by the setting data calculation unit 115 to the selected setting item "angular interval I". For the setting items "start angle S” and “end angle E”, similarly to the case of the setting item "angular interval I", the setting data is set with a rectangular mark by being selected by the user. .
  • the setting item “center coordinate X” is the setting item “center coordinate Y” and " 6 as another setting item set from the same selected shape as the radius R”, the item data setting unit 116, as shown in FIG.
  • the setting data is collectively set in the setting items "center coordinate X", “center coordinate Y", and "radius R".
  • the setting data is collectively set in the setting items "center coordinate X", “center coordinate Y", and "radius R”.
  • “manually select a setting item” is registered as a priority in the linking information of FIG.
  • the setting items "center coordinate X” and “center coordinate Y ”, and “radius R” may be set individually.
  • the setting screen control unit 111 for example, as shown in FIG. may be displayed in a pop-up. By doing so, the user can set the setting data to any setting item from the item list.
  • a pop-up screen may be displayed to prompt the user to select setting items for the selected shape.
  • the selected shape receiving unit 113 receives two straight lines L21 and L22 from the user on the setting screen 300
  • the data type obtaining unit 114 receives the received selection based on the linking information shown in FIG.
  • the setting items "start angle S”, “end angle E”, and “angle interval I” and the extraction data type "angle” are acquired for the two straight lines L21 and L22 of the shape.
  • the setting screen control unit 111 may popup display an item selection screen 310 listing the setting items "start angle S", "end angle E", and "angle interval I”.
  • the setting data calculation unit 115 calculates the setting value (for example, “30°”) of the angle formed by the two straight lines L21 and L22 of the CAD data. may be calculated as the setting data of the setting item "angular interval I". As shown in FIG. 31, the item data setting unit 116 may set the setting data calculated by the setting data calculation unit 115 to the setting item "angular interval I".
  • a storage unit such as a hard disk or ROM that stores a program describing all or part of the operation of the numerical control device 10, and data necessary for calculation are stored.
  • a computer composed of a DRAM, a CPU, and a bus connecting each part, information necessary for calculation is stored in the DRAM, and the program is operated by the CPU.
  • Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (eg, flexible discs, magnetic tapes, hard disk drives), magneto-optical recording media (eg, magneto-optical discs), CD-ROMs (Read Only Memory), CD- R, CD-R/W, semiconductor memory (eg, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM).
  • the program may also be supplied to the computer by various types of transitory computer readable medium. Examples of transitory computer-readable media include electrical signals, optical signals, and electromagnetic waves. Transitory computer-readable media can deliver the program to the computer via wired communication channels, such as wires and optical fibers, or wireless communication channels. Also, these programs may be distributed by being downloaded to a user's computer via a network.
  • steps of writing a program recorded on a recording medium include not only processes that are executed chronologically in order, but also processes that are executed in parallel or individually, even if they are not necessarily processed chronologically. is also included.
  • the numerical control device of the present disclosure can take various embodiments having the following configurations.
  • the numerical control device 10 of the present disclosure includes a uniquely customized custom G code, at least one item set in the custom G code, the type of shape set for each item, and the extraction extracted from the shape
  • each item concerning the shape of the custom G code can be input simply and quickly.
  • the G-code registration unit 110 sets the priority order for the multiple items. It may be registered in the linking information. By doing so, the numerical control device 10 can inform the user which setting items are to be set in what order with respect to a plurality of items having the same shape type and extraction data type.
  • the G-code registration unit 110 In the numerical controller 10 described in (1) or (2), if there are multiple items set from the same selected shape, the G-code registration unit 110 collectively It may be registered in the linking information so that it can be set as By doing so, the numerical controller 10 can save the trouble of inputting the custom G-code.
  • the item data setting unit 116 automatically selects the item and sets the calculated setting data.
  • setting data may be set by automatically selecting each item based on the set priority. By doing so, the numerical controller 10 can shorten the generation time of the machining program.
  • the item data setting unit 116 sets the calculated setting data to each of the plurality of related items. They can be set collectively. By doing so, the numerical controller 10 can more efficiently save the trouble of inputting the custom G-code.
  • the numerical control device 10 described in (2) or (4) further includes a setting screen control unit 111 that displays items and priorities based on the linking information registered by the G-code registration unit 110. may By doing so, the numerical controller 10 can achieve the same effects as (2) and (4).
  • the setting screen control unit 111 displays a list of the multiple items, and displays the item data
  • the setting unit 116 may set the calculated setting data to an item selected from among the plurality of listed items. By doing so, the numerical controller 10 can achieve the same effect as (6).

Abstract

カスタムGコードの形状に関する各項目を簡単かつ迅速に入力できること。 数値制御装置は、独自にカスタマイズされたカスタムGコードと、カスタムGコードにおいて設定される少なくとも1つの項目と、項目毎に設定する形状の種類と、形状から抽出する抽出データの種類とを紐付けた紐付け情報を登録するGコード登録部と、登録された紐付け情報を保存する紐付け情報記憶部と、CADデータ表示部に表示されたCADデータが示す形状のうちユーザにより選択された形状を受け付ける選択形状受付部と、選択された形状で紐付け情報記憶部に問い合わせして、選択された形状に対する項目及び抽出データの種類を取得するデータ種類取得部と、取得された項目及び抽出データの種類と選択された形状とに基づいて設定データを算出する設定データ計算部と、設定データ計算部により算出された設定データを取得された項目に設定する項目データ設定部と、を備える。

Description

数値制御装置
 本発明は、数値制御装置に関する。
 例えば、図32に示すように、工作機械メ-カがカスタムマクロプログラムとマクロプログラム呼出しに使用する独自のカスタムGコード(例えば、「G100」等)を用意し、ユーザは、工作機械メ-カがカスタマイズした独自のカスタムGコードよりマクロプログラムを簡単に呼出すことができる技術が知られている。例えば、特許文献1参照。
 また、1ブロックのNCデータ作成に際して該Gコードの機能及び該Gコードの機能を実行させる場合いかなるデータを入力しなければならないかを示す画像をディスプレイ画面に表示させ、該画像を参照してNCデータを作成する技術が知られている。例えば、特許文献2参照。
特許6654740号 特開昭62-052608号公報
 しかしながら、特許文献1、2では、通常のGコードや独自のカスタムGコードにおいて形状に関する各項目に数値を直接入力する必要があり、プログラム作成に手間と時間がかかる。
 そこで、カスタムGコードの形状に関する各項目を簡単かつ迅速に入力できることが望まれている。
 本開示の数値制御装置の一態様は、独自にカスタマイズされたカスタムGコードと、前記カスタムGコードにおいて設定される少なくとも1つの項目と、前記項目毎に設定する形状の種類と、前記形状から抽出する抽出データの種類とを紐付けた紐付け情報を登録するGコード登録部と、登録された前記紐付け情報を保存する紐付け情報記憶部と、CADデータ表示部に表示されたCADデータが示す形状のうちユーザにより選択された形状を受け付ける選択形状受付部と、選択された前記形状で前記紐付け情報記憶部に問い合わせして、選択された前記形状に対する項目及び抽出データの種類を取得するデータ種類取得部と、取得された前記項目及び抽出データの種類と選択された前記形状とに基づいて設定データを算出する設定データ計算部と、前記設定データ計算部により算出された前記設定データを取得された前記項目に設定する項目データ設定部と、を備える。
 一態様によれば、カスタムGコードの形状に関する各項目を簡単かつ迅速に入力できる。
一実施形態に係る数値制御装置の機能的構成例を示す機能ブロック図である。 Gコード登録部により登録される紐付け情報のデータ構造の一例を示す図である。 歯車のCADデータの一例を示す図である。 歯車加工するプログラムを呼出すカスタムGコードの場合の紐付け情報の一例を示す図である。 円周上に複数の穴が生成されるワークのCADデータの一例を示す図である。 円周上に等間隔に複数の穴加工するプログラムを呼出すカスタムGコードの場合の紐付け情報の一例を示す図である。 カスタムGコード「G100」の紐付け情報の一例を示す図である。 カスタムGコード「G100」の紐付け情報の一例を示す図である。 カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。 カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。 カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。 カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。 カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。 カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。 カスタムGコード「G100」の場合の設定画面の一例を示す図である。 カスタムGコード「G100」の場合の設定画面の一例を示す図である。 カスタムGコード「G200」の場合の設定画面の一例を示す図である。 カスタムGコード「G200」の場合の設定画面の一例を示す図である。 設定項目の設定の一例を示す図である。 設定項目の設定の一例を示す図である。 設定項目の設定の一例を示す図である。 設定項目の設定の一例を示す図である。 設定項目の設定の一例を示す図である。 設定項目の設定の一例を示す図である。 数値制御装置の登録処理について説明するフローチャートである。 数値制御装置のプログラム生成処理について説明するフローチャートである。 優先順位が「現在選択されている項目」の場合の設定画面の一例を示す図である。 優先順位が「設定項目を手動で選択」の場合の設定項目の設定の一例を示す図である。 優先順位が「設定項目を手動で選択」の場合の設定項目の設定の一例を示す図である。 優先順位が「設定項目を手動で選択」の場合の設定項目の設定の一例を示す図である。 優先順位が「設定項目を手動で選択」の場合の設定項目の設定の一例を示す図である。 カスタムGコードがマクロプログラムを呼出す動作例を示す図である。
<一実施形態>
 図1は、一実施形態に係る数値制御装置の機能的構成例を示す機能ブロック図である。
 数値制御装置10は、当業者にとって公知の数値制御装置であり、制御情報に基づいて動作指令を生成し、生成した動作指令を工作機械(図示しない)に出力する。これにより、数値制御装置10は、工作機械(図示しない)の動作を制御する。なお、工作機械(図示しない)がロボット等の場合、数値制御装置10は、ロボット制御装置等でもよい。
 数値制御装置10は、図示しない接続インタフェースを介して工作機械(図示しない)と互いに直接接続されてもよい。なお、数値制御装置10と工作機械(図示しない)とは、LAN(Local Area Network)やインターネット等の図示しないネットワークを介して相互に接続されていてもよい。この場合、数値制御装置10は、かかる接続によって相互に通信を行うための図示しない通信部を備えている。
 ここで、図示しない工作機械は、例えば、工作機械やロボット、周辺装置等である。なお、図示しない工作機械は、工作機械やロボット、周辺装置に限定されず、産業機械全般に広く適用することができる。産業機械とは、例えば、工作機械、産業用ロボット、サービス用ロボット、鍛圧機械及び射出成形機といった様々な機械を含む。
 図1に示すように、数値制御装置10は、制御部11、入力部12、表示部13、及び記憶部14を有する。制御部11、入力部12、表示部13、及び記憶部14は、図示しないバスを介して通信可能に接続されている。また、制御部11は、Gコード登録部110、設定順表示部としての設定画面制御部111、CADデータ解析部112、選択形状受付部113、データ種類取得部114、設定データ計算部115、項目データ設定部116、Gコード指定部117、Gコード入力部118、及びプログラム生成部119を有する。
<入力部12>
 入力部12は、例えば、キーボードや、後述する表示部13に配置されたタッチパネル等であり、工作機械(図示しない)の加工プログラムに使用するGコードの指定等の入力をユーザから受け付ける。
<表示部13>
 表示部13は、例えば、液晶ディスプレイ等であり、後述するGコード登録部110の制御指示に基づいて、カスタムGコードを登録する登録画面を表示する。また、表示部13は、後述する設定画面制御部111の制御指示に基づいて、CADデータ表示部としてカスタムGコードを用いて生成するワークのCADデータを表示しカスタムGコードの設定項目を自動的に選択し設定する設定画面を表示する。なお、登録画面や設定画面等については後述する。
<記憶部14>
 記憶部34は、ROM(Read Only Memory)やHDD(Hard Disk Drive)等であり、形状情報記憶部141、紐付け情報記憶部142、及び解析要素記憶部143を有する。
 形状情報記憶部141は、工作機械(図示しない)に加工動作させることにより生成するワークの形状を示すCADデータ等を格納する。
 紐付け情報記憶部142は、加工プログラムの生成において使用するカスタムGコードの複数のパラメータ(以下、「設定項目」ともいう)の数値を、当該加工プログラムが生成するワークのCADデータを用いて設定するために、カスタムGコードと、複数の設定項目と、設定項目毎にCADデータから選択される形状(以下、「選択形状」ともいう)の種類、CADデータから抽出される選択形状のデータの種類(以下、「抽出データ種類」ともいう)、及び同じ選択形状から設定される別の設定項目と、が予め紐付けられた紐付け情報を、カスタムGコード毎に格納する。
 ここで、同じ選択形状から設定される別の設定項目について説明する。例えば、後述するように、CADデータから設定項目毎に選択される選択形状として、複数の項目において同じ円が選択された場合、カスタムGコードの設定項目(パラメータ)のうち、当該円の選択形状からX軸方向の中心座標、Y軸方向の中心座標、半径等の複数の抽出データ種類を一度に設定する方が効率的である。そこで、紐付け情報において、「同じ選択形状から設定される別の設定項目」を設定することにより、同じ選択形状から設定される複数の設定項目を一括して設定することができる。
 図2は、紐付け情報のデータ構造の一例を示す図である。
 図2に示すように、紐付け情報は、3つの階層のデータ構造を有する。1つ目の階層には、後述するGコード登録部110により登録されるカスタムGコードが格納される。2つ目の階層には、1つ目の階層に登録されたカスタムGコードに設定されるn個の設定項目1~設定項目nが格納される(nは1以上の整数)。3つ目の階層には、2つ目の階層の設定項目毎に、選択形状の種類、抽出データ種類、及び同じ選択形状から設定される別の設定項目が格納される。
 なお、図2に示すように、紐付け情報には、設定項目が設定される順番を示す優先順位の情報が2つ目の階層に格納されてもよい。設定順位については後述する。
 以下、より具体的に、(a)歯車加工するプログラムを呼出すカスタムGコードの場合の紐付け情報と、(b)円周上に複数の穴加工するプログラムを呼出すカスタムGコードの場合の紐付け情報と、について説明する。
(a)歯車加工するプログラムを呼出すカスタムGコードの場合の紐付け情報について
 図3は、歯車のCADデータの一例を示す図である。なお、図3の左側は、例えば、Z軸方向から見たXY平面の歯車のCADデータを示し、歯車の円C1の直径(以下、「ワーク外径」ともいう)が、例えば、130mmに設定される。また、図3の右側は、例えば、Y軸(又はX軸)方向から見たZX平面(又はZY平面)の歯車のCADデータを示し、歯車の直線L1の歯幅(以下、「ワーク歯幅」ともいう)が、例えば、16mmに設定される。
 図4は、図3の歯車を加工するプログラムを呼出すカスタムGコードの場合の紐付け情報の一例を示す図である。
 図4に示すように、紐付け情報の1つ目の階層には、例えば、歯車加工するプログラムを呼出すカスタムGコード「G100」が格納される。また、紐付け情報の2つ目の階層には、設定項目として歯車の円C1の直径を示す「ワーク外径 D」と、歯車の直線L1の歯幅を示す「ワーク歯幅 W」と、が格納される。なお、「D」及び「W」は、アドレス名(カスタムGコードの変数名)を示す。
 また、紐付け情報の3つ目の階層には、設定項目「ワーク外径 D」に対してCADデータから選択される選択形状の種類として円C1の「円」、及びCADデータから抽出される抽出データ種類として円C1の「直径」が格納される。また、設定項目「ワーク歯幅 W」に対してCADデータから選択される選択形状の種類として直線L1の「直線」、及びCADデータから抽出される抽出データ種類として直線L1の「幅」が格納される。
 なお、図3に示すように、設定項目「ワーク外径 D」の選択形状「円」と、設定項目「ワーク歯幅 W」の選択形状「直線」とは形状が異なるため、図4の紐付け情報の3つ目の同じ選択形状から設定される別の設定項目は設定されない。
(b)円周上に複数の穴加工するプログラムを呼出すカスタムGコードの場合の紐付け情報について
 図5は、円周上に等間隔に複数の穴が生成されるワークのCADデータの一例を示す図である。図5は、例えば、Z軸方向から見たXY平面において、半径40mmの円C2の円周上に6つの穴H1~H6が等間隔に生成されるワークのCADデータを示す。
 図6は、図5の円周上に等間隔に複数の穴加工するプログラムを呼出すカスタムGコードの場合の紐付け情報の一例を示す図である。
 図6に示すように、紐付け情報の1つ目の階層には、例えば、円周上に等間隔に複数の穴加工するプログラムを呼出すカスタムGコード「G200」が格納される。また、紐付け情報の2つ目の階層には、設定項目として円C2のX軸方向の中心座標を示す「中心座標 X」及びY軸方向の中心座標を示す「中心座標 Y」と、当該円C2の半径を示す「半径 R」と、が格納される。
 また、紐付け情報の2つ目の階層には、例えばX軸方向の直線をL20とした場合、設定項目として、直線L20と、中心点と最初の穴H1とを結ぶ直線L21とのなす角度(例えば、60°)を示す「開始角度 S」と、直線L20と、中心点と最後の穴H6とを結ぶ直線L26とのなす角度(例えば、210°)を示す「終了角度 E」と、穴H1と穴H2との間の直線L21と直線L22とのなす角度(例えば、30°)を示す「角度間隔 I」と、が格納される。
 また、紐付け情報の3つ目の階層には、設定項目「中心座標 X」に対してCADデータから選択される選択形状の種類として「円」、及びCADデータから抽出される抽出データ種類として「中心点」が格納される。また、設定項目「中心座標 Y」に対してCADデータから選択される選択形状の種類として同じ「円」、及びCADデータから抽出される抽出データ種類「中心点」が格納されるとともに、同じ選択形状から設定される別の設定項目に「中心座標 X」が格納される。また、設定項目「半径 R」に対してCADデータから選択される選択形状の種類として同じ「円」、及びCADデータから抽出される抽出データ種類として「半径」が格納されるとともに、同じ選択形状から設定される別の設定項目に「中心座標 X」が格納される。
 そうすることで、後述するように、数値制御装置10は、図5のCADデータの円C2が選択された場合、設定項目「中心座標 X」、「中心座標 Y」、及び「半径 R」の設定を一括して行うことができる。
 また、紐付け情報の3つ目の階層には、設定項目「開始角度 S」に対してCADデータから選択される選択形状の種類として「2つの直線」、及びCADデータから抽出される抽出データ種類として「角度」が格納される。また、設定項目「終了角度 E」に対してCADデータから選択される選択形状の種類として「2つの直線」、及びCADデータから抽出される抽出データ種類として「角度」が格納される。また、設定項目「角度間隔 I」に対してCADデータから選択される選択形状の種類として「2つの直線」、及びCADデータから抽出される抽出データ種類として「角度」が格納される。
 なお、設定項目「開始角度 S」、「終了角度 E」、「角度間隔 I」の選択形状の種類及び抽出データ種類が「2つの直線」及び「角度」と同じとなるため、後述するように、ユーザが設定する際に、ユーザが区別できることが必要となる。このため、図6の紐付け情報として、後述するように、設定項目「開始角度 S」、「終了角度 E」、「角度間隔 I」を設定する設定順を示す優先順位(例えば、各設定項目が表示される項目表示順等)を2つめの階層に設定することとする。
 解析要素記憶部143は、後述するCADデータ解析部112が形状情報記憶部141に記憶されたCADデータを解析することにより、当該CADデータを構成する形状の構成要素を格納する。
<制御部11>
 制御部11は、CPU(Central Processing Unit)、ROM、RAM(Random Access Memory)、CMOS(Complementary Metal-Oxide-Semiconductor)メモリ等を有し、これらはバスを介して相互に通信可能に構成される、当業者にとって公知のものである。
 CPUは数値制御装置10を全体的に制御するプロセッサである。CPUは、ROMに格納されたシステムプログラム及びアプリケーションプログラムを、バスを介して読み出し、システムプログラム及びアプリケーションプログラムに従って数値制御装置10全体を制御する。これにより、図1に示すように、制御部11が、Gコード登録部110、設定画面制御部111、CADデータ解析部112、選択形状受付部113、データ種類取得部114、設定データ計算部115、項目データ設定部116、Gコード指定部117、Gコード入力部118、及びプログラム生成部119の機能を実現するように構成される。RAMには一時的な計算データや表示データ等の各種データが格納される。また、CMOSメモリは図示しないバッテリでバックアップされ、数値制御装置10の電源がオフされても記憶状態が保持される不揮発性メモリとして構成される。
<Gコード登録部110>
 Gコード登録部110は、加工プログラムの生成にあたり、工作機械メーカ等により独自にカスタマイズされたカスタムGコードと、カスタムGコードにおいて設定される少なくとも1つの設定項目と、設定項目毎に設定する形状の種類と、形状から抽出する抽出データの種類とを紐付けた紐付け情報を登録する。
 以下、Gコード登録部110の具体的な登録動作について、(a)図3の歯車の加工するプログラムを呼出すカスタムGコードの場合と、(b)図5の円周上に等間隔に複数の穴加工するプログラムを呼出すカスタムGコードの場合と、をそれぞれ例示して説明する。
(a)図3の歯車の加工するプログラムを呼出すカスタムGコードの場合
 図7は、カスタムGコード「G100」を登録する登録画面の一例を示す図である。
 Gコード登録部110は、例えば、ユーザによる入力部12の入力操作に基づいてカスタムGコードの登録指示を受け付けた場合、図7に示すように、登録画面200を表示部13に表示する。
 図7に示すように、登録画面200は、Gコード210、設定項目220、設定データ230、設定ボタン250、及びキャンセルボタン260を有する。
 Gコード登録部110は、図4の紐付け情報の1つ目の階層に対応するGコード210において、例えば、ユーザによる入力部12の入力操作に基づいて登録する歯車加工するプログラムを呼出すカスタムGコード「G100」の入力を受け付ける。
 Gコード登録部110は、図4の紐付け情報の2つ目の階層に対応する設定項目220において、例えば、ユーザによる入力部12の入力操作に基づいて、Gコード210で入力されたカスタムGコード「G100」で設定される設定項目の項目名と当該項目名に対応するアドレス名(カスタムGコードの変数名)の入力を受け付ける。例えば、歯車加工するプログラムを呼出すカスタムGコード「G100」の場合、設定項目220には、「ワーク外径」の項目名及び「D」のアドレス名と、「ワーク歯幅」の項目名及び「W」のアドレス名とがユーザにより入力される。
 また、Gコード登録部110は、図4の紐付け情報の3つ目の階層に対応する設定データ230において、例えば、ユーザによる入力部12の入力操作に基づいて、設定項目220の設定項目毎に選択形状の種類及び抽出データ種類の入力を受け付ける。具体的には、設定データ230には、例えば、設定項目220の設定項目「ワーク外径 D」に対して、選択形状の種類「円」及び抽出データ種類「直径」がユーザにより設定される。また、設定データ230には、図8に示すように、設定項目220の設定項目「ワーク歯幅 W」に対して、選択形状の種類「直線」及び抽出データ種類「幅」がユーザにより設定される。
 Gコード登録部110は、Gコード210、設定項目220、設定データ230の項目が設定された後、ユーザによる入力部12の入力操作に基づいて設定ボタン250が押下された場合、図4のカスタムGコード「G100」の紐付け情報を登録し紐付け情報記憶部142に記憶する。
 一方、Gコード登録部110は、Gコード210、設定項目220、設定データ230の項目が設定された後、ユーザによる入力部12の入力操作に基づいてキャンセルボタン260が押下された場合、図4のカスタムGコード「100」の紐付け情報の登録をキャンセルする。
(b)図5の円周上に等間隔に複数の穴加工するプログラムを呼出すカスタムGコードの場合
 図9は、カスタムGコード「G200」を登録する場合の登録画面の一例を示す図である。
 Gコード登録部110は、例えば、ユーザによる入力部12の入力操作に基づいてカスタムGコードの登録指示を受け付けた場合、図7と同様に、図9に示す登録画面200を表示部13に表示する。
 Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、上述したように、図6の紐付け情報の1つ目の階層に対応するGコード210にカスタムGコード「G200」の入力を受け付ける。
 Gコード登録部110は、例えば、ユーザによる入力部12の入力操作に基づいて、上述したように、図6の紐付け情報の2つ目の階層に対応する設定項目220において、「中心座標」の項目名及び「X」のアドレス名と、「中心座標」の項目名及び「Y」のアドレス名と、「半径」の項目名及び「R」のアドレス名と、「開始角度」の項目名及び「S」のアドレス名と、「終了角度」の項目名及び「E」のアドレス名と、「角度間隔」の項目名及び「I」のアドレス名と、の入力を受け付ける。
 また、Gコード登録部110は、例えば、ユーザによる入力部12の入力操作に基づいて、図6の紐付け情報の3つ目の階層に対応する設定データ230において、上述したように、設定項目220の設定項目「中心座標 X」に対して、選択形状の種類「円」及び抽出データ種類「中心点」が設定される。また、設定データ230において、図10に示すように、設定項目220の設定項目「中心座標 Y」に対して、選択形状の種類「円」及び抽出データ種類「中心点」がユーザにより設定されるとともに、同じ選択形状から設定される別の設定項目として「中心座標 X」がユーザにより設定される。また、設定データ230において、図11に示すように、設定項目220の設定項目「半径 R」に対して、選択形状の種類「円」及び抽出データ種類「半径」がユーザにより設定されるとともに、同じ選択形状から設定される別の設定項目として「中心座標 X」がユーザにより設定される。
 また、設定データ230において、図12に示すように、設定項目220の設定項目「開始角度 S」に対して、選択形状の種類「2つの直線」及び抽出データ種類「角度」がユーザにより設定される。また、設定データ230において、図13に示すように、設定項目220の設定項目「終了角度 E」に対して、選択形状の種類「2つの直線」及び抽出データ種類「角度」がユーザにより設定される。また、設定データ230において、図14に示すように、設定項目220の設定項目「角度間隔 I」に対して、選択形状の種類「2つの直線」及び抽出データ種類「角度」がユーザにより設定される。
 なお、上述したように、設定項目「終了角度 E」及び「角度間隔 I」の選択形状の種類及び抽出データ種類は、設定項目「開始角度 S」の選択形状の種類「2つの直線」及び抽出データ種類「角度」と同じである。このため、図13及び図14に示すように、Gコード登録部110は、設定項目「開始角度 S」、「終了角度 E」、「角度間隔 I」を設定する優先順位を設定する優先順位240を登録画面200に表示してもよい。そして、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、優先順位240において「項目表示順」等の優先順位の入力を受け付けてもよい。
 そして、設定ボタン250が押下された場合、Gコード登録部110は、設定されたカスタムGコード「G200」の図6の紐付け情報が登録され紐付け情報記憶部142に記憶される。
<設定画面制御部111>
 設定画面制御部111は、例えば、ユーザによる入力部12の入力操作に基づいて、カスタムGコードを用いた加工プログラムを生成するためにカスタムGコードの設定項目を自動的に選択し設定する設定画面を表示部13に表示する。
 以下、設定画面制御部111の設定画面の表示動作について、(a)歯車加工するプログラムを呼出すカスタムGコードの場合と、(b)円周上に複数の穴加工するプログラムを呼出すカスタムGコードの場合とのそれぞれについて説明する。
(a)歯車加工するプログラムを呼出すカスタムGコードの場合
 設定画面制御部111は、ユーザによる入力部12の入力操作に基づいて、例えば、図3のCADデータに基づき歯車加工する加工プログラムの生成指示を受け付けた場合、図15に示すように、歯車のCADデータを表示するCADデータ表示画面と、カスタムGコードを選択するGコード選択画面と、を含む設定画面300を表示部13に表示する。
 設定画面制御部111は、ユーザによる入力部12の入力操作に基づいて、後述するGコード指定部117が歯車加工するプログラムを呼出すカスタムGコード「G100」をユーザより指定された場合、図4のカスタムGコード「G100」の紐付け情報に基づいて、図16に示すように、CADデータ表示画面と、設定項目「ワーク外径 D」及び「ワーク歯幅 W」を設定するGコード入力画面と、を含む設定画面300を表示する。
(b)円周上に複数の穴加工するプログラムを呼出すカスタムGコードの場合
 設定画面制御部111は、ユーザによる入力部12の入力操作に基づいて、例えば、図5のCADデータに基づき円周上に複数の穴加工する加工プログラムの生成指示を受け付けた場合、図17に示すように、穴H1~H6が円周上に生成されるワークのCADデータを表示するCADデータ表示画面と、カスタムGコードを選択するGコード選択画面と、を含む設定画面300を表示部13に表示する。なお、設定画面300のCADデータ表示部のCADデータは、図5と同じであり、図5のCADデータの設定値及び符号を用いて説明する。
 設定画面制御部111は、ユーザによる入力部12の入力操作に基づいて、後述するGコード指定部117が円周上に複数の穴加工するプログラムを呼出すカスタムGコード「G200」をユーザより指定された場合、図6のカスタムGコード「G200」の紐付け情報に基づいて、図18に示すように、CADデータ表示画面と、設定項目「中心座標 X」、「中心座標 Y」、「半径 R」、「開始角度 S」、「終了角度 E」、及び「角度間隔 I」を設定するGコード入力画面と、を含む設定画面300を表示する。
 ここで、図6の紐付け情報が示すように、設定項目「中心座標 Y」及び「半径 R」は同じ選択形状「円」から設定される別の設定項目「中心座標 X」と関連することから、設定画面制御部111は、同じマーク(例えば、「*」等)、及び当該マークの説明文を付けて表示する。
 そうすることで、ユーザは、同じ選択形状から設定される設定項目であることを知ることができる。
 また、図6の紐付け情報が示すように、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」は、選択形状の種類「2つの直線」及び抽出データ種類「角度」で同じである。このため、図6の紐付け情報の優先順位(例えば、項目表示順)に基づいて、設定画面制御部111は、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」の表示順に「1」、「2」、「3」等のマーク、及び当該マークの説明文を付けて表示部13に表示する。
 そうすることで、ユーザは、設定項目の設定順位を知ることができる。
<CADデータ解析部112>
 CADデータ解析部112は、例えば、形状情報記憶部141に記憶され、図16又は図18の設定画面300に表示されたCADデータを解析し、当該CADデータを構成する形状(例えば、「円」や「直線」等)を抽出する。CADデータ解析部112は、抽出した形状を解析要素として解析要素記憶部143に記憶する。
<選択形状受付部113>
 選択形状受付部113は、例えば、解析要素記憶部143の解析要素を用いて、表示部13に表示されたCADデータが示す形状のうちユーザにより選択された形状を選択形状として受け付ける。
 具体的には、選択形状受付部113は、例えば、ユーザによる入力部12の入力操作に基づいて、図16の設定画面300においてCADデータの形状のうち歯車の外径を示す円C1を選択形状として受け付ける。また、選択形状受付部113は、図16の設定画面300においてCADデータの形状のうち歯車の歯幅を示す直線L1を選択形状としてユーザから受け付けてもよい。
 一方、選択形状受付部113は、ユーザによる入力部12の入力操作に基づいて、図18の設定画面300においてCADデータの形状のうち穴H1~H6が円周上に生成される円C2を選択形状として受け付けてもよい。また、選択形状受付部113は、図18の設定画面300においてCADデータの形状のうち開始角度の角度をなす2つの直線L20、L21、終了角度の角度をなす2つの直線L20、L26、又は角度間隔の角度をなす2つの直線L21、L22を選択形状としてユーザから受け付けてもよい。
<データ種類取得部114>
 データ種類取得部114は、選択形状受付部113により受け付けた選択形状で紐付け情報記憶部142に問い合わせして、選択形状に対する設定項目及び抽出データ種類を取得する。
 具体的には、データ種類取得部114は、例えば、図16の設定画面300において選択形状受付部113から歯車の外径を示す円C1を選択形状として受け付けた場合、紐付け情報記憶部142に記憶された図4の紐付け情報に基づいて、受け付けた選択形状「円」に対して設定項目「ワーク外径 D」と抽出データ種類「直径」とを取得する。また、データ種類取得部114は、図16の設定画面300において選択形状受付部113から歯車の歯幅を示す直線L1を選択形状として受け付けた場合、図4の紐付け情報に基づいて受け付けた選択形状「直線」に対して設定項目「ワーク歯幅 W」と抽出データ種類「幅」とを取得してもよい。
 一方、データ種類取得部114は、例えば、図18の設定画面300において選択形状受付部113から穴H1~H6が円周上に等間隔に生成される円C2を選択形状として受け付けた場合、紐付け情報記憶部142に記憶された図6の紐付け情報に基づいて、受け付けた選択形状「円」に対して設定項目「中心座標 X」、「中心座標 Y」、及び「半径 R」と、抽出データ種類「中心点」及び「半径」と、を取得してもよい。
 また、データ種類取得部114は、図18の設定画面300において選択形状受付部113から2つの直線L20、L21(又は直線L20、L26や直線L21、L22)を選択形状として受け付けた場合、図6の紐付け情報に基づいて受け付けた選択形状「2つの直線」に対して設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」と、を取得してもよい。
<設定データ計算部115>
 設定データ計算部115は、データ種類取得部114により取得された設定項目及び抽出データ種類と、選択形状受付部113により受け付けた選択形状と、に基づいて設定データを算出する。
 具体的には、例えば、選択形状受付部113が、図16の設定画面300において歯車の外径を示す円C1を選択形状としてユーザより受け付けた場合、上述したように、データ種類取得部114は、設定項目「ワーク外径 D」及び抽出データ種類「直径」を取得する。この場合、設定データ計算部115は、CADデータの円C1に設定されている直径の設定値(例えば、「130mm」)を設定データとして算出する。
 また、選択形状受付部113が、図16の設定画面300において歯車の歯幅を示す直線L1を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「ワーク歯幅 W」及び抽出データ種類「幅」を取得する。設定データ計算部115は、CADデータの直線L1に設定されている歯幅の設定値(例えば、「16mm」)を設定データとして算出してもよい。
 一方、例えば、選択形状受付部113が、図18の設定画面300において穴H1~H6が円周上に生成される円C2を選択形状としてユーザより受け付けた場合、データ種類取得部114は、上述したように、設定項目「中心座標 X」、「中心座標 Y」及び「半径 R」と、抽出データ種類「中心点」及び「半径」と、を取得する。この場合、上述したように、設定項目「中心座標 X」は、設定項目「中心座標 Y」及び「半径 R」と同じ選択形状から設定される別の設定項目として図6の紐付け情報に登録されているため、設定データ計算部115は、CADデータの円C2に設定されている設定値(例えば、中心座標(0,0)及び半径「40mm」)を設定データとして算出してもよい。
 また、選択形状受付部113が、図18の設定画面300において2つの直線L20、L21を選択形状としてユーザより受け付けた場合、データ種類取得部114は、上述したように、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」とを取得する。この場合、上述したように、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」は、選択形状の種類が「2つの直線」及び抽出データ種類が「角度」で同じであることから、優先順位(例えば、項目表示順等)が図6の紐付け情報に登録されている。このため、設定データ計算部115は、図6の紐付け情報の優先順位に基づいて、例えば、CADデータの2つの直線L20、L21のなす角度の設定値(例えば、「60°」等)を、1番目の設定順の設定項目「開始角度 S」の設定データとして算出してもよい。
<項目データ設定部116>
 項目データ設定部116は、設定データ計算部115により算出された設定データを、設定画面300の設定項目のうちデータ種類取得部114により取得された設定項目に設定する。
 具体的には、選択形状受付部113が、図16の設定画面300において、例えば図19に示すように、円C1を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「ワーク外径 D」及び抽出データ種類「直径」を取得し、設定データ計算部115は、CADデータの円C1に設定されている直径の設定値(例えば、「130mm」)を設定データとして算出する。そして、項目データ設定部116は、図19に示すように、設定データ計算部115により算出された設定データを、データ種類取得部114により取得された設定項目「ワーク外径 D」に設定する。
 次に、選択形状受付部113が、図19の設定画面300において、例えば図20に示すように、直線L1を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「ワーク歯幅 W」及び抽出データ種類「幅」を取得し、設定データ計算部115は、CADデータの直線L1に設定されている歯幅の設定値(例えば、「16mm」)を設定データとして算出する。そして、項目データ設定部116は、図20に示すように、設定データ計算部115により算出された設定データを、データ種類取得部114により取得された設定項目「ワーク歯幅 W」に設定する。
 一方、選択形状受付部113が、図18の設定画面300において、図21に示すように、円C2を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「中心座標 X」、「中心座標 Y」及び「半径 R」と、抽出データ種類「中心点」及び「半径」と、を取得し、設定データ計算部115は、CADデータの円C2に設定されている設定値(例えば、中心座標(0,0)及び半径「40mm」)を設定データとして算出する。上述したように、設定項目「中心座標 Y」及び「半径 R」は同じ選択形状から設定される別の設定項目「中心座標 X」と関連することから、項目データ設定部116は、図20に示すように、設定データ計算部115により算出された設定データを、データ種類取得部114により取得された設定項目「中心座標 X」、「中心座標 Y」及び「半径 R」に一括して設定する。
 次に、選択形状受付部113が、図21の設定画面300において、図22に示すように、2つの直線L20、L21を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」とを取得する。設定データ計算部115は、上述したように、図6の紐付け情報の優先順位に基づいて、例えば、CADデータの2つの直線L20、L21のなす角度の設定値(例えば、「60°」)を、1番目の表示順の設定項目「開始角度 S」の設定データとして算出する。項目データ設定部116は、図22に示すように、設定データ計算部115により算出された設定データを、データ種類取得部114により取得された設定項目「開始角度 S」に設定する。
 次に、選択形状受付部113が、図22の設定画面300において、図23に示すように、2つの直線L20、L26を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」とを取得する。設定データ計算部115は、図6の紐付け情報の優先順位に基づいて、CADデータの2つの直線L20、L26のなす角度の設定値(例えば、「210°」)を、2番目の表示順の設定項目「終了角度 E」の設定データとして算出する。項目データ設定部116は、図23に示すように、設定データ計算部115により算出された設定データを、データ種類取得部114により取得された設定項目「終了角度 E」に設定する。
 最後に、選択形状受付部113が、図23の設定画面300において、図24に示すように、2つの直線L21、L22を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」とを取得する。設定データ計算部115は、図6の紐付け情報の優先順位に基づいて、CADデータの2つの直線L21、L22のなす角度の設定値(例えば、「30°」)を、3番目の表示順の設定項目「角度間隔 I」の設定データとして算出する。項目データ設定部116は、図24に示すように、設定データ計算部115により算出された設定データを、データ種類取得部114により取得された設定項目「角度間隔 I」に設定する。
<Gコード指定部117>
 Gコード指定部117は、例えば、図15又は図17に示すように、カスタムGコードの設定項目を自動的に選択し設定する表示部13に表示された設定画面300において、ユーザによる入力部12の入力操作に基づいて、カスタムGコードを指定する。
<Gコード入力部118>
 Gコード入力部118は、例えば、図20又は図24に示す設定画面300において指定されたカスタムGコード及び設定された各設定項目の設定データを、後述するプログラム生成部119に入力する。
<プログラム生成部119>
 プログラム生成部119は、例えば、Gコード入力部118により入力されたカスタムGコード及び各設定項目の設定データを用いて加工プログラムを生成する。
<数値制御装置10の登録処理>
 次に、図25を参照しながら、数値制御装置10の登録処理の流れを説明する。
 図25は、数値制御装置10の登録処理について説明するフローチャートである。ここで示すフローは、ユーザからカスタムGコードの登録指示を受け付ける度に実行される。
 ステップS41において、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいてカスタムGコードの登録指示を受け付け、登録画面200を表示部13に表示する。
 ステップS42において、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、登録画面200のGコード210に登録するカスタムGコードを受け付ける。
 ステップS43において、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、登録画面200の設定項目220において、ステップS42で入力されたカスタムGコードの設定項目の項目名及びアドレス名(カスタムGコードの変数名)を受け付ける。
 ステップS44において、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、登録画面200の設定データ230において、設定項目220の設定項目毎に選択形状の種類、抽出データ種類、及び同じ選択形状から設定される別の設定項目を設定する。
 ステップS45において、Gコード登録部110は、選択形状の種類及び抽出データ種類が同じ複数の設定項目があるか否かを判定する。選択形状の種類及び抽出データ種類が同じ複数の設定項目がある場合、処理はステップS46に進む。一方、選択形状の種類及び抽出データ種類が同じ複数の設定項目がない場合、処理はステップS47に進む。
 ステップS46において、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、登録画面200の優先順位240において、選択形状の種類及び抽出データ種類が同じ複数の設定項目それぞれを設定する優先順位を設定する。
 ステップS47において、Gコード登録部110は、ユーザによる入力部12の入力操作に基づいて、設定ボタン250が押下された場合、カスタムGコードの紐付け情報を登録し紐付け情報記憶部142に記憶する。
<数値制御装置10のプログラム生成処理>
 次に、図26を参照しながら、数値制御装置10のプログラム生成処理の流れを説明する。
 図26は、数値制御装置10のプログラム生成処理について説明するフローチャートである。ここで示すフローは、ユーザから加工プログラムの生成指示を受け付ける度に実行される。
 ステップS51において、設定画面制御部111は、ユーザによる入力部12の入力操作に基づいて、加工プログラムの生成指示を受け付けた場合、CADデータを表示するCADデータ表示画面とGコード入力画面とを含む設定画面300を表示部13に表示する。
 ステップS52において、Gコード指定部117は、ユーザによる入力部12の入力操作に基づいて、カスタムGコードを指定する。
 ステップS53において、選択形状受付部113は、ユーザによる入力部12の入力操作に基づいて、ステップS51で表示されたCADデータにおいて選択形状を受け付ける。
 ステップS54において、データ種類取得部114は、ステップS53で受け付けた選択形状で紐付け情報記憶部142に問い合わせして、当該選択形状に対する設定項目及び抽出データ種類を取得する。
 ステップS55において、設定データ計算部115は、ステップS53で受け付けた選択形状と、ステップS54で取得された設定項目及び抽出データ種類と、に基づいて設定データを算出する。
 ステップS56において、項目データ設定部116は、ステップS55で算出された設定データを、設定画面300の設定項目のうちステップS54で取得された設定項目に設定する。
 ステップS57において、項目データ設定部116は、全ての設定項目を設定したか否かを判定する。全ての設定項目を設定した場合、処理はステップS58に進む。一方、全ての設定項目を設定していない場合、処理はステップS53に戻る。
 ステップS58において、Gコード指定部117は、全てのカスタムGコードを指定したか否かを判定する。全てのカスタムGコードを指定した場合、処理はステップS59に進む。一方、全てのカスタムGコードを指定していない場合、処理はステップS52に戻る。
 ステップS59において、Gコード入力部118は、指定されたカスタムGコード及び設定された設定項目の設定データを、プログラム生成部119に入力する。
 ステップS60において、プログラム生成部119は、入力されたカスタムGコード及び各設定項目の設定データを用いて加工プログラムを生成する。
 以上により、一実施形態に係る数値制御装置10は、少なくともカスタムGコード毎に設定項目、設定項目毎の選択形状の種類、抽出データ種類、及び同じ選択形状から設定される別の設定項目を紐付け情報として予め登録する。これにより、数値制御装置10は、カスタムGコードの形状に関する各項目を簡単かつ迅速に入力でき、カスタムGコードの入力の手間を省くことができる。
 また、数値制御装置10は、加工プログラムの生成時間を短縮することができる。
 以上、一実施形態について説明したが、数値制御装置10は、上述の実施形態に限定されるものではなく、目的を達成できる範囲での変形、改良等を含む。
 <変形例1>
 一実施形態では、数値制御装置10は、歯車加工するプログラムを呼出すカスタムGコードと、円周上に複数の穴加工するプログラムを呼出すカスタムGコードとの場合の紐付け情報を登録したが、これに限定されない。例えば、数値制御装置10は、任意のカスタムGコードの紐付け情報を登録してもよい。
 <変形例2>
 また例えば、上述の実施形態では、設定画面制御部111は、円周上に複数の穴加工するプログラムを呼出すカスタムGコード「G200」の設定項目のうち「開始角度 S」、「終了角度 E」、及び「角度間隔 I」の設定項目を項目表示順に設定するために、表示順に応じた「1」、「2」、「3」のマークを付けて表示したが、これに限定されない。
 例えば、設定画面制御部111は、紐付け情報において優先順位として「現在選択されている項目」が設定されている場合、ユーザによる入力部12の入力操作に基づいて現在選択中の設定項目に、図27に示すように、四角形等のマーク、及び当該マークの説明文を付けて表示部13に表示してもよい。
 図27は、優先順位が「現在選択されている項目」の場合の設定画面300の一例を示す図である。
 図27に示すように、設定画面300において設定項目「角度間隔 I」がユーザにより選択され、選択形状受付部113が、設定画面300において2つの直線L21、L22を選択形状としてユーザより受け付けた場合、データ種類取得部114は、設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」とを取得する。設定データ計算部115は、設定項目「角度間隔 I」が選択されていることから、CADデータの2つの直線L21、L22のなす角度の設定値(例えば、「30°」)を、選択された設定項目「角度間隔 I」の設定データとして算出する。項目データ設定部116は、図27に示すように、設定データ計算部115により算出された設定データを選択された設定項目「角度間隔 I」に設定する。
 なお、設定項目「開始角度 S」及び「終了角度 E」についても、設定項目「角度間隔 I」の場合と同様に、ユーザにより選択されることで四角形のマークが付けられ設定データが設定される。
<変形例3>
 また例えば、上述の実施形態では、円周上に複数の穴加工するプログラムを呼出すカスタムGコードの設定項目「G200」のうち、設定項目「中心座標 X」は設定項目「中心座標 Y」及び「半径 R」と同じ選択形状から設定される別の設定項目として図6の紐付け情報に登録されるため、項目データ設定部116は、図21に示すように、選択形状受付部113が、穴H1~H6が生成される円C2を選択形状としてユーザより受け付けた場合、設定項目「中心座標 X」、「中心座標 Y」及び「半径 R」に設定データを一括して設定したが、これに限定されない。
 例えば、図6の紐付け情報に優先順位として「設定項目を手動で選択」が登録された場合、項目データ設定部116は、設定項目「中心座標 X」が設定項目「中心座標 Y」及び「半径 R」と同じ選択形状から設定される別の設定項目として紐付け情報に登録されていても、ユーザによる入力部12の入力操作に基づいて、設定項目「中心座標 X」、「中心座標 Y」、及び「半径 R」それぞれを個別に設定するようにしてもよい。この場合、設定画面制御部111は、例えば、図28に示すように、設定項目「中心座標 X」、「中心座標 Y」、及び「半径 R」のうち設定する設定項目をユーザに選択させる画面をポップアップ表示するようにしてもよい。
 そうすることで、ユーザは、項目リストから任意の設定項目に設定データを設定することができる。
 あるいは、図6の紐付け情報に優先順位として「設定項目を手動で選択」が登録された場合、設定画面制御部111は、選択形状受付部113が選択形状をユーザより受け付ける度に、受け付けた選択形状に対する設定項目をユーザに選択させる画面をポップアップ表示してもよい。
 図29に示すように、選択形状受付部113が、設定画面300において2つの直線L21、L22をユーザより受け付けた場合、データ種類取得部114は、図6の紐付け情報に基づいて受け付けた選択形状の2つの直線L21、L22に対して設定項目「開始角度 S」、「終了角度 E」、及び「角度間隔 I」と、抽出データ種類「角度」と、を取得する。設定画面制御部111は、図30に示すように、設定項目「開始角度 S」、「終了角度 E」、「角度間隔 I」のリスト表示した項目選択画面310をポップアップ表示してもよい。設定データ計算部115は、項目選択画面310において設定項目「角度間隔 I」がユーザにより選択された場合、CADデータの2つの直線L21、L22のなす角度の設定値(例えば、「30°」)を、設定項目「角度間隔 I」の設定データとして算出してもよい。項目データ設定部116は、図31に示すように、設定データ計算部115により算出された設定データを、設定項目「角度間隔 I」に設定してもよい。
 このように、項目選択画面310が単一選択リストを表示することで、ユーザは選択ミスを防ぐことができる。
 数値制御装置10の全部又は一部をソフトウェアで構成する場合、数値制御装置10の動作の全部又は一部を記述したプログラムを記憶した、ハードディスク、ROM等の記憶部、演算に必要なデータを記憶するDRAM、CPU、及び各部を接続するバスで構成されたコンピュータにおいて、演算に必要な情報をDRAMに記憶し、CPUで当該プログラムを動作させることで実現することができる。
 これらのプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(Non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(Tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えば、フレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば、光磁気ディスク)、CD-ROM(Read Only Memory)、CD-R、CD-R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM)を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(Transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は、無線通信路を介して、プログラムをコンピュータに供給できる。
 また、これらのプログラムは、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。
 なお、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
 以上を換言すると、本開示の数値制御装置は、次のような構成を有する各種各様の実施形態を取ることができる。
 (1)本開示の数値制御装置10は、独自にカスタマイズされたカスタムGコードと、カスタムGコードにおいて設定される少なくとも1つの項目と、項目毎に設定する形状の種類と、形状から抽出する抽出データの種類とを紐付けた紐付け情報を登録するGコード登録部110と、登録された紐付け情報を保存する紐付け情報記憶部142と、表示部13に表示されたCADデータが示す形状のうちユーザにより選択された形状を受け付ける選択形状受付部113と、選択された形状で紐付け情報記憶部に問い合わせして、選択された形状に対する項目及び抽出データの種類を取得するデータ種類取得部114と、取得された項目及び抽出データの種類と選択された形状とに基づいて設定データを算出する設定データ計算部115と、設定データ計算部115により算出された設定データを取得された項目に設定する項目データ設定部116と、を備える。
 この数値制御装置10によれば、カスタムGコードの形状に関する各項目を簡単かつ迅速に入力できる。
 (2) (1)に記載の数値制御装置10において、Gコード登録部110は、形状の種類及び抽出データの種類が同じ複数の項目がある場合、複数の項目に対して優先順位を設定し紐付け情報に登録してもよい。
 そうすることで、数値制御装置10は、形状の種類及び抽出データの種類が同じ複数の項目に対してどの順番でどの設定項目を設定するかをユーザに知らせることができる。
 (3) (1)又は(2)に記載の数値制御装置10において、Gコード登録部110は、同じ選択された形状から設定される項目が複数ある場合、関連する複数の項目に対して一括して設定できるように紐付け情報に登録してもよい。
 そうすることで、数値制御装置10は、カスタムGコードの入力の手間を省くことができる。
 (4) (2)に記載の数値制御装置10において、項目データ設定部116は、選択された形状に対する項目が1つの場合、当該項目を自動的に選択して算出された設定データを設定し、形状の種類及び抽出データの種類が同じ複数の項目がある場合、設定された優先順位に基づいて項目それぞれを自動的に選択して算出された設定データを設定してもよい。
 そうすることで、数値制御装置10は、加工プログラムの生成時間を短縮することができる。
 (5) (3)に記載の数値制御装置10において、項目データ設定部116は、同じ選択された形状から設定される項目が複数ある場合、関連する複数の項目それぞれに算出された設定データを一括して設定してもよい。
 そうすることで、数値制御装置10は、カスタムGコードの入力の手間をより効率的に省くことができる。
 (6) (2)又は(4)に記載の数値制御装置10において、Gコード登録部110により登録された紐付け情報に基づいて項目と優先順位とを表示する設定画面制御部111をさらに備えてもよい。
 そうすることで、数値制御装置10は、(2)及び(4)と同様の効果を奏することができる。
 (7) (6)に記載の数値制御装置10において、設定画面制御部111は、形状の種類及び抽出データの種類が同じ複数の項目がある場合、複数の前記項目をリスト表示し、項目データ設定部116は、リスト表示された複数の前記項目のうち選択された項目に算出された設定データを設定してもよい。
 そうすることで、数値制御装置10は、(6)と同様の効果を奏することができる。
 10 数値制御装置
 11 制御部
 110 Gコード登録部
 111 設定画面制御部
 112 CADデータ解析部
 113 選択形状受付部
 114 データ種類取得部
 115 設定データ計算部
 116 項目データ設定部
 117 Gコード指定部
 118 Gコード入力部
 119 プログラム生成部
 12 入力部
 13 表示部
 14 記憶部
 141 形状情報記憶部
 142 紐付け情報記憶部
 143 解析要素記憶部

Claims (7)

  1.  独自にカスタマイズされたカスタムGコードと、前記カスタムGコードにおいて設定される少なくとも1つの項目と、前記項目毎に設定する形状の種類と、前記形状から抽出する抽出データの種類とを紐付けた紐付け情報を登録するGコード登録部と、
     登録された前記紐付け情報を保存する紐付け情報記憶部と、
     CADデータ表示部に表示されたCADデータが示す形状のうちユーザにより選択された形状を受け付ける選択形状受付部と、
     選択された前記形状で前記紐付け情報記憶部に問い合わせして、選択された前記形状に対する項目及び抽出データの種類を取得するデータ種類取得部と、
     取得された前記項目及び抽出データの種類と選択された前記形状とに基づいて設定データを算出する設定データ計算部と、
     前記設定データ計算部により算出された前記設定データを取得された前記項目に設定する項目データ設定部と、
     を備える数値制御装置。
  2.  前記Gコード登録部は、前記形状の種類及び前記抽出データの種類が同じ複数の前記項目がある場合、複数の前記項目に対して優先順位を設定し前記紐付け情報に登録する、請求項1に記載の数値制御装置。
  3.  前記Gコード登録部は、同じ選択された前記形状から設定される項目が複数ある場合、関連する複数の項目に対して一括して設定できるように前記紐付け情報に登録する、請求項1又は請求項2に記載の数値制御装置。
  4.  前記項目データ設定部は、
     選択された前記形状に対する項目が1つの場合、当該項目を自動的に選択して算出された前記設定データを設定し、
     前記形状の種類及び前記抽出データの種類が同じ複数の前記項目がある場合、設定された前記優先順位に基づいて項目それぞれを自動的に選択して算出された前記設定データを設定する、請求項2に記載の数値制御装置。
  5.  前記項目データ設定部は、同じ選択された前記形状から設定される項目が複数ある場合、関連する複数の前記項目それぞれに算出された前記設定データを一括して設定する、請求項3に記載の数値制御装置。
  6.  前記Gコード登録部により登録された前記紐付け情報に基づいて前記項目と前記優先順位とを表示する設定順表示部をさらに備える、請求項2又は請求項4に記載の数値制御装置。
  7.  前記設定順表示部は、前記形状の種類及び前記抽出データの種類が同じ複数の前記項目がある場合、該当する複数の前記項目をリスト表示し、
     前記項目データ設定部は、リスト表示された複数の前記項目のうち選択された項目に算出された前記設定データを設定する、請求項6に記載の数値制御装置。
PCT/JP2021/027719 2021-07-27 2021-07-27 数値制御装置 WO2023007581A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/JP2021/027719 WO2023007581A1 (ja) 2021-07-27 2021-07-27 数値制御装置
JP2023537785A JPWO2023007581A1 (ja) 2021-07-27 2021-07-27
CN202180100789.6A CN117716305A (zh) 2021-07-27 2021-07-27 数值控制装置
DE112021007661.2T DE112021007661T5 (de) 2021-07-27 2021-07-27 Numerische Steuervorrichtung

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/027719 WO2023007581A1 (ja) 2021-07-27 2021-07-27 数値制御装置

Publications (1)

Publication Number Publication Date
WO2023007581A1 true WO2023007581A1 (ja) 2023-02-02

Family

ID=85086393

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/027719 WO2023007581A1 (ja) 2021-07-27 2021-07-27 数値制御装置

Country Status (4)

Country Link
JP (1) JPWO2023007581A1 (ja)
CN (1) CN117716305A (ja)
DE (1) DE112021007661T5 (ja)
WO (1) WO2023007581A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020008780A1 (ja) * 2018-07-06 2020-01-09 株式会社アマダホールディングス 切削加工機及び切削加工方法
JP2020061014A (ja) * 2018-10-11 2020-04-16 ファナック株式会社 数値制御方法及び処理装置
JP6719790B1 (ja) * 2019-09-05 2020-07-08 キタムラ機械株式会社 Cadデータによるマシニングセンタの自動運転装置
JP6808106B1 (ja) * 2019-03-05 2021-01-06 三菱電機株式会社 加工プログラム変換装置、数値制御装置、加工プログラム変換方法および機械学習装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6252608A (ja) 1985-09-02 1987-03-07 Fanuc Ltd 対話型ncプログラム作成方法
JPH0354740A (ja) 1989-07-24 1991-03-08 Matsushita Electric Ind Co Ltd 光学情報記録部材および光学情報記録再生装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020008780A1 (ja) * 2018-07-06 2020-01-09 株式会社アマダホールディングス 切削加工機及び切削加工方法
JP2020061014A (ja) * 2018-10-11 2020-04-16 ファナック株式会社 数値制御方法及び処理装置
JP6808106B1 (ja) * 2019-03-05 2021-01-06 三菱電機株式会社 加工プログラム変換装置、数値制御装置、加工プログラム変換方法および機械学習装置
JP6719790B1 (ja) * 2019-09-05 2020-07-08 キタムラ機械株式会社 Cadデータによるマシニングセンタの自動運転装置

Also Published As

Publication number Publication date
JPWO2023007581A1 (ja) 2023-02-02
CN117716305A (zh) 2024-03-15
DE112021007661T5 (de) 2024-02-29

Similar Documents

Publication Publication Date Title
JP6914329B2 (ja) 手作業場ユニット、リモートデータ処理装置、手作業場動作システム、手作業場動作方法、及び、手作業場提供方法
JP6496272B2 (ja) パラメータ設定装置、パラメータ設定プログラム及びパラメータ設定方法
JP6557282B2 (ja) 工作機械制御装置及び生産システム
JP5620825B2 (ja) 複合機械加工の方法および装置
JPWO2015097886A1 (ja) 加工情報管理装置および工具経路生成装置
KR20120085420A (ko) 컴퓨터 수치 제어 공작기계에서 대화형 프로그램을 이용한 가공 형상 입력 장치 및 방법
CN111919182B (zh) Nc程序变换处理方法以及加工处理系统
US11345026B2 (en) Robot program generation apparatus
JP6434434B2 (ja) 加工装置をロボットに接続して加工を行う加工ロボットシステム
JP2020077063A (ja) 情報処理装置
JP2019057262A (ja) 制御装置及びデータ構造
US11402819B2 (en) Screen creation device and screen creation system
JP2021119478A (ja) 情報処理装置
JP2018114576A (ja) オフラインプログラミング装置及び位置パラメータ補正方法
US20040210868A1 (en) Icons and icon representation of process steps for graphic visualization of task-oriented steps
JP2017037460A (ja) 加工システム及び加工方法
JP6638979B2 (ja) 加工工程管理機能付き数値制御装置および加工工程管理プログラム
WO2023007581A1 (ja) 数値制御装置
KR20100135513A (ko) 그래픽 기반의 사용자 인터페이스를 갖는 수치제어시스템
JP2002529843A (ja) 機械部分を生成するための画像cncプログラム
KR20190082118A (ko) 철골구조 건축자재의 천공 가공 설계 방법
JP2002529843A5 (ja)
JP2010089218A (ja) 産業用ロボットの位置教示装置、動作プログラム作成装置、産業用ロボットの位置教示方法およびプログラム
KR20160091069A (ko) 컴퓨터 수치제어 공작기계의 대화형 프로그램에서 복합 공정 등록 장치 및 방법
JP2023117539A (ja) 情報処理装置、工作機械および情報処理プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21951791

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 112021007661

Country of ref document: DE

WWE Wipo information: entry into national phase

Ref document number: 2023537785

Country of ref document: JP