Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: mpseaside on February 27, 2012, 09:55:29 PM

Title: Auto Tool Zero Question
Post by: mpseaside on February 27, 2012, 09:55:29 PM
I've got a DIY CNC 22"x18" Router based Mach3/SS machine.  I'm trying to get an auto zero Z plate working on the probe input.  Pin 15 (input, pulled high with 73K) attatched to a plate to contact the mill bit.  Diagnostics shows the plate is grounded when it hits the mill (active low green light turns on in diagnostics screen).  Code below (found on the web):

Mesage("Auto Zeroing...")
If IsSuchSignal(22) Then
code "G31 Z-1 F2"
While IsMoving()
Wend
Call SetDRO(2,0.125)
code "G1 Z1"
End If

This does not respond to the probe signal (pin 15 port 1).
How do I know IsSuchSignal(22) is looking at this port/pin?
Where is a definition of these function calls?  and Function parameters?

Thanks in advance.  I'm a newbie and am trying (hard) not to toast my basement!

Mark
Title: Re: Auto Tool Zero Question
Post by: ger21 on February 27, 2012, 10:38:29 PM
http://www.machsupport.com/MachCustomizeWiki/index.php?title=Mach_specific_Subroutines/Functions_grouped_by_purpose

http://www.machsupport.com/MachCustomizeWiki/index.php?title=VB_Constants_for_Signal_Names

it appears that IsSuchSignal just looks to see if you have the pin set up in ports and pins. I don't use it in my macros.