TWI501059B - Machining program interpretation method for machine tool - Google Patents
Machining program interpretation method for machine tool Download PDFInfo
- Publication number
- TWI501059B TWI501059B TW102132913A TW102132913A TWI501059B TW I501059 B TWI501059 B TW I501059B TW 102132913 A TW102132913 A TW 102132913A TW 102132913 A TW102132913 A TW 102132913A TW I501059 B TWI501059 B TW I501059B
- Authority
- TW
- Taiwan
- Prior art keywords
- code
- standard
- program
- instruction
- customized
- Prior art date
Links
Landscapes
- Numerical Control (AREA)
Description
本發明係關於一種解譯方法;特別關於一種用於工具機之工件程式解譯方法,該解譯方法係提供機台操作員一套解譯客制化標準G或客制化標準M碼之方法。The present invention relates to an interpreting method; in particular, to a workpiece program interpreting method for a machine tool, which provides a set of interpreting customized standard G or customized standard M code for a machine operator. method.
一般工件從一開始的設計原型到最後加工完成,其加工流程大致上如第一圖所示,最初的工件設計原型11的外型若過於複雜,必須藉由輔助軟體的協助,例如使用CAD繪圖12繪製出符合工件實際尺寸的3D圖以及使用CAM設計加工流程13根據CAD圖設計出一套完整的加工流程,其整個流程包括加工刀具的選用、加工路徑選擇、進給速率的分配等等,最後再經過後處理14將這些加工路徑轉化成數值控制裝置可以認得的數值控制加工程式17以製成工件成品18。而若最初的工件設計原型11的外型簡單或是有一定的規律,為了加快生產速率或節省開發費用會直接由機台操作員直接撰寫加工程式15,進而持續優化加工程式16,得到最後的數值控制加工程式17以製成工件成品18。Generally, the workpiece is designed from the beginning of the prototype to the final machining. The machining process is roughly as shown in the first figure. If the prototype of the original workpiece design prototype 11 is too complicated, it must be assisted by the auxiliary software, for example, using CAD drawing. 12 draw a 3D map that conforms to the actual size of the workpiece and use the CAM design processing flow 13 to design a complete machining process based on the CAD drawing. The whole process includes the selection of the machining tool, the selection of the machining path, the distribution of the feed rate, and the like. Finally, the post-processing 14 converts these processing paths into numerically-controlled processing programs 17 that the numerical control device can recognize to produce the finished workpiece 18. If the original workpiece design prototype 11 has a simple shape or a certain regularity, in order to speed up the production rate or save the development cost, the machine operator directly writes the processing program 15 directly, and then continuously optimizes the processing program 16 to obtain the final The machining program 17 is numerically controlled to produce the finished workpiece 18 of the workpiece.
然而,使用CAD或CAM等輔助軟體不但浪費成本,也不見得有比較好的效率,在此情形之下就得由機台操作員直接撰寫加工程式,通常機台操作員會運用G、M碼或其他指令來描述加工程式,並搭配機台操作員的操作直覺編修加工程式,然而實際執行加工的過程常會產生重複性的動作,例如使用分度盤機台進行等分孔鑽孔時其加工程式的撰寫如第二圖所示,機台操作員必須直覺地判斷何時該以插銷鎖緊分度盤(M11),以確保加工時旋轉軸位置固定不動,也必須直覺地判斷何時該拔開插銷鬆開分度盤(M10),以進行旋轉軸定位的動作,故在加工程式中編寫如此繁複的鬆開(M10)與鎖緊(M11)分度盤之加工指令,在實際應用上相當不方便。However, the use of auxiliary software such as CAD or CAM is not only a waste of cost, but also has a relatively good efficiency. In this case, the machine operator must directly write the machining program. Usually the machine operator will use the G and M codes. Or other instructions to describe the machining program, and intuitively edit the machining program with the operation of the machine operator. However, the actual machining process often produces repetitive actions, such as machining with equal-division drilling when using an indexing machine. The writing of the program is as shown in the second figure. The machine operator must intuitively judge when the indexing plate (M11) should be locked with the bolt to ensure that the position of the rotating shaft is fixed during machining, and it is necessary to intuitively judge when it should be unplugged. The bolt loosens the indexing plate (M10) for the positioning of the rotary axis, so the complicated machining instructions for loosening (M10) and locking (M11) indexing plates are programmed in the machining program, which is quite practical. inconvenient.
有鑑於上述操作的不便且為了避免重複分度盤定位的鬆開及鎖緊指令輸入,有經驗者會將加工程式中的G00和M11、M10包裝成一個巨集或副程式,改寫成第三圖所示之以巨集(副程式)編程簡化等分孔鑽孔加工程式示意圖,以主程式31加上G100的副程式32的方式簡化編程,但G100僅是一般的客製G碼並非標準G碼必須額外去定義G100,若加工步驟修改了可能就要換一套寫法,對機台操作員來說並無法有效節省編寫加工程式所需的時間。In view of the inconvenience of the above operation and in order to avoid the loosening of the indexing plate positioning and the locking command input, the experienced person will package the G00 and M11, M10 in the processing program into a macro or subprogram, and rewrite it into the third. The figure shows a schematic diagram of a simplified macro drilling (subprogram) programming simplification of the boring drilling program. The programming is simplified by the main program 31 plus the G100 subroutine 32, but the G100 is only a general custom G code and is not standard. The G code must additionally define G100. If the machining step is modified, it may be necessary to change the writing method. It is not effective for the machine operator to save the time required to write the machining program.
綜上所述,如何在原有標準G或標準M碼的指令上,設計出符合工具機適用的客制化G或客制化M碼以提昇程式編寫效率,是機台操作員很重要的產能指標。In summary, how to design a customized G or customized M code in accordance with the original standard G or standard M code instructions to improve the programming efficiency is a very important capacity of the machine operator. index.
為了解決上述有關的問題,本發明之一主要目的在於提供一種用於工具機之工件程式解譯方法,針對機台操作員依原有標準G或標準M碼所設計出來的客制化標準G或客制化標準M碼,取代一般利用標準G或標準M碼以外指令且需額外定義的客制G、M碼,並搭配一套解譯客制化標準G、M碼之方法,可有效節省編寫加工程式所需的時間,且可大幅提昇生產效率。In order to solve the above related problems, one of the main objects of the present invention is to provide a method for interpreting a workpiece program for a machine tool, which is a customized standard G designed by a machine operator according to the original standard G or standard M code. Or custom standard M code, instead of the custom G and M codes that are generally defined by the standard G or standard M code and need to be additionally defined, and with a set of methods for interpreting the customized standard G and M codes, can be effective Save time in writing a machining program and increase productivity.
依據上述之目的,本發明提供一種用於工具機之工件程式解譯方法,其解譯方法包含:載入使用者所欲執行之一具有複數行加工單節指令之工件程式;逐行讀取複數行加工單節指令並進行解譯,並記錄目前讀取之一加工單節指令所屬之層級為一主程式或為一副程式;判斷目前讀取之加工單節指令是否已包含一標準G碼或一標準M碼,若判斷結果為是,則進入標準G碼或標準M碼的解譯流程並繼續進行下一步驟,若判斷結果為否,則進入標準G或標準M碼以外之加工單節指令的解譯;判斷目前讀取之加工單節指令所屬之層級為主程式或為副程式,此一步驟進一步包含:當加工單節指令所屬之層級為主程式時,判斷加工單節指令所含有之標準G碼或標準M碼是否有登錄為一客制化標準G碼或一客制化標準M碼,若判斷結果為是,則進一步呼叫並載入代表客制化標準G碼或客制化標準M碼之一子程式,接著開始逐行讀取子程式中之複數行加工單節指令 並進行解譯,若判斷結果為否,則進行一般標準G碼或M碼的解譯;及當加工單節指令所屬之層級為副程式時,先行判斷副程式是否已是客制化標準G碼或客制化標準M碼,若判斷結果為是,則將目前讀取之加工單節指令所含有之標準G碼或標準M碼進行一般標準G碼或M碼的解譯,若判斷結果為否,再行判斷加工單節指令所含有之標準G碼或標準M碼是否有登錄為一客制化標準G碼或一客制化標準M碼,若判斷結果為是,則進一步呼叫並載入代表客制化標準G碼或客制化標準M碼之一子程式,接著開始逐行讀取子程式中之複數行加工單節指令並進行解譯,若判斷結果為否,則進行一般標準G碼或M碼的解譯;以及判斷加工單節指令是否為一程式結束指令,當加工單節指令為程式結束指令時,依據加工單節指令所屬之層級決定程式結束指令係一主程式的程式結束指令或為一副程式的程式結束指令。According to the above object, the present invention provides a workpiece program interpretation method for a machine tool, the method of decoding includes: loading a workpiece program of a user having a plurality of rows of processing single-segment instructions; The plurality of lines process the single-segment instructions and interpret them, and record that the level at which one of the processing block instructions is currently read is a main program or a sub-program; and whether the currently-processed processing single-segment instruction already contains a standard G Code or a standard M code. If the judgment result is yes, enter the interpretation process of the standard G code or the standard M code and proceed to the next step. If the judgment result is no, the process proceeds to a process other than the standard G or the standard M code. Interpretation of a single-segment instruction; determining whether the currently-processed single-segment instruction belongs to a hierarchy or a sub-program, and this step further includes: determining a processing block when processing a single-segment instruction to be a main program Whether the standard G code or the standard M code contained in the instruction is registered as a customized standard G code or a customized standard M code. If the judgment result is yes, the call is further loaded and loaded to represent the customized standard G. Standard or custom one of M code subroutine, and then starts the read line by line in a plurality of rows subroutine processing of single instruction And interpreting, if the judgment result is no, the general standard G code or M code is interpreted; and when the level of the processing single block instruction is a subprogram, it is first determined whether the subprogram is already a customized standard G The code or the customized standard M code, if the judgment result is yes, the standard G code or the standard M code contained in the currently processed processing block instruction is interpreted by the general standard G code or M code, if the judgment result is If not, it is judged whether the standard G code or the standard M code contained in the processing single block instruction is registered as a customized standard G code or a customized standard M code. If the judgment result is yes, then further call and Loading one of the sub-programs representing the customized standard G code or the customized standard M code, and then starting to read the plurality of lines in the sub-program to process the block instruction and interpreting, if the judgment result is no, proceed Interpretation of the general standard G code or M code; and determining whether the processing block instruction is a program end instruction, and when the machining block instruction is a program end instruction, the instruction end system is determined according to the hierarchy to which the machining block instruction belongs. Program end instruction or A program end program.
經由本發明所提供之用於工具機之工件程式解譯方法,針對機台操作員依原有標準G、M碼所設計出來的客制化標準G、M碼,提供一套解譯客制化標準G、M碼之方法,可有效縮短編寫加工程式所需的時間,進而提昇加工效能以及達到較佳的系統穩定性。By means of the workpiece program interpretation method for the machine tool provided by the invention, a set of interpretation custom system is provided for the customized operator G and M code designed by the machine operator according to the original standard G and M codes. The standard G and M code methods can effectively shorten the time required to write a processing program, thereby improving processing efficiency and achieving better system stability.
11‧‧‧工件設計原型11‧‧‧Workpiece design prototype
12‧‧‧使用CAD繪圖12‧‧‧Using CAD drawing
13‧‧‧使用CAM設計加工流程13‧‧‧Use CAM design process
14‧‧‧後處理14‧‧‧ Post-processing
15‧‧‧直接撰寫加工程式15‧‧‧Direct writing process
16‧‧‧優化加工程式16‧‧‧Optimized processing program
17‧‧‧數值控制加工程式17‧‧‧Numerical Control Processing Program
18‧‧‧工件成品18‧‧‧ finished workpiece
31‧‧‧等分孔鑽孔加工程式之主程式31‧‧‧ Main program of the sub-hole drilling program
32‧‧‧等分孔鑽孔加工程式之巨集32‧‧‧Split-hole drilling program
61‧‧‧客制化標準G00巨集61‧‧‧Customized Standard G00 Macro
62‧‧‧客制化標準G01巨集62‧‧‧Customized Standard G01 Macro
步驟40‧‧‧載入欲執行之工件程式Step 40‧‧‧Load the workpiece program to be executed
步驟41‧‧‧逐行讀取欲執行之工件程式Step 41‧‧‧Read the workpiece program to be executed line by line
步驟42‧‧‧讀入單行工件程式之加工單節指令Step 42‧‧‧Reading a single-row workpiece program
步驟43‧‧‧判斷是否進入標準G碼或標準M碼的解譯Step 43‧‧‧Determine whether to enter the interpretation of the standard G code or the standard M code
步驟44‧‧‧進入標準G碼或標準M碼的解譯流程Step 44‧‧‧ Enter the interpretation process of standard G code or standard M code
步驟45‧‧‧進入標準G碼或標準M碼以外指令的解譯Step 45‧‧‧ Interpretation of instructions outside the standard G code or standard M code
步驟46‧‧‧程式結束指令Step 46‧‧‧Program End Instructions
步驟47‧‧‧回到上一層級Step 47‧‧‧Return to the previous level
步驟48‧‧‧解譯完成Step 48‧‧‧ Interpretation completed
步驟440‧‧‧判斷目前讀取之該行加工單節指令所屬之層級為主程式或副程式Step 440 ‧ ‧
步驟441‧‧‧所屬層級為主程式Step 441‧‧‧ belongs to the main program
步驟442‧‧‧所屬層級為副程式Step 442‧‧‧ belongs to the subprogram
步驟443‧‧‧判斷是否有登錄為客制化標準G碼或客制化標準M碼Step 443‧‧‧Check if there is a login as a custom standard G code or a custom standard M code
步驟444‧‧‧進入一般標準G碼或標準M碼的解譯Step 444‧‧‧Enter the interpretation of the general standard G code or standard M code
步驟445‧‧‧載入客制化標準G碼或客制化標準M碼的子程式Step 445‧‧‧ Load a subroutine of a custom standard G code or a custom standard M code
步驟446‧‧‧判斷副程式是否已是客制化標準G碼或客制化標準M碼Step 446‧‧‧Check if the subprogram is already a custom standard G code or a custom standard M code
第1圖係習知加工流程示意圖。Figure 1 is a schematic diagram of a conventional processing flow.
第2圖係習知等分孔鑽孔加工程式示意圖。Figure 2 is a schematic diagram of a conventional aliquot drilling process.
第3圖係習知以巨集(副程式)編程簡化等分孔鑽孔加工程式示意圖。Figure 3 is a schematic diagram of a simplified aliquot drilling process program programmed with a macro (subprogram).
第4圖係本發明之用於工具機之解譯方法流程圖。Figure 4 is a flow chart of the method for interpreting the machine tool of the present invention.
第5圖係本發明之標準G碼或標準M碼的解譯流程圖。Figure 5 is a flow chart for interpretation of the standard G code or standard M code of the present invention.
第6圖係本發明之客制化標準G碼或客制化標準M碼的主程式與巨集示意圖。Figure 6 is a schematic diagram of the main program and macro of the customized standard G code or the customized standard M code of the present invention.
由於本發明主要係揭露一種用於工具機之工件程式解譯方法,針對機台操作員依原有標準G、M碼所設計出來的客制化標準G、M碼,提供一套解譯客制化標準G、M碼之方法。而與本發明有關之工具機之工件程式的基本原理與功能,已為相關技術領域具有通常知識者所能明瞭,故以下文中之說明,僅針對與本發明用於工具機之解譯方法其特徵處進行詳細說明。此外,於下述內文中之圖式,亦並未依據實際之相關尺寸完整繪製,其作用僅在表達與本發明特徵有關之示意圖。The present invention mainly discloses a workpiece program interpretation method for a machine tool, and provides a set of interpreters for the customized standard G and M codes designed by the machine operator according to the original standard G and M codes. The method of standardizing G and M codes. The basic principles and functions of the workpiece program of the machine tool related to the present invention are well known to those skilled in the relevant art, and therefore, the following description is directed only to the method for interpreting the machine tool with the present invention. The features are described in detail. In addition, the drawings in the following texts are not completely drawn in accordance with actual relevant dimensions, and their function is only to show a schematic diagram relating to the features of the present invention.
首先,請參閱第4圖,第4圖係為本發明之用於工具機之工件程式解譯方法流程圖,針對機台操作員依原有標準G或標準M碼所設計出來的客制化標準G或客制化標準M碼,所提供的一套解譯客制化標準G、M碼之流程。如第4圖所示,在本實施例中,用於工具機之工件程式解譯方法流程,係包括下列步驟:First, please refer to FIG. 4, which is a flow chart of the method for interpreting the workpiece program for the machine tool according to the present invention, and is customized for the machine operator according to the original standard G or the standard M code. Standard G or custom standard M code, a set of procedures for interpreting customized G and M codes. As shown in FIG. 4, in the embodiment, the flow of the workpiece program interpretation method for the machine tool includes the following steps:
步驟40:載入使用者所欲執行之工件程式;其工件程式具有複數行加工單節指令,將一工件程式載入可供工具機動作以執行加工作業,接著進入步驟41。Step 40: Load the workpiece program to be executed by the user; the workpiece program has a plurality of processing unit instructions, and a workpiece program is loaded for the machine tool to perform the machining operation, and then proceeds to step 41.
步驟41:逐行讀取所欲執行之工件程式開始進行解譯,並記錄目前讀取之該行工件程式所屬之層級為主程式或為副程式,接著進入步驟42。Step 41: The program to be executed is read line by line to start the interpretation, and the level of the currently read program of the line belongs to the main program or the sub program, and then proceeds to step 42.
步驟42:讀入單行工件程式之加工單節指令;此一步驟主要係讀取工件程式中複數行加工單節指令之其中一加工單節指令,接著進入步驟43。Step 42: Read the processing block instruction of the single line workpiece program; this step mainly reads one of the processing block instructions of the plurality of row processing block instructions in the workpiece program, and then proceeds to step 43.
步驟43:判斷目前讀取之加工單節指令是否已包含一標準G碼或一標準M碼,若判斷結果為是,則繼續步驟44進入標準G碼或標準M碼的解譯流程,若判斷結果為否,則進入步驟45進行標準G或標準M碼以外之加工單節指令的解譯。Step 43: Determine whether the currently processed processing block instruction already includes a standard G code or a standard M code. If the determination result is yes, proceed to step 44 to enter the interpretation process of the standard G code or the standard M code, if it is determined If the result is no, the process proceeds to step 45 to interpret the processing block instructions other than the standard G or standard M code.
步驟44:進入標準G碼或標準M碼的解譯流程;此流程主要是針對已客制的標準G或標準M碼提供的解譯流程如第5圖所示。Step 44: Enter the interpretation process of the standard G code or the standard M code; this process is mainly for the interpretation process provided by the customized standard G or standard M code as shown in FIG. 5.
步驟45:進行標準G或標準M碼以外之加工單節指令的解譯;所述加工單節指令除了標準G碼或標準M碼以外,還包括其他加工單節指令或非標準G碼、M碼的一般客制G、M碼,此步驟完成後即代表完 成該行的解譯,接著將會讀取次一行工件程式繼續進行解譯。Step 45: Perform interpretation of a processing block instruction other than the standard G or standard M code; the processing block instruction includes other processing single block instructions or non-standard G code, M in addition to the standard G code or the standard M code. The general custom G and M codes of the code, after the completion of this step, the representative is finished. In the interpretation of the line, the next line of the workpiece program will continue to be interpreted.
步驟46:讀取至該行加工單節指令為程式結束指令時,依據該行加工單節指令所屬之層級判斷其程式結束指令係代表主程式結束或為副程式結束,若判斷該行工件程式所屬之層級為副程式即代表其程式結束指令係代表副程式的結束,則需跳至步驟47回到上一層級的主程式繼續解譯,若判斷該行工件程式所屬之層級為主程式即代表其程式結束指令係代表主程式的結束,則跳至最後步驟48判定解釋完成。Step 46: When the processing of the processing block instruction is the program end instruction, the program end instruction is judged to be the end of the main program or the end of the sub program according to the level to which the processing unit block instruction belongs, and if the line workpiece program is judged If the sub-program is a sub-program, that is, the end program of the program represents the end of the sub-program, then you need to skip to step 47 and return to the previous level to continue the interpretation. If you judge that the program of the line belongs to the main program, On behalf of the end of program, the command represents the end of the main program, then jump to the last step 48 to determine the completion of the interpretation.
步驟47:回到上一層級;此步驟所指的上一層級係指回到主程式的層級,當該行加工單節指令所屬之層級為副程式代表主程式尚未完成解譯,必須跳回到上一層級繼續主程式的解譯。Step 47: Return to the previous level; the upper level referred to in this step refers to the level of returning to the main program. When the processing unit of the line belongs to the level of the subprogram, the subprogram indicates that the main program has not been interpreted yet, and must jump back. Go to the previous level to continue the interpretation of the main program.
步驟48:解釋完成,即代表主程式結束,完成整個欲加工之工件程式的解譯。Step 48: The explanation is completed, that is, the end of the main program, and the interpretation of the entire workpiece program to be processed is completed.
請繼續參閱第5圖,係本發明之標準G碼或標準M碼的解譯流程圖,係針對已客制的標準G、M碼所提供的解譯流程,於上述之流程中,步驟44進入標準G碼或標準M碼的解譯流程,進一步包含以下步驟:Please refer to FIG. 5, which is a flowchart of interpretation of the standard G code or standard M code of the present invention, which is an interpretation process provided by the customized standard G and M codes. In the above process, step 44 Entering the standard G code or standard M code interpretation process, further includes the following steps:
步驟440:判斷目前讀取之該行加工單節指令所屬之層級為主程式或副程式,當該行加工單節指令所屬之層級為主程式時,則跳至步驟441繼續進行,而當該行加工單節指令所屬之層級為副程式時,則跳至步驟442繼續進行。Step 440: judging that the level of the processing single block instruction currently read belongs to the main program or the subprogram. When the processing of the processing unit of the line belongs to the main program, the process jumps to step 441 to continue. When the level to which the line processing block instruction belongs is a subprogram, the process jumps to step 442 to continue.
步驟441:當該行加工單節指令所屬之層級為主程式時,直接進入步驟443判斷該行加工單節指令所含有之標準G碼或標準M碼是否有登錄為一客制化標準G碼或一客制化標準M碼。Step 441: When the level of the processing of the single-segment instruction belongs to the main program, proceed directly to step 443 to determine whether the standard G code or the standard M code included in the processing unit of the line is registered as a customized standard G code. Or a custom standard M code.
步驟442:當該行加工單節指令所屬之層級為副程式時,進入步驟446繼續判斷副程式是否已是客制化標準G碼或客制化標準M碼。Step 442: When the level to which the processing block instruction belongs belongs to the subprogram, proceed to step 446 to continue to determine whether the subprogram is already a customized standard G code or a customized standard M code.
步驟443:判斷加工單節指令所含有之標準G碼或標準M碼是否有登錄為客制化標準G碼或客制化標準M碼,若判斷結果為是,則進入步驟445進一步呼叫並載入代表客制化標準G碼或客制化標準M碼之一子程式,若判斷結果為否,則跳至步驟444進行一般標準G碼或標準M碼的解譯;此步驟中載入的客制化標準G碼或客制化標準M碼的子程式也 可視為一個工件程式,因此也需進一步對此子程式進行解譯,其解譯方式與主程式一樣必須逐行進行解譯。Step 443: Determine whether the standard G code or the standard M code included in the processing block instruction is registered as a customized standard G code or a customized standard M code. If the determination result is yes, proceed to step 445 to further call and carry Enter a subroutine representing the customized standard G code or the customized standard M code. If the judgment result is no, then go to step 444 to perform the interpretation of the general standard G code or the standard M code; Customized standard G code or custom standard M code subroutine It can be regarded as a workpiece program, so the subroutine needs to be further interpreted. The interpretation method must be interpreted line by line like the main program.
步驟444:一般標準G碼或標準M碼的解譯;此步驟完成後即代表標準G碼或標準M碼解譯結束,則會跳至步驟45繼續執行進行標準G或標準M碼以外之加工單節指令的解譯。Step 444: Interpretation of the general standard G code or the standard M code; after the completion of the step, the standard G code or the standard M code is interpreted, and then skip to step 45 to continue the processing other than the standard G or standard M code. Interpretation of single-segment instructions.
步驟445:載入客制化標準G碼或客制化標準M碼的子程式;所述客制化標準G碼或客制化標準M碼的子程式也可以是使用包含了邏輯語法的巨集程式。Step 445: loading a subroutine of a customized standard G code or a customized standard M code; the subroutine of the customized standard G code or the customized standard M code may also be a macro that uses a logical grammar Set program.
步驟446:判斷副程式是否已是客制化標準G碼或客制化標準M碼,若判斷結果為是,則進行步驟444將目前讀取之該行加工單節指令所含有之標準G碼或標準M碼進行一般標準G碼或M碼的解譯,若判斷結果為否,則會跳至步驟443繼續後續判斷。Step 446: Determine whether the subroutine is a customized standard G code or a customized standard M code. If the judgment result is yes, proceed to step 444 to process the standard G code included in the processing unit of the currently read line. Or the standard M code is used to interpret the general standard G code or M code. If the judgment result is no, then the process jumps to step 443 to continue the subsequent judgment.
根據上述之說明,經由本發明所提供之用於工具機之解譯方法,可針對機台操作員依原有標準G、M碼所設計出來的客制化標準G、M碼,提供一套解譯客制化標準G、M碼之方法,藉此方法可達成各種機台的加工需求,且於加工程式撰寫上更為簡便,能提高加工的效率。According to the above description, the method for interpreting the machine tool provided by the present invention can provide a set of customized standard G and M codes designed by the machine operator according to the original standard G and M codes. Interpreting the method of customizing standard G and M codes, this method can achieve the processing requirements of various machines, and it is easier to write the processing program, which can improve the processing efficiency.
以分度盤的應用為例,請參閱第6圖,係為本發明之客制化標準G碼或客制化標準M碼的主程式與巨集示意圖。如第6圖所示,首先,將標準G碼G00與G01登錄為客制化標準G碼,並新增G00與G01兩個巨集,其中巨集寫法如第6圖中61、62所示,進一步假設目前控制軸向有X、Y、Z、C,其中C代表旋轉軸,在巨集中以C作為判斷指令,表示G00與G01兩個巨集為旋轉軸定位指令之客制化標準G碼,自動判斷是否進行旋轉軸定位,若有下判斷C的指令,則下M11以進行鎖緊分度盤,若無判斷C的指令,則下M10以進行鬆開分度盤。透過標準G碼G00與G01客制化,在進行旋轉軸定位時自動鬆開分度盤,而定位完成後自動鎖緊分度盤,如此一來,機台操作員撰寫加工程式時就不需要繁複的撰寫鬆開(M10)與鎖緊(M11)分度盤之加工指令,加工程式便可簡化如第6圖中主程式的寫法,只要讀取到主程式中的客制化標準G碼G00與G01搭配旋轉軸C的定位角度,即可判定進行分度盤的鬆開與鎖緊動作,故可有效節省編寫加工程式所需的時間,且可大幅提昇生產效率。Taking the application of the indexing disk as an example, please refer to FIG. 6, which is a schematic diagram of the main program and macro of the customized standard G code or the customized standard M code of the present invention. As shown in Fig. 6, first, the standard G codes G00 and G01 are registered as the customized standard G code, and two macros G00 and G01 are added, wherein the macro writing method is as shown in Fig. 6 and 61, 62. Further assume that the current control axis has X, Y, Z, C, where C represents the rotation axis, and C is used as the judgment command in the macro set, indicating that the two macros G00 and G01 are the customized standard G of the rotation axis positioning command. The code automatically determines whether to perform the rotation axis positioning. If there is a command to judge C, the M11 is pressed to lock the indexing plate. If there is no instruction to judge C, the M10 is pressed to release the indexing plate. Customized by the standard G code G00 and G01, the indexing plate is automatically released when the rotary axis is positioned, and the indexing plate is automatically locked after the positioning is completed, so that the machine operator does not need to write the machining program. The complicated processing of the loosening (M10) and locking (M11) indexing discs allows the machining program to simplify the writing of the main program as shown in Fig. 6, as long as the customized standard G code is read into the main program. G00 and G01 can be used to determine the release and locking action of the indexing plate with the positioning angle of the rotary axis C. This saves the time required to write the machining program and greatly improves the production efficiency.
本發明不僅可應用在分度盤,尚可應用於諸多類型的加工機台,例如:放電加工機與木工切割機,首先以放電加工機來說,在實際加工時因為放電會累積加工屑,所以必須不斷前進一段距離後又退開以進行清理動作,但此動作是有規律的,只要配合設計良好的客制化標準G碼巨集,便可有效簡化加工程式;另外,以木工切割機來說,一般切割機的刀具為鉅片,其只能沿切線方向配合G01(直線切割)、G02(順時針圓弧切割)、G03(逆時針圓弧切割)進行裁切,因此在切削時刀具的方向必須配合旋轉,但刀具不可能瞬間旋轉,必須提刀後先旋轉再下刀,故若能透過客制化標準G碼設計G01、G02、G03的巨集搭配旋轉的指令,在使用上也將便利許多。The invention can be applied not only to the indexing disc but also to many types of processing machines, such as an electric discharge machine and a woodworking cutting machine. First, in the case of an electric discharge machine, in the actual processing, the machining debris is accumulated due to discharge. Therefore, it is necessary to continue to advance for a certain distance and then retreat for cleaning operations, but this action is regular. As long as the well-designed customized standard G code macro is used, the processing program can be simplified. In addition, the woodworking cutting machine In general, the cutter of the general cutting machine is a giant piece, which can only be cut along the tangential direction with G01 (straight line cutting), G02 (clockwise circular cutting), G03 (counterclockwise circular cutting), so when cutting The direction of the tool must match the rotation, but the tool cannot be rotated in an instant. It must be rotated before the knife is removed, so if you can design the G01, G02, G03 macro with the customized standard G code, use the rotation command. It will also be convenient.
綜上所述,透過前述的設計說明可知,本發明針對機台操作員依原有標準G、M碼所設計出來的客制化標準G、M碼,取代一般利用標準G、M碼以外指令且需額外定義的客制G、M碼,並搭配一套解譯客制化標準G、M碼之方法,可有效節省編寫加工程式所需的時間,如此不僅增加了操作的便利性,更提高了加工的效率,進而提昇加工效能以及達到較佳的系統穩定性。In summary, according to the foregoing design description, the present invention is directed to the customized standard G and M codes designed by the machine operator according to the original standard G and M codes, instead of the general use of the standard G and M codes. The additional custom G and M codes are required, and a set of methods for interpreting the customized G and M codes can save the time required to write the machining program, which not only increases the convenience of operation, but also increases the convenience of operation. Improve processing efficiency, thereby improving processing efficiency and achieving better system stability.
雖然本發明以前述之較佳實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。While the present invention has been described above in terms of the preferred embodiments thereof, it is not intended to limit the invention, and the invention may be modified and modified without departing from the spirit and scope of the invention. The patent protection scope of the invention is subject to the definition of the scope of the patent application attached to the specification.
步驟40‧‧‧載入欲執行之工件程式Step 40‧‧‧Load the workpiece program to be executed
步驟41‧‧‧逐行讀取欲執行之工件程式Step 41‧‧‧Read the workpiece program to be executed line by line
步驟42‧‧‧讀入單行工件程式之加工單節指令Step 42‧‧‧Reading a single-row workpiece program
步驟43‧‧‧判斷是否進入標準G碼或標準M碼的解譯Step 43‧‧‧Determine whether to enter the interpretation of the standard G code or the standard M code
步驟44‧‧‧進入標準G碼或標準M碼的解譯流程Step 44‧‧‧ Enter the interpretation process of standard G code or standard M code
步驟45‧‧‧進入標準G碼或標準M碼以外指令的解譯Step 45‧‧‧ Interpretation of instructions outside the standard G code or standard M code
步驟46‧‧‧程式結束指令Step 46‧‧‧Program End Instructions
步驟47‧‧‧回到上一層級(主程式)Step 47‧‧‧Return to the previous level (main program)
步驟48‧‧‧解譯完成Step 48‧‧‧ Interpretation completed
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW102132913A TWI501059B (en) | 2013-09-12 | 2013-09-12 | Machining program interpretation method for machine tool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW102132913A TWI501059B (en) | 2013-09-12 | 2013-09-12 | Machining program interpretation method for machine tool |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201510686A TW201510686A (en) | 2015-03-16 |
TWI501059B true TWI501059B (en) | 2015-09-21 |
Family
ID=53186707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW102132913A TWI501059B (en) | 2013-09-12 | 2013-09-12 | Machining program interpretation method for machine tool |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI501059B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI546639B (en) * | 2015-08-07 | 2016-08-21 | Anderson Ind Corp | Rapid processing methods and computer program products |
TWI554856B (en) * | 2015-10-30 | 2016-10-21 | 財團法人工業技術研究院 | Apparatus and method for transforming nc programs |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0270679A1 (en) * | 1986-05-15 | 1988-06-15 | Fanuc Ltd. | Method of converting nc data |
JPH05100730A (en) * | 1991-10-03 | 1993-04-23 | Yaskawa Electric Corp | Programming device for motion controller |
TW475911B (en) * | 1993-09-08 | 2002-02-11 | Hurco Co Inc | Improved machine tool control system |
CN101206467B (en) * | 2006-12-22 | 2010-09-29 | 南京理工大学 | Universal numerical control code analysis method |
WO2010139605A1 (en) * | 2009-06-03 | 2010-12-09 | Robert Bosch Gmbh | Method and device for controlling auxiliary materials in machine tools |
TW201131333A (en) * | 2009-12-28 | 2011-09-16 | Mitsubishi Electric Corp | Program generation support device |
-
2013
- 2013-09-12 TW TW102132913A patent/TWI501059B/en active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0270679A1 (en) * | 1986-05-15 | 1988-06-15 | Fanuc Ltd. | Method of converting nc data |
JPH05100730A (en) * | 1991-10-03 | 1993-04-23 | Yaskawa Electric Corp | Programming device for motion controller |
TW475911B (en) * | 1993-09-08 | 2002-02-11 | Hurco Co Inc | Improved machine tool control system |
CN101206467B (en) * | 2006-12-22 | 2010-09-29 | 南京理工大学 | Universal numerical control code analysis method |
WO2010139605A1 (en) * | 2009-06-03 | 2010-12-09 | Robert Bosch Gmbh | Method and device for controlling auxiliary materials in machine tools |
TW201131333A (en) * | 2009-12-28 | 2011-09-16 | Mitsubishi Electric Corp | Program generation support device |
Also Published As
Publication number | Publication date |
---|---|
TW201510686A (en) | 2015-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2862030B1 (en) | Computer aided manufacturing (cam) integrated computer numerically controlled (cnc) control of machines | |
TWI501059B (en) | Machining program interpretation method for machine tool | |
JP2003256009A5 (en) | ||
KR102124658B1 (en) | Method and Apparatus for Monitoring Cutting Load of Machine Tool | |
US20160062336A1 (en) | Numerical controller for facilitating adjustment of machining motion | |
TW201740233A (en) | A CNC machine tool for generating G code files to save and process | |
JP2010176377A (en) | Tool for converting plc program | |
TWI496638B (en) | Milling complex processing machine and the encoding method of its cutting tools | |
JPH03177903A (en) | Method and device for production of nc working data | |
JP5113931B1 (en) | Numerical control device with changeable user interface | |
US6397124B1 (en) | Interactive system between machine tool and operator | |
WO2017101700A1 (en) | Computer aided manufacturing method, device and system in direct communication with numerical control system | |
WO2023120451A1 (en) | Information processing device, information processing program, and machine tool | |
CN108829028A (en) | Execute program creating method, processing method and device, medium, terminal | |
CN104656552A (en) | Mobile wireless debugging terminal of six-axis computer numerical control (CNC) polishing machine system and operation method of mobile wireless debugging terminal | |
CN103792886B (en) | Work procedure decomposition method for toolroom machine | |
CN109870977B (en) | Data control method and system for machine tool, computer readable storage medium and machine tool | |
CN105334799A (en) | Programming method of numerically-controlled machine tool | |
JP7041041B2 (en) | Numerical control device | |
CN201309106Y (en) | Dialog window interface system device of inner-outer circular mill | |
JPH01189704A (en) | Numerical controller | |
JP2004268189A (en) | Processing program making device | |
JP5851684B2 (en) | NC program creation method and creation apparatus | |
JP2007241399A (en) | Method for obtaining nc program in g code format and execution method for program therefor | |
WO2023120391A1 (en) | Information processing device and program that generates a first nc program and converts a second nc program |