Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: joepardy on January 30, 2009, 04:53:05 PM

Title: Homing Problem - Slave Axis
Post by: joepardy on January 30, 2009, 04:53:05 PM
I am having a homing problem with a new CNC router.

“Normal” motion (X, Y, Z, & A axis) is working fine.  Jogging works as well.  Homing the Z axis works great.  Homing the Y axis works great.  The problem is during the home operation of the X&A axis (A slaved to X).  Here is what I see happening - per the Alt7 Diagnostic Screen.

I hit the X-Ref button
X & A axis move toward (-) home position
M1Home & M4Home light up (Separate home switches)
X stops A stops
X begins moving away (+) from home switch
X Home switch (M1Home) turns off (M4Home remains on)
X stops moving – X is referenced HOME
A begins moving away (+) from home switch
A Home switch (M4Home) turns off
A continues to move away (+) from home switch until motor “slips” and gantry binds
Finally have to hit “reset” button to stop slipping

IF at this point I then hit A-Ref button …
A begins moving toward (-) home position
A Home switch (M4Home) turns on
A reverses and begins moving away (+) from home switch
A Home switch (M4Home) turns off
A stops moving – A is referenced HOME

In other words, homing seams to work separately – but not together.

Also, when the X&A homing routine fails – Mach 3 no longer recognizes the A axis with regards to standard movement.  In other words, Mach 3 seams to un-slave the A axis from the X axis.  This un-slaving occurs even if the A-Ref button succeeds in homing the A axis.  The only way to resolve this problem is to close Mach3 - and reopen it.

Using Mach3 version 3.042.020
Using a PMDX-132 board
Using Smooth Stepper Driver Beta2_V015ogb
Debounce is set at 2000
X Home on Pin 15
A Home on Pin 13
Y Home & Z Home share Pin 12
All Limit switches share Pin 11

Help! - and Thanks in advance for your input.
Title: Re: Homing Problem - Slave Axis
Post by: Chip on January 30, 2009, 09:04:52 PM
Hi, Joepardy

Try this in your "Ref All Home" Button's, I had similar Issues with a X, A, dual Axis system awhile back.

DoButton( 24 ) 'Z Home Axis
RefCombination( 9 ) 'X + A Home
DoButton( 23 ) 'Y Home Axis

Hear's some info to review from some Post's.

"Art wrote....> Common problem. When you home , the slaving is disabled till the home is
> done. This is done to auto-square the gantry of such a system, thats why
> the
> lack of slaving when you stop the homing.. The solution is to make the
> homing go in the correct order. This is done by modifying the Homing
> button.. If you open the 1024.set file in the screen designer and double
> click the "Ref All-Home" button, you will see the code is
>
> DoButton( 24 )
> DoButton( 23 )
> DoButton( 22 )
> DoButton( 25 )
>
> This basically calls the Z, then X then Y and A homes. This needs to be
> changed to ..
>
> DoButton( 24 ) ' this homes the Z
> DoButton( 23) ' this homes the Y
> RefCombination( 9 ) ' this will home the X and A at the same time.
>
> RefCombination accepts a number where X = 1 , Y = 2, Z = 4, A = 8, you
> simply add the values of the axis
> you wish to home, so X + A = 9..
>
> The squaring will be automatic and can be adjusted by your settings for
> the home position of the switches..
> Thanks,
> Art
> www.artofcnc.ca

Art also wrote this... and I found the complete "Refcombination" listing here....

"Art wrote....   The home switches, (which may be set to the same input as the limit
switches), are used only for homing. The axis will move to the switch, then
slowly move off.

   The program by default does one at a time, because thats the most usual
combination. YOu CAN move any combination at once by editing the RefAll
buttons script. There is a command called RefCombination( n ) which will ref
any combination of the axi s. N is calcuated by adding the following
numbers..

X - 1
Y - 2
Z - 4
A - 8
B - 16
C - 32

Ref X and Y together would be RefCombination( 3 )

Hope this Helps, Chip
Title: Re: Homing Problem - Slave Axis
Post by: joepardy on January 30, 2009, 10:16:55 PM
Thanks for the reply Chip.  I saw this solution posted ... tried it ... responed exactly the same.  Sorry, that solution did not work for me. :(
Title: Re: Homing Problem - Slave Axis
Post by: Chip on January 31, 2009, 01:13:56 AM
Hi, Joepardy

Are you using the "Reversed" settings on you X or A axis.

Looked back at the xml used on the gantry water-jet cutter, We used X and C axises with no "Reversed" on ether axis in Homes & Limits and DoButton( 22 ).

Chip
Title: Re: Homing Problem - Slave Axis
Post by: joepardy on January 31, 2009, 09:57:10 AM
Chip,

I will check this when I get back to the shop on Monday.  I believe that I have my X axis set Normal and the A axis set for Reversed.  But as I recall, this is the only way I could get the system to travel "normally".  If I set them both Normal or both Reversed, do I need to change some wiring? ???
Title: Re: Homing Problem - Slave Axis
Post by: Chip on January 31, 2009, 01:31:55 PM
Hi, Joepardy

I used X, C axises to save the A for rotary use later if needed, Yes if you have one axis reversed you'll need to change the wiring.

Stepper 4 wire type, Swap the A, A- wires around on the motor, On stepper 5 wire type, Reverse the 4 wires on motors 1, 2, 3, 4, to 4, 3, 2, 1.

Servo's, Swap the motor + - wires around and swap the A & B encoders outputs.

Sent you a PM top left of this screen, Click on Messages.

Chip

Title: Re: Homing Problem - Slave Axis
Post by: Greolt on February 01, 2009, 12:30:08 AM
Chip are you using the SmoothStepper on your slaved axis machine?

I get issues when using SS on my slaved axis machine that I do not get on LPT.

Greg
Title: Re: Homing Problem - Slave Axis
Post by: Chip on February 01, 2009, 10:08:08 AM
Hi, Greg

Using a printer port hear, Haven't tried the Smooth Stepper yet.

Chip
Title: Re: Homing Problem - Slave Axis
Post by: Greolt on February 01, 2009, 04:02:52 PM
Chip

OK what I am suggesting is maybe Joepardy is experiencing some slaved axis homing issues that are peculiar to the SS.

I have been using slaved axis homing on the LPT now for a couple of years with no problems. 

Works just as well using "Refcombination"  or not.   Also with A axis reversed.

However when testing the SS I can not get slaved axis homing to work reliably.

Consequently I put the SS on the shelf till the developer gets it sorted.  These type of issues are reported by a number of SS users.

Perhaps I should have another go with the latest plugin.

So anyway I just wanted to put up the possibility that Joepardy's issues just might be SS related.

Greg
Title: Re: Homing Problem - Slave Axis
Post by: Chip on February 01, 2009, 07:04:43 PM
Hi, Greg

I missed the SS being used, Just had similar problems with slave axis in the past.

Chip
Title: Re: Homing Problem - Slave Axis
Post by: joepardy on February 02, 2009, 09:26:56 AM
OK ... I reconfigured the system a few times today.  First I tried Chip's suggestion regarding the "reversed" A axis.  I changed the wiring, changed the software configuration, still the same problem.

Then I disabled the smooth stepper and wired direct to the LPT port.  SUCCESS!  I have homing on the slave axis.

I know that this has been discussed on Warp9's forums - and it was suposed to be fixed with the latest release of their driver, but apparently it has not been fixed - or this is a new problem.

I guess I will play in the "LPT World" until it gets resolved.

Title: Re: Homing Problem - Slave Axis
Post by: joepardy on February 02, 2009, 02:51:54 PM
A reply from "cagray" (Allen) on the Warp9 forum ...

Slave homing doesn't work so well at the moment. Greg is aware of the issue and is working on a fix.

If X tags first it works fine. What I have done as a work around is write a homing routine that first de-slaves, make a small positive A movement then re-slave. This slightly racks the gantry but not enough to put it in to a bind.

I will try this out and see if it works for me. :)
Title: Re: Homing Problem - Slave Axis
Post by: joepardy on February 03, 2009, 07:41:45 AM
Chip,

Allen & Greg helped me with this homing routine for the SmoothStepper board.  I just installed it and it works great! ;D ;D ;D

DoOemButton(1024)   'Home Z
While IsMoving
Sleep(25)
Wend

DoOemButton(1023)   'Home Y
While IsMoving
Sleep(25)
Wend

DoOemButton(357)    'deslave axis

Code "G91"          'Put Mach into incremental mode

Code "G0A0.5"       'Move A axis 1/2"
While IsMoving
Sleep(25)
Wend

Code "G90"          'Return Mach to Absolute Mode'

DoOemButton(358)    'slave axis

DoOemButton(1022)   'Home X with A trailing
While IsMoving
Sleep(25)
Wend

DoOemButton(1007)   'Zero All just to be sure

Again, thanks to everyone that helped me figure this out!

Title: Re: Homing Problem - Slave Axis
Post by: Chip on February 03, 2009, 11:48:15 AM
Hi, Joepardy

Glad to see Greg & Allen helped you work through the SmoothStepper issue.

It's always great to see everyone working to help resolve these issues by sharing there individual experiences.

Mach's continues to amaze me in it's ability to be adapted to so many system uses and continues to evolve to include so many new products.

Thanks for the update, Chip
Title: Re: Homing Problem - Slave Axis
Post by: gwandad on December 03, 2016, 08:31:08 PM
Thanks for the reply Chip.  I saw this solution posted ... tried it ... respond exactly the same.  Sorry, that solution did not work for me. :(
I'm having the same problem with the A being dropped etc but i have a bigger problem in that I don't understand the answer! I have no programming skills at all, so I have neither the understanding nor application skills. Is there some other way to achieve a fix, or what skills would I need to get to be able to achieve a fix? Can anyone assist, please?
Title: Re: Homing Problem - Slave Axis
Post by: gwandad on December 04, 2016, 04:07:02 AM
Please ignore the last. I read the whole blog. It did worh, thanks