Hi all,
I just tried QCADCAM the first time. I creatred a simple square size 30mm and tried to generate g-code. The cutter size is 2mm.
Independant of my chose to cut inside/outside/on the line I get the same G-Code as result.
I'm doing somthing wrong, but I can't see it.
The generated path has the needed offset of 1mm, please see picture (cutting outside), but the G-Code speaks of X10/y10, should be X09/Y09 ...
My version of QCADCAM is 3.19.2.0 (Linux).
I'd be glad to get an info what I'm doing wrong.
Regards,
Christof
[solved] cutter offset path not exported in g-code
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
Re: cutter offset path not exported in g-code
You've chosen a postprocessor that uses G41/G42 for cutter radius compensation. This means that your controller will calculate the offset (if it supports G41/G42 at all).
If your controller does not support G41/G42, you need to choose a postprocessor that exports the offset coordinates instead (e.g. "G-Code (Offset)").
From your screenshot, I guess that you are using the postprocessor for LinuxCNC which does support G41/G42, so your output should work fine for you.
If your controller does not support G41/G42, you need to choose a postprocessor that exports the offset coordinates instead (e.g. "G-Code (Offset)").
From your screenshot, I guess that you are using the postprocessor for LinuxCNC which does support G41/G42, so your output should work fine for you.
Re: cutter offset path not exported in g-code
Hi Andrew,
many thanks for your quick reply. You are right supposing I'm using LinuxCNC. With your hint I could see that (I suppose) the generated g-code is missing an important command, see this info from LinuxCNC (http://linuxcnc.org/docs/2.5/html/gcode ... ation.html):
"Cutter compensation uses the data from the tool table to determine the offset needed. The data can be set at run time with G10 L1".
In my case the preprocessor created code without that G10 L1 information resp. tooltable, so my tool has diameter zero and the cutter follows the original edges.
If I'm right, can I influence myself the preprocessor for LinuxCNC and correct it?
I'd like to avoid entering this info manually after every new creation of g-code, I'm sure I do forget this at least once.
Many thanks,
Christof
many thanks for your quick reply. You are right supposing I'm using LinuxCNC. With your hint I could see that (I suppose) the generated g-code is missing an important command, see this info from LinuxCNC (http://linuxcnc.org/docs/2.5/html/gcode ... ation.html):
"Cutter compensation uses the data from the tool table to determine the offset needed. The data can be set at run time with G10 L1".
In my case the preprocessor created code without that G10 L1 information resp. tooltable, so my tool has diameter zero and the cutter follows the original edges.
If I'm right, can I influence myself the preprocessor for LinuxCNC and correct it?
I'd like to avoid entering this info manually after every new creation of g-code, I'm sure I do forget this at least once.
Many thanks,
Christof
Re: cutter offset path not exported in g-code
Yes. The post processor is in your QCAD/CAM installation directory under postprocessors, for example LinuxCNCMM.js. It's an ECMAScript ("JavaScript") file. If you can attach an example file that works with your setup, I'm happy to help.cki61 wrote:If I'm right, can I influence myself the preprocessor for LinuxCNC and correct it?
Re: cutter offset path not exported in g-code
Hi Andrew,
thanks for your offer. I have two ideas to succeed. For both I need the programmers help.
The G-Code I need concerns the comand to set the tool table: G10 L1 Px Ry, where x is the Integer# of the tool (variable [T] stands for uppercase t plus the tool integer number, so not usable here) and y stands for the tool radius for which we easyly can use variable [TR] = ToolRadius.
So first we need a new variable for a solution:
this.registerVariable("toolNumber", "TN", true, "P", 0);
Now we have two posibilities:
a loop at the beginning of the gcode file to set the tool table like:
....
N50 G10 L1 P1 R1 //Tool1 with radius 1mm/diameter 2mm
N60 G10 L1 P2 R2 //Tool2 with radius 2mm/diameter 4mm
....
or we use the internal loop and send the command with every tool change:
....
N30 T1 M6
N40 S1002 M03
N50 G10 L1 P1 R1 //Tool1 with radius 1mm/diameter 2mm
.
.
N300 T2 M6
N310 S1002 M03
N320 G10 L1 P2 R2 //Tool2 with radius 2mm/diameter 4mm
....
after my opinion: I'd prefer solution 1 because you can better control the tool table at the beginning of the file.
for solution 2 we need a script like:
- file start -
include("LinuxCNC.js");
function LinuxCNCMM(cadDocumentInterface, camDocumentInterface) {
LinuxCNC.call(this, cadDocumentInterface, camDocumentInterface);
this.decimals = 4;
this.unit = RS.Millimeter;
this.toolHeader = [
"[N] [T] M6",
"[N] [S] M03",
"[N] G10 L1 [TN] R[TR]" //TN = new variable
];
}
LinuxCNCMM.prototype = new LinuxCNC();
LinuxCNCMM.displayName = "LinuxCNC [mm]";
- file end -
What do you think about an implementation in QCAD?
Do you see a solution that only affects the scripts?
Best Regards,
Christof
thanks for your offer. I have two ideas to succeed. For both I need the programmers help.
The G-Code I need concerns the comand to set the tool table: G10 L1 Px Ry, where x is the Integer# of the tool (variable [T] stands for uppercase t plus the tool integer number, so not usable here) and y stands for the tool radius for which we easyly can use variable [TR] = ToolRadius.
So first we need a new variable for a solution:
this.registerVariable("toolNumber", "TN", true, "P", 0);
Now we have two posibilities:
a loop at the beginning of the gcode file to set the tool table like:
....
N50 G10 L1 P1 R1 //Tool1 with radius 1mm/diameter 2mm
N60 G10 L1 P2 R2 //Tool2 with radius 2mm/diameter 4mm
....
or we use the internal loop and send the command with every tool change:
....
N30 T1 M6
N40 S1002 M03
N50 G10 L1 P1 R1 //Tool1 with radius 1mm/diameter 2mm
.
.
N300 T2 M6
N310 S1002 M03
N320 G10 L1 P2 R2 //Tool2 with radius 2mm/diameter 4mm
....
after my opinion: I'd prefer solution 1 because you can better control the tool table at the beginning of the file.
for solution 2 we need a script like:
- file start -
include("LinuxCNC.js");
function LinuxCNCMM(cadDocumentInterface, camDocumentInterface) {
LinuxCNC.call(this, cadDocumentInterface, camDocumentInterface);
this.decimals = 4;
this.unit = RS.Millimeter;
this.toolHeader = [
"[N] [T] M6",
"[N] [S] M03",
"[N] G10 L1 [TN] R[TR]" //TN = new variable
];
}
LinuxCNCMM.prototype = new LinuxCNC();
LinuxCNCMM.displayName = "LinuxCNC [mm]";
- file end -
What do you think about an implementation in QCAD?
Do you see a solution that only affects the scripts?
Best Regards,
Christof
Re: cutter offset path not exported in g-code
I've attached a first attempt at exporting a tool list as part of the header.
This file replaces the existing file postprocessors/LinuxCNC.js. The configurations LinuxCNCMM.js and LinuxCNCIN.js are derived from this configuration and are both affected by this change. This has been tested against QCAD/CAM 3.19.2.
Please let me know if other changes are needed to make this work with your controller.
This file replaces the existing file postprocessors/LinuxCNC.js. The configurations LinuxCNCMM.js and LinuxCNCIN.js are derived from this configuration and are both affected by this change. This has been tested against QCAD/CAM 3.19.2.
Please let me know if other changes are needed to make this work with your controller.
- Attachments
-
- LinuxCNC.js
- (1.16 KiB) Downloaded 565 times
Re: cutter offset path not exported in g-code
Hi Andrew,
today I tested your new cde with success.
Thanks for your help. Maybe you allow me to mention a whish: a tool to generate bridges to fix the part you cut would help me a lot.
Are there any plans to introduce it or something simular?
Best Regards,
Christof
today I tested your new cde with success.
Thanks for your help. Maybe you allow me to mention a whish: a tool to generate bridges to fix the part you cut would help me a lot.
Are there any plans to introduce it or something simular?
Best Regards,
Christof
Re: cutter offset path not exported in g-code
Thanks for the feedback. The adjusted postprocessor will also be included in the next update.
Yes, support for "tabs" (small bridges to keep a cut out shape in place) is planned.
Yes, support for "tabs" (small bridges to keep a cut out shape in place) is planned.