Hello,

I'm using linuxcnc-mill postproc and planet-cnc hardware. The working reference is at the top of stock. NC planes at 10/5mm from to of stock.

I would expect all rapid X-Y movements are >=10mm from stock and that the tool goes from 5mm to top of stock at feed rate. Am I ok ?

After stating the program the tool go to G28 (0-0-0) and then go in a straight line to the start of the feature but at Z0.

I think I had aldready experienced that a long time ago, with a Z working reference at *bottom* of stock, the first movement was G28 to XY of the first feature and Z0 in one-step at 3200mm/min causing a local big-bang.

Below is Gcode -- with my own comments (they may be wrong):

G21 G17 -- G21:mm G17:XY plane
G91 G28 Z0 -- [G91:increment mode : Z+0 (useless?)] [goto G28]
G28 X0 Y0
(F4 Z2 L14)
N1 T41 M06 -- tool change
S19894 M03 -- spindle on, clockwise
M08 -- coolant

G90 G54 G00 X17.5 Y-3. -- [G90 use working reference] [G54 reference part 1] [G00 rapid move to X17.5 Y-3.]
-- *** FAIL *** WTF WHY Z IS MOVING ??????????

G43 Z5. H41 -- [G43 tool lenght comp.] [5mm defined in camworks]
G01 Z-1.6 F1989.437 -- start milling


According to my comprehension of g-code, Z axis should not move when executing the G90 line. Am I right?

=> If yes, so the software/hardware that I use is faulty, but I can't do anything to solve that.
=> Otherwise, things are getting better when specifying Z, e.g. "G90 G54 G00 X17.5 Y-3. Z10"

I successfully opened the postproc in UPG... How to properly modify it, for:
- Not hard-coding the Z10 but using the camworks rapid place (using OPR_Z_RAPID_PLANE ?)
- Using it tool-compensated (I suppose that my Z10 in "G90 G54 G00 X17.5 Y-3. Z10" is dangerous because not tool-lenght copensated).


They is probably something to do with:

:SECTION=RAPID_FROM_TOOL_CHANGE_MILL
:T:<G!:ABSINC><G!:work_coord><G!:00><X!><Y!><attri butes><EOL>
*
:SECTION=RAPID_LEADIN_FROM_TOOL_CHANGE_MILL
:T:<G!:ABSINC><G!:work_coord><G!:00><X!><Y!><attri butes><EOL>


Thank you very much for your help