Hello Guest it is March 28, 2024, 04:22:28 PM

Author Topic: Mach4 laser on CNC router setup questions  (Read 1277 times)

0 Members and 1 Guest are viewing this topic.

Mach4 laser on CNC router setup questions
« on: June 05, 2020, 10:05:22 AM »
HI i recently picked up a 5w diode laser to mount on my CNC, and i could use a little help getting started.

I am using a Warp9 ethernet ESS and this laser: https://www.banggood.com/450nm-5W-Laser-Engraving-Module-Blue-Light-With-TTL-Modulation-p-1337358.html?akmClientCountry=America&rmmds=search&fbclid=IwAR25pS6o-yTslRIQvvLckmDzNwlbkvFCPr-NoaQUiBHusemqxGdNWzGHLpE&cur_warehouse=CN

my question is around how to run in in mach4. what i am looking to be able to do is use the Spindle and the laser in the same file. for that i will need to define the offset for the laser so i can have one work zero and have it work out how much to move to be able to be aligned. how is this done in mach4?

also im not sure how this is post processed in fusion 360 how do i tell which tool (spindle or laser) i want to use?

thanks Raptor
Re: Mach4 laser on CNC router setup questions
« Reply #1 on: June 10, 2020, 10:49:57 AM »
well after much messing around i have this nearly working!

https://www.youtube.com/watch?v=6UoMCImsoOc

the answer was head shift in mach 4. so with the help of Trevor in mach 4 support i created 2 macros, one for offsetting the head to the laser offset, and one for setting it back to zero for the spindle. i then made 2 paths in fusion, a drill and  a trace. i set the trace to a large tool number with very little depth of cut so i could replace the gcode with what is needed to control the laser. my plan is to work on a post processor so i don't have to do that manually but it is working. once i have it cleaned up i will share the macros!

Raptor

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 laser on CNC router setup questions
« Reply #2 on: August 13, 2020, 05:22:05 PM »
Did you ever get the macros done?
I would like to see the code for the head shift if you do not mind.
Re: Mach4 laser on CNC router setup questions
« Reply #3 on: August 13, 2020, 11:06:37 PM »
yes i did!

mc.mcCntlMdiExecute(inst, 'G10 L20 P0 X2.0 Y2.0 Z0')
that is the important line, where x and y are the offset spindle vs laser

i have attached my test gcode too.

let me know if you have any questions
https://www.youtube.com/watch?v=gCM2R83E3gM


M120
inst = mc.mcGetInstance()
mc.mcCntlMdiExecute(inst, 'G10 L20 P0 X2.0 Y2.0 Z0')
mc.mcCntlSetLastError(inst,'Laser Head Shift Active')

M121
inst = mc.mcGetInstance()
mc.mcCntlMdiExecute(inst, 'G10 L20 P0 X0 Y0 Z0')
mc.mcCntlSetLastError(inst,'Laser Head Shift Deactivated')
Re: Mach4 laser on CNC router setup questions
« Reply #4 on: August 14, 2020, 05:14:20 AM »
very interesting,chines told me very hard add laser on engraving machine ,is yours work well both ?
have video ,photo?

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 laser on CNC router setup questions
« Reply #5 on: August 14, 2020, 12:02:53 PM »
Raptor,

Thank you for the information

Bill
Re: Mach4 laser on CNC router setup questions
« Reply #6 on: August 15, 2020, 03:13:44 PM »
very interesting,chines told me very hard add laser on engraving machine ,is yours work well both ?
have video ,photo?


once i had the head shift worked out it was ok. the ESS has laser support.

i followed this guide here: https://jtechphotonics.com/?p=13688 and i also added a relay so it is not powered when not armed.