Page 10 of 19

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 7:34 pm
by sliptonic
BenJackson wrote:
Hah! I specifically commented those out just before I pushed to github because they have nothing to do with my rastering code. If you literally used File|Open and selected an image (using the FILTER) then what you got was a program generated milling script. I guess it works because of the magic-z? Was the motion smooth?


I didn't do File|Open. I used your sample code from the README. It was giving me the 'unknown M code' error which I assumed was because it didn't associate .py with python. When I uncommented those lines, it worked great. Very smooth.

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 8:46 pm
by bill.french
I didn't have to uncomment that section to get it to work.

Also, concerning x vs. y -- why would you want it to be y? Isn't x always the faster axis?

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 9:29 pm
by TLHarrell
Having a small machine at the moment, having the ability to determine the raster axis would be cool to me. I've had several projects where I wanted to raster something along the other axis, for sake of how it looks when done, but couldn't due to the constraints of my work envelope. Not necessary, and adds unneeded complexity, but would be a nice feature.

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 10:10 pm
by Modelart
bill.french wrote:I didn't have to uncomment that section to get it to work.

Also, concerning x vs. y -- why would you want it to be y? Isn't x always the faster axis?


I proposed it for non 2x_machines, like mine :oops:

regads
rick

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 10:23 pm
by BenJackson
TLHarrell wrote:Having a small machine at the moment, having the ability to determine the raster axis would be cool to me. I've had several projects where I wanted to raster something along the other axis, for sake of how it looks when done, but couldn't due to the constraints of my work envelope. Not necessary, and adds unneeded complexity, but would be a nice feature.

When I implemented the raster engraving (before PPI) I thought I was making the EMC configuration more portable by sticking to existing HAL components. Thus the snooping of the X axis and the synchronization with the bitmap is done using general purpose HAL components like adders, comparators and LUTs. When I implemented PPI I had to make a new HAL component altogether. That turned out to be much easier than I realized. I could actually move the raster support into its own component and then I could get around limitations preventing a selectable axis.

By the way, regarding FILTER: The existing (commented out) filters should not be necessary. However, a new image filter could easily generate the 5 line O145 script for an image so you could use "File|Open" on an image, select some parameters, and engrave.

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 10:47 pm
by Modelart
BenJackson wrote:I tried to make [RASTER]AXIS set the engraving axis but there are some issues that make it difficult. The M144 script looks at that setting but the HAL doesn't. The HAL needs "xpos" changed to "ypos" in the raster section. For O145 I'd just copy it to O146 and flip X/Y.

If you want to be able to do either at runtime it would require more complex code in the HAL.



o146 with flipped x/y change raster scans to y, but changes in the hal (also has to change axis.0 to 1) doesnt fire the laser at all.
Is coded in another place, or i doing it wrong?

attached my hal file and o146

regards
Rick

Re: Ben's 2.x Laser Build

PostPosted: Thu Jan 05, 2012 10:55 pm
by BenJackson
The HAL change looks ok. M144 looks at [RASTER]AXIS (add that to the INI) so you could set that to 1, but I don't think it rotates the image. By the time I realized I couldn't make it all track [RASTER]AXIS I dropped it.

Re: Ben's 2.x Laser Build

PostPosted: Fri Jan 06, 2012 1:51 am
by Modelart
BenJackson wrote:The HAL change looks ok. M144 looks at [RASTER]AXIS (add that to the INI) so you could set that to 1, but I don't think it rotates the image. By the time I realized I couldn't make it all track [RASTER]AXIS I dropped it.


i have put .ini file
[RASTER]
IMAGE_PATH = /home/my path
AXIS = 1
an error apears (too late at night to find why)

but editing m144 line 28 to axis = 1, the posted .hal, and o146 do the trick.
The only minor drawback is that the image is flipped (EDIT: mirrored) around x axis.
Thanks for the reply Ben
Regards
Rick

Re: Ben's 2.x Laser Build

PostPosted: Fri Jan 06, 2012 3:53 am
by BenJackson
Modelart wrote:AXIS = 1
an error apears (too late at night to find why)

Needs axis=int(axis) because the config is a string. Never tested that.

Modelart wrote:The only minor drawback is that the image is flipped (EDIT: mirrored) around x axis.

Look for image.resize in M144 and see this Python document for things you can do. You probably need some kind of image.transpose() to flip it the right way.

Re: Ben's 2.x Laser Build

PostPosted: Fri Jan 13, 2012 4:36 pm
by Modelart
BenJackson wrote:
Modelart wrote:AXIS = 1
an error apears (too late at night to find why)

Needs axis=int(axis) because the config is a string. Never tested that.

Dont test this, i will.

Modelart wrote:
BenJackson wrote:The only minor drawback is that the image is flipped (EDIT: mirrored) around x axis.

Look for image.resize in M144 and see this Python document for things you can do. You probably need some kind of image.transpose() to flip it the right way.


You make it look easy. Its done, i have the files if any want,
i have too much questions about programming!
Thanks and Regards
Rick