Generic selectors
Exact matches only
Search in title
Search in content

Setting up your Endurance Laser using Mach3

Setting up your Endurance Laser using Mach3

The Endurance Lasers site is relatively new but we now have over a thousand members. Although our members are predominantly 3D printers there’s a surprising amount of homemade CNC owners (like myself). We recently did a survey to see what setups everyone was using and there’s almost 20 running the Endurance Laser with Mach3, Vectric and the Warp9, Ethernet Smooth Stepper (ESS). This write-up is for any new members and anyone that hasn’t even posted yet.

Many of us are still relatively new to controlling a laser using PWM. So the same questions keep arising.

Thus, I’ve been assigned to do a detailed write-up to put into our archives. I have compiles this write-up based on a lot of information available online. I’ve read through hundreds of posts and threads as well as experimented a lot before I actually got satisfactory results. The main chunk of this write-up is based on the help I got from Andy (Warp9 Tech Design) and also the Jtech website. Hopefully this will save you a lot of time setting up your Endurance Laser and Mach3.

There are several components within this write-up including…

  1. Connections for your Endurance laser
  2. Setting up a Mach3 profile
  3. Using Vectric to create the GCode
  4. Installing the Post Processor
  5. Operational Description

As all M3 and M5 GCode commands take at least 1/10th of a second to activate, laser firing with these can be as much as a full second off. This is why the M11 and M10 commands are used, they synchronize the laser on/off with motion.

Setting up a Mach3 (R3.043.056 or later) Laser Profile to control a laser through the ESS is as follows:

Basic Connections

You need to connect the ESS to your Break out Board (BoB) using the supplied Parallel port and header cable. I also needed to use a DB25 Gender Changer to connect with my BoB. I have a 12v PSU that runs my lasers, TEC system and all my fans together. This is powered up as soon as my CNC table is switched on. Next take the signal cable (Red TTL cable) of your Endurance laser and connect it to Pin17 of your BoB. Connect the ground (Black TTL) to a ground connection on your BOB. This will be used for your PWM’s 0V to 5V DC signal.

Setting up a Mach3 profile

To simplify things just use Port 1 Pin 17. This is what I used… It’s best to create a new profile in mach3 to do this, make sure you clone from a profile that has the motors already tuned correctly. I named mine ‘ESS Laser’.

Essentially we are going to use the Mach3 Spindle PWM signals to control the laser.

  1. In Mach3’s Menu -> Config -> Ports & Pins -> Motor Outputs tab.

Setting up your Endurance Laser using Mach3

Enable your Spindle by selecting the green tick, set your ‘Step Pin’ to 17 and set the ‘Step Port’ to 1. You can ignore the ‘Dir Pin’ and ‘Port’ fields.

  1. In Mach3’s Menu -> Config -> Ports & Pins -> Spindle Setup tab:

Setting up your Endurance Laser using Mach3

In Relay control check the ‘Disable Spindle Relays’ box. (we want them disabled).

In the General Parameters area, make sure all of your delays are set to 0 seconds (we don’t want to wait for the laser, since it will be essentially instantaneous with the M11P1, M10P1).

Check ‘Use Spindle Motor Output’ & ‘PWM control’ (you may ignore the PWM Base frequency as that frequency will be set in the ESS config window later).

  1. In Mach3’s Menu -> Config -> Ports & Pins -> Output Signals tab.

Setting up your Endurance Laser using Mach3

This will control the Laser on/off M11/M10 commands. Enable your Output#1 with a green check.

Then choose any available output Port and pin (that’s not already used) for the Gate/Relay signal. Your Endurance laser does not have a Gate or On/Off input but the software prefers you do this.

  1. In Mach3’s Menu ->Plugin Control -> Spindle, THC & Laser Config:

Setting up your Endurance Laser using Mach3

Place a Check next to ‘PWM’.

Set your Base Hz to 1000 to start with, (this is what I use) but you can try anything upto 4000 with the Endurance laser.

Make sure that the ‘XY PWM Output’ is blank.

  1. In Mach3’s Menu ->Plugin Control -> Main Config, in the M11P#/M10P# area:

Setting up your Endurance Laser using Mach3

Place a check next to Output Mode.

Set the Output Number to 1 (from step 3).

Although your Endurance laser doesn’t have a Gate input, you still want to place a check in the ‘M11P1/M10P1 Gates Spindle Output’ box. If you don’t check this, then the PWM signal will be active all the time (after you call M3).

  1. In Mach3’s Menu -> Config -> Pulley Selection.

Setting up your Endurance Laser using Mach3

I used Pulley Number 1 (any one will do)

Set the ‘Min speed’ to 0, ‘Max Speed’ to 100, and a ‘Ratio’ of 1. Doing this will allow you to control the laser power in increments of 1%, between 0 – 100%.

Therefore S50 will give you 50% PWM duty cycle (50% power).

Operational Description:

The M11P1, M10P1 signals act about 10 times faster than the M3, M5. They basically prepare the laser to turn on/off at the beginning/end of the next move.

M11P1 followed by a G0, G1, G2 or G3 (plus a move) command on the next line will activate the PWM signal. The M11 command allows for the laser output to be synchronized and turned on with the start of the next motion command. This prevents the burning of holes in your material or burning before you get to the starting point of the line you want it to turn on at.

M10P1 followed by a G0, G1, G2 or G3 (plus a move) command on the next line will deactivate the PWM signal. The M10 command allows for the laser output to be synchronized and turned off with the start of the next motion command, and stops the laser shutting off before you get to the end of the line you’re burning.

So, these commands are fast enough but they require movement to work properly. The Laser will not switch on/off at the G0, G1, G2 or G3 command, the switching occurs at the next X, Y, Z, A, B or C command. Occasionally the laser wouldn’t switch off at the end of the job because after the last M10P1 there was no actual movement.. So after talking some more with Andy at Warp9, he suggested that I create a ‘Phantom axis’ that wasn’t actually connected to anything but we would use the switching of this axis to turn off the laser after the last M10p1. The PP had to be edited to activate this movement and, it works great.

To setup a Phantom Axis to Control the Switching is done as follows…

Set up a phantom axis C, and assign its Step and Dir pins to two unused ESS outputs (which never need to be connected to anything).

Setting up your Endurance Laser using Mach3

I enabled the ‘C’ axis, set the Step to Pin2 and Dir to Pin3

Then we need to configure the Phantom C axis, this is done under… In Mach3’s Menu -> Config -> Motor Tuning

Setting up your Endurance Laser using Mach3

Select the C axis and set it to 10000 ‘steps per’ and use your Maximum (or a very high velocity). The ‘Acceleration’ rate (will auto calculate), so that the fake moves will happen almost instantaneously.

Using Vectric to create the GCode

You can use several programs to produce the GCode but for the purposes of this write-up we will be concentrating on Vectric Aspire. Vectric is a very popular software used by many professionals and hobbyists alike to design and create both vector and raster engraving GCode. Vectric are starting to get serious about output for lasers and have recently added a specific laser tool. However this is relatively new and untested so we will be using the ‘End Mill tool’ method to control our Laser.

Set up Your Tool

First you need to have a tool for your laser with the correct parameters. In the “Tool List”, make a new Endmill tool for the laser. For the “Diameter” set the spot size for the laser (about 0.25mm to start). Everyone will have different spot sizes and it depends on your ability to focus as well but 0.25mm is a good place to start.

Setting up your Endurance Laser using Mach3

If you notice during a fill engrave that there’s too much space between the lines, then make the numbers smaller until the spaces disappear.

The Spindle speed RPM (S) will be your Endurance Laser power %. Remember the Pulley we setup in Mach3? Enter 100 here and your Laser will run at full power. I also setup a tool here and called it ‘Laser Focus’ with a Spindle speed of 2, (2% power)

You can set the Feedrate (F) here for your laser as well. You can have different tools with different feedrates (remember with lasers, slower feedrate = deeper burn), or you can modify the tool whenever you want to change the feed speed.

Make Your Project

Do what you normally do in your Vectric Software to design and create your job. Make sure to select your Laser tool from the previous setup in your job.

The Post Processor (PP)

Getting a good Post Processor is critical. Many of the PP’s I tried were causing unpredictable results for my setup. I didn’t really want to start learning everything about PP’s but turns out I had to do a fair amount of research and reading.

Basically a PP is a text file that specifies a set of rules and tells your machine how the GCode is to be interpreted. All the PP’s I tried were derived/edited from some other versions. Some were initially created for 3D printing and/or for Co2 lasers having M3 commands etc. The ones available from the Jtech site were derived from milling machine Post Processors. Even the M11P1 versions included ‘G04’ (pauses) which caused random dwelling (Gaps) and not turning off fast enough. Of course with the laser, this resulted in little burn spots at the end of each line.

The results of these Post Processors can be seen here

Setting up your Endurance Laser using Mach3

Eventually I found a PP that was pretty close to what I was after. It was created by a guy called Tweakie, who’s been using Mach3 and lasers for years. Basically I edited his Vectric, laser PP by removing the M3 and Tool Change (M6) commands and replaced them with the M11P1, M10P1 commands as needed for this setup.

Setting up your Endurance Laser using Mach3

As you can see, using my modified Post Processor there’s no gaps or burn spots. I’m making this Post Processor available to save you the time and effort.

Install the Post Processor

To install the PP, download the file to your computer.

From within Vectric, GoTo -> Menu -> Toolpaths -> Install PostProcessor… Navigate to where you downloaded the file and select it.

You will be prompted, if you would like to make this your default PostProcessor Click ‘Yes’

Then when you have set all your toolpath settings etc. for your project, select the post processor from the drop down box.

It will be named ‘Endurance Mach3 Laser M11p1 (mm)‘.

There will also be a copy of this Post Processor in our Facebook group page under the ‘Files’ section.

Remember… don’t be afraid to ask for help on our Facebook group. We are all learning together!

Stay updated with Endurance newsletter.
I have read and agree with the Endurance privacy policy
X

    Get a quote?

    Get an individual offer now... Just leave your contacts..





    X

      Get a quote?

      Get an individual offer now... Just leave your contacts..