Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 12:40:14 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Probing Z gives problem
Pages: 1   Go Down
Print
Author Topic: Probing Z gives problem  (Read 866 times)
0 Members and 2 Guests are viewing this topic.
dhookings
Active Member

Offline Offline

Posts: 36


View Profile
« on: May 16, 2009, 12: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?

* M991.m1s (0.19 KB - downloaded 57 times.)
Logged
dhookings
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #1 on: May 16, 2009, 12:43:48 PM »

Sorry the macropump.m1s did not attach.
Here it is:
MACROPUMP.M1S
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


setoemdro(3,jog_rate)

and M991.m1s

M991.M1S
Code "G71 G91"   ' METRIC And INCREMENTAL
Code "F500"
Do While Not isactive(18)

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

Loop



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

Logged
dhookings
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #2 on: May 17, 2009, 08: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.

Dave
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!