Moving X and Y tangent to Z
- mmt
- Offline
- Premium Member
- Posts: 124
- Thank you received: 2
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
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
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.
- mmt
- Offline
- Premium Member
- Posts: 124
- Thank you received: 2
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:~$
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
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.
- mmt
- Offline
- Premium Member
- Posts: 124
- Thank you received: 2
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.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
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.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
linuxcnc.org/docview/html/hal/comp.html#_installing
John
Please Log in or Create an account to join the conversation.
- mmt
- Offline
- Premium Member
- Posts: 124
- Thank you received: 2
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.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
I don't know, now.E: Couldn't find package linuxcnc-dev
what am I doing wrong?
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.
- mmt
- Offline
- Premium Member
- Posts: 124
- Thank you received: 2
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
Please Log in or Create an account to join the conversation.