Hello Guest it is January 26, 2020, 09:13:47 PM

Author Topic: How to setup Auto Zero button in latest version of Mach4  (Read 3066 times)

0 Members and 1 Guest are viewing this topic.

Re: How to setup Auto Zero button in latest version of Mach4
« Reply #30 on: March 21, 2018, 09:46:30 PM »
I agree with Craig,
Keep it out of the screen load until a final revision is made. 
I like the stripped down code.  I appreciate the thought to put the TLO addition in the Touch Module.  But I wish it were on the home screen or in the offsets screen as a stand alone button.  I went through and did this same thing with the TLO code.  I didn't like having to open up the module and be sure that TLO is selected, then push the probe button.
Chad Byrd

Offline cv580

*
  •  50 50
    • View Profile
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #31 on: March 21, 2018, 10:03:07 PM »
Adding the line of code that Chad recommended does not work properly, it will work once after the first touch off and the next touch offs I will get the "Cannot use G53 incremental" message in Mach and not able to move any axis to work zero

cv580
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #32 on: March 21, 2018, 10:19:43 PM »
cv580,
What are you doing to move to work zero?  The button on the main screen under the Position Dros?
Chad Byrd
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #33 on: March 21, 2018, 10:27:13 PM »
cv580,
I had some issues when I first used the TouchOffset Module.
I wonder if something is up with this code as well.  Is this code working back to back?
Chad Byrd

Offline cv580

*
  •  50 50
    • View Profile
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #34 on: March 21, 2018, 11:39:22 PM »
Chad,
I am using the Go To Work Zero button under the DRO's on the main screen to move the axis to work zero.  I am not sure what you mean by the code working back to back?

What is happening is I do a auto zero touch off and after the Z axis has retracted from the touch plate I use the Go To Work Zero button to bring all axis to work zero which will work once, then I do another auto zero touch off and now I am not able to bring any of the axis back to work zero and get the "Cannot use G53 incremental" message.

I jog the X and Y axis off to one side to do the tool change and auto zero the Z axis thus the need to bring the machine back to work zero after the touch off.

cv580
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #35 on: March 22, 2018, 12:02:16 AM »
Hi,
can you go to the edit screen and capture and post the code associated with the Go To Work Zero button?

I've encountered a fault like this before and struggling to remember what it was. I seem to recall its in the Go To Work
Zero script.

Craig
My wife left with my best friend...
     and I miss him!

Offline cv580

*
  •  50 50
    • View Profile
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #36 on: March 22, 2018, 01:31:00 AM »
Craig,
The Go to Work Zero script:

function GoToWorkZero()
    --mc.mcCntlMdiExecute(inst, "G00 X0 Y0 A0")--Without Z moves
    mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")--With Z moves
end

The Go to Work Zero button:

GoToWorkZero()
--local inst = mc.mcGetInstance()
--mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")

cv580
 
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #37 on: March 22, 2018, 01:46:38 AM »
Hi,
they look like the standard issue.

may I suggest putting an mc.mcCntlGcodeExecuteWait(inst,'G90') just prior. It will guard against be in incremental mode when doing Go To Work Zero.

Craig
My wife left with my best friend...
     and I miss him!
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #38 on: March 22, 2018, 08:44:01 AM »
That was going to be my next suggestion.
Craig, you mentioned you had this type of fault before.  Was it with the WorkZero Function, or the Probe?
Chad Byrd

Offline cv580

*
  •  50 50
    • View Profile
Re: How to setup Auto Zero button in latest version of Mach4
« Reply #39 on: March 22, 2018, 12:00:49 PM »
Works 100% now!
Many Thanks for your help and patience Craig and Chad

cv580