Inkscape PlasmaC g-code generation

More
13 Oct 2020 06:47 #185926 by radek_marko
Inkscape PlasmaC g-code generation was created by radek_marko
Hi,
I'm a total newbie in the whole CNC subject - I've built CNC bed, I've attached plasma torch to it, I can do test cuts in X and Y axis from PlasmaC GUI and now I'm trying to move to cut a project created in Inkscape (v1.0.1).

I've generated a simple text, processed the text outline so letters like "O" will not fall from the rest of the cut. Then I've generated the g-code. I've checked it in one of the on-line g-code viewers and discovered that LinuxCNC cannot accept it :(

Is there a g-code validator for PlasmaC that will tell me what commands are allowed and what are not?

G-code attached

File Attachment:

File Name: Testgcode_0001.ngc
File Size:75 KB
Attachments:

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
13 Oct 2020 06:59 #185928 by tommylight
Replied by tommylight on topic Inkscape PlasmaC g-code generation
In Inkscape when the drawing is finished go to extensions>gcodetools>tools library, choose plasma and click apply then close, now select that green window and select the text tool, edit the green window by removing lines with G31, G92, Z anything, leave just the lines with feed, tool, M3 and M5.
After that do the usual extensions>gcodetools>path to gcode.
In the folder where the gcode will be saved create a new empty file and name it "header", save it. That will get rid of the first M3 at the top of the gcode so it does not mess up the material.

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 09:01 #185950 by radek_marko
Replied by radek_marko on topic Inkscape PlasmaC g-code generation
Thank you. I did those modes and generated new code - I will be able to test it in the afternoon.

I have a floating Z sensor - do I need to add special code for that or M3 code will take care of the lowering the torch and firing it when required?

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
13 Oct 2020 10:28 #185960 by tommylight
Replied by tommylight on topic Inkscape PlasmaC g-code generation
M3 will do everything, might also need an S nnn where nnn is some number, depending on how your config is set up, but usually it does work with just M3

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 19:12 #186011 by radek_marko
Replied by radek_marko on topic Inkscape PlasmaC g-code generation
Thank you for your help so far, but I need much more...
I'm totally confused.
First of all - initially I've loaded g-code and LinuxCNC was not throwing any errors to the file content and displayed the image of expected work. Then I've started the job and it didn't use the plasma torch

Next, I've executed few test cuts to check if the plasma is still operational... and it was...
So, I've tried the g-code again and this time the torch was activated (move to approx 30 sec mark on the video below):

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 20:09 #186016 by AgentWD40
Replied by AgentWD40 on topic Inkscape PlasmaC g-code generation
I tried to get fancy and change the feed rate to #<_hal[plasmac.cut-feed-rate]> but it threw an error and reverted back to the default 400. The script expected a numeric instead of a string.

How are you handling that and material selection?

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 20:22 #186018 by radek_marko
Replied by radek_marko on topic Inkscape PlasmaC g-code generation
Here is the code I've loaded

File Attachment:

File Name: Testgcode_...0-13.ngc
File Size:69 KB

I tried to get fancy and change the feed rate to #<_hal[plasmac.cut-feed-rate]> but it threw an error and reverted back to the default 400. The script expected a numeric instead of a string.
How are you handling that and material selection?


I have done some test custs and created material list - I've selected material from the dropdown list (3mm steel was used in my case).

In Inkscape I've changed from

to


I think I know where I've screwed up :(
The feed rate on my 3mm steel, from tests is 4800!!! I've left Inkscape params unchanged so the g-code was generated for 10mm with feed rate 400...

Am I right?
Attachments:

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 20:44 - 13 Oct 2020 20:52 #186020 by AgentWD40
Replied by AgentWD40 on topic Inkscape PlasmaC g-code generation
Yeah, the gcode you've attached does show a feedrate of 400. I'm curious how @tommylight handles this.

fwiw I've poked around the gcode extension's python code and figured out how to make it output #<_hal[plasmac.cut-feed-rate]>. Untested and I don't recommend it but hey, maybe it'll be fine.

Around line #3337 change:
f = " F{:f}".format(tool)
to
f = " F{}".format(tool)

Line 5158 change:
"feed": 400.,
to
"feed": "#<_hal[plasmac.cut-feed-rate]>",
(you can change the rest of your defaults here too)

Line 5347 just comment it out:
self.tool["feed"] = float(self.tool["feed"])
to
#self.tool["feed"] = float(self.tool["feed"])

Line 3091 change:
"feed": 400.0,
to
"feed": "400.0",

I think that's all the changes I made... again, I don't recommend it :)
Last edit: 13 Oct 2020 20:52 by AgentWD40.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 21:47 #186025 by phillc54
Replied by phillc54 on topic Inkscape PlasmaC g-code generation
You need a S1 after the M03, so it would be M03 S1

Please Log in or Create an account to join the conversation.

More
13 Oct 2020 22:09 #186034 by AgentWD40
Replied by AgentWD40 on topic Inkscape PlasmaC g-code generation
Does plasmac ignore feed rates during a cut? Just set it in the header?

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.091 seconds
Powered by Kunena Forum