Enhancing G-Code Programming in Cnc Machining Using Chatgpt: A Comparative Study of Gpt-3.5 and Gpt-4.0
19 Pages Posted: 29 Aug 2024
Abstract
This study investigates the effectiveness of generating ISO G-code for 3-axis machining using OpenAI's Chat Generative Pre-Trained Transformer models, specifically ChatGPT-3.5 and the latest GPT-4o. G-code (RS-274-D, ISO 6983) translates human instructions into machine-readable commands that manage toolpaths, spindle speeds, and feed rates to produce specific object features. Traditionally, G-code is created manually or via computer-aided manufacturing (CAM) software paired with machine-specific post-processors, both of which can be time-consuming and costly. This research aimed to assess the viability and performance of selected large language models (LLMs) in generating G-code. The evaluation was conducted through three distinct phases on an example part requiring 3-axis machining. These phases included: (1) the independent generation of G-code for the example part, (2) the interpretation of G-code generated separately in CAM software, and (3) the detection and simplification of G-code errors. The results revealed varying competencies with promising results.
Keywords: generative artificial intelligence, intelligent manufacturing, large language models, ChatGPT, CNC machining, ISO programming
Suggested Citation: Suggested Citation