少样本基于视觉语言模型的CNC加工G代码和人机界面验证
Few-Shot VLM-Based G-Code and HMI Verification in CNC Machining
AI总结:
本文提出基于视觉语言模型的少样本方法,用于验证CNC加工中G代码与人机界面的错误和安全状态。
摘要:
手动生成G代码对于学习CNC机床的操作至关重要。先前的G代码验证工作使用大型语言模型(LLMs),主要检查书面编程中的错误。然而,CNC加工需要广泛使用和了解人机界面(HMI),它显示机器状态和错误。LLMs目前缺乏利用HMI知识的能力,因为它们无法访问视觉模态。本文提出了一种基于少样本视觉语言模型(VLM)的验证方法,同时评估G代码和HMI显示的错误和安全状态。输入数据集包括配对的G代码文本和相关的HMI截图,来自一台15斜面PRO车床,包括正确和易出错的案例。为了实现少样本学习,VLM被提供一个基于先前启发式知识的结构化JSON模式。确定提示后,包含错误或无错误的G代码和HMI实例被用作少样本示例来指导VLM。然后模型通过多个错误的G代码和HMI错误场景进行评估,以比较零样本VLM的表现。VLM显示,少样本提示导致整体提高了检测HMI错误和与G代码不一致的能力,从而实现了更全面的调试。因此,所提出的框架被证明适用于验证通常在CNC培训中开发的手工生成的G代码。
英文摘要:
Manual generation of G-code is important for learning the operation of CNC machines. Prior work in G-code verification uses Large-Language Models (LLMs), which primarily examine errors in the written programming. However, CNC machining requires extensive use and knowledge of the Human-Machine Interface (HMI), which displays machine status and errors. LLMs currently lack the capability to leverage knowledge of HMIs due to their inability to access the vision modality. This paper proposes a few-shot VLM-based verification approach that simultaneously evaluates the G-code and the HMI display for errors and safety status. The input dataset includes paired G-code text and associated HMI screenshots from a 15-slant-PRO lathe, including both correct and error-prone cases. To enable few-shot learning, the VLM is provided with a structured JSON schema based on prior heuristic knowledge. After determining the prompts, instances of G-code and HMI that either contain errors or are error free are used as few-shot examples to guide the VLM. The model was then evaluated in comparison to a zero-shot VLM through multiple scenarios of incorrect G-code and HMI errors with respect to per-slot accuracy. The VLM showed that few-shot prompting led to overall enhancement of detecting HMI errors and discrepancies with the G-code for more comprehensive debugging. Therefore, the proposed framework was demonstrated to be suitable for verification of manually generated G-code that is typically developed in CNC training.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。