Drill Postprocessor

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Post Reply
Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Drill Postprocessor

Post by Claudiosp » Tue Feb 11, 2020 4:36 pm

Hi
In my post for Biesse I have this
// point moves for drilling:
this.firstPointMoveZ = "[N] [X] [Y] [T] VF=[FP] PRF=[Z-] L=G99";
this.pointMoveZ = []

Output this
N30 X43.5345 Y37.4059 T2 VF=1 PRF=10 L=G99
N40 T2 VF=1 PRF=0 L=G99

How remove N40 T2 VF=1 PRF=0 L=G99

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

Re: Drill Postprocessor

Post by andrew » Tue Feb 25, 2020 1:30 pm

I don't have enough context, but that could be the Z move to move up after drilling. To disable:

Code: Select all

MyPostProcessor.prototype.writeLinearMoveZ = function() {
    if (this.zStartPosition < this.zPosition) {
        // disable all Z up moves:
        return;
    }
    else {
        this.writeBlock("linearMoveZ");
    }
};
Be sure to properly check / verify that this is exactly what you want as disabling all Z up moves seems suspicious to say the least.

Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Re: Drill Postprocessor

Post by Claudiosp » Wed Feb 26, 2020 1:27 pm

HELP ME


// point moves for drilling:
this.firstPointMoveZ = "[N] [X] [Y-] [T] VF=[FP] PRF=[Z-] L=G99";
this.pointMoveZ = []

// command to execute after writing file:

this.alwaysWriteG1 = true;


}

BIESSE.prototype.writeLinearMoveZ = function() {
if (this.zStartPosition < this.zPosition) {
// disable all Z up moves:
return;
}
else {
this.writeBlock("linearMoveZ");
}
};


// Derive our class from class GCodeBase:
BIESSE.prototype = new GCodeBase();

// Display name shown in user interface:
BIESSE.displayName = "BIESSE";

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

Re: Drill Postprocessor

Post by andrew » Wed Feb 26, 2020 1:31 pm

BIESSE.prototype.writeLinearMoveZ = function() { .... }
has to be after
BIESSE.prototype = new GCodeBase();

Otherwise it has no effect, since prototype is overwritten immediately and writeLinearMoveZ deleted.

Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Re: Drill Postprocessor

Post by Claudiosp » Wed Feb 26, 2020 3:32 pm

NOT WORK

// linear Z moves:
this.firstLinearMoveZ = [];
this.linearMoveZ = [];

// circular moves:
this.firstArcCWMove = "[N] G5 [X] [Y-] [RADIUS-]";
this.arcCWMove = "[N] G5 [X] [Y-] [RADIUS-]";

this.firstArcCCWMove = "[N] G4 [X] [Y-] [RADIUS-]";
this.arcCCWMove = "[N] G4 [X] [Y-] [RADIUS-]";

// tool compensation on:
this.linearMoveCompensationLeft = [
"[N] G42 G69 [X] [Y-] G1 ",
];
this.linearMoveCompensationRight = [
"[N] G41 G69 [X] [Y-] G1 ",
];

// tool compensation off:
this.linearMoveCompensationOff = [
"[N] G40 [X] [Y-] G1 ",
"[N] L=PSU",
];

// linear lead in / out:
// these default to this.lineadMove:
this.linearLeadIn = [];
this.linearLeadOut = [];

// point moves for drilling:
this.firstPointMoveZ = ["[N] [X] [Y-] [T] VF=[FP] PRF=[Z-] L=G99",
];
this.pointMoveZ = []

// command to execute after writing file:

this.alwaysWriteG1 = true;


}

// Derive our class from class GCodeBase:

BIESSE.prototype = new GCodeBase();

BIESSE.prototype.writeLinearMoveZ = function() {
if (this.zStartPosition < this.zPosition) {
// disable all Z up moves:
return;
}
else {
this.writeBlock("linearMoveZ");
}
};

// Display name shown in user interface:
BIESSE.displayName = "BIESSE";

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

Re: Drill Postprocessor

Post by andrew » Wed Feb 26, 2020 4:28 pm

Please post your entire post processor file.

Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Re: Drill Postprocessor

Post by Claudiosp » Wed Feb 26, 2020 4:33 pm

/**
* This file is part of the QCAD/CAM software.
* Do NOT edit this file. Your changes will be lost when the software
* is updated or reinstalled.
* For details, please refer to the file README.txt in this directory.
*/

// Include GCodeBase.js which contains the class 'GCodeBase', used as base for our own configuration:
include("GCodeBase.js");

// Constructor of our class:
function BIESSE(documentInterface, newDocumentInterface) {
// Call constructor of base class:
GCodeBase.call(this, documentInterface, newDocumentInterface);


this.registerVariable("feedRate", "F", true, "", 0);
this.registerVariable("plungeRate", "FP", true, "", 0);
this.registerVariable("zClearancePass", "ZUP", true, "", "DEFAULT", "DEFAULT");
this.registerVariable("zStart", "Z_START", true, "", "DEFAULT", "DEFAULT");
this.registerVariable("zEnd", "Z_END", true, "", "DEFAULT", "DEFAULT");
this.registerVariable("zCuttingDepth", "ZD", true, "", "DEFAULT", "DEFAULT");
this.registerVariable("tool", "T", true, "", 0);
this.registerVariable("arcRadius", "RADIUS", true, "R", "DEFAULT", "DEFAULT");
this.registerVariable("zPosition", "Z", false, "", "DEFAULT", "DEFAULT");
this.registerVariable("zStartPosition", "Z1", true, "", "DEFAULT", "DEFAULT");


this.fileExtensions = [ "",];

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



this.header = [
"[COMMENTO]",
" ",
"[CENTRO01]",
" ",
"PARAMETRI=000000208",
"UTENSILI=000000303",
"LABELF=000003772",
"LABELC=000003759",
"FORATURA=000003726",
"CONTORNATURA=000000318",
"TABELLEFORI=000003741",
"CONFASSIST=000003785",
"ATTREZZAGGIO=000003802",
" ",
"[PARAMETRI01]",
"[N] G71 HC=1 LY=[Y_MIN-] LZ=[Z_MAX] FIL=0 BLO=0 ACC=0 RUO=2 PRS=1 PRL=1 Z=PRK KA=0 LX=[X_MAX] ",
"%",
"[UTENSILI01]",
"%",
"[CONTORNATURA01]",
];
this.footer = [
"[N] G0 L=POFF",
"%"
];
this.toolHeader = [

"[N] PAN=1 ST1=\"[T]\" L=PCUA",
"[N] XO0 YO0",

];
this.toolFooter = [];

// header / footer before / after single Z pass:
this.singleZPassHeader = [];
this.singleZPassFooter = [];

// header / footer before / after first pass of mutliple or single Z pass(es):
this.zPassFirstHeader = [
"[N] [XF] [YF-] Z=PRK PRF=[Z1-] F=[F] VF=[FP] G40 TP=1 L=PON TRZ=0 M55 ",
];
this.zPassFirstFooter = [];

// header / footer before / after each pass of mutliple Z passes:
this.zPassHeader = [
"[N] [XF] [YF-] Z=PRK PRF=[Z-] F=[F] VF=[FP] G40 TP=1 L=PON TRZ=0 M55 ",
];
this.zPassFooter = [];

// rapid moves:
this.rapidMove = [];
this.rapidMoveZ = [];

// linear moves:
this.firstLinearMove = "[N] G1 [X] [Y-]";
this.linearMove = "[N] G1 [X] [Y-]";

// linear Z moves:
this.firstLinearMoveZ = [];
this.linearMoveZ = [];

// circular moves:
this.firstArcCWMove = "[N] G5 [X] [Y-] [RADIUS-]";
this.arcCWMove = "[N] G5 [X] [Y-] [RADIUS-]";

this.firstArcCCWMove = "[N] G4 [X] [Y-] [RADIUS-]";
this.arcCCWMove = "[N] G4 [X] [Y-] [RADIUS-]";

// tool compensation on:
this.linearMoveCompensationLeft = [
"[N] G42 G69 [X] [Y-] G1 ",
];
this.linearMoveCompensationRight = [
"[N] G41 G69 [X] [Y-] G1 ",
];

// tool compensation off:
this.linearMoveCompensationOff = [
"[N] G40 [X] [Y-] G1 ",
"[N] L=PSU",
];

// linear lead in / out:
// these default to this.lineadMove:
this.linearLeadIn = [];
this.linearLeadOut = [];

// point moves for drilling:
this.firstPointMoveZ = ["[N] [X] [Y-] [T] VF=[FP] PRF=[Z-] L=G99",
];
this.pointMoveZ = []

// command to execute after writing file:

this.alwaysWriteG1 = true;


}

// Derive our class from class GCodeBase:

BIESSE.prototype = new GCodeBase();

BIESSE.prototype.writeLinearMoveZ = function() {
if (this.zStartPosition < this.zPosition) {
// disable all Z up moves:
return;
}
else {
this.writeBlock("linearMoveZ");
}
};

// Display name shown in user interface:
BIESSE.displayName = "BIESSE";

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

Re: Drill Postprocessor

Post by andrew » Wed Feb 26, 2020 4:56 pm

I've attached the adjusted post processor.
Attachments
BIESSE.js
(4.36 KiB) Downloaded 1 time

Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Re: Drill Postprocessor

Post by Claudiosp » Wed Feb 26, 2020 5:21 pm

firstPointMoveZ

N30 XO0 YO0
N40 X50 Y50 T1 VF=0 PRF=10 L=G99
N50 X83.7894 Y21.8884 T1 VF=0 PRF= L=G99
N60 X164.1622 Y32.5882 T1 VF=0 PRF= L=G99
N70 G0 L=POFF
%

IN LINES
N40 PRF= \\ IS CUT DEPTH
N50 PRF= \\ IS CUT DEPTH
I NEED OUT THIS
N40 PRF=10 \\IS CUT DEPTH
N50 PRF=10 \\ IS CUT DEPTH

Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Re: Drill Postprocessor

Post by Claudiosp » Wed Feb 26, 2020 5:59 pm

this.registerVariable("zPosition", "Z", true, "", "DEFAULT", "DEFAULT");
true


FIX

Claudiosp
Newbie Member
Posts: 7
Joined: Tue Feb 11, 2020 4:17 pm

Re: Drill Postprocessor

Post by Claudiosp » Wed Feb 26, 2020 7:14 pm

WHY LEAD IN NOT DO ZERO DEGREES
IN EXTENSION TOLL LEAD IN ON MATERIAL

Post Reply

Return to “QCAD/CAM”