Project

General

Profile

Firmware with boundary function

Added by joostn over 5 years ago

Hi!

As an exercise to get familiar with the firmware, but also to add something which I needed myself, I've implemented a 'boundary' feature.
This scans the job to determine the bounding rectangle of the cut. The rectangle is shown by moving the laser head and finally the dimensions are displayed in the display.

Attached is the modified firmware. I've also issued a pull request on github, hope it can be included in the main branch.

Joost


Replies (9)

RE: Firmware with boundary function - Added by jaap over 5 years ago

Hi Joost,

Thanks for that! I'll test it on my laser tomorrow and add it to the main branch!

Jaap

RE: Firmware with boundary function - Added by jaap over 5 years ago

Just tested this patch: the boundaries are show on the display but the laser head is not moving. Something wrong with the uploaded bin file, or difference between our lasers?

RE: Firmware with boundary function - Added by joostn over 5 years ago

Does it display a non-zero width and height or are both 0?
Is the machine homed?

RE: Firmware with boundary function - Added by jaap over 5 years ago

It displays the correct position, width and height. But it doesn't move along the boundaries. The machine was homed.

RE: Firmware with boundary function - Added by joostn over 5 years ago

Hi Jaap,

See http://redmine.laoslaser.org/boards/3/topics/765
Could you try again with the firmware posted there?

RE: Firmware with boundary function - Added by jaap over 5 years ago

Boundaries work now!

RE: Firmware with boundary function - Added by jaap about 5 years ago

I've split joostn's patches into seperate pieces, because things were breaking and I couldn't figure out what was breaking what.

The first patch only adds the boundary function to the menu. It moves the laserhead along the outline and shows size and offset.
It works for me, but I would like to see some tests on other machines to make sure. So please test!

Compiled firmware is attached here. You can download the source here:

git clone --recursive -b testing http://github.com/LaosLaser/Firmware
git checkout 883194

RE: Firmware with boundary function - Added by drogon about 5 years ago

It appears to work on my HPC.

A very worthwhile addition IMO.

One minor niggle - I think it would be good to leave the laser at the x.rest/y.rest position rather than at the bottom left where it starts the boundary scan from.

And just noticed - if I run it twice, there seems to be a pause - almost as if it's doing a "phantom" move from home to bottom-left before then doing the boundary scan. Not a show stopper though - maybe put something on the display when you push the button though - "Calculating Boundary" - "moving to origin" - "scanning boundary" ... ?

Cheers,

-Gordon

RE: Firmware with boundary function - Added by jaap about 5 years ago

Thanks for testing!

Your wish-list has been noted, but there are some other features that Joost added that I want to get working first!

The "phantom move" is indeed a 1 second pause, build in to distinguish between the motion towards the boundary and the scanning of the boundary. If there is no move towards the boundary, it still does the pause.

    (1-9/9)