Laser cutter mode configuration using M452
-
Hi everyone
I have one of the Classic Blue and White 60W Chinese laser cutter/engraver.
The Chinese controller board eventually failed and I decided to upgrade it with one of my Duet 0.6 boards.
I have had some success with the Fan0 output via the M571 code, but I would like to investigate the RepRapFirmware using the Laser mode as described on the gcode for Duet3d wiki page.I have would like the following functionality X axis, Y axis, an enable pin (FAN0-) along with a correctly configured PWM pin not sure which one yet, maybe a heater.
So I have a standard setup for cartesian XY motion with endstops and a diode from FAN0- to laser PSU IN pin.
This has been proved to work with M571 style configuration.So, I want to use the following to allow the FAN0- pin to be used as an enable.
M106 P0 I-1 ; disable Fan0 and allow it to be reallocated
M452 P20 R255 F200 ; Enable laser mode, use pin 20 (Fan0)Is this correct and should I then be able to see the FAN0- output go on/off when ever there is a G1 controlled movement?
I also expect to put a M4/5 commands around the gcode to enable the PWM of the pin and so its strength
M4 S255 ; PWM full strength
M5 ; PWM offDoes this sound right? at the moment after homing the head the laser is not fired when I manually issue the commands from the console:
M4 S255 ; enable laser at full strength
G0 X0 Y0 ; Move without firing
G1 X0 Y100 ; Move whilst firing
G1 X100 Y100 ; Move whilst firing
G1 X100 Y0 ; Move whilst firing
G1 X0 Y0 ; Move whilst firing
M5 ; disable laserAny input would be useful.
ThanksLloyd
-
Have you figured out how to do bitmaps using a Duet board? Vector should be easy enough, but can't figure out the bitmap side.
-
No I was hoping that once I had the vector stuff going I could work out how to PWM the heater0 output and then use that to vary the power to the laser. At least that would then give me the ability to cut and engrave at different power levels.
To engrave bitmaps would need some sort of work flow that will enable me to move the head at a fixed speed and vary the heater0 PWM as the head is moving, or just do lots of small movements at different power levels, "that would just be messy".
My work flow for cutting and vector engraving uses Fusion 360 CAM with a gcode plugin, I expect to have to program a new plugin based on the one I am using to optimise the gcode output to the Duets gcode.
Lloyd
-
Try using M3 instead of M4 to set the laser PWM. That is what Repetier supports according to the gcode wiki at reprap.org, and in the absence of a better documented standard I have supported that.
-
Thanks I will try that tomorrow.
-
Hi David
The M3/M5 commands work and I can now cut using those.
I have also worked out the G2 arc command and this works well as well, firmware version 1.20 for reference.Would upload a picture but not sure how to do that on this site.
Lloyd
-
To upload a picture, host it on a public image sharing site and put a link to it between "img" tags. If you host it on Dropbox, replace ?dl=0 at the end of the URL by ?raw=1.