Hello Guest it is March 28, 2024, 11:43:57 AM

Author Topic: Homing Slaved axis  (Read 8561 times)

0 Members and 1 Guest are viewing this topic.

Homing Slaved axis
« on: January 03, 2010, 10:25:57 PM »
Ok, most everything works on my machine, I managed to get the home function to work after reading a few posts. (Debounce interval) I have a dual X axis gantry. I set up the B as a slave to the X axis. I reference home in hopes of squaring up the gantry after start up, everything goes home and backs off the switches like it is supposed to but the slaved axis just follows the X command. I even tried to reference B but it acted like the others did when the debounce interval was Zero. I set the debounce at 1000. Is there something else I need to do to get the B side of the gantry to home?

Offline Greolt

*
  •  956 956
    • View Profile
Re: Homing Slaved axis
« Reply #1 on: January 04, 2010, 05:58:16 AM »
I will assume you have home switches on each side of the slaved axis.  Each with their own input pin.

Make sure "Home Slave with Master" is not checked.

The macro that is activated with the "Ref All" button will need the following line changed  (In Blue)

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 26 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

This line homes axis B

So when X homes then B will follow along in tandem and then B will home on its own as X stays still.

B should only move a couple of mm each way as it homes.

If that does not work then delete these two lines,

DoButton( 22 )
DoButton( 25 )

And replace with,

RefCombination  ( 17 )

This will do a simultaneous homing of X and B.

I am not sure this command will "square the gantry" or not.  I don't use it, although I have seen Brian recommend it for slaved axis many times.

Greg



 
« Last Edit: January 04, 2010, 06:03:14 AM by Greolt »
Re: Homing Slaved axis
« Reply #2 on: February 10, 2010, 11:37:20 PM »
I'm having a similar problem but different axis.  The Y axis is slaved with the A Motor.  Will the above mentioned edit work for the slaving of Y and A.  Right now the Y and A are slaved for homing.  This doesn 't work very well because if the A is slightly ahead of the Y when the home switches are hit the A triggered first is interpreted as a limit trigger instead of a home trigger.

Offline Greolt

*
  •  956 956
    • View Profile
Re: Homing Slaved axis
« Reply #3 on: February 11, 2010, 01:53:18 AM »
Mikee

Here is the relevant line from the wiki on refcombination command,

Sub RefCombination(Axes as Integer)

Performs simultaneous referencing on several axes. They are coded by ORing or addition of the following codes: X = 1, Y= 2, Z = 4, A = 8, B = 16 and C = 32.


So try, 

RefCombination ( 10 )  'ref Y and A simultaneously.

after removing,

DoButton ( 23 )  'ref Y
DoButton ( 25 )  'ref A

Greg
Re: Homing Slaved axis
« Reply #4 on: February 11, 2010, 06:17:42 PM »
i'm very inexperienced at Mach 3 so let me restate what needs to be done to make the change.  If its wrong please slap me upside the head and correct me!

  In Mach 3 select Operator Tab.
         On Drop Down menu select - Edit Button Script
               Then Press REF ALL HOME button

  Editor pops up with the following 4 lines of code.

 DoButton(24)
 DoButton(23)
 DoButton(22)
 DoButton(25)

          Delete the lines DoButton(23) and (25)

Enter following on new line

  RefCombination(10)

Select File -- Then Save.

Close the Editor.



Offline Greolt

*
  •  956 956
    • View Profile
Re: Homing Slaved axis
« Reply #5 on: February 11, 2010, 06:34:49 PM »
Mikee

Yes that is correct.

I am suggesting trying this command.  Because you are hitting the A axis home switch before the Y.

See if it works.  :)

Greg
Re: Homing Slaved axis
« Reply #6 on: February 11, 2010, 06:48:41 PM »
Greg,

    Thanks.  I'm off to the shop to try it out right now.

Mikeee
Re: Homing Slaved axis
« Reply #7 on: February 11, 2010, 09:57:53 PM »
Greg,

  It works!!  That is definitely the solution to homing a slaved axis.

Mikeee
Re: Homing Slaved axis
« Reply #8 on: April 03, 2013, 09:26:25 AM »
I have the same configuration as Mikeee, with A slave to Y.
I tried to modify the Ref All Home button,and made the following:

DoButon (22) ' s ref for X, at least behaves like this
RefCombination( 10) ' this is supposed to home Y and A

but the behaviour iswrong agan.... Y remains in position while A goes back and bends the gantry.

Do i do anythoing wrong here?

thanks
Marius