Hello Guest it is March 28, 2024, 04:01:19 AM

Author Topic: Auto Tool zero. Which Input etc. do I Use?  (Read 16967 times)

0 Members and 1 Guest are viewing this topic.

Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #10 on: August 27, 2008, 11:20:27 PM »
Thanks Greg,

The digitise led does light
 


Bruce


Offline Greolt

*
  •  956 956
    • View Profile
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #11 on: August 28, 2008, 12:35:34 AM »
Bruce

I ran Brett's macro on my machine and it works fine. 

Don't think the pause after the probe move (Code "G4 P0.25") is needed but it does not stop it working.

So I guess your problem may lie elsewhere.  Are you using LPT?    My SmoothStepper likes the macro to be a little different.

Also I found a gotcha in  Brett's macro.

If, starting a job, I jog down close to material and call the tool zero, it is likely to move the Z in the wrong direction as the Z DRO is already a negative number.

I don't like my machine doing anything I am not expecting.  :)    So my macro zeros the Z DRO before the probe move.

You can try this one of you like but if Brett's won't work then this probably won't make any difference to that.


CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = 1.5 'Z-plate thickness

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get probe in place
Code "G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Sleep 20
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" ' this message goes in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
Exit Sub
End If
« Last Edit: August 28, 2008, 12:37:58 AM by Greolt »

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #12 on: August 28, 2008, 07:07:19 AM »
Bruce, What version of Mach are you running?  If it is 3.042.00* please go back to the previous version. 3.041 or earlier.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #13 on: August 28, 2008, 07:45:41 AM »
Brett: I am running Version R2.63


Greg: Your Code worked for me as VB script in the button But I still cant run it as a macro.
To try to run as a Macro,I  stored the VB script as M975 in the Mach3 Macro folder. I then used MachScreen to code the ATZ button ie. checked the VB script button, typed in M695, saved changes.
I then restarted Mach3 and pressed the ATZ button and it returns a error in line 1.

Bruce

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #14 on: August 28, 2008, 08:25:07 AM »
Brett: I am running Version R2.63


Greg: Your Code worked for me as VB script in the button But I still cant run it as a macro.
To try to run as a Macro,I  stored the VB script as M975 in the Mach3 Macro folder. I then used MachScreen to code the ATZ button ie. checked the VB script button, typed in M695, saved changes.
I then restarted Mach3 and pressed the ATZ button and it returns a error in line 1.

Bruce

If you are adding VB to a button to call a macro you will need to do it as follows
Code "M975"


Or whatever your macro number is , you have two different ones above ;)

Hood
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #15 on: August 28, 2008, 04:51:25 PM »
Thankyou all for the assistance.
The use of VB script syntax is a little lacking at the moment. The Books i have looked at on VB all seemed to be aimed at the www of business application's.
Perhaps this could be a good topic for an "expert" to produce a small video tutorial on syntax and the common comands used for our purposes, for the Mach support site? It would certainly remove some of the mystery surrounding similar uses of VB for Mach.

Thanks,

Bruce

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #16 on: August 28, 2008, 04:55:39 PM »
VB is a complete mystery to me as well, there are bits and pieces dotted around in the customising manual and the Wiki. I also find looking at the VB in the wizards helps a lot in the understanding.
Hood

Offline Greolt

*
  •  956 956
    • View Profile
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #17 on: August 29, 2008, 01:18:36 AM »


If you are adding VB to a button to call a macro you will need to do it as follows
Code "M975"


Ahh that was my fault.  Sorry about that Bruce.

I should check and not just go from the old memory.  ;D

Greg
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #18 on: January 14, 2009, 08:51:04 AM »
This may not be the correct place and there may be a thread that address my problem but I can not get the Auto Tool Zero Touch Plate to work.

This is my set up.

I am not using any screen in Mach.  I have added an LED to my touch plate.  I have 2.5 volts to power things.

I am using the code that is at the top of the thread.  Before I run the macro from my Shuttle Pro, I touch the plate to the router or bit and the LED lights and I can see on the Diagnostic page that a complete circuit has been made.

When I run the macro, the router is driven through the plate and wants to continue.  It does not stop. 

What am I doing wrong or what do I need to change.  it would seem to me that I should be able to hold the plate in the air and once the router has touched the plate, it would stop driving downwards and set the Z to zero and move upward to stop.

Help please.  If you need additonal information, let me know.

Thanks
 
Re: Auto Tool zero. Which Input etc. do I Use?
« Reply #19 on: January 14, 2009, 01:05:11 PM »