Ok, so, I ran a test, and I've got a couple follow-up questions. I took Graham's gcode and tweaked it a bit to fit the measurements I need, and used the wizard to generate a spiral pocket to stick in the sub.

The first part cut perfectly, all measurements exact. The offset move to the second part was right. But the second part was somehow different from the first, even though it used the same gcode from the sub! So something has to be wrong with the table, yes? There's no way the same code could make two parts that aren't exactly the same, right?

Two things were wrong with the second part. First, the main circular pocket was just a tiny bit smaller -- slightly less than 1" in diameter. These parts fit like a cap on something 1" in diameter, and the first part fits perfectly, the 2nd part you really have to work to jam it on. So, probably less than 1/64" difference, but noticeable for my application. I need to buy some calipers to measure exactly how far off it is.

Second, the Z depth is too deep on the 2nd part. There's supposed to be a circular pocket inside a circular pocket, and on the 2nd part, the inner pocket goes clear through the part, making a hole instead of a pocket. Again the difference is probably only 1/32 or less, but that's too much for my application.

Some thoughts I had about possible causes:

-- Is my steps per inch off? I'm using the settings given to me by the manufacturer of the machine -- Zenbot comes pre-assembled with motors and everything attached, so it should be right, but... what can I do to see if this is the problem? I don't have one of those gauge blocks & dial test indicators the manual recommends for testing, do I need to buy one?

-- Maybe the heat from cutting the first part causes the bit to expand? but that should make the pocket wider, not narrower, yes? I'm using this 1/8" bit, is it too cheap to be reliable?

http://www.widgetsupply.com/page/WS/PROD/dremel-router-bit/D-AD06-- Maybe the bit is moving in the "chuck" ? It's only a dremel after all, and there isn't a proper chuck. I've got it tightened down as much as I dare without risking breakage. This might explain the depth problem, but why is the pocket smaller?

I recognize that I'm using a low-end machine, and a certain lack of precision is to be expected. But if anything can be done to fix this, I want to try it. Does anyone have suggestions?

Oh, and here's the gcode I'm using:

`(====================================================================================)`

(START main program)

(====================================================================================)

O9999

(=== Initialization stuff ===)

G0 G49 G40 G17 G80 G50 G90

M6 T1(TOOL DIA.0.125)

G20 G64 (Inch, constant velocity)

G52 X0 Y0 (clear any existing G52)

G00 G90 X0 Y0 Z0.1 (move to origin, safe Z)

(=== Start cutting ===)

G52 X0 Y0 (clear any existing G52)

M98 P1000 (call sub to cut 1st part)

G52 X0.0 Y1.50 (datum shift coordinates)

M98 P1000 (call sub to cut 2nd part)

G52 X0 Y0(cancel datum shift ** very important **)

G00 Z0.10 (rapid to safe Z)

M30 (end and rewind)

(====================================================================================)

(END main program )

(====================================================================================)

(====================================================================================)

(START subroutine )

(====================================================================================)

O1000

G00 G90 X0 Y0 Z0.1 (move to centre of circle, which is 0,0 as defined by datum shift in main)

(=== spiral arcs generated by the wizard, to cut main circular pocket ===)

G01 Z-0.078125 F3

G2 Y0 X0.0938 R0.0469 F6

Y0 X-0.0938 R0.0938

Y0 X0.1875 R0.1407

Y0 X-0.1875 R0.1875

Y0 X0.2813 R0.2344

Y0 X-0.2813 R0.2813

Y0 X0.375 R0.3282

Y0 X-0.375 R0.375

Y0 X0.4375 R0.4063

Y0 X-0.4375 R0.4375

X0.4375 Y0 R0.4375

G00 Z0.1

X0 Y0

G01 Z-0.140625 F3

G2 Y0 X0.0938 R0.0469 F6

Y0 X-0.0938 R0.0938

Y0 X0.1875 R0.1407

Y0 X-0.1875 R0.1875

Y0 X0.2813 R0.2344

Y0 X-0.2813 R0.2813

Y0 X0.375 R0.3282

Y0 X-0.375 R0.375

Y0 X0.4375 R0.4063

Y0 X-0.4375 R0.4375

X0.4375 Y0 R0.4375

G3 I-0.4375 F5 (=== around again ===)

G00 Z0.1

X0 Y0

(=== Smaller circular pocket within main circular pocket ===)

G01 Z-0.1875 F3

X0.09375

G3 I-0.09375 F5

G3 I-0.09375 F5 (=== around again ===)

G00 Z0.1

X0 Y0

(=== Outer cut to remove part from material ===)

X0.609375

G01 Z-0.0625 F3

G3 I-0.609375 F5

G01 Z-0.125 F3

G3 I-0.609375 F5

G01 Z-0.1875 F3

G3 I-0.609375 F5

G01 Z-0.210 F3

G3 I-0.609375 F5

(=== wrap up, move back to center hole and safe Z ===)

G00 Z0.1

X0 Y0

M99 (return from sub)

(====================================================================================)

(END subroutine)

(====================================================================================)