Moving X and Y tangent to Z

More
14 May 2012 17:24 - 14 May 2012 17:26 #20088 by mmt
I am new to Linuxcnc, but love it. I am building a high power laser for drilling purposes and I have completely customized Linux to my machine.

I only have one last hurdle to overcome and I am not sure the best way to explain this, but here goes:

I am using this machine to drill conical holes in very hard material. Parts are normally around 3/8" thick and is spinning. the conical hole is normally around 20 degrees of taper (10 per side) and where it breaks through is as small as .003". My machine is an X,Y,Z configuration and the part is mounted on the X-Y table and Z is a movable high power focal lens.

As there is no way to perfectly square the laser beam to the X-Y axis I am trying to find a method of moving the X and Y axis to the tangent of the Z axis to keep the beam on the part center as Z moves up and down.

Most every part has different geometry. I could do it with cam software but that would be way too time consuming for the volume of parts that I am running. I created an NGCGUI tab to program each one quickly and efficiently.

I have a camera system installed and can accurately measure the X-Y deviation at specific Z heights.

So is there a way to create a program that runs in the background that will move X and Y tangent to the Z movements while still maintaining X0 Y0 at say Z-1.

I hope this all makes sense. Any help would be appreciated. If this is in the wrong section please feel free to move it or let me know and I will.

Thanks,
Kent
Last edit: 14 May 2012 17:26 by mmt.

Please Log in or Create an account to join the conversation.

More
14 May 2012 18:55 #20089 by andypugh
I think what you want to do is make compensating moves in X and Y as Z moves?
There are a few ways to do this I can think of.
The simplest to set up, but least convenient to use, would be to add some "offset" components in HAL between the axis position commands and the stepgens.
You could then pass Z-position into a "scale" component for each axis, then pass the output of that to the stepgen.
You could manually tweak the scale and offset of the "scale" components to achieve the alignment you want.
www.linuxcnc.org/docview/html/hal/basic_hal.html
www.linuxcnc.org/docview/html/man/man9/offset.9.html
www.linuxcnc.org/docview/html/man/man9/scale.9.html

Alternatively you could write a custom kinematics module, an example of something similar is the skew-correction kinematics written to correct a skewed machine:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...y_XY_skew_correction
That approach would require installing linuxcnc-dev so that you can use the "comp" compiler macro to compile/install the code.

Please Log in or Create an account to join the conversation.

More
21 May 2012 15:09 - 21 May 2012 15:10 #20252 by mmt
Replied by mmt on topic Re:Moving X and Y tangent to Z
Thanks for the response.

Having trouble installing. I get this message

wdd@wdd-desktop:~$ sudo apt-get --install millkins.c
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package millkins.c
wdd@wdd-desktop:~$
Last edit: 21 May 2012 15:10 by mmt.

Please Log in or Create an account to join the conversation.

More
21 May 2012 15:17 #20253 by andypugh
mmt wrote:

wdd@wdd-desktop:~$ sudo apt-get --install millkins.c


Try sudo comp --install...

apt-get searches the Ubuntu packages for software. You need to download and then compile/install the millkins module.
(actually, you need to edit that module to do the correct corrections for your situation, then compile and install it)

Please Log in or Create an account to join the conversation.

More
21 May 2012 15:24 #20254 by mmt
Replied by mmt on topic Re:Moving X and Y tangent to Z
woodburn@woodburn-desktop:~$ sudo comp --install millkins.c
sudo: comp: command not found
woodburn@woodburn-desktop:~$


Sorry for being a pain in the butt......

Please Log in or Create an account to join the conversation.

More
21 May 2012 15:29 #20255 by andypugh
mmt wrote:

sudo: comp: command not found


That approach would require installing linuxcnc-dev so that you can use the "comp" compiler macro to compile/install the code.

That does require apt-get: sudo apt-get install linuxcnc-dev

Please Log in or Create an account to join the conversation.

More
21 May 2012 15:42 #20256 by BigJohnT
Might want to read the short comp chapter...

linuxcnc.org/docview/html/hal/comp.html#_installing

John

Please Log in or Create an account to join the conversation.

More
21 May 2012 16:44 #20259 by mmt
Replied by mmt on topic Re:Moving X and Y tangent to Z
woodburn@woodburn-desktop:~$ sudo apt-get install linuxcnc-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package linuxcnc-dev
woodburn@woodburn-desktop:~$


Once again """SORRY""".....but what am I doing wrong?

Please Log in or Create an account to join the conversation.

More
21 May 2012 17:06 #20260 by andypugh
mmt wrote:

E: Couldn't find package linuxcnc-dev
what am I doing wrong?

I don't know, now.
If you are using an old version of LinuxCNC (2.4 or earlier) then it might be that you need emc2-dev instead (the name change has caused some problems like that)

I can see both packages through System->Administration->Synaptic Package Manager

Please Log in or Create an account to join the conversation.

More
21 May 2012 19:26 - 21 May 2012 19:28 #20264 by mmt
Replied by mmt on topic Re:Moving X and Y tangent to Z
woodburn@woodburn-desktop:~$ sudo comp --install kent.c
Traceback (most recent call last):
File "/usr/bin/comp", line 1335, in <module>
main()
File "/usr/bin/comp", line 1318, in main
shutil.copy(f, tempdir)
File "/usr/lib/python2.6/shutil.py", line 88, in copy
copyfile(src, dst)
File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: 'kent.c'
woodburn@woodburn-desktop:~$


Here is the lastest Andy andy ideas???

I am using 2.5.0
Last edit: 21 May 2012 19:28 by mmt.

Please Log in or Create an account to join the conversation.

Time to create page: 0.137 seconds
Powered by Kunena Forum