Laser PWM and M codes

More
11 Mar 2022 16:53 - 11 Mar 2022 20:18 #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 ?
 
Last edit: 11 Mar 2022 20:18 by ggsxx.

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

More
12 Mar 2022 22:43 #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 or Create an account to join the conversation.

More
12 Mar 2022 22:55 #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

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

More
12 Mar 2022 23:04 #237043 by ggsxx
Replied by ggsxx on topic Laser PWM and M codes
I will look at it, thanks Tommy.
The following user(s) said Thank You: tommylight

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

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