Laser, Aspire, Mach 3 and a diy CNC

This forum is for general discussion about Aspire
jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

The purpose is to fit Chinese laser (which came with no instructions, diagrams or data!) to a home built diy CNC machine of my own design and make it function using Aspire and Mach 3 software.

Mach has no laser dedicated function but does support output signals such as spindle and coolant. I latched onto the later as a simple on/off control method which was fairly easy set up.

The idea being to set the z height and maintain that setting while "lasing" things to be burned. Not so hard with an Aspire post processor that will convert plus and minus z movements to coolant off and on instructions. There are several post processor mods around to get you started.

The cheese begins to bind, however, when Aspire refuses to send the generated tool path directly to the machine. Any body got a clue what that is all about?

Another "bind" is that Aspire doesn't want to create a new tool for this chore. After the new tool is described you can use it to create your project but Aspire won't save it to tools.

I'm sure theses are simple things I've over looked but after dragging so bloody much information together my 75 year old brain is bout to go into over load. Any young bucks with flexible minds willing to point the way?
Attachments
IMG_0253.JPG

User avatar
TReischl
Vectric Wizard
Posts: 4575
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by TReischl »

Interesting post. My 2.5w laser arrived today and I mounted it up. Did some prep work a few weeks ago so all I had to do was drill a few holes.

Anyhow, I was thinking I would need a time delay when the laser starts. Nope. In fact, the opposite is true. I run Mach also and I kept getting overburn marks where the "cut" started.

What I did was modify the post so that an M3 (laser on) is output after the first rapid move. After that it stays on, even during rapid moves. At the end, "M5". This worked way, WAY better. Yup, I have some faint lines where the rapids occurred. But I ran out of time today but have an idea for tomorrow. I am going to increase my rapid speed from 250 IPM to about 400IPM. Yup, my homebuilt can do it, I just do not like it when I am working with the machine. That is way too fast for me.

Actually did something like this years ago when I was in a different life. Worked on big honking commercial laser cutters with lots of power, like 5000w. We figured out that we could leave the beam on during rapids since the machine traveled at 2500IPM. Worked great in thin materials.

Interestingly, this method really cuts down on the time. The image I was doing today was about 23 minutes in a normal mode. After the change that time dropped to about 7 minutes AND the quality was much better. I also figure a very light sanding will remove those rapid lines.

I am going to do quite a bit of testing in the next week or so.

Not sure why you are feeding the program from Vectric rather than just loading a file into Mach and go from there? Not sure there any advantages to that? Works well for me :::shrug::::
"If you see a good fight, get in it." Dr. Vernon Johns

kaetamer
Posts: 35
Joined: Mon May 12, 2014 3:10 pm
Model of CNC Machine: CNCRP Pro 4824

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by kaetamer »

Have a look here https://jtechphotonics.com/?p=3851
and here
https://jtechphotonics.com/?page_id=1436
for connection and control options. The M10/M11 feature is very useful.
Good luck.

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

J Tech Photonics page is very helpful and the M10 and M11 are interesting but there are unanswered questions for me bout that code.
Which Mach setup routine does one follow? The one for spindle control or the one for output #1?
I think M10 and M11 lock and unlock the chuck but as for Mach function I am not sure, and then is there a screen and shortcut button to access this function?

As for feeding the program from Vectric rather than just loading a file into Mach, that makes my work function more smoothly with fewer clicks and fuss to move between programs while modifying a project on the fly.

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

Researching on line I found an interesting post that may help clarify things so I will paste it here.

Switching a laser under Mach control.
With a laser the depth of cut is related to the time of exposure so that, for the same power setting, slow federates will cut deeper than fast federates. If there is any delay between the laser being switched on and the subsequent axis movement a deep spot is produced at the beginning of the kerf and likewise if there is any delay between the axis movement stopping, at the end of the kerf, and the laser being switched off another deep spot is also produced. This effect seems to be no problem when cutting right through or when profile cutting but it does cause problems and creates poor looking work when engraving (for example, a fine line engraved into a soft wood appears to have a dot at each end of the line). So to produce neat work, a method of rapidly switching the laser coincident with axis motion starting and stopping is necessary.
The existing spindle commands M3/M4 and M5 are really not suitable, mainly because of the delay they exhibit (after all they are designed to switch a spindle, which already has inherent spin up / down delay). Likewise the M7/M8 and M9 commands have similar (albeit not so much) delays. A command set which shows much less of a delay is the M11P1/M10P1 combination which will switch the Output #1 on/off at the exact time of the next axis movement. The 'P' relates to the Output# number where P1 would be Output#1, P2 would be Output#2 and so on.
Because Mach was a constantly evolving product (as of mid 2014 it's development ceased and no future revisions are planned following the introduction of Mach4) some of it’s routines / subroutines were rewritten with each new revision in order to create improvements in both speed and function. However, in some versions changes were made in the way Visual Basic or to be correct Cypress Basic routines, in particular, behave (what used to work perfectly subsequently needed some re-coding to work properly again – the Auto Tool Zero macro is a typical example of this).
At about revision R3.042.040 the M11/M10 commands stopped working correctly and following my discussions with Artsoft the problem was later resolved with revision R3.043.056.
During the period when M11/M10 was not working correctly I reverted back to 'plan B' of using an axis direction signal for laser switching. The technique here is to edit the existing GCode or modify the post processor used so that the +axis moves are just one step (in my case +0.002) and the –axis moves are also just one step (-0.002) then set the axis direction pin to the laser trigger pin allocation. The time delay between the axis completing the two virtual steps and the laser switching is so small that it can almost be considered instantaneous and when I return to engraving the fine line in a soft wood there is no longer a dot at each end of the line. In order to minimize any conflicts I chose to use my (imaginary) B axis direction pin for laser control where the B axis ‘steps per’ are set to 1 and the B axis direction pin is mapped to the laser trigger (pin 16 in my case) then any GCode is edited (or the post processor used modified) to replace the Z axis moves with B1 to turn the laser on and B0 to turn it off. Again these commands can almost be considered as instantaneous and tests have shown it to have equal results to when any other axis direction pin was used.
Returning to the M11P1/M10P1 command set – these undocumented calls were written into the original Mach code by Art (founder and creator of Mach3) for the sole purpose of controlling a laser or other fast acting device and they have quite special properties. The standard M commands (M3,M5) typically take 100mS between switching an output and the GCode continuing whereas M11P1 currently takes 2mS and M10P1 1mS under the same conditions.
So, for reliable operation, Mach3 revision R3.043.056 or later should now be used if M11/M10 laser switching is required.
Looking to the future and Mach4 there have now been discussions with various external motion controller manufacturer's and it has been decided to use the command set M62/M63. This may change if any conflicts are discovered but currently (Jan.2015) within Mach4 the command M62P1 will turn on Output#1 and M63P1 will turn off Output#1 and in most respects these commands behave in exactly the same manner as the Mach3 M11/M10 command set.

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

Today I braved California's latest blast of cold air long enough to re-configure Mach3 with only output #1, no spindle or coolant and then eliminate all the "new" post processors and then install just the one that uses M11p1 and M10p1.
It works beautifully but there is no provision for screen or keyboard control. I has to be done with gcode either in a file of entered by way of MDI. That is a pain. A physical on/off switch for the laser transformer may be the best answer.
Also, Aspire refuses to write the file directly to the Mach machine if it is written with the new post processor.
Aspire as well refuses to save anything to the tool library!!
Anyone got a clue whats up with that?

kaetamer
Posts: 35
Joined: Mon May 12, 2014 3:10 pm
Model of CNC Machine: CNCRP Pro 4824

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by kaetamer »

I configured the M10/11 commands as per JTech and I can manually toggle the laser on/off with "Spindle CW F5" command under Spindle Speed in Mach3.

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

Thank you!
I will look into that as soon as some of the ice melts out in my shop! (I'm just getting old and sensitive to weather, come on global warming! lol)

I did discover why Aspire wasn't directing the gcode straight to my machine.
The post processor was missing the line DIRECT_OUTPUT = "Mach|Mach4.Document"!
Once I added that bit of code the problem disappeared.

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

kaetamer wrote:I configured the M10/11 commands as per JTech and I can manually toggle the laser on/off with "Spindle CW F5" command under Spindle Speed in Mach3.

No matter how I configure Mach 3, the F5 button has no effect on the operation underway on the laser. It does toggle The spindle (M5 / M9) but since that routine is not operating and instead the M10P1 routines are active there is no net effect.

Meanwhile the tool database refuses to except any changes or new tools.

Pulling my hair out because I hate to start experimenting in a database I don't understand and have no documentation for , much less even basic instruction as how to handle corrupted files or whatever the problem may be.

Vectric is missing a bet here and one of them should step forward and offer some assistance, PLEASE!

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

kaetamer wrote:I configured the M10/11 commands as per JTech and I can manually toggle the laser on/off with "Spindle CW F5" command under Spindle Speed in Mach3.

No matter how I configure Mach 3, the F5 button has no effect on the operation underway on the laser. It does toggle The spindle (M5 / M9) but since that routine is not operating and instead the M10P1 routines are active there is no net effect.

Meanwhile the tool database refuses to except any changes or new tools.

Pulling my hair out because I hate to start experimenting in a database I don't understand and have no documentation for , much less even basic instruction as how to handle corrupted files or whatever the problem may be.

Vectric is missing a bet here and one of them should step forward and offer some assistance, PLEASE!

antennasDIY
Vectric Craftsman
Posts: 233
Joined: Wed Jul 10, 2013 3:43 am
Model of CNC Machine: Home made
Location: Canada

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by antennasDIY »

Have a look at cncnuts youtube video on setting up a laser. It is what I Used and it works well. As long as you don't want teh z to go up and down to follow a 3d contour.

jhowelb
Posts: 42
Joined: Tue Aug 14, 2012 7:04 pm
Model of CNC Machine: home built

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by jhowelb »

antennasDIY wrote:Have a look at cncnuts youtube video on setting up a laser. It is what I Used and it works well. As long as you don't want teh z to go up and down to follow a 3d contour.
CNCnuts has posted a lot of interesting and useful stuff anybody getting involved with CNC Machines should take the time to watch and listen to him and avoid a lot of costly mistakes. He just didn't cover the subject!

Interesting things I found along the way are as follows:

If you place a post processor file or files in the folder named "My Postpone" then those will be the only ones you have to look at when you process your project to G code.

You can eliminate the return to zeros at the beginning and end of G code file by editing the post processor file.

You can establish an offset for your laser tool so that you don't have to find a separate zero setting aside from the cutting tool in your router.

The M10p1 and M11p1 commands will fire the laser when an axis begins to move there by eliminating the heavier burned dots but there is no manual override available in case you need to stop the run on your machine. You really need a physical switch to turn the power off to the laser in case this happens!

Very very narrow lines produced by a laser look squiggly if there is any movement of the laser independent of the movement of the axis move. That sucker has to be tight! If there is any backlash in your system you'll see it with this business!

BDM
Vectric Craftsman
Posts: 167
Joined: Tue Jan 04, 2011 3:52 pm
Location: S.E. Michigan

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by BDM »

TReischl wrote:Interesting post. My 2.5w laser arrived today and I mounted it up. Did some prep work a few weeks ago so all I had to do was drill a few holes.

Anyhow, I was thinking I would need a time delay when the laser starts. Nope. In fact, the opposite is true. I run Mach also and I kept getting overburn marks where the "cut" started.

What I did was modify the post so that an M3 (laser on) is output after the first rapid move. After that it stays on, even during rapid moves. At the end, "M5". This worked way, WAY better. Yup, I have some faint lines where the rapids occurred. But I ran out of time today but have an idea for tomorrow. I am going to increase my rapid speed from 250 IPM to about 400IPM. Yup, my homebuilt can do it, I just do not like it when I am working with the machine. That is way too fast for me.

Actually did something like this years ago when I was in a different life. Worked on big honking commercial laser cutters with lots of power, like 5000w. We figured out that we could leave the beam on during rapids since the machine traveled at 2500IPM. Worked great in thin materials.

Interestingly, this method really cuts down on the time. The image I was doing today was about 23 minutes in a normal mode. After the change that time dropped to about 7 minutes AND the quality was much better. I also figure a very light sanding will remove those rapid lines.

I am going to do quite a bit of testing in the next week or so.

Not sure why you are feeding the program from Vectric rather than just loading a file into Mach and go from there? Not sure there any advantages to that? Works well for me :::shrug::::

Ted,

Are you using a laser driver board that they mention here https://jtechphotonics.com/?page_id=1436 or is this one of those "nice to have, but not necessary items", i.e. can you by-pass a laser driver board and hook directly to the interface board? I'm not an electronics whiz, but have no problem wiring things with a diagram or good instructions.

Thanks

User avatar
TReischl
Vectric Wizard
Posts: 4575
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by TReischl »

I had the chance today to work with my laser setup.

For the work I am going to do with it I have no need for instant on when an axis starts moving. Right now the post is configured to output an M3 when the first G0 is seen. It stays on until the end of the program. The machine is now rapiding at 400 IPM so a very faint line is left on the surface of the material. This is not a big deal for my main usage. You will see why in a bit.

Test cut about 15 parts out of .020 veneer that comprise a flower. Cut a pocket in the base piece in the traditional manner. Who'd a thunk! They fit in perfectly. I did not cut inside or outside with the laser. Right on the line. The .020 veneer required three passes at about 25 IPM to cut through. Yup, it is slow. But they are small pieces as are most marquetry projects. Is one heckuva lot faster than fiddling around with scalpels.

It was also able to cut through .060 walnut veneer. That took 8 passes at a slightly lower feedrate.

The reason those rapid travel lines do not bother me is that the piece needs to be sanded flush after gluing anyhow and they will disappear. So I am not going to spend a lot of effort trying to get Mach to act like a 20K laser cutter. The other thing I figured out is that I can very easily place my start points for these parts so that the beam never runs over a piece. Pretty easy.

Now, if I were doing engraving work that needed to be "just so" it would be an entirely different story.

BDM, the laser I bought has no control board. When power is applied, it is full on. There is no adjustment to set power levels. With what I am doing with it setting a power level would be a waste of time. Heck, it takes at least passes to cut through so I sure am not going to lower the power.

One interesting thing I did was use the contour function in Corel X7 on some lettering. It is sort of like Offset on steroids. That worked out really well, gave me nice large dark letters.

So, as of right now, I am very happy with the way it is working. Later on I may get a more powerful laser (5W) with power control and then I will have to figure out all the mach stuff, but now? Nah.

I am going to get some pics of what I have been doing and post them in a day or so.
"If you see a good fight, get in it." Dr. Vernon Johns

robertf
Vectric Apprentice
Posts: 72
Joined: Wed Oct 20, 2010 2:55 am
Model of CNC Machine: CnC Router

Re: Laser, Aspire, Mach 3 and a diy CNC

Post by robertf »

Still waiting on laser module, Been doing lot of surfing for info.

I came across this web site and free program, made for laser engraving.

Apears to work very well as far as making Gcode, but since I cant do any thing with the code
yet OH Well !!

there is not much info on the site but if you look under the FAQ tab -- some info

You can open a jpeg file and it will convert it very nicely, maybe other types also.

http://lasergrbl.com/en/download/ Web site

https://github.com/arkypita/LaserGRBL/r ... nstall.exe Program

If some one can try it out and report back would be great.

I ran virus check with Kaspersky to make sure its clean !!!!!

Post Reply