本文在ARM控制器上研製了兩種解譯器控制語言,一種是Basic-like的解譯器語言是為了讓使用者可以淺顯易懂的操作加工平台,此解譯器具有圖片雕刻、點雕刻以及遞迴等功能;另一種則是參考嘉昇公司所研製加工機的G/M Code,設計出應用在雷射加工機上的G/M Code,使用者可自行選擇常用或是方便操控雷射雕刻機的語言進行控制。其中,本文將自行定義變數、數值的運算以及三角函數的運算這些數值定義的方法統一為一種,方便使用者在程式的撰寫上不用記住兩種不一樣型態定義變數以及數值運算的方法。 在撰寫解譯碼時,為了避免使用者撰寫解譯碼程式時出錯,本文在解譯器中加入了錯誤中斷的指令,在解譯碼判斷出錯時會在控制器上顯示出錯誤的行號與錯誤訊息,可以讓使用者知道程式是在哪裡出錯。 最後本文將發展完成的解譯器,使用本解譯器所具有特點,如自行定義變數、數值的運算以及三角函數的運算、點陣圖檔的雕刻以及迴圈遞迴等功能,展現本解譯器的功能,並使用擷取解譯器所算出來的點展現在Excel的圖檔上展現圖形。
.This is the article that is researching the development of ARM controller on two language interpreter: the first one is Basic-like which making the users are easy to understand the manual on controlling the machines. This interpreter’s function includes the photo-sculpture, dot-sculpture and recursion. Another interpreter is consulting the idea from G/M Code by Ja-San Co.; this design is using the laser on G/M Code; the users can choose “random” or “easy-function” on controlling the interpreter of the laser cutting. In this research, it combines Definition of variables, the calculation of value and the calculation of the trigonometric function to be one calculation. It helps the users easy to write the program for the machine instead of memorize two or more different ways on definition of variables or the calculation of the value. While writing the interpreter, this research also includes the fault’s alarm in order to prevent the users typing the wrong interpreter program into the machine. While the interpreter receives the wrong order; the users can figure out which part of the program is wrong by reading the fault’s order message on the monitor. Again, this research would combine all the character of the interpreter, such as the definition of variables, the calculation of the value, the calculation of the trigonometric function and the photo-sculpture and dot-sculpture to represent this new interpreter function and using the retrieve-interpreter to calculate the dots to present the graph on Excel.