Welcome! Log In Create A New Profile

Advanced

How to change location of X0 Y0 Z0

Posted by zakelectric 
How to change location of X0 Y0 Z0
January 13, 2016 10:37PM
Hi guys,

Just bought my first 3d printer, it's a reprap delta style. Have been playing with it and made a whistle of all things! So far so good.

Part of the reason I bought it was to do some wood laser engraving by attaching a laser to the print head. I am all ready to go with the acception that I cannot figure out how to use my whole print space- the pictures that I convert into Gcode start at X, Y or Z 0, and continue to positive numbers so I can't use the negative number coordinates of the printer since X and Y zero are smack dab in the middle.

I've been racking my brain how to rectify this, it would be great if the program I use to convert the picture to Gcode could make negative coordinates but it seems like that's not a possibility.

What seems like it would work best would be to use G92 to set up a temporary zero point on one side of the printer by finding my starting X coordinate for example and then entering G92 X0 Y0 Z0. However, when I do this, the next command I enter causes the printer to crash into the limit switches and I have to emergency stop. I'm stumped as to why this is happening! Any ideas?? Maybe even something other than G92?

Thanks smiling smiley
Re: How to change location of X0 Y0 Z0
January 14, 2016 12:21AM
What program do you use to generate your gcode?

You should be able to easily write a script that simply subtracts half you bed diameter from the X and Y co ordinates of the gcode... if it generates gcode with absolute positions. If it produces relative gcode positions... then it a lot trickier

Paste a small example in pastebin and link to it, so we can take a look at it

With a delta X,Y and Z aren't that simple, resetting the location of x0 y0 z0 breaks all the positional maths... (as I understand it)

Edited 1 time(s). Last edit at 01/14/2016 12:32AM by Dust.
Re: How to change location of X0 Y0 Z0
January 14, 2016 12:50AM
Hi, thanks for the reply! So are you saying that G92 doesn't generally work with delta printers??

The code is made with "Raster 2 Laser Gcode generator", an extension for Inkscape.

[pastebin.com] <-- There's the code, not sure if I did that right, never heard of pastebin before!

So would I write that script with gcode? Or perhaps another language? I've been wanting to get into python, seems like maybe it's a good time smiling smiley

Edited 1 time(s). Last edit at 01/14/2016 01:00AM by zakelectric.
Re: How to change location of X0 Y0 Z0
January 14, 2016 01:45AM
Looks good.

Ok it uses Absolute positions

The extenson is written in python! easy to change (its just text)

Look like it uses fan controls to control the strength on the laser.

Whats the largest square size you can "print" ie what size if your print bed
Re: How to change location of X0 Y0 Z0
January 14, 2016 01:59AM
If you look at [github.com]

Line447 onwards of raster2laser_gcode.py

you see lines like: file_gcode.write('G00 X' + str(float(x)/Scala) + ' Y' + str(float(y)/Scala) + '\n')

All you need to do is change str(float(x)/Scala) to str((float(x)/Scala)-yourxoffset)

Where yourxoffset is how left you want to shift it

Do the same thing with the y for what ever y offset you want.


NB

this need updating in a few places, different bits of code, something to do with normal, reverse and scaled and reversed and scaled images, but easy to find them

Edited 3 time(s). Last edit at 01/14/2016 02:05AM by Dust.
Re: How to change location of X0 Y0 Z0
January 14, 2016 03:48AM
Dust,

You nailed it! Thanks so much!!
Had to insert the offset in about 13 places and now it's working perfectly!

I even figured out that I can change the Y to a Z so it spits out a X Z coordinate since I'm actually going to be lazering horizontally to utilize the height of the delta printer. I've been using the find and replace function on Gedit to do that. I feel like a dummy.

Thanks again man!
Re: How to change location of X0 Y0 Z0
January 14, 2016 04:10AM
Nice

Got any videos we can see of the results?
Sorry, only registered users may post in this forum.

Click here to login