Way to Tram X Axis in software?

More
12 Jan 2012 23:52 - 12 Jan 2012 23:56 #16699 by kbailey204
I've been using EMC2 2.4.6 for a while now in its most basic iteration, and am just now trying to dig in and learn the HAL, pyvcp, and classicladder.

One thing that is a problem with my machine is tramming the X axis. It is a 3 axis Gantry Mill with 2 X Axis motors.

I was working on a piece of hardware that would tie into 2 homing switches on the x axis, and then disable the motor and got there first, allowing the 2nd motor to run until the X and Y are square. After both switches were made it would send the signal to EMC2 saying the Axis Home Switch was made.

My Question is whether it would be possible to do this in software via Classic Ladder?

Some information about my machine:

72V 20A Power Supply
4 GeckoDrive G203V's (have a physical disable pin i was going to use to turn off one of the X motors)
1/2-10 5 start Leadscrews on X
Last edit: 12 Jan 2012 23:56 by kbailey204. Reason: more information

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

More
13 Jan 2012 00:52 #16703 by andypugh
kbailey204 wrote:

My Question is whether it would be possible to do this in software via Classic Ladder?


Possibly, but it's a solved problem, have a look at the gantry sample config in 2.5 (it uses gantrykins)

git.linuxcnc.org/gitweb?p=emc2.git;a=tre...fs/heads/v2.5_branch

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

More
13 Jan 2012 01:01 - 13 Jan 2012 01:03 #16704 by kbailey204
Please bear with me because I'm new, but how exactly does that kinematics.hal square the X Axis in relation to the Y axis on a dual motor X Setup?

As of right now, I have to shut off machine power and manually rotate the motors, then turn the machine back on and jog along the X with a dial indicator to check for square.
Last edit: 13 Jan 2012 01:03 by kbailey204.

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

More
13 Jan 2012 10:30 #16711 by andypugh
kbailey204 wrote:

Please bear with me because I'm new, but how exactly does that kinematics.hal square the X Axis in relation to the Y axis on a dual motor X Setup?

It homes each motor independently (but simultaneously) to its own home switch.

EMC2 gives the option to control a machine in two modes, "joint mode" where you move each joint individually, and "world mode" where you move the controlled point in cartesian space. On most machines that is the same thing, but if you consider a robot arm, for example, the two things are very different..

gantrykins is a non-trivial trivial kinematics, it doesn't do any clever mathematics, but is does support separate joint and world modes. So, you home it in joint mode, via a homing sequence, then switch to world mode (by pressing $) and carry on as normal.
It is possible to automatically switch to world mode after homing, if you prefer.

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

More
13 Jan 2012 18:56 #16725 by kbailey204
Can this be implemented in 2.4.6? If so, how would I go about this?

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

More
13 Jan 2012 21:20 #16731 by andypugh
kbailey204 wrote:

Can this be implemented in 2.4.6? If so, how would I go about this?


It should all work fine in 2.4.

The simplest thing to do is probably to make a copy of your config directory with a new name (so you still have a working machine) then replace the HAL file with the one from the 2.5 version (from that git web page is probably easiest).

Then see how it works. You might have to fiddle with the HAL file a bit to slave the correct axes, and to get the pin assignments correct.

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

More
13 Jan 2012 22:15 #16735 by kbailey204
I downloaded and ran some of those configuration files. Although they somewhat do what I was talking about, albeit manually, what I was looking for was something transparent to EMC2 and automatic. But thank you for the help.

I think I'll continue with a hardware solution.

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

More
13 Jan 2012 22:23 #16737 by andypugh
kbailey204 wrote:

I downloaded and ran some of those configuration files. Although they somewhat do what I was talking about, albeit manually, what I was looking for was something transparent to EMC2 and automatic. But thank you for the help.


I am confused, what is manual about the gantry sample? You hit "home all" and it homes the axes, and squares the gantry. (or, at least, it should)

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

More
13 Jan 2012 22:39 - 13 Jan 2012 22:40 #16741 by kbailey204
Sorry, I was running the wrong .ini.

I had to use the gantry example instead of the stepper-gantry example because I don't have a physical E-Stop right now.

It seemed to work pretty well, Now as I jog around the table, I'm getting a lot of Joint follow errors. Joint 1, Joint 2, and Joint 3. Any Ideas?


Never Mind, figured it out.
Last edit: 13 Jan 2012 22:40 by kbailey204.

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

More
13 Jan 2012 22:41 #16742 by andypugh
kbailey204 wrote:

Never Mind, figured it out.

What was it?

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

Time to create page: 0.101 seconds
Powered by Kunena Forum