- Posts: 16
- Thank you received: 0
Laser PWM and M codes
4 years 7 months ago #236946
by ggsxx
Laser PWM and M codes was created by ggsxx
Hi i'm new to the world of linuxcnc and G codes. I have succesfully built and tested a CNC gantry router table. A friend brought me a laser to install on my machine. I have been looking at the forum on how to implement this and found it very difficult to do. I have found two ways to go about this problem.
The first one is to use the spindle's PWM and implement M3,M4 and M5 codes. The second one creates a pwmgen signal just for the laser and uses M67 and M68 codes.
I read a lot about these two but i have very little knowledge about implementing M codes. I did read all the files in the Linux M codes.
My questions is what signal would be the best to use and where do i learn how to modify the G code to implement the M codes ?
The first one is to use the spindle's PWM and implement M3,M4 and M5 codes. The second one creates a pwmgen signal just for the laser and uses M67 and M68 codes.
I read a lot about these two but i have very little knowledge about implementing M codes. I did read all the files in the Linux M codes.
My questions is what signal would be the best to use and where do i learn how to modify the G code to implement the M codes ?
Please Log in to join the conversation.
4 years 7 months ago #237039
by ggsxx
Replied by ggsxx on topic Laser PWM and M codes
I got the laser PWM hooked to the spindle's output and i used M3 sxxx on negative Z et M5 on positive Z movements. it does work but it takes a while to do manually. Is there an easier way to edit the G code? Post processor or a Python program maybe used to match the Zès movement to the PWM?
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
4 years 7 months ago #237042
by tommylight
Replied by tommylight on topic Laser PWM and M codes
Have a look here, i used "dmap2gcode" from ScorchWorks, it is a Python for importing pictures and exporting gcode, it does a very good job. Also it is Python, so easy to modify, i did modify it to output M67 i think, so just export and open in LinuxCNC.
forum.linuxcnc.org/10-advanced-configura...-superimposing-a-pic
forum.linuxcnc.org/10-advanced-configura...-superimposing-a-pic
Please Log in to join the conversation.
Time to create page: 0.073 seconds
