I would like to get line number in the output of the Lxcnc [in] postprocessor. How is this done.
Thanks
Jim
how to get line number in lxcnc postprocessor
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: how to get line number in lxcnc postprocessor
You'd have to create your own post processor, e.g. "MyLxcncIn.js" and add the number ([N]) to the front of each g-code line. For example:
Code: Select all
include("LxcncIn.js");
function MyLxcncIn(documentInterface, camDocumentInterface) {
LxcncIn.call(this, documentInterface, camDocumentInterface);
this.header = [
"%",
"[N] ( CREATED WITH QCAD-CAM )",
"[N] ( FILE PATH: [FILEPATH])",
"[N] ( FILE NAME: [FILENAME])",
"[N] ( DATE/TIME: [DATE_TIME])",
"[N] ( CUTTER NUM: [T])",
"[N] ( CUTTER DIA: [TD])",
"[N] ( CUTTER NOTES: [PROGRAM_NAME])",
"[N] G20 G17 G40 G49 G54 G80 G90 G94",
"[N] G64 P0.001" // tighten tolerance
];
this.footer = [
"[N] M02",
"[N] %"
];
this.toolHeader = [
"[N] M6 [T]"
];
this.rapidMove = "[N] G0 [X] [Y]";
this.rapidMoveZ = "[N] G0 [Z]";
this.firstLinearMove = "[N] G1 [X] [Y] [F]";
this.firstLinearMoveZ = "[N] G1 [Z] [F]";
this.linearMove = "[N] [X] [Y] [F]";
this.linearMoveZ = "[N] [Z] [F]";
this.firstArcCWMove = "[N] G2 [X] [Y] [I] [J] [F]";
this.arcCWMove = "[N] G2 [X] [Y] [I] [J] [F]";
this.firstArcCCWMove = "[N] G3 [X] [Y] [I] [J] [F]";
this.arcCCWMove = "[N] G3 [X] [Y] [I] [J] [F]";
this.linearMoveCompensationLeft = [
"[N] [F!]",
"[N] G41 [X] [Y]"
];
this.linearMoveCompensationRight = [
"[N] [F!]",
"[N] G42 [X] [Y]"
];
this.linearMoveCompensationOff = [
"[N] G40",
"[N] G1 [X] [Y]"
];
}
MyLxcncIn.prototype = new LxcncIn();
MyLxcncIn.displayName = "My Lxcnc [in]";
Re: how to get line number in lxcnc postprocessor
Thank you
Jim
Jim