Hello Guest it is September 27, 2020, 12:13:38 AM

Author Topic: How to manually set Current Position, Machine Coord, and Work Offset to zero.  (Read 20061 times)

0 Members and 1 Guest are viewing this topic.

Ok, I tried what was suggested to no avail.  Disabling the z limit input and then doing a RefAll still didn't zero either the machine coord or work offset (if not zero). 

What I am also going to try is posting a script I wrote to see if it is a reasonable script and if it will work with my version of mach3.

Offline Hood

  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Ok so do the X and Y still move?
If they do I dont think there is much you can do.
If they dont then it may be possible to modify your RefAll button to only home Z and just have Mach set the X and Y zero.

If you let me know whether X and Y still move with Z Home disabled.

Thank you again.

What I have observed is I when have Z home enabled in Ports and Pins and Z Auto Zero enabled in Homing/Limits with X and Y Auto Zero DISABLED in Homing/Limits allows me to home the axis wherever I desire without the x and y axis moving.

So I wrote a script which replaces Hiddenscript.m1s to operate RefAll.  The first section of the script is exactly what was there originally and the second part is supposed to set the values in Machine Coord, work offset, and current position to zero.

It should work but as of yet is does not seem to.  I don't know if it is because of a problem in the script or if in version of Mach3, R3.042.038.

I cannot at this time build and test a upgrade to Mach3 because I need to use the system.  Later on I may be able to build a newer system.

Here is the script:

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

Xaxis = 0
Yaxis = 1
Zaxis = 2
Const XaxisMultiFunctionOEMDRONum = 800
Const YaxisMultiFunctionOEMDRONum = 801
Const ZaxisMultiFunctionOEMDRONum = 802
SetOEMDRO(XaxisMultiFunctionDRONum, 0.0000)
SetOEMDRO(YaxisMultiFunctionDRONum, 0.0000)
SetOEMDRO(ZaxisMultiFunctionDRONum, 0.0000)

Thank you again!

Offline Hood

  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
OK if you can get it so Z homes and X and Y dont move then the following should work.

It didn't work, but I suspect it has to do with the version of mach3 I am using instead of any fault with the code.

What I am doing now is ordering a backup PC which I will convert to the latest version of Mach3.  This way I can keep working without loosing any more days, and have the original system as a backup which is always a good idea anyhow.

Thanks, and I will let you know how it goes!

Offline Hood

  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Hopefully it will work but I am suspecting it may have more to do with you running MaxCL mode rather than the version of Mach, hopefully not though.
I will let you know!

Thank again for your help.  At the very least I found out how to keep the axis from moving when I RefAll the system (disable x and y homing) and I am now searching on how to eliminate posting G54 in Mastercam, which then will allow me to set the home where I want it and not have any G54 calls to mess it up.

(Crossed fingers)

Offline BR549

  •  6,932 6,932
    • View Profile
You CAN reset the Machine Cords  to ZERO from a button press or Mcode.  EVEN IF you have homes or NOT.

OOPS I see yall figured that out, (;-)

(;-) TP
« Last Edit: August 22, 2013, 06:35:38 PM by BR549 »