Setting up 5axiskins

More
01 Jan 2012 13:40 #16183 by tommy
Setting up 5axiskins was created by tommy
Hello,

I have my 5 axis machine up and running, now what's still left to do is to configure (implement) 5axiskins (XYZBC).

1. I have gantry style of machine construction(X=>X, X1=>V) , so for now I used gantrykins to link X and X1, is it going along with 5axiskins, or that covers also 5axiskins module?

2. Because of tool length compensation, has to be W axis defined, what parameter values to put in for it, if it is "virtual" axis? As I see in sample configs,it usually has same parameters as X axis?

I found this the closest configuration to mine, and there is also 5axisgui file which is used for?

wiki.linuxcnc.org/emcinfo.pl?action=brow...=1&id=FiveAxisGantry

I attached my hal and ini files for better understanding where I am now...

Any help would be appreciated.

File Attachment:

File Name: my_5axis.hal
File Size:5 KB
Attachments:

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

More
01 Jan 2012 13:41 #16184 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
And ini file ...

File Attachment:

File Name: my_5axis.ini
File Size:3 KB
Attachments:

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

More
02 Jan 2012 15:19 #16211 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

I have my 5 axis machine up and running, now what's still left to do is to configure (implement) 5axiskins (XYZBC)


You might need to explain what you want your 5 axis kinematics to do, and how the physical BC axes correspond to the machine reference frame, and to your G-code.
It is perfectly possible to perform 5-axis (or 9-axis) machining with trivkins if your G-code is written in such a way that a 1-to-1 correspondence between axis words in the G-code and joint positions is acceptable. (You can also run a gantry using trivkins if you don't need or want to home the gantry sides independently)

I think that the 5axiskins in the EMC2 distribution is intended to work with tool-length offsets in W, and allows drilling operations in W too. That might not be what you want.

BC sounds to me like a tool spindle that rotates about the X axis ( C ) with a tilt (B). If you or your postprocessor can write G-code that works that way, then you don't need fancy kins. If you want your BC axes to be controlled to set AB angles (ie angles above the plane in X and Y directions), though, then you will need kinematics.

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

More
02 Jan 2012 17:35 #16215 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
Sorry, here is more detailed explanation.
Machine's construction is XYZ, B is paralel to X and C is paralel and rotaits arround Z.

What I would like to achieve is Tool length compensation when running full 5 axis g-code (tool tip path).

I know there is a 5axis_sim already included in emc2 which is very similar to my case, and it is for simulation purpose, but I am not very familiar with that hal, and I don't really know what can I use from it and maybe modify for my case.

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

More
02 Jan 2012 22:56 #16225 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

I know there is a 5axis_sim already included in emc2 which is very similar to my case, and it is for simulation purpose, but I am not very familiar with that hal, and I don't really know what can I use from it and maybe modify for my case.


The simplest case would be to alter your HAL file to use 5axiskins instead of trivkins/gantrykins, also adding the line that sets the pivot length.

However, that rather depends on your gantry layout and homing scheme. What is your gantry layout and homing scheme?
Servo or stepper?

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

More
02 Jan 2012 23:02 #16227 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
I used gantrykins, because I use 2 switches (one on each side of X axis), to square gantry each time I home axis, and I use steppers.

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

More
03 Jan 2012 10:43 #16243 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

I used gantrykins, because I use 2 switches (one on each side of X axis), to square gantry each time I home axis, and I use steppers.


In that case I think you will need to create a 5axisgantrykins. This may be moderately easy, involving changing one line and compiling/installing the new kinematics with comp.
However, I would need to be at an EMC2 machine to be sure that the instructions I was giving were correct, but if you want to experiment..
make a copy of 5axiskins with a name of your choice:
git.linuxcnc.org/gitweb?p=emc2.git;a=tre...a326515f0fd4;hb=HEAD
change lines 53 and 74:
53     pos->u = joints[0] + r.x;
74     joints[6] = pos->tran.x;
then compile and install
sudo comp --install yournamekins.c
Then [AXIS_6] will be your X2 axis.

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

More
03 Jan 2012 20:04 #16268 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
Sorry, its first time for me to do thees things in linux...

I managed to modify those 2 lines in 5axiskins.c and then renamed it to my5axiskins.c, copy it into /usr/realtime-2.6.32-122-rtai/modules/emc2# and run compile and install, but I recevie this message:


root@cnc:/usr/realtime-2.6.32-122-rtai/modules/emc2# sudo comp --install my5axiskins.c
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-122-rtai'
CC [M] /tmp/tmpJK3XSS/my5axiskins.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hal_init" [/tmp/tmpJK3XSS/my5axiskins.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpJK3XSS/my5axiskins.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmpJK3XSS/my5axiskins.ko] undefined!
WARNING: "hal_pin_float_new" [/tmp/tmpJK3XSS/my5axiskins.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpJK3XSS/my5axiskins.ko] undefined!
CC /tmp/tmpJK3XSS/my5axiskins.mod.o
LD [M] /tmp/tmpJK3XSS/my5axiskins.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
cp my5axiskins.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/

What am I doing wrong?

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

More
03 Jan 2012 21:15 #16270 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

Sorry, its first time for me to do thees things in linux...
What am I doing wrong?

That looks like it might actually have worked, those were all warnings, not errors.
It got as far as creating and installing the .ko file, you might find that it works.

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

More
03 Jan 2012 21:23 #16271 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
unfortunately no, at startup I receive:


Debug file information:
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/rtai_hal.ko': -1 File exists
3301
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
ERROR: Module 5axiskins does not exist in /proc/modules
<commandline>:0: exit value: 1
<commandline>:0: rmmod failed, returned -1
<commandline>:0: unloadrt failed
ERROR: Module hal_lib is in use by my5axiskins
ERROR: Module rtapi is in use by hal_lib
ERROR: Module rtai_math does not exist in /proc/modules
ERROR: Module rtai_sem is in use by rtapi
ERROR: Module rtai_fifos is in use by rtapi
ERROR: Module rtai_sched is in use by rtapi,rtai_sem,rtai_fifos
ERROR: Module rtai_hal is in use by rtapi,rtai_sem,rtai_fifos,rtai_sched

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

Time to create page: 0.099 seconds
Powered by Kunena Forum