Coder Social home page Coder Social logo

klippy-cnc's Introduction

KCNC - Klipper CNC Macro Package

This is a collection of macros to support CNC commands on klipper 3d printer software


G/M-code Support

The codes that are strikethrough are not supported yet

KCNC Macros

Gcode Parameters Description
KCNC_STATUS - Get KCNC Status (workspace, tools, etc)
KCNC_SET_WORKSPACE TARGET=0 Set workspace, 0 is machine workspace, 1 is equivalent to G54
KCNC_HOME_MACHINE - Homes the machine using endstops

Supported G-codes

Gcode Parameters Command Description
G0 axes Straight traverse Traverse at maximum velocity. At least one axis must be present
G1 axes, F Straight feed Feed at feed rate F. At least one axis must be present
G2 axes, F, I,J,K or R Clockwise arc feed Arc at feed rate F. Offset mode IJK or radius mode R
G3 axes, F, I,J,K or R Counter clockwise arc feed Arc at feed rate F. Offset mode IJK or radius mode R
G4 P Dwell Pause for P seconds
G10 L2 axes, P Set offset parameters P selects coordinate system 1-6
G10 L20 axes, P Set offset parameters P selects coordinate system 1-6
G17 Select XY plane G17, G18 and G19 set the plan in which the G2/G3 arcs are drawn
G18 Select XZ plane
G19 Select YZ plane
G20 Select inches units mode All Gcode from this point on will be interpreted in inches
G21 Select mm units mode All Gcode from this point on will be interpreted in millimeters
G28 axes Go to G28.1 position Optional axes specify an intermediate point
G28.1 Set position for G28 The current machine position is recorded (No parameters are provided)
G30 axes Go to G30.1 position Optional axes specify an intermediate point
G30.1 Set position for G30 The current machine position is recorded (No parameters are provided)
G53 Select absolute coordinates Non-Modal: Applies only to current block
G54 Select coord system 1
G55 Select coord system 2
G56 Select coord system 3
G57 Select coord system 4
G58 Select coord system 5
G59 Select coord system 6
G90 Set absolute mode
G91 Set incremental mode
G92 axes Set origin offsets
G92.1 Reset origin offsets
G92.2 Suspend origin offsets
G92.3 Resume origin offsets

Supported M-codes

Mcode Parameter Command Description
M0 Program stop
M1 Program stop Optional program stop switch is not implemented so M1 is equivalent to M0
M2 Program end
M30 Program end
M6 Change tool No operation at this time

M-codes that need customisations based on your hardware

Mcode Parameter Command Description
M3 S Spindle on - CW S is speed in RPM
M4 S Spindle on - CCW S is speed in RPM
M5 Spindle off
M7 Mist coolant on Note that mist and flood share the same Coolant ON/OFF pin
M8 Flood coolant on Note that mist and flood share the same Coolant ON/OFF pin
M9 All coolant off Note that mist and flood share the same Coolant ON/OFF pin

Klipper for CNC - PROs and CONs

Klipper benefits for hobby CNC

Klipper downsides for hobby CNC

  • only 3 axis supported

klippy-cnc's People

Contributors

emnarges avatar enarges avatar vladbabii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

klippy-cnc's Issues

Unsupported syntax - "default_parameter"

As the "default_parameter" syntax is no longer supported in klipper, This needs updating for the relevant macros (e.g. M204:)

[gcode_macro M204] rename_existing: M204.1 #default_parameter_F: 0.75 gcode: {% set F = params.F|default(0.75) %} {% if 'S' in params %} SET_VELOCITY_LIMIT ACCEL={ S } ACCEL_TO_DECEL={ S|float * F|float } {% endif %}

HOME_PRINTER

Howdy, I'm struggling to understand some parts of these macros, I have them loaded properly and customised m3 and m4 to work with my setup.

I'm currently stuck with homing. I see the custom macro kcnc_home_machine and I uncommented as below:

Home Machine Axis

[gcode_macro kcnc_home_machine]
gcode:
G990028

But the machine doesnt respond to this macro at all.

What is your setup?

Hi !

I saw this project a while ago and always wanted to try it out. But there are some questions left ...
So this is not an issue. More some questions about practical usage :-)

  1. At the moment I use estlcam with it's Windows frontend. What did you use with this klipper impementation? Will it work with MainSail and fluid? Or are there some other UIs ?
  2. What did you use for generating the GCode? I could still use estlcam for that. But it would make the whole workflow more complicated I think.
  3. I have some high power stepper driver. Something similar to DM542. Can I use these steppers? Basically I only need to connect DIR, STEP, Enable - right?

So in general it would be really nice if you can tell a little bit about your setup and your software workflow.
Thx in advance
Dominik

What screen are you using

So I looked at Sailfish, fluid,Klipper screen, etc what one would you recommend for CNC and implementing the macros as buttons.

Thanks

G68?

I would love to be able to rotate the relative coordinate system about the Z-axis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.