I'm just starting out with this simulation software and i put in this g-code that someone gave me (without the notes!)

My machine is a small lathe but the chcuk rotates slowly for positioning rather than fast for cutting. The x axis moves the tool (dremel-type) along the work spindle, y axis moves the tool into the work. The 3rd axis is the rotation of the chuck and the 4th is not really used - it just raises and lowers the tool to centre it on the work but I'm going to do that manually for now because it doesn't need to be moved during the cut.I don't know if i have a 3 axis lathe with the chuck as Z or a 4 axis lathe with the chuck as the 4th axis and an unused z axis.

Gcode for a barley twist
G01 X0 Y0 Z0 A0 F50 (Move to starting position. Tool over the centre of the work piece at one end and just touching the work piece. Use A=180 for a second start 180° around from the first and add 180 to the A value below ie 360+180=540)
G01 Z-1 F25 (Move the tool down 1mm into the work piece)
G01 X250 A360 F50 (Move the tool 250mm along the work piece whilst rotating the work piece 360°. Change 250mm and 360° to suit your requirements.
G01 Z2 (Lift the tool away from the work piece)
G0 X0 A0 (Rapid move back to X=0
G01 Z-2 F25 (Lower the tool 1mm more than before to do a second cut)
Repeat with decreasing Z until you have got to the depth you want

The error I get is:

Z -0.024 out of limit (0 to 15.748)
Parameter name: Z

Any help would surely be appreciated!