Screaminlean / SCL-SW-GRBL

Solidworks CamWorks Post Processor for Generic 3 axis CNC using a GRBL controller.
MIT License
1 stars 0 forks source link

Unknown characters appearing in Gode files #1

Open iammmmmmm opened 4 months ago

iammmmmmm commented 4 months ago

问题描述: 1.无论我如何调整soildworks Cam 的设置,Gode文件头总是出现一行未知字符(见图一) 2.紧接未知字符的下一行便是一句错误的Gcode,即紧接着的G53.当我在UGS尝试执行这个文件,总是会在这个G53处出错。(见图二) 3.无论如何在cam软件中设置文件末尾总是会出现一句很危险的指令,命令机器移动到一个很大的错误坐标(见图三) 4.与问题3类似,在文件开头总是会出现一句危险的指令,命令机器错误的向下移动(见图四) 我的尝试: 1.我尝试手动删除或者修复所有错误的行,这样做似乎是可行的。(但是这样并不是个好选择) 2.换用别的后处理程序,Grbl-Post](https://github.com/msbealo/GRBL-Post)出现了相同的问题(见图五,六) 我的设备,软件,环境等信息: My device, software, environment, and other information:

GRBL version 1.1 +ardunio un R3 +cnc sheild V3+a4988*4 ugsplatform-win Soildworks soildworks cam

Problem Description:

  1. No matter how I adjust the settings in SolidWorks CAM, there is always a line of unknown characters at the beginning of the G-code file (as shown in Image 1).
  2. Following the unknown characters, there is an incorrect G-code line, specifically a G53 command. When I try to execute this file in UGS (Universal G-code Sender), it always errors out at this G53 line (as shown in Image 2).
  3. Regardless of the settings in the CAM software, there is always a very dangerous command at the end of the file, instructing the machine to move to a very large and incorrect coordinate (as shown in Image 3).
  4. Similar to issue 3, there is always a dangerous command at the beginning of the file, instructing the machine to move downwards incorrectly (as shown in Image 4).

My Attempts:

  1. I tried manually deleting or fixing all the erroneous lines, which seems to be a viable solution. (But this is not a good choice.)
  2. I switched to a different post-processor, Grbl-Post, but encountered the same issues (as shown in Images 5 and 6).

Please note that the link provided is for reference and should be visited with caution as I cannot guarantee the safety or content of external sites. 图一 image 1: image 图二 image 2: image 图三 image 3: image 图四 image4: image 图五,六 image 5,6: image image

iammmmmmm commented 4 months ago

我发现原因了,使用EControl syntax editor 编辑 后处理程序的scr文件发现这些都是写死的,我不明白为什么要这样写,有知道的吗?
I found the reason. When editing the post-processing program’s .scr file using EControl syntax editor, I discovered that everything is hardcoded. I don’t understand why it’s written this way. Does anyone know?” image