Setting up 5axiskins
- tommy
- Offline
- Premium Member
- Posts: 107
- Thank you received: 1
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.
Please Log in or Create an account to join the conversation.
- tommy
- Offline
- Premium Member
- Posts: 107
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23558
- Thank you received: 4858
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 (. 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.
- tommy
- Offline
- Premium Member
- Posts: 107
- Thank you received: 1
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.
- andypugh
- Offline
- Moderator
- Posts: 23558
- Thank you received: 4858
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.
- tommy
- Offline
- Premium Member
- Posts: 107
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23558
- Thank you received: 4858
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;
sudo comp --install yournamekins.c
Please Log in or Create an account to join the conversation.
- tommy
- Offline
- Premium Member
- Posts: 107
- Thank you received: 1
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.
- andypugh
- Offline
- Moderator
- Posts: 23558
- Thank you received: 4858
That looks like it might actually have worked, those were all warnings, not errors.Sorry, its first time for me to do thees things in linux...
What am I doing wrong?
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.
- tommy
- Offline
- Premium Member
- Posts: 107
- Thank you received: 1
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.