Hello Guest it is November 15, 2019, 04:45:30 AM

Author Topic: A script for zeroing Current Position, Machine Coord, and Work Offset.  (Read 2022 times)

0 Members and 1 Guest are viewing this topic.

I am searching for a script for zeroing Current Position, Machine Coord, and Work Offset.

A am currently using Ver: R3.042.038 which is working fine except when I RefAllHome my x axis moves .0005" (1 step).  Apparently this problem may be related to using HillbillyBOB's board and MaxCL.  I have been helped by Hood with this, and he is very generous.  Unfortunately we seem to be going in circles.
http://www.machsupport.com/forum/index.php/topic,25290.0.html

If there was a simple script which would force the zeroing of Current Position, Machine Coord, and Work Offset, then I simply could append this script to Hiddenscript.m1s and things would be perfect.

Here is the script I have been working on.  It doesn't seem to work and I cannot figure out why.  It is a replacement for Hiddenscript.m1s with the last part forcing Current Position, Machine Coord, and Work Offset to zero.


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

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

Xaxis = 0
Yaxis = 1
Zaxis = 2
SetMachZero(xaxis)
SetMachZero(Yaxis)
SetMachZero(zaxis)

Const XaxisMultiFunctionOEMDRONum = 800
Const YaxisMultiFunctionOEMDRONum = 801
Const ZaxisMultiFunctionOEMDRONum = 802
SetOEMDRO(XaxisMultiFunctionDRONum, 0.0000)
SetOEMDRO(YaxisMultiFunctionDRONum, 0.0000)
SetOEMDRO(ZaxisMultiFunctionDRONum, 0.0000)

 
Suggestions?

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: A script for zeroing Current Position, Machine Coord, and Work Offset.
« Reply #1 on: August 22, 2013, 07:46:48 PM »
Move to new location

'Macro for zero,zero,zero

SetMachZero(0)    'Set Machine Cords to ZERO
SetMachZero(1)
SetMachZero(2)
SetMachZero(3)

DoButton(7)         ' Set all Work cords to Zero including fixture offset that you are currently using.

END


Note this does NOT reset any G52/G92 or tool offsets that may be active.


Just a thought, (;-) TP
Re: A script for zeroing Current Position, Machine Coord, and Work Offset.
« Reply #2 on: August 22, 2013, 09:04:56 PM »
I'll give it a try!

Thanks!