Option Explicit'********DO NOT remove or change the expand line or the included file contents******************'  MachStdMIll license terms REQUIRE that the copyright and License terms remain a part of this source file#expand <Masters\Headers\CopyRightAndLicenseNotice>	'**************************************************************************************' this is a template script for M6ATC.m1s' This template is installed by MSM into <mach install dir>\MachStdMill\Profile Macro Masters\Templates'' the Auto Tool Changer implementer should flesh this template out with appropriate code.' this script is called from MSMM6start for AutoTC mode' the script will be looked for by M6Start in the macro dir for the current profile'  i.e. in "<mach install dir>\Macros\<GetActiveProfileName() >\"    and the name of the script in that dir must be "M6ATC"'' this script is responsible for physically putting GetSelectedTool() into the spindle ' this script should returns when the tool mount is complete '' the routine should do all TC operations in G53 coordinates' Routine is entered with G90 G00 G40' entry point into the script      	Dim newtool As Integer  	Dim oldtool As Integer  	Dim NewtoolDro As Integer   	Dim XTCpos As Double	Dim ZTCpos As Double  	  	XTCpos = GetoemDRO (1817)	ZTCpos = GetOemDRO (1819)  	oldtool = Getoemdro (1824)	newtool = GetSelectedTool()	setoemdro(2000,newtool)  	              Code "G53 G00 X" & XTCpos & "Z" & ZTCpos              While ISMoving()       Sleep 50000              Wend                                'MsgBox ("newtool = " & GetSelectedTool)  'MsgBox ("oldtool = " & oldtool )  'MsgBox ("dro 2000 = " & getoemdro (2000) )                   