Figured it out...
Roxy thanks so much for all your help it works great.

How can I change the behavior of the z axis. I would like to remove the pauses it makes during g28 and g29?