yeah but when I'm doing manual automatic tool changes I would have to type that in the MDI instead of pressing a button.
I know what your saying but lets think about that for just a minute.
"
manual automatic tool changes"
Most machine manufacturers wont have the machine move to any position during a tool change unless it is required for the tool change. When an operator gets ready to do something manually they assume the worst case scenario (it is due to some problem). They want to put as much control into the users hands as they can and rely on the user to know enough about what they are doing to be able to recover. I would really think about it. For example, what would happen if a mill drove a carbide end mill into a chunk of steel spinning way to fast. It might friction weld, essential turning the table and spindle into a solid block now. How does the operator recover if the first thing the manual tool change does is move to a position in Z? This can get ugly fast.
Another thing to think about...... shouldn't you have a Manual tool change page or tab? This would make it so you could manually go through steps in the tool change sequence (including moving to tool change position which is normally done by the gcode)?
Just be careful not to paint yourself into a corner that the only way out is to break something.
But anyway, you can certainly automate it if you want to. This too can get ugly fast. It will require some scripting in the PLC script, a custom module with a co-routine and some edits to the load modules macro in the macros folder. You can look at the default wx4 or wx6 screen sets Ref all axis (Home) button and the function it calls. It uses a coroutine. You will need very similar but in a module so you can call it from a macro.
It might be a lot easier to add a button that simply moves the machine to the position you want or just type it into the MDI before the M6. You might be able to just use the return to position button already in the default screens too. Lots of ways to do it. The question is, do you want exactly what you want bad enough to do what it takes to get it or will some of the out of the box features get you close enough to avoid a lot of extra work, time and effort?