Hello Guest it is December 26, 2024, 09:17:16 AM

Author Topic: Ref All Home  (Read 6192 times)

0 Members and 1 Guest are viewing this topic.

Offline ger21

*
  • *
  •  6,295 6,295
    • The CNC Woodworker
Re: Ref All Home
« Reply #10 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.
« Last Edit: April 23, 2019, 01:16:05 PM by ger21 »
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline reuelt

*
  •  520 520
Re: Ref All Home
« Reply #11 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).
« Last Edit: April 23, 2019, 08:49:39 PM by reuelt »
"the gift of God is eternal life through Jesus Christ our Lord"

Offline reuelt

*
  •  520 520
Re: Ref All Home
« Reply #12 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************"   
"the gift of God is eternal life through Jesus Christ our Lord"

Offline TPS

*
  •  2,539 2,539
Re: Ref All Home
« Reply #13 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. ;)
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline reuelt

*
  •  520 520
Re: Ref All Home
« Reply #14 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.


"the gift of God is eternal life through Jesus Christ our Lord"

Offline reuelt

*
  •  520 520
Re: Ref All Home
« Reply #15 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************"     
"the gift of God is eternal life through Jesus Christ our Lord"

Offline TPS

*
  •  2,539 2,539
Re: Ref All Home
« Reply #16 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.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline reuelt

*
  •  520 520
Re: Ref All Home
« Reply #17 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.
"the gift of God is eternal life through Jesus Christ our Lord"