Hello Guest it is April 18, 2024, 01:56:38 PM

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

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
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