TWI541623B - Five-axis numerical control system and numerical controlling method thereof - Google Patents
Five-axis numerical control system and numerical controlling method thereof Download PDFInfo
- Publication number
- TWI541623B TWI541623B TW103137566A TW103137566A TWI541623B TW I541623 B TWI541623 B TW I541623B TW 103137566 A TW103137566 A TW 103137566A TW 103137566 A TW103137566 A TW 103137566A TW I541623 B TWI541623 B TW I541623B
- Authority
- TW
- Taiwan
- Prior art keywords
- curve
- processing data
- data points
- vector
- new
- Prior art date
Links
Landscapes
- Numerical Control (AREA)
Description
本發明係有關於一種數值控制系統及其數值控制方法,特別是有關於一種五軸加工數值控制系統與其數值控制方法。 The invention relates to a numerical control system and a numerical control method thereof, in particular to a five-axis machining numerical control system and a numerical control method thereof.
近年來,隨著製造技術的加工水準日漸升高,汽車業、半導體製造工業、電子工業,航太工業和各類模具製造業等,因應產品美觀與功能需求的連續曲面造型日益普遍,產品外型也日趨複雜化與多樣化,因此,在精度、效率、複雜曲面的加工需求下,具有高效率、高加工精度與高表面加工品質之五軸加工技術顯得日益重要。 In recent years, with the increasing processing level of manufacturing technology, the automotive industry, semiconductor manufacturing industry, electronics industry, aerospace industry and various types of mold manufacturing, etc., continuous surface modeling in response to product aesthetics and functional requirements is becoming more and more common. The types are becoming more and more complicated and diversified. Therefore, under the processing requirements of precision, efficiency and complex curved surfaces, five-axis machining technology with high efficiency, high machining accuracy and high surface processing quality is becoming increasingly important.
五軸加工切削方式可分為端銑與側銑兩種,端銑是利用刀具的刀尖進行材料移除,側銑則是利用刀具的刀刃進行材料移除,而目前五軸加工技術為根據原始加工幾何形狀透過五軸加工路徑規劃方法所規劃出來的刀具姿態與加工路徑,故其加工品質取決於五軸加工路徑的規劃方法,當規劃方法不恰當的時候,加工品質隨之下降。 The five-axis machining cutting method can be divided into end milling and side milling. End milling uses the tool tip for material removal, and side milling uses the tool cutting edge for material removal. The current five-axis machining technology is based on The original machining geometry is processed by the five-axis machining path planning method, so the machining quality depends on the planning method of the five-axis machining path. When the planning method is not appropriate, the processing quality will decrease.
另一方面,根據加工產品的幾何形狀選擇適當的路徑規劃方法難度相當高,通常以既有方式加工後的成品,其成品外觀常呈鋸齒狀或是凹凸不平,即非平滑面,然五軸加工的加工程式資料量龐大,修正加工程式需耗費大量時間,並且修正加工程式的好壞取決於使用者的經驗與技術,而使得五軸加工程式的使用門檻高,故如何將使用者所規劃的五軸加工路徑之加工程式達到加工路徑平滑化、降低使用者修正加工程式所需耗費的時間及降低五軸加工程式的使用門檻以提升加工品質,為目前所需解決的問題。 On the other hand, it is quite difficult to select an appropriate path planning method according to the geometry of the processed product. The finished product is usually processed in a conventional manner, and the finished product is often jagged or uneven, that is, a non-smooth surface, but five axes. The processing program has a large amount of data, and it takes a lot of time to correct the processing program. The correction of the processing program depends on the user's experience and technology, so that the five-axis processing program has a high threshold, so how to plan the user. The processing program of the five-axis machining path achieves smoothing of the machining path, reduces the time required for the user to correct the machining program, and lowers the use threshold of the five-axis machining program to improve the processing quality, which is a problem to be solved at present.
為了解決先前技術所述之問題,本發明之主要目的在於提供一種五軸加工數值控制系統,藉由五軸加工數值控制系統之運算單元,可將使用者所規劃的五軸加工路徑之加工程式達到加工路徑平滑化,並且使用者無須將加工程式大幅修改,也無須將加工程式中大量的資料逐一檢查異常處,以達到降低使用者修正加工程式所需耗費的時間、降低五軸加工程式的使用門檻及提升加工品質之目的。 In order to solve the problems described in the prior art, the main object of the present invention is to provide a five-axis machining numerical control system, which can process a five-axis machining path planned by a user by an arithmetic unit of a five-axis machining numerical control system. Smoothing of the processing path, and the user does not need to modify the processing program greatly, and does not need to check the abnormality of a large amount of data in the processing program one by one, so as to reduce the time required for the user to correct the processing program and reduce the five-axis processing program. Use thresholds and enhance the quality of processing.
根據上述目的,本發明主要目的在於提供一種五軸加工數值控制系統,包括一數值控制裝置及一加工裝置,數值控制裝置電性連接於加工裝置,加工裝置具有一刀具、三個幾何軸及兩個旋轉軸,刀具電性連接於幾何軸與旋轉軸,刀具於幾何軸上移動且於旋轉軸上轉動,其特徵在於:數值控制裝置包括:一使用者介面,其接收一包含有複數個加工資料點的加工程式,每一加工資料點包含複數個旋轉軸命令與複數個幾何軸命令,加工資料點形成一第一曲線,使用者介面輸出加工資料點與第一曲線;一運算單元,其電性連接於使用者介面,且接收使用者介面所輸出之加工資料點與第一曲線,並依據每一加工資料點之旋轉軸命令決定一刀具向量,並計算垂直於所有二相鄰之刀具向量之一法向量,並判斷法向量之間的夾角是否大於一預設值,再根據幾何軸命令之一移動量線性比例地調整旋轉軸命令,並將加工資料點之幾何軸命令嵌合為一第二曲線,將位於第一曲線之加工資料點以垂直投影的方式找出位於第二曲線之複數個對應點,計算對應點之一起始點至每一其他對應點之一曲線長度,並形成複數個新加工資料點,每一新加工資料點位於第二曲線上,每一新加工資料點包含曲線長度與一第一及一第二旋轉軸命令,每一新加工資料點之曲線長度與第一旋轉軸命令形成一第一向量點,每一新加工資料點之曲線長度與第二旋轉軸命令形成一第二向量點,第一向量點形成一第三曲線,第二向量點形成一第四曲線,利用第二 曲線、第三曲線及第四曲線插值計算出複數個新旋轉軸命令與複數個新幾何軸命令,運算單元輸出新旋轉軸命令與新幾何軸命令;及一控制模組,其電性連接至運算單元,且接收運算單元輸出之新旋轉軸命令與新幾何軸命令,用以控制旋轉軸帶動刀具之旋轉及幾何軸帶動刀具之移動。 In accordance with the above objects, a primary object of the present invention is to provide a five-axis machining numerical control system including a numerical control device and a processing device, the numerical control device being electrically connected to the processing device, the processing device having a tool, three geometric axes and two a rotating shaft, the tool is electrically connected to the geometric axis and the rotating shaft, and the tool moves on the geometric axis and rotates on the rotating shaft, wherein the numerical control device comprises: a user interface, and the receiving device comprises a plurality of processing a processing program of the data points, each processing data point includes a plurality of rotation axis commands and a plurality of geometric axis commands, the processing data points form a first curve, the user interface outputs the processing data points and the first curve; and an arithmetic unit Electrically connected to the user interface, and receiving the processing data point and the first curve output by the user interface, and determining a tool vector according to the rotation axis command of each processing data point, and calculating perpendicular to all two adjacent tools One of the vector vectors, and judge whether the angle between the normal vectors is greater than a preset value, and then according to the geometric axis One of the movement amounts linearly adjusts the rotation axis command, and the geometric axis command of the machining data point is fitted into a second curve, and the processing data point located in the first curve is vertically projected to find the second curve. a plurality of corresponding points, calculating a curve length from one of the starting points to one of the other corresponding points, and forming a plurality of new processing data points, each new processing data point is located on the second curve, each new processing data point The curve length and a first and a second rotation axis command are included, and the curve length of each new processing data point forms a first vector point with the first rotation axis command, and the curve length and the second rotation of each newly processed data point The axis command forms a second vector point, the first vector point forms a third curve, and the second vector point forms a fourth curve, using the second The curve, the third curve and the fourth curve interpolation calculate a plurality of new rotation axis commands and a plurality of new geometry axis commands, the operation unit outputs a new rotation axis command and a new geometry axis command; and a control module electrically connected to The arithmetic unit receives the new rotary axis command and the new geometric axis command outputted by the arithmetic unit to control the rotation of the rotary axis and the movement of the geometric axis to drive the tool.
所述的五軸加工數值控制系統,其中運算單元包括:一計算模組,其電性連接於使用者介面,且接收使用者介面所輸出之加工資料點與第一曲線,並決定刀具向量,以及計算垂直於所有二相鄰之刀具向量之法向量,並輸出加工資料點、法向量及第一曲線,計算模組更計算對應點之起始點至每一其他對應點之曲線長度,並形成位於第二曲線上之複數個新加工資料點,以及將每一新加工資料點之曲線長度與第一旋轉軸命令形成第一向量點,將每一新加工資料點之曲線長度與第二旋轉軸命令形成第二向量點,計算模組輸出第二曲線、第一向量點及第二向量點;一判斷模組,其電性連接於計算模組,且接收自計算模組輸出之法向量與加工資料點,並判斷法向量之間的夾角是否大於預設值,輸出加工資料點;一調整模組,其電性連接於判斷模組,且接收加工資料點,根據幾何軸命令之移動量線性比例地調整加工資料點之旋轉軸命令,並輸出經調整後之加工資料點;一嵌合模組,其電性連接於調整模組與計算模組,且接收經調整後之加工資料點及自計算模組輸出之第一曲線,將每一加工資料點嵌合為第二曲線,將位於第一曲線之加工資料點以垂直投影的方式找出位於第二曲線之對應點,將對應點與第二曲線輸出至計算模組,並接收自計算模組輸出之第二曲線、第一向量點及第二向量點,並將第一向量點與第二向量點分別形成第三曲線與第四曲線,並輸出第二曲線、第三曲線及第四曲線;及一插值計算模組,其電性連接至嵌合模組與控制模組,其接收自嵌合模組輸出之第二曲線、 第三曲線及第四曲線,並利用第二曲線、第三曲線及第四曲線插值計算出新旋轉軸命令與新幾何軸命令,輸出新旋轉軸命令與新幾何軸命令至控制模組。 The five-axis machining numerical control system, wherein the computing unit comprises: a computing module electrically connected to the user interface, and receiving the processing data point and the first curve output by the user interface, and determining the tool vector, And calculating a normal vector perpendicular to all two adjacent tool vectors, and outputting the processing data point, the normal vector and the first curve, and the calculation module further calculates the curve length from the starting point of the corresponding point to each of the other corresponding points, and Forming a plurality of new processing data points on the second curve, and forming a first vector point with a curve length of each new processing data point and a first rotation axis command, and a curve length of each new processing data point and a second The rotation axis command forms a second vector point, and the calculation module outputs a second curve, a first vector point and a second vector point; a determination module electrically connected to the calculation module and received from the calculation module output method The vector and the processing data point, and determine whether the angle between the normal vector is greater than a preset value, output processing data points; an adjustment module, which is electrically connected to the judgment module, and receives processing The material point adjusts the rotation axis command of the processing data point linearly proportionally according to the movement amount of the geometric axis command, and outputs the adjusted processing data point; a fitting module electrically connected to the adjustment module and the calculation module And receiving the adjusted processing data point and the first curve outputted from the calculation module, and fitting each processing data point into a second curve, and finding the processing data point located in the first curve by vertical projection Located at a corresponding point of the second curve, the corresponding point and the second curve are output to the calculation module, and receive the second curve, the first vector point and the second vector point output from the calculation module, and the first vector point is The second vector points respectively form a third curve and a fourth curve, and output a second curve, a third curve and a fourth curve; and an interpolation calculation module electrically connected to the fitting module and the control module, Receiving the second curve output from the fitting module, The third curve and the fourth curve are used to calculate a new rotation axis command and a new geometry axis command by using the second curve, the third curve, and the fourth curve interpolation, and output a new rotation axis command and a new geometry axis command to the control module.
所述的五軸加工數值控制系統,其中將每一加工資料點嵌合為第二曲線、第三曲線及第四曲線的方式為一最佳化演算法。 The five-axis machining numerical control system, wherein the method of fitting each processing data point into the second curve, the third curve and the fourth curve is an optimization algorithm.
所述的五軸加工數值控制系統,其中最佳化演算法為一最小平方誤差演算法、一最小曲率變化演算法及一最小誤差演算法其中之一。 The five-axis machining numerical control system, wherein the optimization algorithm is one of a least square error algorithm, a minimum curvature change algorithm and a minimum error algorithm.
根據上述目的,本發明主要目的在於提供一種五軸加工數值控制方法,用以控制一加工裝置之二旋轉軸帶動一刀具之旋轉及三幾何軸帶動刀具之移動,方法包括下列步驟:接收一包含複數個加工資料點之加工程式,每一加工資料點包含複數個旋轉軸命令與複數個幾何軸命令,加工資料點形成一第一曲線;依據每一加工資料點之旋轉軸命令決定一刀具向量,刀具向量的數量等於加工資料點的數量;計算垂直於所有二相鄰之加工資料點之刀具向量之一法向量;判斷法向量之間的夾角是否大於一預設值;根據幾何軸命令之一移動量線性比例地調整旋轉軸命令;將每一加工資料點嵌合為一第二曲線;將位於第一曲線之加工資料點以垂直投影的方式找出位於第二曲線之複數個對應點;計算對應點之一起始點至每一其他對應點之一曲線長度,並形成複數個新加工資料點,每一新加工資料點位於第二曲線上,每一新加工資料點包含曲線長度與一第一旋轉軸命令及一第二旋轉軸命令;將每一新加工資料點之曲線長度與第一旋轉軸命令形成一第一向量點,將每一新加工資料點之曲線長度與第二旋轉軸命令形成一第二向量點;將第一向量點形成一第三曲線;將第二向量點形成 一第四曲線;及利用第二曲線、第三曲線及第四曲線插值計算出複數個新旋轉軸命令與複數個新幾何軸命令。 In accordance with the above objects, a primary object of the present invention is to provide a five-axis machining numerical control method for controlling the rotation of a tool by a rotating shaft of a processing device and the movement of the tool by three geometric axes, the method comprising the steps of: receiving an inclusion a processing program of a plurality of processing data points, each processing data point includes a plurality of rotation axis commands and a plurality of geometric axis commands, and the processing data points form a first curve; determining a tool vector according to the rotation axis command of each processing data point , the number of tool vectors is equal to the number of processing data points; calculating one of the tool vectors perpendicular to all two adjacent processing data points; determining whether the angle between the normal vectors is greater than a preset value; according to the geometric axis command A moving axis adjusts the rotating axis command linearly proportionally; each processing data point is fitted into a second curve; and the processing data points located in the first curve are vertically projected to find a plurality of corresponding points located in the second curve Calculate the curve length from one of the starting points to one of the other corresponding points, and form a plurality of new additions Data points, each new processing data point is located on the second curve, each new processing data point includes a curve length and a first rotation axis command and a second rotation axis command; the length of each new processing data point is The first rotation axis command forms a first vector point, and the curve length of each newly processed data point and the second rotation axis command form a second vector point; the first vector point forms a third curve; the second vector is Point formation a fourth curve; and using the second curve, the third curve, and the fourth curve interpolation to calculate a plurality of new rotation axis commands and a plurality of new geometry axis commands.
所述的五軸加工數值控制方法,其中,判斷法向量之間之夾角是否大於預設值之方法進一步包含:判斷法向量其中之二法向量之一夾角是否大於一倍預設值;及判斷是否有另一法向量;其中,當法向量其中之二法向量之夾角大於一倍之預設值並且判斷有另一法向量時,則判斷數個法向量之第一個法向量與最後一個法向量的夾角是否大於數倍之預設值;以及其中,當判斷法向量其中之二法向量之夾角小於一倍預設值並且判斷有另一法向量時,則判斷另二法向量之一夾角是否大於一倍之預設值。 The five-axis machining numerical control method, wherein the method for determining whether the angle between the normal vectors is greater than a preset value further comprises: determining whether an angle of one of the two normal vectors is greater than a preset value; and determining Whether there is another normal vector; wherein, when the angle between the two normal vectors of the normal vector is greater than the preset value of one time and judges that there is another normal vector, the first normal vector of the several normal vectors is judged with the last one Whether the angle of the normal vector is greater than a preset value of several times; and wherein, when the angle between the two normal vectors of the normal vector is less than one preset value and that another normal vector is determined, one of the other two normal vectors is determined Whether the angle is greater than a preset value of one time.
所述的五軸加工數值控制方法,其中將每一加工資料點嵌合為第二曲線的方式係利用一最佳化演算法達成。 The five-axis machining numerical control method, wherein the method of fitting each processing data point into the second curve is achieved by using an optimization algorithm.
所述的五軸加工數值控制方法,其中最佳化演算法為一最小平方誤差演算法、一最小曲率變化演算法及一最小誤差演算法其中之一。 The five-axis machining numerical control method, wherein the optimization algorithm is one of a least square error algorithm, a minimum curvature change algorithm and a minimum error algorithm.
經上述可知藉由本發明之五軸加工數值控制系統,達到降低使用者修正加工程式所需耗費的時間、降低五軸加工程式的使用門檻及提升加工品質之目的。 According to the above, the five-axis machining numerical control system of the present invention can reduce the time required for the user to correct the machining program, reduce the threshold of use of the five-axis machining program, and improve the processing quality.
1‧‧‧五軸加工數值控制系統 1‧‧‧5-axis machining numerical control system
11‧‧‧數值控制裝置 11‧‧‧Numerical control device
111‧‧‧使用者介面 111‧‧‧User interface
112‧‧‧運算單元 112‧‧‧ arithmetic unit
1121‧‧‧計算模組 1121‧‧‧Computation Module
1122‧‧‧判斷模組 1122‧‧‧Judgement module
1123‧‧‧調整模組 1123‧‧‧Adjustment module
1124‧‧‧嵌合模組 1124‧‧‧Fitting module
1125‧‧‧插值計算模組 1125‧‧‧Interpolation calculation module
113‧‧‧控制模組 113‧‧‧Control Module
12‧‧‧加工裝置 12‧‧‧Processing device
121‧‧‧刀具 121‧‧‧Tools
122、123‧‧‧旋轉軸 122, 123‧‧‧Rotary axis
124、125、126‧‧‧幾何軸 124, 125, 126‧‧‧ geometry axes
A、B、C、D‧‧‧加工資料點 A, B, C, D‧‧‧ processing data points
A’、B’、C’、D’‧‧‧對應點 A', B', C', D'‧‧‧ corresponding points
A”、B”、C”、D”‧‧‧新加工資料點 A", B", C", D" ‧ ‧ new processing data points
A’’’、B’’’、C’’’、D’’’‧‧‧第一向量點 A’’’, B’’’, C’’’, D’’’‧‧‧‧ first vector point
A’’’’、B’’’’、C’’’’、D’’’’‧‧‧第二向量點 A’’’’, B’’’’, C’’’’, D’’’’’’’’’’’’’’
L‧‧‧曲線長度 L‧‧‧ Curve length
C1‧‧‧第一曲線 C1‧‧‧ first curve
C2‧‧‧第二曲線 C2‧‧‧second curve
C3‧‧‧第三曲線 C3‧‧‧ third curve
C4‧‧‧第四曲線 C4‧‧‧fourth curve
α‧‧‧第一旋轉軸命令 α‧‧‧First rotary axis command
β‧‧‧第二旋轉軸命令 β‧‧‧Second rotary axis command
S1~S11、S4A~S4F、S5A~S5B‧‧‧步驟 S1~S11, S4A~S4F, S5A~S5B‧‧‧ steps
第1圖係本發明一實施例之五軸加工數值控制系統的示意圖。 Fig. 1 is a schematic view showing a five-axis machining numerical control system according to an embodiment of the present invention.
第2圖係本發明一實施例之五軸加工數值控制系統之第一曲線與第二曲線示意圖。 2 is a first curve and a second curve diagram of a five-axis machining numerical control system according to an embodiment of the present invention.
第3圖係本發明一實施例之五軸加工數值控制系統之第二曲線示意圖。 Figure 3 is a second schematic diagram of a five-axis machining numerical control system in accordance with an embodiment of the present invention.
第4A圖係本發明一實施例之五軸加工數值控制系統之第三曲 線示意圖。 4A is a third song of a five-axis machining numerical control system according to an embodiment of the present invention. Line diagram.
第4B圖係本發明一實施例之五軸加工數值控制系統之第四曲線示意圖。 4B is a fourth schematic diagram of a five-axis machining numerical control system according to an embodiment of the present invention.
第5圖係本發明一實施例之五軸加工數值控制方法之流程圖。 Fig. 5 is a flow chart showing a method of numerical control of five-axis machining according to an embodiment of the present invention.
第6圖係第5圖之判斷法向量夾角是否大於預設值步驟之流程圖。 Figure 6 is a flow chart of the step of judging whether the angle of the normal vector is greater than a preset value in Fig. 5.
由於本發明揭露一種五軸加工數值控制(Numerical Control;NC)系統,其中所利用之法向量計算方式,已為相關技術領域具有通常知識者所能明瞭,故以下文中之說明,不再作完整描述。同時,以下文中所對照之圖式,係表達與本發明特徵有關之結構及功能示意,並未依據實際尺寸完整繪製,盍先敘明。 Since the present invention discloses a five-axis numerical control (NC) system, the method of calculating the normal vector used therein has been known to those of ordinary skill in the related art, and therefore, the description below will not be completed. description. At the same time, the drawings referred to in the following texts express the structure and function diagrams related to the features of the present invention, and are not completely drawn according to actual dimensions, which are first described.
本發明係有關於一種五軸加工數值控制系統,特別是有關於包含一數值控制裝置與一加工裝置之五軸加工數值控制系統。 The present invention relates to a five-axis machining numerical control system, and more particularly to a five-axis machining numerical control system including a numerical control device and a processing device.
首先,請同時參閱第1、2、3、4A及4B圖,第1圖係為本發明一實施例之五軸加工數值控制系統的示意圖,第2圖係為本發明一實施例之五軸加工數值控制系統之第一曲線與第二曲線示意圖,第3圖係為本發明一實施例之五軸加工數值控制系統之第二曲線示意圖,第4A圖係為本發明一實施例之五軸加工數值控制系統之第三曲線示意圖,第4B圖係為本發明一實施例之五軸加工數值控制系統之第四曲線示意圖。 First, please refer to the figures 1, 2, 3, 4A and 4B at the same time. FIG. 1 is a schematic diagram of a five-axis machining numerical control system according to an embodiment of the present invention, and FIG. 2 is a five-axis embodiment of the present invention. The first curve and the second curve of the numerical control system are processed. FIG. 3 is a second schematic diagram of a five-axis machining numerical control system according to an embodiment of the present invention, and FIG. 4A is a five-axis embodiment of the present invention. A third schematic diagram of a numerical control system for processing, and FIG. 4B is a fourth schematic diagram of a five-axis machining numerical control system according to an embodiment of the present invention.
如第1圖所示,本發明一實施例之五軸加工數值控制系統1,是由一數值控制裝置11與一加工裝置12所組成,數值控制裝置11電性連接至加工裝置12,加工裝置12用以切削一加工工件(圖中未顯示),加工裝置12具有一刀具121、三個幾何軸124、125、126與兩個旋轉軸122、123,刀具121電性連接於三個幾何軸124、125、126與兩個旋轉軸122、123,旋轉軸122、 123帶動刀具121之旋轉,幾何軸124、125、126帶動刀具121之移動,加工裝置12例如是一車床、一銑床以及一切割機等可結合五軸數值控制方式之加工裝置。 As shown in FIG. 1, a five-axis machining numerical control system 1 according to an embodiment of the present invention is composed of a numerical control device 11 and a processing device 12, and the numerical control device 11 is electrically connected to the processing device 12, and the processing device 12 for cutting a workpiece (not shown), the processing device 12 has a cutter 121, three geometric axes 124, 125, 126 and two rotating shafts 122, 123, the tool 121 is electrically connected to three geometric axes 124, 125, 126 and two rotating shafts 122, 123, rotating shaft 122, 123 drives the rotation of the cutter 121, and the geometric axes 124, 125, and 126 drive the movement of the cutter 121. The processing device 12 is, for example, a lathe, a milling machine, and a cutting machine, which can be combined with a five-axis numerical control method.
請繼續參考第1圖,數值控制裝置11是由一使用者介面111、一運算單元112及一控制模組113所組成,運算單元112電性連接至使用者介面111,控制模組113電性連接至運算單元112,其中運算單元112更包含一計算模組1121、一判斷模組1122、一調整模組1123、一嵌合模組1124及一插值計算模組1125,計算模組1121電性連接至使用者介面111,判斷模組1122電性連接於計算模組1121,調整模組1123電性連接於判斷模組1122,嵌合模組1124電性連接於調整模組1123與計算模組1121,插值計算模組1125電性連接至嵌合模組1124與控制模組113。 Please refer to FIG. 1 , the numerical control device 11 is composed of a user interface 111 , an operation unit 112 and a control module 113 . The operation unit 112 is electrically connected to the user interface 111 , and the control module 113 is electrically connected. The computing unit 112 further includes a computing module 1121, a determining module 1122, an adjusting module 1123, a fitting module 1124, and an interpolation computing module 1125. The computing module 1121 is electrically The module 1122 is electrically connected to the computing module 1121, and the adjusting module 1123 is electrically connected to the determining module 1122. The fitting module 1124 is electrically connected to the adjusting module 1123 and the computing module. The interpolation calculation module 1125 is electrically connected to the fitting module 1124 and the control module 113.
請繼續參考第1、2圖,使用者利用使用者介面111輸入一加工程式,使用者介面111用以接收使用者輸入的加工程式,加工程式包含複數個加工資料點A、B、C、D,每一個加工資料點包含二個旋轉軸命令與三個幾何軸命令,複數個加工資料點形成一第一曲線C1,使用者介面111輸出加工資料點A、B、C、D與第一曲線C1至計算模組1121;計算模組1121接收使用者介面111所輸出之加工資料點A、B、C、D與第一曲線C1,依據每個加工資料點A、B、C、D的兩旋轉軸命令計算出第一刀具向量、第二刀具向量、第三刀具向量及第四刀具向量,計算模組1121進一步計算垂直於第一刀具向量與第二刀具向量之一法向量、垂直於第二刀具向量與第三刀具向量之一法向量以及垂直於第三刀具向量與第四刀具向量之一法向量,其中,兩相鄰法向量組成一組待判斷的法向量,並輸出加工資料點A、B、C、D、法向量、及至判斷模組1122,輸出第一曲線C1至嵌合模組1124;判斷模組1122判斷兩兩相鄰法向量之間的夾角是否大於一預設值,意即判斷兩兩相鄰法向量之間的變化是否過大,同樣也是判斷兩兩刀具向量所形成的平面之間變化是否過於激烈,並判斷是否有另一法向量可用以判斷兩相鄰的法向量之間的變 化,當判斷模組1122判斷完成後,將加工資料點A、B、C、D輸出至調整模組1123,調整模組1123接收判斷模組1122輸出之加工資料點A、B、C、D後,根據判斷模組1122的判斷結果以線性方式調整加工資料點A、B、C、D之旋轉軸命令,調整模組1123輸出經調整後之加工資料點A、B、C、D至嵌合模組1124。 Continuing to refer to Figures 1 and 2, the user inputs a processing program using the user interface 111. The user interface 111 is configured to receive a processing program input by the user. The processing program includes a plurality of processing data points A, B, C, and D. Each processing data point includes two rotation axis commands and three geometric axis commands, the plurality of processing data points form a first curve C1, and the user interface 111 outputs the processing data points A, B, C, D and the first curve. C1 to the calculation module 1121; the calculation module 1121 receives the processing data points A, B, C, D and the first curve C1 output by the user interface 111, according to each of the processing data points A, B, C, D The rotary axis command calculates the first tool vector Second tool vector Third tool vector And fourth tool vector The computing module 1121 further calculates a vertical to the first tool vector With the second tool vector One normal vector Vertical to the second tool vector With the third tool vector One normal vector And perpendicular to the third tool vector With the fourth tool vector One normal vector , wherein two adjacent normal vectors form a set of normal vectors to be judged, and output processing data points A, B, C, D, and normal vectors , and The determining module 1122 outputs the first curve C1 to the fitting module 1124; the determining module 1122 determines whether the angle between the two adjacent normal vectors is greater than a preset value, that is, determining the two adjacent normal vectors Whether the change between the two is too large, is also to judge whether the change between the planes formed by the two tool vectors is too intense, and to determine whether another normal vector can be used to judge the change between two adjacent normal vectors. After the determination of 1122 is completed, the processing data points A, B, C, and D are output to the adjustment module 1123, and the adjustment module 1123 receives the processing data points A, B, C, and D output by the determination module 1122, and then according to the determination module. The judgment result of 1122 adjusts the rotation axis command of the processing data points A, B, C, and D in a linear manner, and the adjustment module 1123 outputs the adjusted processing data points A, B, C, and D to the fitting module 1124.
嵌合模組1124接收經調整模組1123調整後之加工資料點A、B、C、D及計算模組1121輸出之第一曲線C1,利用一最佳化演算法將每一個加工資料點A、B、C、D的幾何軸命令嵌合為第二曲線C2,將位於第一曲線C1之加工資料點A、B、C、D以垂直投影的方式找出位於第二曲線C2之對應點A’、B’、C’、D’。 The fitting module 1124 receives the processed data points A, B, C, D adjusted by the adjustment module 1123 and the first curve C1 output by the calculation module 1121, and uses an optimization algorithm to process each processing data point A. The geometric axis commands of B, C, and D are fitted into the second curve C2, and the processing data points A, B, C, and D located in the first curve C1 are vertically projected to find the corresponding points located in the second curve C2. A', B', C', D'.
更具體而言,請繼續參考第1、2圖,判斷模組1122判斷兩兩相鄰法向量夾角大於預設值的過程中,以兩相鄰法向量視為一組,首先,判斷模組1122需先判斷第一組兩個相鄰法向量之間的夾角是否大於一倍預設值,以本實施例而言,當判斷模組1122判斷兩相鄰法向量、之間的夾角大於一倍預設值時,則判斷模組1122判斷是否有另一法向量,如判斷有另一法向量時,則判斷模組1122判斷該些組的第一個與最後一個法向量之間的夾角是否大於預設值乘以法向量的組數,在本實施例中,為判斷法向量、之間的夾角是否大於兩倍的預設值,如判斷該些組的第一個與最後一個法向量之間的夾角大於預設值乘以法向量的組數時,則判斷模組1122再次判斷是否仍有再另一法向量,如判斷仍有另一法向量時,則判斷模組1122再次判斷該些組的第一個與最後一個法向量之間的夾角是否大於預設值乘以法向量的組數,判斷模組1122重複進行判斷該些組的第一個與最後一個法向量之間的夾角是否大於預設值乘以法向量的組數以及判斷是否仍有再另一法向量,直到判斷並無另一法向量,接著,調整模組1123以線性內插法調整組成該些法向量的加工資料點A、B、C、D,意即調整加工資料點A、B、C、D中的旋轉軸命令,之後,調整模組1123線性比例地調整加工資料點A、B、C、D的旋轉軸命令; 如判斷模組1122判斷該些組法向量的第一個法向量與最後一個法向量之間的夾角並未大於兩倍預設值時,則調整模組1123將組成這些法向量、、的第一個至倒數第二個加工資料點的旋轉軸命令以線性內插法調整,意即將加工資料點A、B、C的旋轉軸命令以線性內插法調整,之後,調整模組1123線性比例地調整加工資料點A、B、C的旋轉軸命令,並且判斷模組1122同時判斷是否有另一個法向量,如判斷並未有另一個法向量時,則調整模組1123將最後一個加工資料點的旋轉軸命令直接以線性比例調整,而不經由線性內插法調整,意即加工資料點D的旋轉軸命令直接以線性比例調整;但當判斷有另一個法向量時,則判斷模組1122判斷此組之兩法向量之間的夾角是否大於一倍預設值,此時,若判斷該組的兩法向量之間的夾角未大於一倍預設值時,則調整模組1123將該組的第一個加工資料點之旋轉軸命令進行線性比例調整,並且判斷模組1122同時判斷是否有另一個法向量,當判斷沒有另一個法向量時,則調整模組1123直接將組成此兩相鄰法向量之另二加工資料點中的旋轉軸命令以線性比例的方式調整,當判斷仍有另一法向量,則判斷模組1122再次判斷該組的兩法向量之間的夾角是否大於一倍預設值;此時,若判斷該組的兩法向量之間的夾角大於預設值時,則判斷模組1122再次判斷是否有另一法向量,並且調整模組1123再次依照判斷結果進行線性比例調整旋轉軸命令或是判斷該些組的第一個法向量與最後一個法向量之間夾角是否大於預設值乘以法向量的組數,此部分的判斷已於前述實施例中描述,在此不再贅述。 More specifically, please refer to the first and second figures, and the determining module 1122 determines that the angle between the two adjacent normal vectors is greater than the preset value, and considers two adjacent normal vectors as a group. First, the determining module 1122 is to determine whether the angle between the two adjacent normal vectors of the first group is greater than a preset value. In this embodiment, when the determining module 1122 determines two adjacent normal vectors , When the angle between the angles is greater than a preset value, the determining module 1122 determines whether there is another normal vector, such as determining that there is another normal vector. The determining module 1122 determines whether the angle between the first and last normal vectors of the groups is greater than a preset value multiplied by the number of normal vectors, in this embodiment, a judgment vector , Whether the angle between the angles is greater than twice the preset value. If it is determined that the angle between the first and last normal vectors of the groups is greater than the preset value multiplied by the number of normal vectors, then the determination module 1122 is again It is determined whether there is another normal vector. If it is determined that there is another normal vector, the determining module 1122 determines again whether the angle between the first and last normal vectors of the groups is greater than a preset value multiplied by The number of sets of normal vectors, the determining module 1122 repeatedly determines whether the angle between the first and last normal vectors of the groups is greater than a preset value multiplied by the number of normal vectors and whether there is still another method Vector, until it is determined that there is no other normal vector, then the adjustment module 1123 adjusts the processing data points A, B, C, and D constituting the normal vectors by linear interpolation, that is, adjusting the processing data points A, B, The rotation axis command in C and D, after that, the adjustment module 1123 adjusts the rotation axis command of the processing data points A, B, C, and D linearly proportionally; if the determination module 1122 determines the first method of the group normal vectors vector With the last normal vector When the angle between the angles is not greater than twice the preset value, the adjustment module 1123 will constitute these normal vectors. , , The rotation axis command of the first to the second last processing data point is adjusted by linear interpolation, meaning that the rotation axis command of the processing data points A, B, C is adjusted by linear interpolation, and then the adjustment module 1123 The rotary axis command of the processing data points A, B, and C is linearly proportionally adjusted, and the determining module 1122 simultaneously determines whether there is another normal vector. If it is determined that there is no other normal vector, the adjustment module 1123 will be the last one. The rotary axis command of the machining data point is directly adjusted in linear proportion without linear interpolation, which means that the rotary axis command of the processing data point D is directly adjusted linearly; but when it is judged that there is another normal vector, it is judged The module 1122 determines whether the angle between the two normal vectors of the group is greater than a preset value. At this time, if it is determined that the angle between the two normal vectors of the group is not greater than a preset value, the adjustment module is 1123 linearly adjusts the rotation axis command of the first processing data point of the group, and judges that the module 1122 simultaneously determines whether there is another normal vector, and when it is determined that there is no other normal vector, the adjustment module 1123 directly adjusts the rotation axis command in the other processing data points constituting the two adjacent normal vectors in a linear proportional manner. When it is judged that there is another normal vector, the determination module 1122 determines the two normal vectors of the group again. Whether the angle between the two is greater than a preset value; at this time, if it is determined that the angle between the two normal vectors of the group is greater than a preset value, the determining module 1122 determines again whether there is another normal vector, and adjusts the mode. The group 1123 again performs linear scaling of the rotation axis command according to the judgment result or judges whether the angle between the first normal vector and the last normal vector of the groups is greater than a preset value multiplied by the number of normal vectors, and the judgment of the portion It has been described in the foregoing embodiments, and details are not described herein again.
此外,當判斷模組1122判斷第一組兩相鄰法向量之夾角並未大於一倍預設值時,以本實施例而言,當判斷兩相鄰法向量、之夾角並未大於一倍預設值時,調整模組1123直接將組成此兩相鄰法向量之第一個加工資料點中的旋轉軸命令以線性比例的方式調整,意即將加工資料點A的旋轉軸命令以線性比例的方式調整,並判斷模組1122同時判斷是否有另一個法向量,當判斷沒有另一個法向量時,則調整模組1123直接將組成此兩相鄰法 向量之另二加工資料點中的旋轉軸命令以線性比例的方式調整,意即將加工資料點B、C的旋轉軸命令以線性比例調整;當判斷有另一個法向量時,則判斷模組1122接著判斷兩相鄰法向量的夾角是否大於一倍預設值,意即判斷兩相鄰法向量、之間的夾角是否大於一倍預設值,當判斷此兩相鄰法向量的夾角沒有大於一倍預設值時,則調整模組1123將組成此法向量的第一個加工資料點的旋轉軸命令以線性比例的方式調整,意即將加工資料點B的旋轉軸命令以線性比例的方式調整,並判斷模組1122再次判斷是否有另一法向量,判斷模組1122重複執行判斷是否有另一法向量以及判斷兩組法向量夾角是否大於預設值等兩步驟,直到判斷並無另一個法向量。 In addition, when the determining module 1122 determines that the angle between the two adjacent normal vectors of the first group is not greater than a preset value, in the embodiment, when determining two adjacent normal vectors , When the angle is not more than one preset value, the adjustment module 1123 directly adjusts the rotation axis command in the first processing data point constituting the two adjacent normal vectors in a linear proportional manner, that is, processing the data point A The rotation axis command is adjusted in a linear scale manner, and the module 1122 is determined to determine whether there is another normal vector. When it is determined that there is no other normal vector, the adjustment module 1123 directly constitutes the other two adjacent normal vectors. The rotation axis command in the two processing data points is adjusted in a linear proportional manner, that is, the rotation axis command of the processing data points B and C is adjusted linearly; when it is judged that there is another normal vector, the determination module 1122 then judges two Whether the angle between adjacent normal vectors is greater than one preset value, that is, judging two adjacent normal vectors , Whether the angle between the two is greater than a preset value. When it is determined that the angle between the two adjacent normal vectors is not greater than a preset value, the adjustment module 1123 rotates the first processing data point constituting the normal vector. The axis command is adjusted in a linear proportional manner, that is, the rotation axis command of the processing data point B is adjusted in a linear proportional manner, and the module 1122 is judged again to determine whether there is another normal vector, and the determination module 1122 repeatedly performs the determination to determine whether there is another. A normal vector and two steps of determining whether the angle between the two sets of normal vectors is greater than a preset value until it is judged that there is no other normal vector.
此外,當判斷模組1122在一開始判斷兩相鄰法向量夾角大於一倍預設值並且判斷沒有另一個法向量時,意即判斷兩相鄰法向量、之夾角大於一倍預設值時,則調整模組1123將組成此兩個法向量的加工資料點以線性比例的方式調整加工資料點的旋轉軸命令。 In addition, when the judging module 1122 determines at the beginning that the angle between two adjacent normal vectors is greater than a preset value and judges that there is no other normal vector, it means determining two adjacent normal vectors. , When the angle is greater than one preset value, the adjustment module 1123 adjusts the rotation axis command of the processing data point by linearly proportionally processing the processing data points constituting the two normal vectors.
接著,請同時參考第1、2、3圖,嵌合模組1124將複數個對應點A’、B’、C’、D’與第二曲線C2輸出至計算模組1121計算複數個對應點A’、B’、C’、D’之起始點A’至每一個對應點之曲線長度L,並形成位於第二曲線C2上之複數個新加工資料點A”、B”、C”、D”,每一個新加工資料點A”、B”、C”、D”包含曲線長度L、第一旋轉軸命令α及第二旋轉軸命令β,例如:新加工資料點A”表示為(L 0 ,α 0 ,β 0),新加工資料點B”表示為(L 1 ,α 1 ,β 1),新加工資料點C”表示為(L 2 ,α 2 ,β 2),新加工資料點D”表示為(L n ,α n ,β n ),n為一正整數,在本實施例中,因加工資料點數量為四,故此處n等於4。 Next, please refer to the first, second, and third figures at the same time, the fitting module 1124 outputs a plurality of corresponding points A', B', C', D' and the second curve C2 to the calculation module 1121 to calculate a plurality of corresponding points. The starting point A' of A', B', C', D' to the curve length L of each corresponding point, and forming a plurality of new processing data points A", B", C" on the second curve C2 , D", each new processing data point A", B", C", D" includes the curve length L, the first rotation axis command α and the second rotation axis command β, for example: the newly processed data point A" is expressed as ( L 0 , α 0 , β 0 ), the newly processed data point B” is expressed as ( L 1 , α 1 , β 1 ), and the newly processed data point C” is expressed as ( L 2 , α 2 , β 2 ), new The processing data point D" is expressed as ( L n , α n , β n ), and n is a positive integer. In the present embodiment, since the number of processing data points is four, n is equal to four.
接著,請同時參考第1、3、4A、4B圖,計算模組1121將每一個新加工資料點A”、B”、C”、D”之曲線長度L與第一旋轉軸α命令形成一第一向量點A’’’、B’’’、C’’’、D’’’,每一個新加工資料點A”、B”、C”、D”之曲線長度L與第二旋轉軸命令 β形成一第二向量點A’’’’、B’’’’、C’’’’、D’’’’,因此,複數個新加工資料點A”、B”、C”、D”產生複數個第一向量點A’’’、B’’’、C’’’、D’’’與複數個第二向量點A’’’’、B’’’’、C’’’’、D’’’’,計算模組1121輸出第二曲線C2、複數個第一向量點A’’’、B’’’、C’’’、D’’’及複數個第二向量點A’’’’、B’’’’、C’’’’、D’’’’至嵌合模組1124,嵌合模組1124利用最佳化演算法將複數個第一向量點A’’’、B’’’、C’’’、D’’’與複數個第二向量點A’’’’、B’’’’、C’’’’、D’’’’分別形成一第三曲線C3與一第四曲線C4,並輸出第二曲線C2、第三曲線C3及第四曲線C4至插值計算模組1125;插值計算模組1125接收嵌合模組1124輸出之第二曲線C2、第三曲線C3及第四曲線C4,並利用第二曲線C2、第三曲線C3及第四曲線C4插值計算出複數個新旋轉軸命令與複數個新幾何軸命令,插值計算模組1125輸出複數個新旋轉軸命令與複數個新幾何軸命令至控制模組113,控制模組113接收插值計算模組1125輸出之新旋轉軸命令與新幾何軸命令並控制加工裝置12之兩個旋轉軸122、123及三個幾何軸124、125、126,即控制旋轉軸122、123帶動刀具121之旋轉及幾何軸124、125、126帶動刀具121之移動。 Next, please refer to the figures 1, 3, 4A, and 4B at the same time, and the calculation module 1121 forms a curve length L of each of the newly processed data points A", B", C", D" and the first rotation axis α command. The first vector points A''', B''', C''', D''', the length L of each new processing data point A", B", C", D" and the second rotation axis command β forms a second vector point A'''', B'''', C'''', D'''', therefore, a plurality of new processing data points A", B", C", D" Generating a plurality of first vector points A''', B''', C''', D''' and a plurality of second vector points A'''', B'''', C'''' D''', the calculation module 1121 outputs a second curve C2, a plurality of first vector points A''', B''', C''', D''', and a plurality of second vector points A '''', B'''', C'''', D'''' to the fitting module 1124, the fitting module 1124 uses the optimization algorithm to make a plurality of first vector points A'' ', B''', C''', D''' and a plurality of second vector points A'''', B'''', C'''', D'''' respectively form a first The third curve C3 and the fourth curve C4, and output the second curve C2, the third curve C3 and the fourth curve C4 to the interpolation calculation module 1125; the interpolation calculation module 1125 receives the second curve C2 output by the fitting module 1124 , the third curve C3 and the fourth curve C4, and utilize the The two curve C2, the third curve C3 and the fourth curve C4 are interpolated to calculate a plurality of new rotation axis commands and a plurality of new geometry axis commands, and the interpolation calculation module 1125 outputs a plurality of new rotation axis commands and a plurality of new geometric axis commands to The control module 113 receives the new rotation axis command and the new geometry axis command output by the interpolation calculation module 1125 and controls the two rotation axes 122, 123 and the three geometric axes 124, 125, 126 of the processing device 12, That is, controlling the rotation axes 122, 123 to drive the rotation of the cutter 121 and the geometric axes 124, 125, 126 to drive the movement of the cutter 121.
接著,請參閱第5圖,係為本發明一實施例之五軸加工數值控制方法之流程圖。 Next, please refer to FIG. 5, which is a flow chart of a five-axis machining numerical control method according to an embodiment of the present invention.
首先,執行步驟S1,如第1、2圖所示,使用者利用使用者介面111輸入一加工程式,使用者介面111用以接收使用者輸入的加工程式,加工程式包含複數個加工資料點A、B、C、D,每一個加工資料點包含二個旋轉軸命令與三個幾何軸命令,複數個加工資料點形成一第一曲線C1,使用者介面111輸出加工資料點A、B、C、D與第一曲線C1至計算模組1121。 First, step S1 is executed. As shown in FIGS. 1 and 2, the user inputs a processing program by using the user interface 111. The user interface 111 is configured to receive a processing program input by the user, and the processing program includes a plurality of processing data points A. , B, C, D, each processing data point includes two rotation axis commands and three geometric axis commands, a plurality of processing data points form a first curve C1, and the user interface 111 outputs processing data points A, B, C D and the first curve C1 to the calculation module 1121.
接著,進行步驟S2,如第1、2圖所示,計算模組1121接收使用者介面111所輸出之加工資料點A、B、C、D與第一曲線C1,依據每個加工資料點之兩旋轉軸命令決定一刀具向量,故加工資料點A、B、C、D決定一第一刀具向量、一第二刀具向量、第三刀具向量及第四刀具向量;再進行步驟S3, 如第1、2圖所示,計算模組1121進一步計算垂直於第一刀具向量與第二刀具向量之法向量、垂直於第二刀具向量與第三刀具向量之法向量以及垂直於第三刀具向量與第四刀具向量之一法向量,並輸出加工資料點A、B、C、D及法向量、、至判斷模組1122,輸出第一曲線C1至嵌合模組1124。 Next, step S2 is performed. As shown in the first and second figures, the calculation module 1121 receives the processing data points A, B, C, and D output by the user interface 111 and the first curve C1, according to each processing data point. The two rotary axis commands determine a tool vector, so the machining data points A, B, C, and D determine a first tool vector. Second cutter vector Third tool vector And fourth tool vector Step S3 is further performed. As shown in FIGS. 1 and 2, the calculation module 1121 further calculates a perpendicular to the first tool vector. With the second tool vector Normal vector Vertical to the second tool vector With the third tool vector Normal vector And perpendicular to the third tool vector With the fourth tool vector One normal vector And output processing data points A, B, C, D and normal vectors , , The determination module 1122 outputs the first curve C1 to the fitting module 1124.
接著,進行步驟S4,如第1、2圖所示,判斷模組1122判斷法向量之間的夾角是否大於預設值,判斷模組1122判斷法向量夾角是否大於預設值後,接著,執行步驟S5,意即將加工資料點A、B、C、D輸出至調整模組1123,調整模組1123接收判斷模組1122輸出之加工資料點A、B、C、D後,調整旋轉軸命令,調整模組1123輸出經調整後之加工資料點A、B、C、D至嵌合模組1124。 Next, step S4 is performed. As shown in the first and second figures, the determining module 1122 determines whether the angle between the normal vectors is greater than a preset value, and the determining module 1122 determines whether the normal vector angle is greater than a preset value, and then executes In step S5, it is intended that the processing data points A, B, C, and D are output to the adjustment module 1123, and the adjustment module 1123 receives the processing data points A, B, C, and D outputted by the determination module 1122, and then adjusts the rotation axis command. The adjustment module 1123 outputs the adjusted processing data points A, B, C, and D to the fitting module 1124.
其中,在執行步驟S4~S5時,以兩相鄰法向量視為一組,如第6圖所示,首先,執行步驟S4A,判斷模組1122需先判斷第一組兩個相鄰法向量之間的夾角是否大於一倍預設值,以本實施例而言,當判斷模組1122判斷兩相鄰法向量、之間的夾角大於一倍預設值時,則執行步驟S4B,即判斷模組1122判斷是否有另一法向量,當判斷有另一法向量時,則執行步驟S4C,即判斷模組1122判斷該些組的第一個與最後一個法向量的夾角是否大於預設值乘以法向量的組數,在本實施例中,為判斷、之間的夾角是否大於兩倍的預設值,如判斷該些組的第一個與最後一個法向量之間的夾角大於預設值乘以法向量的組數時,則執行步驟S4D,即判斷模組1122再次判斷是否仍有再另一法向量,如判斷仍有另一法向量時,則執行步驟S4C,即判斷模組1122再次判斷該些組的第一個與最後一個法向量之間的夾角是否大於預設值乘以法向量的組數,重複執行步驟S4C~S4D,直到執行步驟S4D時,判斷模組1122判斷並無另一法向量後,接著,執行步驟S5A,即調整模組1123以線性內插法調整組成法向量、、的加工資料點A、B、C、D,意即調整加工資料點A、B、C、D中的旋轉軸命令,之後,執行步驟S5B,即調整模組1123線性比例地調整 加工資料點A、B、C、D的旋轉軸命令。 Wherein, when performing steps S4 to S5, two adjacent normal vectors are regarded as one group. As shown in FIG. 6, first, step S4A is performed, and the determining module 1122 needs to first determine the first two adjacent normal vectors. Whether the angle between the angles is greater than a preset value, in the embodiment, when the determining module 1122 determines two adjacent normal vectors , When the angle between the angles is greater than the preset value, step S4B is performed, that is, the determining module 1122 determines whether there is another normal vector, and when there is another normal vector. Then, the step S4C is performed, that is, the determining module 1122 determines whether the angle between the first and the last normal vectors of the groups is greater than a preset value multiplied by the number of normal vectors, in this embodiment, , Whether the angle between the angles is greater than twice the preset value. If it is determined that the angle between the first and last normal vectors of the groups is greater than the preset value multiplied by the number of normal vectors, step S4D is performed, ie, The determining module 1122 determines again whether there is another normal vector. If it is determined that there is another normal vector, then step S4C is performed, that is, the determining module 1122 determines the first and last normal vectors of the groups again. If the angle between the angles is greater than the preset value multiplied by the number of normal vectors, the steps S4C to S4D are repeatedly executed until the step S4D is executed, and after the determination module 1122 determines that there is no other normal vector, then step S5A is performed, that is, the adjustment is performed. Module 1123 adjusts the constituent normal vector by linear interpolation , , The processing data points A, B, C, and D mean to adjust the rotation axis command in the processing data points A, B, C, and D, and then execute step S5B, that is, the adjustment module 1123 linearly adjusts the processing data point A. , B, C, D rotation axis commands.
當執行步驟S4B時,即判斷模組1122判斷並未有另一法向量時,則調整模組1123將組成第一組法向量的加工資料點之旋轉軸命令以線性比例調整,在本實施例中,即調整加工資料點A、B、C的旋轉軸命令。 When step S4B is executed, that is, when the determining module 1122 determines that there is no other normal vector, the adjustment module 1123 adjusts the rotation axis command of the processing data points constituting the first set of normal vectors in a linear ratio, in this embodiment. In the middle, the rotary axis command of the machining data points A, B, and C is adjusted.
當執行步驟S4A時,即判斷模組1122判斷第一組法向量之間的夾角並未大於一倍預設值時,則執行步驟S5B,即調整模組1123將組成第一組法向量的第一個加工資料點之旋轉軸命令以線性比例調整,在本實施例中,即線性比例調整加工資料點A的旋轉軸命令,並同時執行步驟S4E,即判斷模組1122判斷是否有另一個法向量,當判斷沒有另一個法向量時,則執行步驟S5B,即調整模組1123直接將組成此兩相鄰法向量之另二加工資料點中的旋轉軸命令以線性比例的方式調整;此時,當執行步驟S4E時,即判斷模組1122判斷有另一個法向量時,則執行步驟S4F,即判斷模組1122判斷兩相鄰法向量的夾角是否大於一倍預設值,當判斷此兩相鄰法向量的夾角沒有大於一倍預設值時,則執行步驟S5B,即調整模組1123將組成此組法向量的第一個加工資料點的旋轉軸命令以線性比例的方式調整,並同時再次執行步驟S4E,即判斷模組1122判斷是否有另一法向量,重複執行步驟S4E~S4F,直到執行步驟S4E,即判斷模組1122判斷並無另一個法向量;當執行步驟S4F時,即判斷模組1122判斷此兩相鄰法向量的夾角大於一倍預設值時,則執行步驟S4B。 When the step S4A is performed, that is, the determining module 1122 determines that the angle between the first set of normal vectors is not greater than a preset value, step S5B is performed, that is, the adjusting module 1123 will form the first group of normal vectors. The rotation axis command of a machining data point is adjusted in a linear ratio. In this embodiment, the rotation axis command of the processing data point A is linearly scaled, and step S4E is simultaneously performed, that is, the determination module 1122 determines whether there is another method. Vector, when it is determined that there is no other normal vector, step S5B is executed, that is, the adjustment module 1123 directly adjusts the rotation axis command in the other processing data points constituting the two adjacent normal vectors in a linear proportional manner; When the step S4E is executed, that is, when the determining module 1122 determines that there is another normal vector, the step S4F is performed, that is, the determining module 1122 determines whether the angle between the two adjacent normal vectors is greater than a preset value, when determining the two If the angle between the adjacent normal vectors is not more than one preset value, step S5B is performed, that is, the adjustment module 1123 linearly proportions the rotation axis commands of the first processing data points constituting the set of normal vectors. At the same time, step S4E is performed again, that is, the determining module 1122 determines whether there is another normal vector, and repeats steps S4E to S4F until step S4E is performed, that is, the determining module 1122 determines that there is no other normal vector; In S4F, when the judging module 1122 determines that the angle between the two adjacent normal vectors is greater than a preset value, step S4B is performed.
當執行步驟S4B時,即判斷模組1122判斷並未有另一法向量時,則調整模組1123將組成該組法向量的加工資料點之旋轉軸命令以線性比例調整。 When step S4B is executed, that is, when the determination module 1122 determines that there is no other normal vector, the adjustment module 1123 adjusts the rotation axis command of the processing data points constituting the set of normal vectors in a linear ratio.
當執行步驟S4C時,判斷模組1122判斷法向量、之間的夾角並未大於兩倍預設值時,則執行步驟S5A,即調整模組1123將組成這些法向量、、的第一個至倒數第二個加工資料點的旋轉軸命令以線性內插法調整,意即將加工資料點A、B、C的旋轉軸命令以線性內插法調整,之後,接著執行步驟S5B,即 調整模組1123線性比例地調整加工資料點A、B、C的旋轉軸命令,並同時執行步驟S4E,即判斷是否有另一個法向量,如執行步驟S4E時,判斷模組1122判斷並未有另一個法向量時,則執行步驟S5B,即調整模組1123將最後一個加工資料點的旋轉軸命令以線性比例調整,在本實施例中,係將加工資料點D的旋轉軸命令以線性比例調整,但當執行步驟S4E時,即判斷模組1122判斷有另一個法向量時,則執行步驟S4F,即判斷模組1122判斷此組之兩法向量之夾角是否大於一倍預設值。 When step S4C is performed, the determining module 1122 determines the normal vector , If the angle between the angles is not greater than twice the preset value, step S5A is performed, that is, the adjustment module 1123 will form the normal vectors. , , The rotation axis command of the first to the second last processing data point is adjusted by linear interpolation, that is, the rotation axis command of the processing data points A, B, and C is adjusted by linear interpolation, and then step S5B is performed. That is, the adjustment module 1123 adjusts the rotation axis command of the processing data points A, B, and C linearly proportionally, and simultaneously performs step S4E, that is, whether there is another normal vector. If the step S4E is performed, the determination module 1122 determines and If there is no other normal vector, step S5B is executed, that is, the adjustment module 1123 adjusts the rotation axis command of the last processing data point in a linear ratio. In this embodiment, the rotation axis command of the processing data point D is Linear scaling, but when step S4E is executed, that is, when the determining module 1122 determines that there is another normal vector, step S4F is performed, that is, the determining module 1122 determines whether the angle between the two normal vectors of the group is greater than a preset value. .
當執行步驟S4F時,即判斷模組1122判斷該組兩法向量之間的夾角大於一倍預設值時,則執行步驟S4B;當執行步驟S4F時,即判斷模組1122判斷該組兩法向量之間的夾角未大於一倍預設值時,則執行步驟S5B,即調整模組1123將該組的第一個加工資料點之旋轉軸命令進行線性比例調整,並同時執行步驟S4E,意即判斷模組1122同時判斷是否有另一個法向量,當判斷沒有另一個法向量時,則執行步驟S5B,即調整模組1123直接將組成此兩相鄰法向量之另二加工資料點中的旋轉軸命令以線性比例的方式調整,當執行步驟S4E時,即判斷仍有另一法向量,則再次執行步驟S4F,即判斷模組1122再次判斷該組的兩法向量之間的夾角是否大於一倍預設值。 When the step S4F is executed, that is, the determining module 1122 determines that the angle between the two normal vectors is greater than a preset value, step S4B is performed; when step S4F is executed, the determining module 1122 determines the two methods of the group. When the angle between the vectors is not more than one preset value, step S5B is performed, that is, the adjustment module 1123 linearly adjusts the rotation axis command of the first processing data point of the group, and simultaneously performs step S4E, That is, the determining module 1122 simultaneously determines whether there is another normal vector. When it is determined that there is no other normal vector, step S5B is performed, that is, the adjusting module 1123 directly directly among the other processing data points constituting the two adjacent normal vectors. The rotation axis command is adjusted in a linear proportional manner. When step S4E is performed, that is, it is determined that there is another normal vector, step S4F is performed again, that is, the determination module 1122 determines again whether the angle between the two normal vectors of the group is greater than Double the preset value.
當執行步驟S1~S5後,接著執行步驟S6,如第1、2圖所示,嵌合模組1124接收經調整模組1123調整後之加工資料點A、B、C、D及計算模組1121輸出之第一曲線C1,利用一最佳化演算法將每一個加工資料點A、B、C、D嵌合為第二曲線C2;再執行步驟S7,如第1、2圖所示,嵌合模組1124將位於第一曲線C1之加工資料點A、B、C、D以垂直投影的方式找出位於第二曲線C2之對應點A’、B’、C’、D’。 After performing steps S1 to S5, step S6 is performed. As shown in FIGS. 1 and 2, the fitting module 1124 receives the processed data points A, B, C, D and the calculation module adjusted by the adjustment module 1123. The first curve C1 of the output 1121 is used to fit each of the processing data points A, B, C, and D into the second curve C2 by using an optimization algorithm; and then step S7 is performed, as shown in the first and second figures. The fitting module 1124 finds the corresponding points A', B', C', D' located in the second curve C2 by vertically projecting the processing data points A, B, C, and D located in the first curve C1.
接著,執行步驟S8,如第1、2、3圖所示,嵌合模組1124將複數個對應點A’、B’、C’、D’與第二曲線C2輸出至計算模組1121,計算複數個對應點A’、B’、C’、D’之起始點A’至每一個對應點之曲線長度L,並形成位於第二曲線C2上之複數個新 加工資料點A”、B”、C”、D”,每一個新加工資料點A”、B”、C”、D”包含曲線長度L、第一旋轉軸命令α及第二旋轉軸命令β,例如:新加工資料點A”表示為(L 0 ,α 0 ,β 0),新加工資料點B”表示為(L 1 ,α 1 ,β 1),新加工資料點C”表示為(L 2 ,α 2 ,β 2),新加工資料點D”表示為(L n ,α n ,β n ),n為一正整數,在本實施例中,因加工資料點數量為四,故此處n等於4。 Next, step S8 is performed. As shown in the first, second, and third figures, the fitting module 1124 outputs a plurality of corresponding points A', B', C', D' and the second curve C2 to the calculation module 1121. Calculating a curve length L of a plurality of corresponding points A', B', C', D' from the starting point A' to each corresponding point, and forming a plurality of new processed data points A" located on the second curve C2, B", C", D", each new processing data point A", B", C", D" includes a curve length L, a first rotation axis command α and a second rotation axis command β, for example: new processing data Point A" is expressed as ( L 0 , α 0 , β 0 ), the newly processed data point B" is expressed as ( L 1 , α 1 , β 1 ), and the newly processed data point C" is expressed as ( L 2 , α 2 , β 2 ), the newly processed data point D” is expressed as ( L n , α n , β n ), and n is a positive integer. In the present embodiment, since the number of processed data points is four, n here is equal to 4.
接著,執行步驟S9,如第1、3、4A、4B圖所示,計算模組1121將每一個新加工資料點A”、B”、C”、D”之曲線長度L與第一旋轉軸命令α形成一第一向量點A’’’、B’’’、C’’’、D’’’,每一個新加工資料點A”、B”、C”、D”之曲線長度L與第二旋轉軸命令β形成一第二向量點A’’’’、B’’’’、C’’’’、D’’’’,因此,複數個新加工資料點A”、B”、C”、D”產生複數個第一向量點A’’’、B’’’、C’’’、D’’’與複數個第二向量點A’’’’、B’’’’、C’’’’、D’’’’。 Next, step S9 is executed. As shown in the first, third, fourth, and fourth diagrams, the calculation module 1121 sets the curve length L of each of the newly processed data points A", B", C", and D" with the first rotation axis. The command α forms a first vector point A''', B''', C''', D''', and the length L of each newly processed data point A", B", C", D" and The second rotation axis command β forms a second vector point A′′′′, B′′′′, C′′′′, D′′′′, and therefore, a plurality of new processing data points A”, B”, C", D" generates a plurality of first vector points A''', B''', C''', D''' and a plurality of second vector points A'''', B'''', C'''', D''''.
接著,執行步驟S10,如第1、3、4A、4B圖所示,計算模組1121輸出第二曲線C2、複數個第一向量點A’’’、B’’’、C’’’、D’’’及複數個第二向量點A’’’’、B’’’’、C’’’’、D’’’’至嵌合模組1124,嵌合模組1124利用最佳化演算法將複數個第一向量點A’’’、B’’’、C’’’、D’’’與複數個第二向量點A’’’’、B’’’’、C’’’’、D’’’’分別形成一第三曲線C3與一第四曲線C4,並輸出第二曲線C2、第三曲線C3及第四曲線C4至插值計算模組1125。 Next, step S10 is executed. As shown in the first, third, fourth, and fourth diagrams, the calculation module 1121 outputs the second curve C2, the plurality of first vector points A''', B''', C''', D''' and a plurality of second vector points A'''', B'''', C'''', D'''' to the fitting module 1124, and the fitting module 1124 is optimized The algorithm divides a plurality of first vector points A''', B''', C''', D''' and a plurality of second vector points A'''', B'''', C'' '', D'''' respectively form a third curve C3 and a fourth curve C4, and output a second curve C2, a third curve C3 and a fourth curve C4 to the interpolation calculation module 1125.
最後,執行步驟S11,如第1、3、4A、4B圖所示,插值計算模組1125接收嵌合模組1124輸出之第二曲線C2、第三曲線C3及第四曲線C4,並利用第二曲線C2、第三曲線C3及第四曲線C4插值計算出複數個新旋轉軸命令與複數個新幾何軸命令,插值計算模組1125輸出複數個新旋轉軸命令與複數個新幾何軸命令至控制模組113,控制模組113接收插值計算模組1125輸出之新旋轉軸命令與新幾何軸命令並控制加工裝置12之兩個旋轉軸122、123及三個幾何軸124、125、126。 Finally, step S11 is performed. As shown in the first, third, fourth, and fourth embodiments, the interpolation calculation module 1125 receives the second curve C2, the third curve C3, and the fourth curve C4 output by the fitting module 1124, and uses the The two curve C2, the third curve C3 and the fourth curve C4 are interpolated to calculate a plurality of new rotation axis commands and a plurality of new geometry axis commands, and the interpolation calculation module 1125 outputs a plurality of new rotation axis commands and a plurality of new geometric axis commands to The control module 113 receives the new rotary axis command and the new geometric axis command output by the interpolation calculation module 1125 and controls the two rotary axes 122, 123 and the three geometric axes 124, 125, 126 of the processing device 12.
在上述本發明實施例中,最佳化演算法例如是一最小平方誤差演算法、一最小曲率變化演算法或一最小誤差演算 法,在此本發明並不設限;而本實施例舉出四個加工資料點,然其加工資料點、對應點、新加工資料點、第一向量點及第二向量點數量並不限定於四個,加工資料點數量可視實際加工而定,在此本發明並不設限。 In the above embodiment of the present invention, the optimization algorithm is, for example, a least square error algorithm, a minimum curvature change algorithm, or a minimum error calculation. The present invention is not limited thereto; however, the present embodiment cites four processing data points, but the number of processing data points, corresponding points, newly processed data points, first vector points, and second vector points is not limited. In four, the number of processing data points may be determined by actual processing, and the invention is not limited thereto.
在上述本發明實施例中,刀具姿態係指刀具的方向,例如是刀具尖端的方向或刀具相位方向,藉由調整模組1123根據幾何軸命令之移動量線性比例地調整旋轉軸命令的方式,可將兩個旋轉軸及三個幾何軸的速度互相匹配,而調整模組1123以線性內插法調整旋轉軸命令,意即調整刀具姿態,以避免兩相鄰刀具向量所形成的平面間變化過於激烈,並藉由計算模組1121計算垂直於兩刀具向量之一法向量、判斷模組1122判斷法向量之間的夾角是否大於預設值及調整模組1123根據幾何軸命令之移動量線性比例地調整旋轉軸命令之方式,可減少使用者輸入不恰當的加工程式而造成加工品質不佳的機會,不恰當的加工程式意即不恰當的加工路徑規劃。 In the above embodiment of the present invention, the tool attitude refers to the direction of the tool, for example, the direction of the tool tip or the tool phase direction, and the adjustment module 1123 linearly adjusts the rotation axis command according to the movement amount of the geometric axis command. The speeds of the two rotating shafts and the three geometric axes can be matched with each other, and the adjusting module 1123 adjusts the rotating shaft command by linear interpolation, which means adjusting the tool posture to avoid the change between the planes formed by the two adjacent tool vectors. Too intense, and by calculating the module 1121 to calculate a normal vector perpendicular to the two tool vectors, the judgment module 1122 determines whether the angle between the normal vectors is greater than a preset value, and the adjustment module 1123 linearly moves according to the geometric axis command. Proportional adjustment of the rotary axis command reduces the chances of poor input quality due to user input of inappropriate machining programs. Inappropriate machining programs mean improper machining path planning.
再者,在上述本發明實施例中,藉由所嵌合出的第三曲線與第四曲線,可增加加工裝置12的加工路徑平滑度,以提升五軸加工之加工平整度與加工精度。 Furthermore, in the above embodiment of the present invention, the smoothness of the processing path of the processing device 12 can be increased by the third curve and the fourth curve that are fitted to improve the processing flatness and processing accuracy of the five-axis machining.
更具體而言,在上述本發明實施例中,藉由本實施例之運算單元112,可將使用者所規劃的五軸加工路徑之加工程式達到加工路徑平滑化,並且使用者無須將加工程式大幅修改,也無須將加工程式中大量的資料逐一檢查異常處,以達到降低使用者修正加工程式所需耗費的時間、降低五軸加工程式的使用門檻及提升加工品質之目的。 More specifically, in the embodiment of the present invention, the arithmetic unit 112 of the embodiment can smooth the processing path of the five-axis machining path planned by the user, and the user does not need to process the processing program significantly. Modifications do not require a large amount of data in the processing program to check the abnormalities one by one, so as to reduce the time required for the user to correct the processing program, reduce the use threshold of the five-axis processing program, and improve the processing quality.
以上所述僅為本發明之較佳實施例,並非用以限定本發明之權利範圍;同時以上的描述,對於相關技術領域之專門人士應可明瞭及實施,因此其他未脫離本發明所揭示之精神下所完成的等效改變或修飾,均應包含在申請專利範圍中。 The above description is only the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. The above description should be understood and implemented by those skilled in the relevant art, so that the other embodiments are not disclosed. Equivalent changes or modifications made under the spirit shall be included in the scope of the patent application.
1‧‧‧五軸加工數值控制系統 1‧‧‧5-axis machining numerical control system
11‧‧‧數值控制裝置 11‧‧‧Numerical control device
111‧‧‧使用者介面 111‧‧‧User interface
112‧‧‧運算單元 112‧‧‧ arithmetic unit
1121‧‧‧計算模組 1121‧‧‧Computation Module
1122‧‧‧判斷模組 1122‧‧‧Judgement module
1123‧‧‧調整模組 1123‧‧‧Adjustment module
1124‧‧‧嵌合模組 1124‧‧‧Fitting module
1125‧‧‧插值計算模組 1125‧‧‧Interpolation calculation module
113‧‧‧控制模組 113‧‧‧Control Module
12‧‧‧加工裝置 12‧‧‧Processing device
121‧‧‧刀具 121‧‧‧Tools
122、123‧‧‧旋轉軸 122, 123‧‧‧Rotary axis
124、125、126‧‧‧幾何軸 124, 125, 126‧‧‧ geometry axes
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW103137566A TWI541623B (en) | 2014-10-30 | 2014-10-30 | Five-axis numerical control system and numerical controlling method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW103137566A TWI541623B (en) | 2014-10-30 | 2014-10-30 | Five-axis numerical control system and numerical controlling method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201616254A TW201616254A (en) | 2016-05-01 |
| TWI541623B true TWI541623B (en) | 2016-07-11 |
Family
ID=56508563
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW103137566A TWI541623B (en) | 2014-10-30 | 2014-10-30 | Five-axis numerical control system and numerical controlling method thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI541623B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11378493B1 (en) | 2020-12-24 | 2022-07-05 | Industrial Technology Research Institute | Method for motion test and control host of movable machinery |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI791373B (en) * | 2022-01-10 | 2023-02-01 | 凌華科技股份有限公司 | Cutting speed planning system and method, non-transient recording medium and cutting system |
-
2014
- 2014-10-30 TW TW103137566A patent/TWI541623B/en active
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11378493B1 (en) | 2020-12-24 | 2022-07-05 | Industrial Technology Research Institute | Method for motion test and control host of movable machinery |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201616254A (en) | 2016-05-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108369407B (en) | Tool path correction device and tool path correction method | |
| Liu et al. | Development and implementation of a NURBS interpolator with smooth feedrate scheduling for CNC machine tools | |
| CN106647623B (en) | The smooth interpolating method of five-axle linkage that a kind of geometric accuracy and linking speed optimize | |
| TWI512418B (en) | A five axis flank milling system for machining curved surface and a toolpath planning method thereof | |
| Hu et al. | Five-axis tool path generation based on machine-dependent potential field | |
| CN103412514B (en) | Paths planning method in a kind of multi-shaft interlocked belt sanding processing | |
| CN105759726B (en) | Adaptive curve interpolating method based on profile errors constraint | |
| CN109918807B (en) | A local tool path smoothing method with optimized curvature | |
| JP5615377B2 (en) | Tool path generation method and generation apparatus | |
| CN105005265B (en) | A Feed Rate Planning Method for NC Machining Based on Curve Smooth Deformation | |
| CN110399681A (en) | A Parametric Modeling Method of Edge Curve of Arc End Mill | |
| CN105785913B (en) | Cutter path cutting direction optimization method based on machine spindle rate limitation | |
| CN111819504A (en) | System, method and apparatus for toolpath virtualization and optimization | |
| CN108196511B (en) | Error prediction method for turning track of spiral cutter | |
| CN110727246B (en) | Tool and workpiece instantaneous contact contour extraction method based on tool position file | |
| CN105717874B (en) | Five-axis numerical control machining singular region tool location point optimization method | |
| TWI541623B (en) | Five-axis numerical control system and numerical controlling method thereof | |
| CN110362039B (en) | Five-axis machining workpiece placement posture optimization method | |
| JP2016014531A (en) | Manufacturing device and manufacturing method for manufacturing blower blade with less imbalance | |
| US20170343982A1 (en) | Method for machining a workpiece by means of a chip-removing tool on a numerically-controlled machine tool | |
| CN107544433A (en) | Five-axle number control machine tool plane machining process rose cutter and workpiece contact zone semi analytic modeling method | |
| CN105629881B (en) | Five-axis machining numerical control system and numerical control method thereof | |
| CN108098515B (en) | Method for machining drill groove type by using multiple formed grinding wheels | |
| TWM496786U (en) | Five-axis numerical control system | |
| CN105676777B (en) | Towards the two-way interpolation numerical control code generating method of triangle mesh curved surface and its application |