Katoh,
I am thinking your problem is use of Mastercam and i can't help you with that. I would think that Mc has all of what you want to do, maybe not, and maybe you haven't mastered mastercam yet. You should be able to request a lathe pp for Mach3 Diameter mode ( if that is what you want) from Mc.
Contacting Mc or the seller you purchased it from for the pp.
There are differences in the gcode dialects of different software controllers and one must know what they are if they want to manualy change the gcode of a program for use by a different controller.
RICH