Hello Guest it is March 29, 2024, 07:01:17 AM

Author Topic: G28.1  (Read 4094 times)

0 Members and 1 Guest are viewing this topic.

G28.1
« on: February 12, 2012, 11:36:46 PM »
G00 G20 G90 G17 G40 G80 G49 G64 G94
T3 M06 (0.5 ENDMILL ROUGH)
G00 X10 Z2
M325 (All Z /Y2 off)
M221 (Z1 On)
G28.1z.001  (what is the .001)
M325 (All Z /Y2 off)
M223 (Z3 On)
G28.1z.001
M221 (Z1 On)
M223 (Z3 On)
M202 (Y2 On)
G00 X10 Z2 (used to prevent driving cutter into work piece)
M325 (All Z /Y2 off)
M222 (Z2 On)
G28.1z.001
M325 (All Z /Y2 off)
M224 (Z4 On)
G28.1z.001
M222 (Z2 On)
M224 (Z4 On)
M202 (Y2 On)
I am using this code to reference 4 router heads using Mach3 controller with  Z axis. M codes are used to enable/disable drives. Everything works fine except. Before it raises the router toward home sensor it lowers it about 3". This is creating the danger of driving the cutter into the table. If I reference with the ultimate screen buttons I do not get the downward movement. Will adding a G90 or G91 before G28 stop the downward movement.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: G28.1
« Reply #1 on: February 13, 2012, 07:37:15 AM »
What is in your macros?
Hood
Re: G28.1
« Reply #2 on: February 13, 2012, 11:30:24 AM »
Macro for custom M codes :

M221
DeActivateSignal(output2)
M321
ActivateSignal(output2)

This is the user button to do the same:

If Not(GetOEMLED(1801)) Then
SetUserLabel(23,"Z1 On")
SetUserLED(1801,1)'USER LED 1 ON
code"M221"
Else
SetUserLabel(23,"Z1 Off")
SetUserLED(1801,0)'USER LED 1 OFF
code"M321"
End If
I need to add the ability to change status of user buttons to match M code status. Also should I use the macro Refz [DoOembutton (1010) for the actual refZ instead of G28.1

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G28.1
« Reply #3 on: February 13, 2012, 12:25:14 PM »
"G28.1z.001  (what is the .001)"

The Z.001 is the way point that the G28.1 function moves the Z to BEFORE it sends it to the home switch. Read the manual (;-)

Probably the source of the movement you are seeing.

(;-) TP
Re: G28.1
« Reply #4 on: February 13, 2012, 02:14:20 PM »
Solved my problem. Created a custom M function. M300 DoOem button(1024) REF Z
Pasted relevant script from my user buttons into other custom M code. Now as the program runs my buttons match condition of router.
I will have to download a manual to find out the .001 I was asking about.
I do have the install/config manual if it is in there.
Thanks