Looking for noob guidance on laser rastering (Ben's work)

Discuss Laser CNC Software Issues

Looking for noob guidance on laser rastering (Ben's work)

Postby shobley » Wed Dec 12, 2012 3:26 pm

I've been successfully running my DIY laser as a simple vector cutter using Mach3, but now I'm becoming aware that I need more precise control over the laser power, and rastering is proving to be difficult.
So I installed LinuxCNC (Ubuntu 10.4) and managed to get control of the laser as before.

So now I'm looking for where to go next...

I've been reading through Ben's posting on his Laser work, and the readme here : https://github.com/bjj/2x_laser/blob/master/README.md
It looks like I need to do the following things:

1. Download the build essentials for LinuxCNC
2. Grab the HAL code and build it
3. Install the HAL into LinuxCNC (is it a problem that Ben is using EMC2?)

4. Grab the "other" code/scripts and somehow build and install them.

I got a reasonable rating on my system latency by applying various tips and tricks online - I have under 30000 as the max value (not excellent, but good enough)
I am however a bit lost trying to understand exactly how latency will effect my max speed and travel while rastering.

Any assistance would be greatly appreciated.

Thanks in advance,
Steve
www.stephenhobley.com
shobley
 
Posts: 8
Joined: Wed Dec 12, 2012 7:22 am

Re: Looking for noob guidance on laser rastering (Ben's work

Postby BenJackson » Wed Dec 12, 2012 6:44 pm

shobley wrote:1. Download the build essentials for LinuxCNC
2. Grab the HAL code and build it
3. Install the HAL into LinuxCNC (is it a problem that Ben is using EMC2?)

You can also start with the bootable LinuxCNC CD and either run from that or use it to install.

The HAL component build/install is one command (should be in the README)

EMC2 was just the old name of LinuxCNC. They renamed shortly after I did my work. My repository is still set up for 2.4, but I will upgrade it to 2.5 soon. I think one of the forked versions on github has some 2.5 compatibility changes.

shobley wrote:4. Grab the "other" code/scripts and somehow build and install them.

You really only need to git clone the repo, update the INI and HAL for your system and go.

shobley wrote:I got a reasonable rating on my system latency by applying various tips and tricks online - I have under 30000 as the max value (not excellent, but good enough)
I am however a bit lost trying to understand exactly how latency will effect my max speed and travel while rastering.

I think mine is 27000. The step generator is able to generate one full pulse per BASE_PERIOD. The base-thread wakes up and makes the rising edge of the pulse, and then special logic enabled by setp parport.0.reset-time 1000 turns it off later in the same pass. That means you get 1/BASE_PERIOD steps/second. In my case that's 1/27000ns = 37000 steps/sec and my AXIS_0 SCALE is 78.74 so I get 37000/78.74 mm/s or 470mm/s.

I could go faster if I reduced the microstepping (scale would become smaller thus top speed would be higher).

Another important setting is acceleration. My X accel is 7500mm/s/s. You need it to be pretty high in order to limit how much overscan is required at the edges of the raster (see the README for the formula).

Since I'd like to go faster I've just ordered one of the $90 PCI FPGA parallel port cards (the 5I25) from Mesa Electronics.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Looking for noob guidance on laser rastering (Ben's work

Postby shobley » Wed Dec 12, 2012 7:01 pm

Thanks Ben,

I will give it a try later and see how I get on.
shobley
 
Posts: 8
Joined: Wed Dec 12, 2012 7:22 am

Re: Looking for noob guidance on laser rastering (Ben's work

Postby shobley » Wed Dec 12, 2012 7:22 pm

Actually one final question - one of my tests was cutting paper without (excessive) charring. I noticed that where the gantry was slowing down (corners) and also where the beams crossed there was an increase in charring. I'm hoping that LinuxCNC will help me to implement a PPI strategy for vector cutting - is that something I should be able to do?
shobley
 
Posts: 8
Joined: Wed Dec 12, 2012 7:22 am

Re: Looking for noob guidance on laser rastering (Ben's work

Postby shobley » Thu Dec 13, 2012 12:34 am

Hmmm....

Still need some help I think.

I tried to install this version, as it indicates compatibility with v2.5 of LinuxCNC

https://github.com/jv4779/2x_laser

I got the build tools no problem, but rather than get the files via git I just downloaded the ZIP file. I expanded this and ran Comp on the two files, everything seemed OK, but nothing got installed. I changed the path to my own config folder as described in the README.

So... I tried manually copying the folder to my configs folder and re-ran the wizard to generate a new ini file, but this didn't seem to do anything either.

When I loaded LinuxCNC and checked the HAL configuration I didn't see anything new loaded.

I think it's the last step - getting the HAL inside LinuxCNC that is tripping me up - what's the bit that I'm missing?

Steve
shobley
 
Posts: 8
Joined: Wed Dec 12, 2012 7:22 am

Re: Looking for noob guidance on laser rastering (Ben's work

Postby shobley » Thu Dec 13, 2012 2:53 am

OK so I did some more pondering and it looks like the laserfreq.ko and laserraster.ko are copied to the correct directory.

Am I right that these ko files (kernel objects) are actually part of the OS, rather than just parts of LinuxCNC?

...and that they make no difference to the LinuxCNC UI?

Someone mentioned gaining extra UI controls for laser speed/ppi/and power or are these just controlled in G-Code?
shobley
 
Posts: 8
Joined: Wed Dec 12, 2012 7:22 am

Re: Looking for noob guidance on laser rastering (Ben's work

Postby BenJackson » Thu Dec 13, 2012 6:25 pm

shobley wrote:Actually one final question - one of my tests was cutting paper without (excessive) charring. I noticed that where the gantry was slowing down (corners) and also where the beams crossed there was an increase in charring. I'm hoping that LinuxCNC will help me to implement a PPI strategy for vector cutting - is that something I should be able to do?

Yes, that's explained in the README. The "motor RPM" (M3 Sxxx) sets it up.

shobley wrote:So... I tried manually copying the folder to my configs folder and re-ran the wizard to generate a new ini file, but this didn't seem to do anything either.

When I loaded LinuxCNC and checked the HAL configuration I didn't see anything new loaded.

I think it's the last step - getting the HAL inside LinuxCNC that is tripping me up - what's the bit that I'm missing?

It comes with an INI that you may have to fine tune, called 2x_Laser.ini. Don't generate a new config (it won't load anything new). You may have to tweak the shortcut that was provided to use the 2x_Laser.ini instead of one created by the wizard. Or you can invoke LinuxCNC (the command used to be "emc") from the command line.

shobley wrote:Am I right that these ko files (kernel objects) are actually part of the OS, rather than just parts of LinuxCNC?

...and that they make no difference to the LinuxCNC UI?

Someone mentioned gaining extra UI controls for laser speed/ppi/and power or are these just controlled in G-Code?

The ko files do run in the kernel to get tighter realtime control. Loading/configuring them is controlled by the HAL.

They don't directly affect the UI. My config does tweak the UI ("axis") by "monkeypatching" the python code.

There are no UI controls specific to the laser. I do remove some irrelevant controls. Since the PPI is "RPM" you can use some existing controls to drive it manually, but usually that will be overridden by the gcode.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Looking for noob guidance on laser rastering (Ben's work

Postby shobley » Fri Dec 14, 2012 2:55 am

OK thanks.

I think I'm almost there - just need help with the concepts, the fiddly bits are working themselves out. :D

So I tweaked the revised (jv4779 version) INI file and got the LinuxCNC UI to load with an extra panel - but the controls don't seem to do anything.
(The result of the PYVCP = custompanel.xml entry in the INI file.)

Is there a test G-code file somewhere that would conclusively let me test if the PPI functionality was working?
shobley
 
Posts: 8
Joined: Wed Dec 12, 2012 7:22 am

Re: Looking for noob guidance on laser rastering (Ben's work

Postby BenJackson » Fri Dec 14, 2012 9:08 pm

shobley wrote:Is there a test G-code file somewhere that would conclusively let me test if the PPI functionality was working?

A cut in plywood (or even card stock) at M3 S20 vs M3 S1000 should show a very obvious difference (the latter will be charred). Heck, M3 S1 will probably just perforate cardstock.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Looking for noob guidance on laser rastering (Ben's work

Postby jv4779 » Sat Dec 15, 2012 6:19 am

shobley wrote:Is there a test G-code file somewhere that would conclusively let me test if the PPI functionality was working?


There are example gcode of raster and vector modes in https://github.com/jv4779/2x_laser/tree ... mple_gcode I believe they are duty cycle and not PPI, but they can be changed to PPI by using M3 instead M4. I don't expect them to cut correctly as they are really just to show how the gcode should look when tweaking a cam post processor.

Make sure the few path names in the .ini file are changed to reflect your setup. This can cause buttons and other functions to not work.
jv4779
 
Posts: 40
Joined: Fri Dec 09, 2011 10:54 pm

Next

Return to Software

Who is online

Users browsing this forum: No registered users and 11 guests

cron