Hello Guest it is July 17, 2019, 07:15:49 AM

Author Topic: Auto Z setting, macro help....  (Read 1216 times)

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,556 2,556
    • View Profile
    • DD Metal Products Ltd
Auto Z setting, macro help....
« on: February 03, 2014, 03:35:42 PM »
Can someone tell me what this code would do if placed at the start of the M3 command....

DoOEMButton (1010) 'reset z DRO
Code "G4 P1" 'wait
Code "G31 Z-100 F250" 'probe surface
While isMoving()
Wend
ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
While IsMoving()
Wend
DoOEMButton (1010) 'reset z DRO
Code "G0 Z20" 'remove floating head travel
DoOEMButton (1010) 'reset the z DRO

Would that not probe the surface and leave my Z DRO at zero ready for the M3 command to complete?

This is all theory but I do write VB programs in my day job and it's very similar, what I want is for mach to reference the material surface at the start of EVERY plasma pierce/cut.

Any ideas

Thanks
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives