簡易檢索 / 詳目顯示

研究生: 蔣承儒
Chiang, Cheng-Ju
論文名稱: 工具機數控程式編譯系統研究暨行動化人機實現
NC Program Compiling System and Mobile Human-machine Interface Implementation for Machine Tool
指導教授: 陳響亮
Chen, Shang-Liang
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 製造資訊與系統研究所
Institute of Manufacturing Information and Systems
論文出版年: 2018
畢業學年度: 106
語文別: 中文
論文頁數: 60
中文關鍵詞: 數控程式編譯器直譯器遠端監控
外文關鍵詞: NC Program, Compiler, Interpreter, Remote Control
相關次數: 點閱:76下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 數控程式編譯是數值控制系統中最重要的工作之一,GM Code可以經由編譯器轉換為控制器的內部命令,國內控制器開發時,也將其視為關鍵技術之一。另一方面,工具機的加工監控主要以人力進行,由於機台控制必須有現場操作人員至機台旁操控使用,侷限於時間與空間,缺乏操控的彈性及行動性。對於此問題,近年來人員透過行動裝置監控加工成為趨勢。
    有鑑於此,本研究發展以下兩大重點研究項目:(1)開發數控程式混合式編譯系統,本研究探討GM Code的使用規則,並依據規則實現數控程式編譯,可將輸入之數控程式轉換為中間碼。直譯器以中間碼作為輸入,並產生控制器內部命令。本研究提出的系統在GM Code編譯方面規劃一種新的語彙分析、語法分析、語意分析的實現方法,以及對於模態G碼進行分析與處理,使其能正確的轉換。(2)開發一行動化人機介面,提供使用者進行機台監控,透過Socket連線的方式與編譯系統進行資訊傳輸。本研究於此項傳輸自訂其封包傳輸規格,以實現行動化加工。編譯伺服器由收到的封包解析出要進行的命令,可以依據命令執行控制器內部命令或者執行編譯器。讓使用者可以遠距離監控機台並達到行動化加工,有效解決生產製造時操作人員受限於時間與空間的問題。
    本研究將數控程式混合式編譯系統實踐於運動控制器上,再以行動化人機介面與運動控制器連線,進行遠端加工監控。此實作結果顯示,加工行為與輸入之GM Code相同,表示混合式編譯系統可以實際導入至加工環境中。

    The controller provides the user with GM Code input to operate the machine tool, and hence, controls the cutting path of the machine tool. GM Code can be converted to internal commands of the controller via compiler, and it is considered as one of the key technologies when developing controllers. In another aspect, machining monitoring and machining operations must rely on field operators, which causes time and space restriction. In order to deal with this problem, it has become a trend to monitor and operate machining through mobile devices in recent years.
    For these purposes, this study has the following two major projects. (1) Developed a hybrid programming system for NC programs. This study explores the rules of GM Code, implements NC program compilation according to the rules. It can convert the input NC program into an intermediate code. The interpreter takes the intermediate code as input and generates controller internal commands. (2) Develop a human-machine interface, provide users with machine monitoring and transmit user commands to the hybrid programming system via Socket connection. The compile server parses out the command from the received packet and execute the controller internal command or execute the compiler according to the command.
    The system proposed in this study plans a new lexical analysis, syntax analysis, semantic analysis implementation method in GM Code compilation. We analyze and process the modal G code so that it can be converted correctly, and implement the human-machine interface, so that users can monitor the machine remotely and achieve mobile processing, which solves the problem that operators are limited by time and space during manufacturing.

    摘 要 II 致 謝 VIII 目 錄 IX 表目錄 XI 圖目錄 XIII 第一章 緒論 1 1.1 研究背景與動機 1 1.2 研究目的 2 1.3 章節敘述 2 第二章 文獻探討 3 2.1 GM Code格式 3 2.2 編譯器原理 7 2.2.1 編譯器 7 2.2.2 直譯器 8 2.2.3 混合式編譯器 8 2.3 Socket通訊機制 9 第三章 行動化人機介面規劃與設計 10 3.1 行動化人機資訊流程 12 3.2 行動化人機介面 13 3.3 編譯伺服器連線機制 14 3.3.1 自訂封包格式 14 3.3.2 封包實作 17 3.3.3 Socket Client/Server連線機制 20 第四章 混合式編譯系統設計 23 4.1 數控程式編譯流程 23 4.2 前置處理 24 4.3 語彙分析 24 4.4 語法分析 30 4.5 語意分析 35 4.6 中間碼產生 37 4.7 直譯 39 4.8 混合式編譯系統導入 46 第五章 系統實作與測試分析 47 5.1 實驗平台 47 5.2 行動化人機介面實作 49 5.2.1 機台機構參數設定 49 5.2.2 GM Code程式編輯 51 5.2.3 程式執行 52 5.3 實際運動命令驗證 53 第六章 結論 58 參考文獻 59

    [1] 蔡宜真,“2018年1月台灣工具機產業現況報導”,取自http://www.tami.org.tw/market/taiwan_mt_2018_01.html。
    [2] 經濟部精密機械研究發展中心,“國內控制器發展現況”,取自http://www.pmc.org.tw/upload/files/1031001/PMC/%E5%9C%8B%E5%85%A7%E6%8E%A7%E5%88%B6%E5%99%A8%E7%99%BC%E5%B1%95%E7%8F%BE%E6%B3%81V5.pptx。
    [3] 吳明機,“提升機械產業競爭優勢措施”,取自https://www.ey.gov.tw/File/58B67BEC86A87CF8?A=C。
    [4] Lai, Xiaoyan, “A design of general compiler for NC code in embedded NC system,” Industrial Electronics and Applications (ICIEA), 2014 IEEE 9th Conference on. IEEE, pp. 1515-1519, 2014.
    [5] Hong, H., Yu, D., Zhang, X., Chen, L., “Researh on a new model of numerical control program interpreter,” Advanced Computer Control (ICACC), 2010 2nd International Conference on Vol. 2, pp. 467-472, 2010.
    [6] 洪海涛、于东、陈龙、武南,“数控代码解释器模块化结构的研究与实现”,小型微型计算机系统,34卷第3期,頁480-485,2013。
    [7] Rüßmann, M., Lorenz, M., Gerbert, P., Waldner, M., Justus, J., Engel, P., & Harnisch, M, “Industry 4.0: The future of productivity and growth in manufacturing industries,” Boston Consulting Group, 2015.
    [8] 徐永源,“數控工具機”,高立圖書,民國八十七年。
    [9] Siemens, “SINUMERIK 802D sl/840D/840D sl/840Di//840Di sl/810D Programming Manual ISO Milling Programming Guide,” Retrieved from https://cache.industry.siemens.com/dl/files/188/28755188/att_27502/v1/PGM_0407_en.pdf.
    [10] 新代科技,“銑床程式製作說明書”,取自http://www.syntecclub.com.tw/manual/%E9%8A%91%E5%BA%8A%E7%A8%8B%E5%BC%8F%E8%A3%BD%E4%BD%9C%E8%AA%AA%E6%98%8E%E6%9B%B8.pdf。
    [11] Aho, A., R. Sethi, and J. Ullman, “Compilers: principles, techniques, and tools,” Addison-Wesley Publishing Co., 1986.
    [12] 蕭文龍、徐瑋廷,“電腦網路概論與實務(第六版)”,2014。
    [13] 范劭寧,“CNC控制器之混合式編譯器原理研究與發展以PCB鑽孔機Excellon碼為例”,國立成功大學製造工程研究所,2008。
    [14] 張家瑋,“具Macro及GM-Code 編譯功能之CNC控制器混合編直譯器研究”,國立成功大學製造工程研究所,2008。
    [15] 陳響亮、郭晟宏、蕭應涵、王欣如、李庚學,“基於代理人技術之射出成型機遠端監控系統架構之研究”,精密機械與製造科技研討會(PMMT),台灣墾丁,2013。
    [16] 陳響亮、林宥辰、陳韻堯、王欣如,“基於射出成型機之資訊擷取代理人架構設計”,精密機械與製造科技研討會(PMMT),台灣墾丁,2014。
    [17] Google, “Protocol Buffers”, Retrieved from: https://developers.google.com/protocol-buffers/.
    [18] 李桂銘,“EPCIO即時性運動控制函式庫介紹與實作”,機械工業雜誌,349期,頁29-37,2012。
    [19] 陳響亮,陸品丞,“基於EMP之行動化系統發展與應用”,工業技術研究院補助專題研究計畫結案報告,2016。

    下載圖示 校內:2023-07-18公開
    校外:2023-07-18公開
    QR CODE