Request for Community Feedback on g-code++ (sterp) Integration with LinuxCNC

More
1 year 2 months ago #332989 by smv
Hi everyone! I’ve recently been working on integrating g-code++ (a lightweight g-code interpreter inspired by the rs274ngc NIST g-code specification) into the LinuxCNC ecosystem. Before I submit a pull request, I’d like to get some community feedback so as to ensure that it fits well and is aligned with the project's direction.

Link to my original repo:  github.com/s-mv/gcode-plus-plus
Link to the LinuxCNC fork:  github.com/s-mv/linuxcnc/tree/s-mv/sterp (s-mv/sterp branch)
Demo video: 
What I’ve Done
  • Integrated g-code++ into the LinuxCNC environment.
  • Verified it works for 3-axis machines on LinuxCNC.
  • Documented the integration process and architecture.
  • Set up an ANTLR4-based parser for g-code interpretation.
Key features
  • Control flow: Support for
    Code:
    while
    loops,
    Code:
    for
    loops,
    Code:
    if
    statements, imports,
    Code:
    continue
    , and
    Code:
    break.
  • g-code compatibility: Supports standard G-codes like G0, G1, G2, G3, G20, G21, G54, M3, M4, etc.
Feedback would be greatly appreciated, especially from people who have experience using g-code interpreters with LinuxCNC or have experience maintaining/debugging the project. Eager to make this integration as frictionless as possible so that it meets the needs of the community. Thanks in advance, and I’m looking forward to hearing your thoughts!

Best regards,
s-mv (Shreerang Vaidya)
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #333055 by andypugh
Does this exist as an alternative plug-in interpreter for LinuxCNC?

LinuxCNC already supports this, though the only alternative that currently exists is called canterp and just passes canonincal commands straight through.

I don't know how much traction you will get with a new G-code dialect, not even well-supported alternatives to G-code like STEP-NC have made much of a dent.

If it's a plug-in interpreter for existing LinuxCNC then I would support it's inclusion in principle.

Are you committed to supporting it for the next 20 years or so?
The following user(s) said Thank You: smv

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #333088 by pippin88
Please tell us the advantages of gcode++
The following user(s) said Thank You: smv

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #333278 by smv
Right now gcode++ extends g-code by introducing for loops, while/do-while loops, as well as imports (currently working on test cases for the same for the latest LinuxCNC release).

The inclusion of these control structures and import statements could greatly improve readability and code reusability.

It also ships with an in-house REPL for dry-running programs that can be used outside of LinuxCNC and has richer logging - I intend to add a simple debugger to it possibly in the future.

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #333279 by smv
Thanks a lot for reaching out!

Yes, in the current fork, it lives under src/emc/sterp as a plug-in interpreter.
In fact, I modeled it after studying how canterp works.

I understand that it might not gain much traction.

I'd love to maintain and extend the project as long as life permits me! Currently, I’m just an undergraduate, so I can’t promise a fixed 20-year roadmap just yet, but I've built sterp/gcode++ with maintainability in mind.
I might also extend it in the near future and add more preliminary unit tests.

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #333671 by andypugh

Right now gcode++ extends g-code by introducing for loops, while/do-while loops, as well as imports (currently working on test cases for the same for the latest LinuxCNC release).
You know that LinuxCNC G-code already has do/while loops? 

linuxcnc.org/docs/stable/html/gcode/o-code.html
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.425 seconds
Powered by Kunena Forum