Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 06:24:52 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Manual button for auto zero
Pages: 1 2 3 »   Go Down
Print
Author Topic: Manual button for auto zero  (Read 1331 times)
0 Members and 4 Guests are viewing this topic.
Duc748
Active Member

Offline Offline

Posts: 31


View Profile
« on: October 22, 2010, 12: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
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #1 on: October 22, 2010, 01: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
Logged
Duc748
Active Member

Offline Offline

Posts: 31


View Profile
« Reply #2 on: October 22, 2010, 01: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
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #3 on: October 22, 2010, 01: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
Logged
Greolt
Global Moderator
*
Offline Offline

Posts: 872


View Profile
« Reply #4 on: October 23, 2010, 06: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)   Grin

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

* Trigger.zip (0.77 KB - downloaded 68 times.)
« Last Edit: October 23, 2010, 06:02:18 PM by Greolt » Logged
Duc748
Active Member

Offline Offline

Posts: 31


View Profile
« Reply #5 on: April 13, 2011, 05: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
Logged
Greolt
Global Moderator
*
Offline Offline

Posts: 872


View Profile
« Reply #6 on: April 14, 2011, 05: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.  Grin

Greg
Logged
stirling
Global Moderator
*
Offline Offline

Posts: 1,190

UK


View Profile WWW
« Reply #7 on: April 14, 2011, 07: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
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,616



View Profile WWW
« Reply #8 on: April 14, 2011, 10:58:46 AM »

That's what I was thinking. As long as you have a button for it, just use an OEM Trigger.
Logged

Greolt
Global Moderator
*
Offline Offline

Posts: 872


View Profile
« Reply #9 on: April 14, 2011, 04: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, 04:15:13 PM by Greolt » Logged
Pages: 1 2 3 »   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!