Hello Guest it is March 29, 2024, 04:43:53 AM

Author Topic: Manual button for auto zero  (Read 13887 times)

0 Members and 1 Guest are viewing this topic.

Manual button for auto zero
« on: October 22, 2010, 01:58:37 PM »
Hi All,

Is it possible to have a manual button on the gantry to do a z auto zero, instead of using mach3 zero button??
When doing tool change I think it would be better to have button on the gantry rather than going back to pc to do it.

If its possible is their anyone prepared to give me advice and directions on how to implement this?

Rick

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Manual button for auto zero
« Reply #1 on: October 22, 2010, 02:22:29 PM »
I do a similar kind of thing, in as much as I run macros via external buttons. Scott Scheafers MachMad plugin allows you to assign a User LED to a macro and when the LED is seen the plugin will run the macro that you have designated.
So what you would do is have your autozero named as a macro ( eg m1234.m1s) and placed in your profiles macro folder. You would then set up the plugin to look out for your LED and tell it the macro to run.

You could also likely do this via a macropump, just have the macropump look for a LED and then do the macro when its seen.
Hood
Re: Manual button for auto zero
« Reply #2 on: October 22, 2010, 02:34:30 PM »
Thanks Hood,

Do you have a simple macro for this you like to share?
I read so many posts with different operations like is the probe conneted.. although they seem good ideas all I want is something very simple to get the job done.

Rick

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Manual button for auto zero
« Reply #3 on: October 22, 2010, 02:38:08 PM »
Afraid I dont use auto zero so dont have a macro but a search of the forum will bring up plenty I am sure.

I use external buttons to activate other things such as Cycle Start, Ref All etc.

Hood

Offline Greolt

*
  •  956 956
    • View Profile
Re: Manual button for auto zero
« Reply #4 on: October 23, 2010, 07:00:20 PM »
Hood's advice to use MachMad is good.  It only costs $10.  Then you can have all sorts of remote triggers.

However if you want to do it this way, here is a copy of an old post of mine regarding having a manual button for a macro.

====================================================================

A brain can not trigger a macro on it's own.  So the macropump does that.

However brains are a no brainer to implement safety timers and lockouts.  (pun intended)   ;D

The auto tool zero macro needs to be placed in the macro folder with the name of your profile.  Eg.  Mach3Mill.    Call it  M615.m1s

The macropump calls the relevant macro when a user LED goes active.

It basically is one which Poppabear wrote for me a while ago.  Much the same as posted above.

The brain sets the LED when the switch is pushed and held for 1.5 seconds but only if there is no motion,  the spindle is not running and reset is not active.

Being an external momentary switch I think the 1.5 second delay is a good safety measure.  

This means you must push and hold the switch for 1.5 seconds before anything will happen.

You do not want unintentional activation of the macro.

So the addition of the brain is just to allow for easy implementation of the safety lockouts.

====================================================================

Have the momentary switch activate OEMTRIGGER#5

Remove any initial delay in the auto tool zero script.  The brain now handles that.

Try it if you wish,

Greg
« Last Edit: October 23, 2010, 07:02:18 PM by Greolt »
Re: Manual button for auto zero
« Reply #5 on: April 13, 2011, 06:52:09 PM »
Hi Greg,

I am running a twin Z axis machine (Z and A axis) with external zero buttons for both axis, can you please advise on what additional code I need to add to the macropump? I have 2 separate Macros M615 and M616 one for each axis in the macro folder but unsure regarding the macro pump.

Rick

Offline Greolt

*
  •  956 956
    • View Profile
Re: Manual button for auto zero
« Reply #6 on: April 14, 2011, 06:23:43 AM »
Rick

Just duplicate what is in the macropump  as follows. (duplicated section in blue).  This time using DRO and LED 1141  and M616


A = GetOEMled (1140)
B = GetUserDRO (1140)

If A And (B = 0) Then
Code "M615"
SetUserDRO(1140,1)
End If

If Not A And (B > 0) Then
SetUserDRO(1140,0)
End If 

C = GetOEMled (1141)
D = GetUserDRO (1141)

If C And (D = 0) Then
Code "M616"
SetUserDRO(1141,1)
End If

If Not C And (D > 0) Then
SetUserDRO(1141,0)
End If 


Then edit the trigger brain to duplicate what is already in the brain.   Make the first input of the duplicated section,  OEMTRIGGER#6  and terminate with OEMLED: 1141

So M615 will be for Axis Z,   and M616 will be for Axis A.

That should work.............I think.  ;D

Greg

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Manual button for auto zero
« Reply #7 on: April 14, 2011, 08:23:18 AM »
I'm probably missing something here, but isn't it easier just to use triggers? i.e. with no macropump, macros, brains or plugins needed.

Ian

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Manual button for auto zero
« Reply #8 on: April 14, 2011, 11:58:46 AM »
That's what I was thinking. As long as you have a button for it, just use an OEM Trigger.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Greolt

*
  •  956 956
    • View Profile
Re: Manual button for auto zero
« Reply #9 on: April 14, 2011, 05:13:07 PM »
No doubt there are lots of ways you can do this.   Using MachMad would be easy.

As I understand it you cannot activate a macro with an OEMtrigger.  With the exception of the one "Trigger Macro" which first must be set in the init string.

I guess with some clever macro writing you could run a tool zero routine for the appropriate Z or A axis, all contained within the trigger macro.

Why I use a brain is because the safety lockouts and time delay can be done very easily.

Greg

« Last Edit: April 14, 2011, 05:15:13 PM by Greolt »