Machsupport Forum
		Mach Discussion => General Mach Discussion => Topic started by: Fred_evans on May 19, 2012, 01:30:58 PM
		
			
			- 
				Hello all, 
 I have looked all over for a sample of code to do a manual toolchange and cant find any.
 
 I have a dickson toolpost
 
 could someone please give me a piece of code which incorporates a tool change?
 
 many many thanks
 
 frred evans
- 
				The usual way would be to have "Stop spindle wait for start" option chosen in General Config and then in your code you would have a move to a safe location and then the tool call, eg T0101 or T0202 etc.
 You could also have code written to the M6Start macro so that it moves to a safe location without you having to command it but I personally dont like that as it wastes time and motion as you have to go further than needed in most cases to allow for all eventualities. Much better just to write it in your code and move just enough to give you room to tool change for the part size being used at that time.
 Hood
- 
				thanks Hood,
 so something like this
 g28
 t0202     (NOW PRESS CYCLE TO RESTART)
 go x20 z0
 g01 z-20
 etc
 etc ??
 
 thanks
- 
				Yes that looks ok, only thing I would say is be carefull of commanding a G0 to Z0, I would prefer to be at least 0.2mm positive of the Z zero with a rapid.
 
 Hood