axes, joints and configurating your own machine

More
02 Apr 2009 16:21 #34 by luminize
Dear readers,

I'm new to EMC2, but not to mechanical machine design (SolidWorks) and controlling machinery (motion control with Mitsubishi Q system positioning card).

After spending a day printing documentation and reading the manuals i can't figure out where or how i should configure EMC/HAL so that they know how my custom machine should be controlled.

Where do i start if i want to control say a simple robotic arm (2 limbs), with 2 rotary joints, A and B, where A is fixed, and B sits on the end of the limb controlled by A, and the second limb is controlled by B.
I can figure out the mathematics, but where do i configure. It seems that i have to write C code (not a big problem) and compile when i read www.linuxcnc.org/docs/devel/html/motion_kinematics.html . But what do i do next?

Thanx, Bas

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

More
02 Apr 2009 16:40 - 02 Apr 2009 16:41 #35 by BigJohnT
I think you just have to pick the correct thing... Just a second I'll try and find it...

Here it is I think.

www.linuxcnc.org/docview/html//motion_kinematics.html

John
Last edit: 02 Apr 2009 16:41 by BigJohnT.

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

More
02 Apr 2009 18:37 #36 by luminize
Hi John,

The math is clear to me, but where do i put the code and tell EMC2 and HAL there is this (my own just recently made) kinematics module i want to use for my machine?

Bas

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

More
02 Apr 2009 18:47 - 02 Apr 2009 19:07 #37 by BigJohnT
Ok, I didn't have time to really read that before I left the shop.

This is the different kins that can be loaded AFAIK

www.linuxcnc.org/docview/html//man/man9/kins.9.html

This will be in the main .hal file. I guess it is time for me to build a robot :)

I'm not sure I know how to do that at the moment.

John
Last edit: 02 Apr 2009 19:07 by BigJohnT.

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

More
02 Apr 2009 19:14 - 02 Apr 2009 19:14 #38 by BigJohnT
Ok, I have some info on it now.

You will have to look at trivkins and replace it with your own kins.
Then change the loadrt trivkins in the HAL file with loadrt mykins or whatever you name it.
The mykins needs to export the kinematicsFoward() and Reverse().

The kins files are located in the src/emc/kinematics/ directory.

Let me know if this helps you get started.

Looks like I need to add a section to the manual once I get it figured out :)

John
Last edit: 02 Apr 2009 19:14 by BigJohnT.

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

More
03 Apr 2009 05:42 #39 by luminize
Hi John

That's what i was searching for.
If i understand this right, then all i have to do is do the math, write the kinematics file, place it in the right folder and tel HAL where it is.

Do i have to compile my newly created kinematics file or is the C code sufficient ?

Thanks, Bas

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

More
03 Apr 2009 11:20 #41 by BigJohnT
You will have to compile EMC after you make changes. You could do an anon CVS checkout and compile as RIP (run in place) so all the files will be one directory.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?CVS

you may want to use the following to get an anon cvs checkout

cvs -z5 -d:ext:anon@cvs.linuxcnc.org:/cvs co -rv2_3_branch -demc2.3.x emc2

then in a terminal window in the emc2.3.x/src directory

./configure --enable-run-in-place
make

then from the emc2.3.x directory you may need to do

. scripts/emc-environment

that sets environment vars, etc, so they point to the run-in-place, otherwise you tend to get the installed stuff instead

Keep us posted on your progress.

John

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

Time to create page: 0.108 seconds
Powered by Kunena Forum