Hello Guest it is December 03, 2021, 01:39:29 PM

Author Topic: Homing position is not absolute  (Read 15343 times)

0 Members and 1 Guest are viewing this topic.

Homing position is not absolute
« on: May 01, 2011, 12:48:25 PM »
Hello everyone!

I'm not happy with the homing function in Mach3.
When starting the homing, the machine runs into the switch. It then slow down and stops. The number of steps needed to stop depends on the speed in the moment the switch is closing and the acceleration. The machine is then trying to get to full speed in the opposit direction til the the switch is released. In the moment the switch is released it will be on the same speed like the moment the switch was closed because the distance and acceleration are the same. Now the machine slow down again and stops. And after that the position is set (to zero). This position is the number of steps away from the switch-release-point of needed to come to full stop.
If the the machine is verry close to the switch before homing, may be 4 steps, it will not reach max speed, so not the max breake distance is nedded. 4 steps vor speedup means 4 steps needed to break. In this case the new zeroposition will be ca. 4 steps away from the switch-release-point.

The homingposition depends on the position from where the homing ist started. And if you change the motortuning the position will move as well.

I would like the machine running into the switch. Break and stop while counting the steps needed. As I know a switch (mechanical or optical) can't be released by now. Then travel back these number of steps. Now go on step by steb til the switch is released so the machine can stop with only one step after releasing the switch. This position will never change.
What do you think?
Burkhard (Germany)
(sorry for my bad english)

Offline ger21

*
  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Re: Homing position is not absolute
« Reply #1 on: May 01, 2011, 12:52:11 PM »
Lower your homing speed in Config >Homing/Limits. It sounds like you're homing at 100% speed. Try 10%, or less.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Homing position is not absolute
« Reply #2 on: May 01, 2011, 02:11:50 PM »
Lower your homing speed in Config >Homing/Limits. It sounds like you're homing at 100% speed. Try 10%, or less.
Hi Gerry!

Thanks for your advice. My machine is not very fast and 10% is really slow, especially when there is a long way to travel. And, it will only lower the effect, not eliminate it. I'm using light barriers for homing and I would like it exact as it can be. If i later change the homing speed the homing position will move, I don't like that. May be I can use a macro. Fist homing run with 100% to come close to the switch and a second one, step by step.
With the light barriers the signal needs max 2 steps to flip and I don't want to give this away.

Burkhard

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Homing position is not absolute
« Reply #3 on: May 01, 2011, 02:15:59 PM »
The homing is not speed dependant. It acts on the switch change of state when it backs OFF the switch.  Yes the final stop position can change with speed BUT that is not where the home position is derived from.

Just a thought, (;-) TP
Re: Homing position is not absolute
« Reply #4 on: May 01, 2011, 02:27:37 PM »
Your understanding of how homing works is incorrect.  When homing, Mach takes a step, then checks the home switches, BEFORE taking the next step.  If it sees the switch has changed state, then THAT position becomes the "home" position.  The fact that the axis continues to move beyond that point does not affect the home position in any way.  Homing at high speed, however, WILL generally make homing less accurate.  It should be done at a low speed.

Regards,
Ray L.
Regards,
Ray L.

Offline ger21

*
  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Re: Homing position is not absolute
« Reply #5 on: May 01, 2011, 03:02:16 PM »
Here's a macro that will home at the set speed, then re-home at 1/10 that speed, then reset the speed to what it was before.

DoButton(24)
DoButton(23)
DoButton(22)
While IsMoving()
Sleep(100)
Wend
SetParam("XRefPer", GetParam("XRefPer")/10)
SetParam("YRefPer", GetParam("YRefPer")/10)
SetParam("ZRefPer", GetParam("ZRefPer")/10)
DoButton(24)
DoButton(23)
DoButton(22)
While IsMoving()
Sleep(100)
Wend
SetParam("XRefPer", GetParam("XRefPer")*10)
SetParam("YRefPer", GetParam("YRefPer")*10)
SetParam("ZRefPer", GetParam("ZRefPer")*10)
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Homing position is not absolute
« Reply #6 on: May 01, 2011, 09:04:03 PM »
Hello TP, hello Ray!

Set the acceleration of your machine to , let us say, 10. Then do the homing. You will see what i described. That axis run into the switch, slow down to stop. Go back increasing speed til switch release, slow down to stop, and then resetting the coordinates. The machine is not moving again and the machine coordinate is set to zero (if you don't set an offset). And that position do depend on speed! Do the homing with different speed, look at your stepper position (a marker or screw) it will be different while the machinecoordinates in all cases is shown with zero.
If you were right, and as we see, the machine is not moving again towards the switch, the machine will not show the position zero, but the distance needed to come to stop  ;).
I understand that the switch need time to flip, no matter how fast the knob is hit. But why travel the long way with low speed when that is only needed for the way back to release the switch? Is it not stupid to let a fast machine move slow across the whole table while only a few step are needed on that speed?

Burkhard
« Last Edit: May 01, 2011, 09:08:59 PM by JimKnopf »
Re: Homing position is not absolute
« Reply #7 on: May 01, 2011, 09:05:31 PM »
HelloGerry!

Thanks for the makro. Thats what I like much more :-)
Burkhard
« Last Edit: May 01, 2011, 09:09:58 PM by JimKnopf »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Homing position is not absolute
« Reply #8 on: May 02, 2011, 03:56:32 AM »
Hi Burkhard

FWIW I think you've made a good catch and a quick scope of Mach's step stream and dir pin would tend to confirm you're correct.

I'd just make a couple of observations re: Gerry's method if he doesn't mind. The crux is that the second homing speed can be anything up to the maximum reliable speed that your axis can move without an acceleration curve. (a bit like the Z axis under THC control).

Also, I think there may be another issue. Whilst this method will allow the axis to stop on a dime the instant the switch deactivates on the backoff phase, depending on the type and quality of your switches this could mean you're setting home at the switch jitter zone. This could be an issue particularly if home and limit share a switch. Maybe at the end of the script, you could move some predefined constant distance further off the switch to counter this.

Ian
Re: Homing position is not absolute
« Reply #9 on: May 02, 2011, 04:59:07 AM »
Thanks Ian for confirming my observations!

I also use CNC-Player and that program do the homing the way you mentioned. But it only uses the moment when the switch is hit. There are fields for hysteresis (distance between closing- and openingpoint of the switch) and the distance to move the switch free. hysteresis is not needed in Mach3.
I  think the only constant position will be taken, when the releasepoint will be found without an acceleration curve. I have no problem when the machine travel an extra distance (may be 1mm), if it will allways be the same. The optimum would be to run with max speed into the switch, move back step by step til switch is released, reset the coordinates and travel on a defined distance ( or first travel on and reset coordinates on that position). This will be fast and absolute exact. May be something like that could be inserted in the program code.
@Gerry
Is it possible to turn off/on limitswitches inside a macro?
Burkhard