The Macro was written by Trevor that works for Mach .I have spent the last 9 months trying to get it to work through M.D.I. I ran into a road block and decided to go with it the way it was .Trying to make it run bye directional was too much an issue .So the first time I tried to run a program with tool changes , 5 tools .It would change to tool 1 do its machining then get to tool t0202 and sit there .Left there for an hour the cycle timer keep running and no tool change. I started to edit the program that was posted with a generic Fanuc post . When I deleted the M5 it got past the t0202 until t0303 then it hung up on that line again. Once I removed all the m5 it went all the way through. I will take the g28 out .But thats not going to fix why I cant run the program a 2nd time .It rewinds to the top ?