Hello Guest it is May 21, 2019, 07:18:23 PM

Author Topic: Touch Plate  (Read 1385 times)

0 Members and 1 Guest are viewing this topic.

Touch Plate
« on: January 29, 2014, 01:05:22 PM »
I am trying to write a macro to zero my Z.  I want the spindle to home itself up at the limit switch, then move to a specified location, then move down to the touch plate.

Here is my macro.  It was working for a while, now it does the steps out of order.  It moves in XY before doing the G28.1 Z0


Code "G28.1 Z0"
Code "G0 X0.44 Y-0.46"
Code "G31 Z-4.0 F9"
While IsMoving()
Sleep(200)
Wend
Call SetDro (2, 0.6324)
Code "G1 Z0.8"
Code "G0 Y1"
Code "G0 Z0"

Offline ger21

*
  • *
  •  6,232 6,232
    • View Profile
    • The CNC Woodworker
Re: Touch Plate
« Reply #1 on: January 29, 2014, 02:40:38 PM »
Try the code below.
If the macro is doing something it's not supposed to, try closing and restarting Mach3. If it's still acting strange, try using an older backup .xml file, as they can occasionally become corrupted and casue strange things to happen.



Code "G28.1 Z0"
While IsMoving()
Wend
Code "G0 X0.44 Y-0.46"
While IsMoving()
Wend
Code "G31 Z-4.0 F9"
While IsMoving()
Wend
Call SetDro (2, 0.6324)
Sleep (250)
Code "G1 Z0.8"
While IsMoving()
Wend
Code "G0 Y1"
While IsMoving()
Wend
Code "G0 Z0"
While IsMoving()
Wend
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Touch Plate
« Reply #2 on: January 29, 2014, 03:50:45 PM »
Thanks,

Just before I saw this I tried the isMoving after the G28.1 and it worked.  I'll add it to the other places