Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laser on/off and PWM should accept M106 M107 G Code commands #274

Closed
mrgithub opened this issue Feb 10, 2018 · 8 comments
Closed

Laser on/off and PWM should accept M106 M107 G Code commands #274

mrgithub opened this issue Feb 10, 2018 · 8 comments

Comments

@mrgithub
Copy link

I have a laser diode and converted my Wanhao i3 Duplicator Plus (Marlin compatible i think) into a laser engraver and cutter.

These commands control the laser diode when its using my extruder fan PWM.
M106 = off...also M106 S255
M107 = on...also M106 S0

The laser power can be varied with M106 Sxxx.

M106 S254 is very dim and M106 S0 is full power.

Can these be included in next iteration?

@arkypita
Copy link
Owner

I see that the user @chantling is working on a fork of LaserGRBL compatible with marlin.
https://github.com/chantling/LaserGRBL

@tater1337
Copy link

I have a laser on my CR-10, but the codes are reversed (M107 off, M106 S255 full power)

I assume there is a 'save Gcode to file' option for those of us using CD cards?

nice job @chantling, go you!

@sinfocomp
Copy link

Hello, why not add a setup option to let the software know wich code tu use to turn on laser, wich code to use to turn off laser and the sxxx max and sxxx min values and whether s is normal or inversed, kind of a post procesor mod for the generated gcode from the software

@arkypita
Copy link
Owner

your requests are already in development roadmap #64

@arkypita arkypita mentioned this issue Mar 19, 2018
83 tasks
@sgsalman
Copy link

@arkypita most important thing m106 m107 codes I think. Please add them :/

@arkypita
Copy link
Owner

Contrary to what one might think, this change is not as simple as replacing a string. There are various points in the code that are affected by such a seemingly simple change:

  • interpretation of the gcode and preview
  • calculation of timing
  • state building and recovery operations after abort
  • automatic optimization of the generated code (M3 / M5 are modal and can be optimized, other commands are not) and more.

@ETE-Design
Copy link

@arkypita Has the M106 Sxxx + M107 Sxxx been implemented yet? Can see people have asked for it for ages...

@DeathDealer33
Copy link

Contrary to what one might think, this change is not as simple as replacing a string. There are various points in the code that are affected by such a seemingly simple change:

  • interpretation of the gcode and preview
  • calculation of timing
  • state building and recovery operations after abort
  • automatic optimization of the generated code (M3 / M5 are modal and can be optimized, other commands are not) and more.

Fr i had to write a script to post process gcode from another program just to add this. It is actually simple to do.. Not sure why its not done yet. Ive even seen a version of it with those commands but i cant seem to find it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants