Help getting started Kinematics

More
19 Apr 2015 00:48 #57881 by OOOVincentOOO
Hello,

Sorry I am a newbee (hobby) user of LinuxCNC and Linux/Devian.

Last week I sucsesfully transferred my XYZ mill into LinuxCNC. The system is operational: movements, limitswitches etc. Operationally I have the same functionality as my licenced Mach3

The reason using linuxCNC is my wish to use kinematics. I wish to do the following, I want the machine coordinates to compensate for a curvature in the X-axis. So I think I have deal with Forward Kinimatics is this correct?

so something like this:

X=X
Y=Y
Z=Z+ m*cos(n*X)

I did some reading but I din't understand allot of things. Some of allot of questions:

- Do I need to create a new HAL Component (named after my new kinetics file)?
- Where are the HAL components located on debian? Nowhere I can fin the directory: "linuxcnc/src/hal/components". I have no clue where to find the location of the HAL components! sry I am completely new to Linux!
- I have installed the development packages like described in: "www.linuxcnc.org/docs/devel/html/hal/comp.html#_compiling" was this correct to do?
- Do some people maybe have some simple kinematics examples or a walktrough?
- In the ini file I found a reference to: "trivkins". Might it be usefull to use this as a starting point. But I cannot find a file named trivkins.

Hopefully someone can help a newbe and give some ideas. I am a little lost right now. :S

Thank you in advance,

Vince

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

More
19 Apr 2015 20:16 #57890 by OOOVincentOOO
Hello,

I am al all new user to LinuxCNC and Linux. I have installed my system with the live CD "Debian" . I am able to Run my mill and run some G-Code.

My wish is to make my own kinetics file. I am doing some reading and searching to understand the system and ini files.

I cant' seem to figure out where the HAL components are located / stored. I also can't find a directory named: "linuxcnc/src/hal/components" (page 99 HAL manual)

Clearly I am not capable could someone give me some hint or tips?

Regards,

Vincent

Page 99 HAL manual
===============
12.11 Compiling
Place the .comp file in the source directory linuxcnc/src/hal/components and re-run make. Comp files are automatically detected
by the build system.
If a .comp file is a driver for hardware, it may be placed in linuxcnc/src/hal/components and will be built unless LinuxCNC is
configured as a userspace simulator.
================

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

More
19 Apr 2015 21:48 #57894 by Dave_Dyke
Perhaps someone can correct me if I am wrong here, but could Lincurve be used to compensate for a single axis correction

www.linuxcnc.org/docs/html/man/man9/lincurve.9.html
The following user(s) said Thank You: OOOVincentOOO

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

More
19 Apr 2015 21:58 #57896 by ArcEye

I cant' seem to figure out where the HAL components are located / stored. I also can't find a directory named: "linuxcnc/src/hal/components" (page 99 HAL manual)

Clearly I am not capable could someone give me some hint or tips?


You need to download the sources, the distro has the packages binaries only.
linuxcnc.org/dists/wheezy/2.6/source/linuxcnc_2.6.7.tar.gz

The you need to build the sources in a RIP (run in place) install, to edit and test.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Installing_LinuxCNC

I too am a little confused by the curved X axis, is it warped or is this a peculiar machine?

regards
The following user(s) said Thank You: OOOVincentOOO

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

More
19 Apr 2015 22:51 #57897 by OOOVincentOOO
Much thanks for the hints. I''l try them out as soon as I am back home.

I am a hobby RC model pilot. My overall goal is to cut balsa, triplexwood and GFK CFK (3mm thick) to 200um accuracy if hope (in X andY direction no problem I think ut in Z!). I have bought a CNC mill in Austria KK1000S from CNC4ALL. Maybe not the best machine for the more proffesional CNC enthousiast. But in my opinion it is a good starting point getting familiar with CNC cutting. Better than a same priced Stepcraft system (I think).

The long X axs bends 500um over the complete axis length of 1100mm. I have borrowed a nice micrometer from my Job and have accuratly measured this bending. This would be no problem for milling smaller components, but my dream is to mill foam wing cores for a DLG glider. (example is like this:
). I could mill my MDF base plate so it follows this same curverature. But ma favorate is to use the kinematics to adjust for this bending and then mill my baseplate flat! A complete hardware change is not in my favor (effort it takes and money).

I have checke the formula option in my licenced Mach3. But this does not work in machine coorinates. It works good if the working coordintes are identical as the machine coordinates. But is can note used for my purpose!

The machine is now sofar operational. The next step (afer

Thank you,

VInce

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

More
26 Apr 2015 01:08 #58124 by OOOVincentOOO
Hello,

Here is a summary got I got my kinetics working thank to the help from this forum.

I am a first time user of Linux, CNC machines and LinuxCNC. Just learned the Linux(cnc) basics the last two weeks! Maybe this summary might help other first time users like me.

Goal/Tasks:
Insert a compensation in the Z axis due to a curvature in the X-axis.

Step 1:
Use the live installation CD. In my case I used the "Debian Wheezy" with linuxcnc 2.6.5. It will update automatic to the latest version of: 2.6.x.

Step 2:
Make your configuration with one of the two wizards. In my case I used: stepconf (parallel port based machine).

carefull 1: I did not check the velocity unit check if your using: mm/s or mm/minutes (when transferring from other software)
carefull 2: If your homing direction is "wrong" change the homing velocity to a negative number

Step 3:
Check the functionality of your machine in standard configuration.

Step 4:
Create your own kinematics file. I have used the trivkins file and made some adaptions. I don't know how everything works but I have looked and examined other kins file (to make use of e.g. math). Use a simple clear name for your kinetics file. In my case: "kk1000skins". With trial and error I repeaticly updated and installed the new kinetics file (replacing the old one).

File Attachment:

File Name: kk1000skins.zip
File Size:1 KB


Make sure you also rename (I got a nasty error because my still had trivkins there, I had to reinstall the complete pc). Not sure what happens here but I got no problems when I used my own kinetics name:
comp_id = hal_init("kk1000skins");

Step 5:
Copy your new kinetics file to the same directory where your HAL and INI files are stored.

Step 6:
For installation of a new component (kinetics component) to work you need the linuxcnc-dev package. Type this in the console:
sudo apt-get install linuxcnc-dev

(make sure you type sudo it has something to do with super user (the following command has super user rights) else directory might be blocked.

Step 7:
Go to your personal linuxcnc folder (the directory with all the ini and hal files). With the debian wheezy from the live CD it is easy: right click and select open console in this directory. (otherwise manually open a console and browse to the specified directory).

Now install your new kinetics file:
sudo comp --install my_new_kins.c

In my case the kinetics file is based on c language thus: *.c. Use your own kinetics file name: my_new_kins.

Step 8:
Open the HAL file referenced to by your own INI file replace the name: loadrt trivkins with loadrt my_new_kins

Remarks:
With some reading and checking you'll have to find the correct formula's for your kinetics (axis compensation in my case). You will probably get: "joint following error's" most likely caused by wrongly defined formula's between forward and reverse.
When you make a mistake just edit your kinetics file and repeat step 7 and test your system again. Before I installed a new/adapted kinetics I closed AXIS and restarted it afterwards to test the new file.
When you restart Stepconf wizard the link in the HAL file is replaced with loadrt trivkins. Change it back after an update of LinuxCNC


To the people who helped me thank you very much. I measured my axis error and is now below +/-50um (was 500um)!

Now I can continue learning Gcode and start milling!

Thank you again!!!

Vincent
Attachments:
The following user(s) said Thank You: furkanyilmaz11

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

More
29 May 2015 01:53 #59162 by LucBah
Hello,

having here the same mill at the university. Are you willing to share your machine-files?

Best,
Lucas

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

More
29 May 2015 13:58 #59181 by OOOVincentOOO
Hello Lucas,

Here is a copy of the files I had on my google drive.

Step 1 (setting up KK1000S):
If you want the standard setup it is best to use (open with stepconf wizard):

File Attachment:

File Name: KK1000S.stepconf
File Size:11 KB


It makes all the nessaccary files.

Step 2 (personal kins file if required):

Or here are my files. I am using a adapted kins file. Before you can use it read my step by step follow up. Though, better to use stepconf and follow step by step manual to create your own kinematics.

File Attachment:

File Name: KK1000S-20...5-28.zip
File Size:8 KB


Note, the last measurements I performed showed a slight overcompensation of the axis. Milling the table flat might be a good solution. I am a bit stubborn and wanted to have a software compensation!

Good luck,

Vince
Attachments:

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

More
29 May 2015 20:48 - 29 May 2015 20:48 #59187 by furkanyilmaz11
Hi Vincent,

I am trying to make a controller like in this video.


I installed my bob card for parallel port and I connected correctly my pulse dir signals of driver to bob card. Everything looks fine. I did a configuration for 3 axis standart cnc and motors worked in jog mode. So I think everythink is ok about the hardware.

I am planning to use this kinematic file kvarc.extra.hu/step/motor/emc/emckinematics.html
But I am very new in linuxcnc. I was an mach3 user before. And I couldnt configure the software for my delta. I installed my c files for kinematic like you tell(step my step) but there are no difference, so everything is working like a standart cnc?

Could you please help me. I just want to control my delta like in that video. I am reading the documents about kinematics, HAL etc. for 4 days. But I could nothing.

Sorry about my bad english.

Thanks in advance!
Last edit: 29 May 2015 20:48 by furkanyilmaz11.

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

More
29 May 2015 22:02 #59191 by andypugh

I am planning to use this kinematic file kvarc.extra.hu/step/motor/emc/emckinematics.html


Did you change the kinematics in your HAL file? (ie, does your HAL file contain the line "loadrt deltakins"

If it does, then do you see joint numbers rather than axis letters when you start LinuxCNC?
If that is the case then you simply need to switch out of "Joint mode" and into "world mode" which in the Axis GUI is a menu option, or you can use the keyboard shortcut "$" (if you have that on your keyboard)
The following user(s) said Thank You: furkanyilmaz11

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

Time to create page: 0.258 seconds
Powered by Kunena Forum