Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: manp16 on April 22, 2019, 09:06:42 AM

Title: Ref All Home
Post by: manp16 on April 22, 2019, 09:06:42 AM
Hi All

When I 'Ref All Home', the gantry crashes into the stops and then zeros. Is there a way to slow it down when it is near to 'machine zero'?

Thanks Andrew
Title: Re: Ref All Home
Post by: Overloaded on April 22, 2019, 09:51:14 AM
Your debounce setting might be so high that its passing the switch before it is sensed.
Slow the homing speed in the config.
Move the switch further from the hard stops.
Title: Re: Ref All Home
Post by: joeaverage on April 22, 2019, 10:04:09 AM
Hi,
you can set the speed at which the machine homes.

Look on Config/HomnigSoftLimits. The setting "Speed" is the speed as a percentage of the rapid speed for that axis.

What Mach wont do, without extra switches and programming, is go fast until it gets clos and then slow down.

Craig
Title: Re: Ref All Home
Post by: manp16 on April 22, 2019, 04:06:40 PM
Thanks again. Now resolved.
Title: Re: Ref All Home
Post by: reuelt on April 23, 2019, 03:29:03 AM
Craig: "What Mach wont do, without extra switches and programming, is go fast until it gets clos and then slow down."

But that is what the SLOW ZONE column is for.
In my case, I set it to SLOW DOWN when 20mm from the switches (see attached).
This only works if you ALSO set soft limits from 0 to say 1mm from the far end limit switch and the SOFTLIMITS is also on during program run.
Title: Re: Ref All Home
Post by: manp16 on April 23, 2019, 03:33:06 AM
Craig: "What Mach wont do, without extra switches and programming, is go fast until it gets clos and then slow down."

But that is what the SLOW ZONE column is for.
In my case, I set it to SLOW DOWN when 20mm from the switches (see attached).
This only works if you ALSO set soft limits from 0 to say 1mm from the far end limit switch and the SOFTLIMITS is also on during program run.

I tried changing the 'slow zone' but I could not get it to work. Maybe my 'soft limits' are not set correctly.
Title: Re: Ref All Home
Post by: reuelt on April 23, 2019, 03:41:56 AM
Craig: "What Mach wont do, without extra switches and programming, is go fast until it gets clos and then slow down."

But that is what the SLOW ZONE column is for.
In my case, I set it to SLOW DOWN when 20mm from the switches (see attached).
This only works if you ALSO set soft limits from 0 to say 1mm from the far end limit switch and the SOFTLIMITS is also on during program run.

I tried changing the 'slow zone' but I could not get it to work. Maybe my 'soft limits' are not set correctly.

Study my limit switch settings and set to suit you machine size. SLOW ZONE also works for manual jogging using 360games pad.
When you make a fundamental change, please save the settings and restart Mach3 before you can confirm it working or NOT.
DO NOT TURN OFF SOFTLIMITS before restart or it will not work.
Title: Re: Ref All Home
Post by: joeaverage on April 23, 2019, 03:44:31 AM
Hi,
to my knowledge that is not how the slow zone works.

If you had an extra set of switches that activated 1/2 inch or so before the home switch you could make that work.

As reuelt has suggested the slow zone as allowed for in Mach applies only AFTER the machine is referenced and soft limits
are ACCURATELY applied.

Craig
Title: Re: Ref All Home
Post by: reuelt on April 23, 2019, 06:58:40 AM
Hi,
to my knowledge that is not how the slow zone works.

If you had an extra set of switches that activated 1/2 inch or so before the home switch you could make that work.

As reuelt has suggested the slow zone as allowed for in Mach applies only AFTER the machine is referenced and soft limits
are ACCURATELY applied.

Craig
YOU are correct. Sorry.
"Slow zone" is a soft limits feature.
The  std. v.062 Mach3 [ref all zero] VB script PROBABLY does not slow down based on slow zone. (I was using 066 before).
I have tried some better [ref all zero] scripts written by someone in this forum (sorry, can't remember who off hand).
It does [ref all zero] for each axis twice, first at high speed, backs off "the slow zone distance" and then does it again at much slower speed for a very accurate zero position before setting that axis to zero.
Title: Re: Ref All Home
Post by: TPS on April 23, 2019, 12:42:05 PM
This will home at the homing speed in Config>Homing/Limits, then home again at 1/10 the speed.

So if you set the Homing speed at 50%, it will home at 50% first, then 5%.

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

sometimes i wonder why a searchfunction has been invented ;)
Title: Re: Ref All Home
Post by: ger21 on April 23, 2019, 01:14:29 PM


But that is what the SLOW ZONE column is for.
In my case, I set it to SLOW DOWN when 20mm from the switches (see attached).
This only works if you ALSO set soft limits from 0 to say 1mm from the far end limit switch and the SOFTLIMITS is also on during program run.

Slow Zone slows the machine down when it approaches SoftLimits. It has nothing to do with homing.

That's like saying my car will stop at red lights by itself. But ONLY if you also apply the brakes.
Title: Re: Ref All Home
Post by: reuelt on April 23, 2019, 08:45:34 PM


But that is what the SLOW ZONE column is for.
In my case, I set it to SLOW DOWN when 20mm from the switches (see attached).
This only works if you ALSO set soft limits from 0 to say 1mm from the far end limit switch and the SOFTLIMITS is also on during program run.

Slow Zone slows the machine down when it approaches SoftLimits. It has nothing to do with homing.

That's like saying my car will stop at red lights by itself. But ONLY if you also apply the brakes.
I had already corrected myself.

[REF ALL HOME] is not done only once after powering up.
The first time, MACH3 may not know the machine zero YET.

After that, because of the presence of soft limits, if I do[REF ALL HOME] AGAIN and AGAIN, the SLOW ZONE will take effect.
I use [REF ALL HOME] whenever I want to change tools since my "machine zero" area ALWAYS does not have any material on top and I keep tool height always the same MANUALLY using a GAUGE relative to the machine surface by moving the the SPINDLE cylinder up and down by loosening and re tightening the clamp.
(I have to do this "NONSENSE" because I have end-mills that are 100mm long and tiny engraving bits that are just 20mm long but my Z travel is only 65mm so my spindle cannot be clamped at the same location all the time).
Title: Re: Ref All Home
Post by: reuelt on April 24, 2019, 10:56:01 PM
Hi Guys

Here is a Compromised script for much FASTER REF. ALL HOME
I have not replaced the STD [Ref. all Home] but create a custom macro and assigned that macro to one button of my xbox360 to it.
It is in mm but you can just change the 25 (mm) to 1 (inch)

Here is the code:

Speak (" FASTER Referencing all home.") 'VOICE Alert

Message "************ FAST Reference all home Started************"
Sleep (1000) ' Pause 1 second
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

DoOEMButton( 1024 ) ' Ref (home) Z Axis
While IsMoving()
Wend

DoOEMButton(135)  ' Zero Z Encoder
Code "G90"
Code "G0 Y25"  '25mm from Y0
While IsMoving()
Wend
Code "G0 X25" '25mm from X0
While IsMoving()
Wend

DoOEMButton( 1023 ) ' Ref Y Axis
DoOEMButton( 1022 )' Ref X Axis
DoOEMButton( 1025 )' Ref A Axis

DoOEMButton(134)  ' Zero Y Encoder
DoOEMButton(133)  ' Zero X Encoder
DoOEMButton(136)  ' Zero A Encoder
While IsMoving()
Wend


If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   


Speak ("FAST Reference all home Completed") 'Voice Alert
Message "************  FAST Reference all home Completed************"   
Title: Re: Ref All Home
Post by: TPS on April 25, 2019, 02:23:34 AM
for the Moment i can not see the real benefit of your script, because the
G0 X/Y25 moves are done in the actual fixture Offset (G54..).
let's say for example your G54 0,0 is in machine coords at 200,200 the machine
will go to 225/225 and do the ref X/Y.

faster would be to use G53 G0 X/Y25 then machine will go to 25mm from Limit Switches,
but this is dangerous if machine has not been homed before, because this 25,25 can be somewhere.

this are only my insignificant thoughts. ;)
Title: Re: Ref All Home
Post by: reuelt on April 25, 2019, 02:52:23 AM
for the Moment i can not see the real benefit of your script, because the
G0 X/Y25 moves are done in the actual fixture Offset (G54..).
let's say for example your G54 0,0 is in machine coords at 200,200 the machine
will go to 225/225 and do the ref X/Y.

faster would be to use G53 G0 X/Y25 then machine will go to 25mm from Limit Switches,
but this is dangerous if machine has not been homed before, because this 25,25 can be somewhere.

this are only my insignificant thoughts. ;)

Thanks
I have put back G53 back into my own script. I did put it in at first but accidentally deleted it during debugging when correcting other syntax errors.

Note that I am moving up Z to the very top slowly FIRST. So there is nothing dangerous even if X and Y are in the wrong place. Where will G0 x25 Y25 (units in mm) send the head to ? The most it will happen is it is still slow referencing Y and X.


Title: Re: Ref All Home
Post by: reuelt on April 25, 2019, 03:34:37 AM
This is my update script:-

Speak (" FASTER Referencing all home.") 'VOICE Alert

Message "************ FAST Reference all home Started************"
Sleep (1000) ' Pause 1 second
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

DoOEMButton( 1024 ) ' Ref (home) Z Axis
While IsMoving()
Wend

DoOEMButton(135)  ' Zero Z Encoder
Code "G90"
Code "G53 Y25"  'Go to Y25 (mm) in Machine coordinates
While IsMoving()
Wend
Code "G53 X25"  'Go to X25 (mm) in Machine coordinates
While IsMoving()
Wend

DoOEMButton( 1023 ) ' Ref Y Axis
DoOEMButton( 1022 )' Ref X Axis
DoOEMButton( 1025 )' Ref A Axis

DoOEMButton(134)  ' Zero Y Encoder
DoOEMButton(133)  ' Zero X Encoder
DoOEMButton(136)  ' Zero A Encoder
While IsMoving()
Wend

Code "G54"
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   


Speak ("FAST Reference all home Completed") 'Voice Alert

Message "************  FAST Reference all home Completed************"     
Title: Re: Ref All Home
Post by: TPS on April 25, 2019, 03:38:55 AM
Quote
Note that I am moving up Z to the very top slowly FIRST. So there is nothing dangerous even if X and Y are in the wrong place. Where will G0 x25 Y25 (units in mm) send the head to ? The most it will happen is it is still slow referencing Y and X.

i noticed that the z-axis is up first, but i noticed on my machines, that sometimes after i fire up mach3
for the first time, that machine coords are somewhere (sometimes up to 500mm), and the machine is
physicaly  near 0,0. if you do then a G53 G0 X25 it will move full Speed into Limit Switches.
Title: Re: Ref All Home
Post by: reuelt on April 25, 2019, 04:14:11 AM
Quote
Note that I am moving up Z to the very top slowly FIRST. So there is nothing dangerous even if X and Y are in the wrong place. Where will G0 x25 Y25 (units in mm) send the head to ? The most it will happen is it is still slow referencing Y and X.

i noticed that the z-axis is up first, but i noticed on my machines, that sometimes after i fire up mach3
for the first time, that machine coords are somewhere (sometimes up to 500mm), and the machine is
physicaly  near 0,0. if you do then a G53 G0 X25 it will move full Speed into Limit Switches.

Notice that I stated earlier that I only do the [fast ref all home] on the Xbox360 games controller using my own custom macro M797.m1s
So I can still click on the screen STD [ref. all home] if on powering up, if I need to.

BUT if I alway bring my machine head to home using the [fast ref. all home] (instead of G28 or G28.1 etc.) before powering down, I will always be at machine zero on power up. So [fast ref. all home] using my Xbox360 games controller works every morning.