[gnea/grbl-Mega Issue#57] Parser state message question

未分类 bolang 3周前 (10-15) 7次浏览 0个评论

Issue #57 | 状态: 已关闭 | 作者: barma1ey | 创建时间: 2018-04-03


As far as I know, grbl doesn’t allow mixing $-commands ($G in this case) and regular G-codes together.
Even if it does, the solution is ugly. Is there a simple way to keep active codes up-to-date while streaming? Wiki says nothing about this. Thanks.


评论 (4)

#1 – winder 于 2018-04-03

Most grbl interfaces end up implementing a gcode parser eventually and keep track of the state in parallel to grbl. Here are a few examples:
* UGS: GcodeParser.java
* bCNC: CNC.py
* Grbl-Panel: GrblState.vb
* LaserGRBL: StateBuilder.cs


#2 – chamnit 于 2018-04-03

@barma1ey : It’s not clear why you would want to combine Grbl $ commands with a line of g-code. Unless you want to know the parser state after each g-code block. If so, that is a waste of bandwidth. It’s usually not necessary to know the state that closely. Do you have a particular application that requires it?


#3 – barma1ey 于 2018-04-03

@winder Yes, i know this. Of course, to parse each line before sending it to grbl seems to be the most obvious / easiest way. But the planner says it is not so good idea. Need to implement a queue

@chamnit I am planning to install some kind of tool change device on my machine. semi-automatic maybe. The idea was to pause program (M1 M6 Tx) when change is required, and state string was intended to notify operator which tool to use.


#4 – chamnit 于 2018-04-03

@barma1ey : In that case, it would be best to analyze the g-code prior to sending tool change g-codes (not M6 itself since Grbl doesn’t support it). You can easily wait until you get a reply from Grbl upon parsing the prior g-code line before doing anything related to a tool change. No need to constantly query for g-code parser state.


原始Issue: https://github.com/gnea/grbl-Mega/issues/57

喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址