I use a macro in the initialization to set the state of the machine so it is always consistent on start-up.
Here is an example of one and of course one can modify to suite for your machine and desires.
APPENDIX “C” – INITIALIZATION MACRO
This is a macro that can be used to “reset” the lathe to a user preferred state. The macro should be reviewed and then modified for the users working preference. The macro must be placed in the proper turn profile folder and can be used as an Initialization String, called in a program or implemented via the MDI line.
To modify the macro use the VB script editor available in Mach. See Section 10.9 in the “Using Mach3 Turn Manual” for additional info on macros.
This is the macro:
' ( M1111.M1S Macro )
' ( Needs to be installed in C:\Mach3\Macros\Mach3Turn Folder)
' ( Basic Default Location or as needed )
' ( Change it as you need to )
' ( For MM Units Replace G20 with G21 )
' ( For CV Mode Replace G61 with G64 )
Code "G18" ' Set X,Z Plane
Code "G20" ' Set INCH Units Mode
Code "G40" ' Cancel Cutter Radius Comp.
Code "G49" ' Cancel Tool Length Offset
Code "G50" ' Re-Set All Scale Factors To 1.0
Code "G61" ' Set Exact Stop Mode
Code "G69" ' Cancel G68 Rotate Coordinate System
Code "G80" ' Cancel Canned Cycle Mode
Code "G90" ' Set ABS Mode
Code "G91.1" ' Set IJ's INC Mode
Code "G94" ' Set Feed Per Minute Mode
Code "M30" ' Program End and Rewind G-Code
RICH