I am sorry, but I have no experience operating or programming CNC equipment. The lathe I mention here was "home built" it presently runs under DOS and the profiles are all written in BASIC.
My employer has asked me to figure out how to convert this equipment, both the lathe and the plotter to operate using industry-standard CNC methods.
OK, I can set up the stepper motors to use the Z-Axis and I can wire the Left/right motor at the controller to move the toolpost to the left, using negative values of Z. I would then set the X-Axis to replace (what presently is the Y-Axis) to move the toolpost in/out. Will the jog buttons then follow accordingly?
You ask Where are you getting the code from? I am presently writing simple G-Codes by hand. I simply chose X&Y, because it seemed to make sense to me.