Hello Guest it is July 15, 2024, 07:45:34 AM

Author Topic: Probing Z gives problem  (Read 3512 times)

0 Members and 1 Guest are viewing this topic.

Probing Z gives problem
« on: May 16, 2009, 01:39:16 PM »
I have been working on a Z probe macro, similar to a recent post.
I use the keygrabber to input joystick signals.
I have 6 jogging buttons, 3 buttons to set the jog rate, 1 button to zero X and Y, and 1 button to zero Z.
The jogging buttons are routed directly using Config - Ports and Pins
I have been successfully using these for months.
Now added 2 more buttons through the keygrabber. One of them initiates M991.m1s through the oem(301) and the other is routed to input#1.
The codes are attached.
My problem is that everything works perfectly, except that after doing a Z probe the two buttons that move X and Y and Z to zero do not work. Everything else in the macropump.m1s does work. I have to close down Mach3 and start again to get my normal buttons working again. Any suggestions as to where I have gone wrong?
Re: Probing Z gives problem
« Reply #1 on: May 16, 2009, 01:43:48 PM »
Sorry the macropump.m1s did not attach.
Here it is:
Option Explicit

Dim jog_rate
jog_rate = getoemdro(3)
If isactive(29) Then
   jog_rate = 4
elseif isactive(30) Then
   jog_rate = 40
elseif isactive(31) Then
   jog_rate = 100
elseif isactive(33) Then
   code("g0 x0 y0")
elseif isactive(34) Then
   code("g0 z0")
End If


and M991.m1s

Code "F500"
Do While Not isactive(18)

Code "G1 Z -.01"
While ismoving()


setoemdro(802,0.1)   'set Z height to thickness of brass shim

Re: Probing Z gives problem
« Reply #2 on: May 17, 2009, 09:13:49 AM »
Panic over - I was still leaving incremental mode on in my probe macro. So when I subsequently asked it to go to Z0 nothing happened.