[solved] LinuxCNC post processor

Discussions around the CAM Add-On of QCAD.

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.

Post Reply
vitek
Registered Member
Posts: 2
Joined: Thu Jan 28, 2021 3:44 pm

[solved] LinuxCNC post processor

Post by vitek » Thu Jan 28, 2021 7:48 pm

Hi Andrew,

I am trying to find a way to post process to LinuxCNC, but it seems, I am completely lost with the variety of menus, options, its purposes and dependencies.
I select the LinuxCNCmm option from the CAM Configuration roll menu, set a *.ngc file name, Tolerance to 0.XXmm - in (KK) menu and export a *.ngc file, getting more less pure code. Then I always have to edit the *.ngc code adding at minimum G64 P0.01 in the header and maybe do few additional changes in the code by hand to be even able to run the code successfully.

I have spent a couple of hours, trying to understand documents; Tutorial: QCAD/CAM, CAM Legacy Export, Tutorial: QCAD/CAM Postprocessor, Forum posts, investigate and replace files under /Applications/QCADCAM-Pro.app/Contents/Resources/scripts/Cam/CamConfigurations/ LinuxCNC.js LinuxCNCMm.js. In the GUI there is once roll-out LinuxCNC"mm" and CAM Config (KK), once CAM Legacy Export V1 and LinuxCNC"Mm" maybe with the js behind and the CamExporterV2? - no glue what is what - As The Only influence to gcode seems to make ticking the check-box "Always write G1" in (KK) GUI!

Is there some straight forward way, how get this to work?

I am running Qcad 3.25.2.0 on macOS 10.14.6
Attachments
Deska_CNC.ngc
(258 Bytes) Downloaded 464 times
LinuxCNCMm.js
(2.26 KiB) Downloaded 472 times
LinuxCNC.js
(2.26 KiB) Downloaded 471 times

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

Re: LinuxCNC post processor

Post by andrew » Thu Jan 28, 2021 8:17 pm

I'd recommend to only use CAM > Export (not the legacy export).

You can find the post processors under

QCADCAM-Pro.app/Contents/Resources/postprocessors

LinuxCNCMM is derived from LinuxCNC which is derived from GCodeBase.

To create your own custom version of a post processor, I'd recommend to derive yours from LinuxCNCMM and add the bits you need.

Call your file for example "MyLinuxCNCMM.js" and in it create a JavaScript class with the same name as the file name ("MyLinuxCNCMM"), derived from LinuxCNCMM. Now you can define for example your own header as "G64 P0.01":

Code: Select all

include("LinuxCNCMM.js");

function MyLinuxCNCMM(cadDocumentInterface, camDocumentInterface) {
    LinuxCNCMM.call(this, cadDocumentInterface, camDocumentInterface);

    this.header = [
        "[N] G64 P0.01"
    ];
}

MyLinuxCNCMM.prototype = new LinuxCNCMM();

MyLinuxCNCMM.displayName = "My LinuxCNC [mm]";

vitek
Registered Member
Posts: 2
Joined: Thu Jan 28, 2021 3:44 pm

Re: LinuxCNC post processor

Post by vitek » Thu Jan 28, 2021 10:01 pm

Suggested procedure works fine, thank you for immediate support! :D

There are still too many hidden corners within the Qcad to me, so I am sorry, if I disturb you again.

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: LinuxCNC post processor

Post by RobB » Tue Aug 17, 2021 2:57 pm

Is it possible to use the LinuxCNC(mm) post processor in offset (G40) mode? It is one of the few post processors that has no alternative to G41/42.
When cutting small holes with a mill, I often run in trouble with the obligatory lead in / lead out.

Thanks, Robert
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

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

Re: LinuxCNC post processor

Post by andrew » Tue Aug 17, 2021 8:29 pm

I've attached two post processors for LinuxCNC with offset. Please save these into the postprocessors directory of your QCAD/CAM installation.

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: LinuxCNC post processor

Post by RobB » Wed Aug 18, 2021 9:46 am

Andrew,
Thanks very much adding this.
Best regards, Robert
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: LinuxCNC post processor

Post by RobB » Wed Aug 25, 2021 8:56 am

Andrew,
Still a problem remains. When opening a test file (attached) using LinuxCNCmm, the 'CAM configuration' window allows me to set the usual parameters.
When opening with LinuxCNCOffsetMM, CAM configuration does not list any files and remains empty.

Robert


Version:
3.26.4.0 (3.26.4)
Internet:
QCAD.org
Build Date:
Jun 4 2021
Revision:
0bb4334
Qt Version:
5.14.2
Architecture:
x86_64
Compiler:
gcc 5.4.0
Attachments
test144-7.dxf
(168.53 KiB) Downloaded 397 times
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

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

Re: LinuxCNC post processor

Post by andrew » Wed Aug 25, 2021 9:28 am

Please replace the files with the attached. This should fix the problem.
Attachments
LinuxCNCOffsetIN.js
(583 Bytes) Downloaded 369 times
LinuxCNCOffsetMM.js
(589 Bytes) Downloaded 374 times

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: LinuxCNC post processor

Post by RobB » Wed Aug 25, 2021 10:37 am

Andrew,
Confirm that this works.
Thank you.
Robert
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

Post Reply

Return to “QCAD/CAM”