CAM Gcode

Drop in here to discuss whatever you want.

Moderator: andrew

Post Reply
kap34443
Newbie Member
Posts: 3
Joined: Mon Aug 10, 2020 6:20 pm

CAM Gcode

Post by kap34443 » Mon Aug 10, 2020 6:40 pm

Hello, I am trying to send a test sample gcode to GRBL 1.1 (currently the latest version...I think) but am getting errors when I use GRBL Candle, the Gcode is unsupported, G40,G71,G91.1 are the highlighted codes when I use online Gcode simulator, there is probably more. GRBL candle (Gcode sender and visualiser) shows error 22, which apparently can be solved by adding feed command but I don't know how to solve G40,G71 and G91.1 which are all unsupported but can be seen in GRBL (postprocessor) and G-code (mm) configurations.

ideally creating Gcode without manually editing to suit machine is the objective.

User avatar
andrew
Site Admin
Posts: 7436
Joined: Fri Mar 30, 2007 6:07 am

Re: CAM Gcode

Post by andrew » Tue Aug 11, 2020 7:58 pm

The header is defined in the "Grbl (offset) [mm]" postprocessor, file "postprocessors/GrblMM.js":

Code: Select all

this.header = [
        "[N] G21 G17 G90 G40 G49 G80",
        "[N] G71 G91.1"
    ];
It depends also on the Grbl version if a specific code is supported or not. G40, G91.1 should be supported from Grbl v0.9i. G71 generally switches to Millimeter mode while G70 switches to Inch mode. It's not clear at this point whether this is supported in any Grbl version or not.

I'd recommend to simply remove the unsupported codes from the postprocessor header definition or to create your own postprocessor, for example file "postprocessors/MyGrblMM.js" with contents:

Code: Select all

include("Grbl.js");

function MyGrblMM(documentInterface, camDocumentInterface) {
    Grbl.call(this, documentInterface, camDocumentInterface);

    this.decimals = 4;
    this.unit = RS.Millimeter;
    this.outputOffsetPath = true;

    this.header = [
        "[N] G21 G17 G90 G49 G80"
    ];
}

MyGrblMM.prototype = new Grbl();
MyGrblMM.displayName = "My Grbl (offset) [mm]";

kap34443
Newbie Member
Posts: 3
Joined: Mon Aug 10, 2020 6:20 pm

Re: CAM Gcode

Post by kap34443 » Fri Aug 14, 2020 6:27 pm

I do not know how to open postprocessor, I can locate it (from where QCAD/CAM is installed, its Local disk C:/Program Files/QCADCAM/postprocessors). I want to remove unsupported code from GrblMM (which is in the postprocessors folder) as suggested but how do I open the right file.

I have read through this tutorial but am missing a step or two: https://qcad.org/en/qcad-cam-postprocessor.
Would be nice to have a Youtube channel that provides video tutorials for the CAM functions as am more of a visual learner (am probably not the only one). : ]

Thank you for your help so far Andrew.

User avatar
andrew
Site Admin
Posts: 7436
Joined: Fri Mar 30, 2007 6:07 am

Re: CAM Gcode

Post by andrew » Fri Aug 14, 2020 8:29 pm

It might be easier if you just save the attached file to your QCAD/CAM directory under postprocessors (C:/Program Files/QCADCAM/postprocessors).

Then you'd have to select "My Grbl (offset) [mm]" from the post processor selection at the top in the QCAD/CAM application window.
Attachments
MyGrblMM.js
(379 Bytes) Downloaded 50 times

jeffk
Registered Member
Posts: 2
Joined: Fri Aug 14, 2020 9:04 pm

Re: CAM Gcode

Post by jeffk » Fri Aug 14, 2020 9:24 pm

andrew wrote:
Tue Aug 11, 2020 7:58 pm
G71 generally switches to Millimeter mode while G70 switches to Inch mode. It's not clear at this point whether this is supported in any Grbl version or not.
For reference this is what is documented for Grbl.

Code: Select all

G20 or G21 - Inch and millimeter mode
I don't understand why it is unclear what G70 and G71 does in Grbl. The source code for Grbl is open to anyone and there is no G70 or G71 in the code base. So why send it?

I purchased the CAM version of QCAD yesterday and expected it to just work. Instead I had to spend the time to research an issue that shouldn't exist anymore. This has clearly been a problem with an available resolution for months and should be fixed in the released version that people are paying for.

Researching G70 and G71 shows that they are rarely if ever used for Inch and MM mode. When used, at appears they mostly do something different which is specific to certain lathes.

kap34443
Newbie Member
Posts: 3
Joined: Mon Aug 10, 2020 6:20 pm

Re: CAM Gcode

Post by kap34443 » Sun Aug 16, 2020 1:23 pm

GRBL highlights errors on any line with J and I commands.

Sent from my SM-G986B using Tapatalk


Post Reply

Return to “Chat”