Ok, more newb questions. I appreciate all the help you guys are providing.


I want the spindle to lift up 50mm when I hit start. At the moment I set the workpiece zero and hit start and then it moves dragging the bit across the workpiece.

I added this z50 to the "init tool change" section, however it lifts the Z to the limit rather than just 50mm - in G-code to lift the z 50mm I just write z50, but how do I write it in the UPG?

:T:<N><TOOL_COMMENT><EOL>
:T:<N><T><M:06><EOL>
:T:<N><G:00><Z50><EOL>
:T:<N><S!><M!:SPINDLE_DIR><EOL>

Next question, because I've added it here, I think it'll do it at every tool change, so where should I actually be adding it, I want it to lift at the beginning, just before the spindle starts.

Here is my default "start of tape", should I have it in here?

:T:O<"%4LT": program_number><EOL>
:T:<N><G:17><G!:ENGMET><G!:40><G!:80><EOL>

Next question, I've added this M:05 to the end of tape to turn the spindle off - at the moment when the workpiece is finished, the spindle lifts, moves to the machine zero and then the spindle turns off, I want the spindle to turn off before it returns to zero (safety first)

:T:<N><G:00><G:91><G:28> Z0<EOL>
:T:<N><M:05><G:28> X0 Y0<EOL>
:T:<N><M:30><EOL>

So why isn't this working? Or do I need to add it somewhere else? All the G-Code still looks cryptic to me.

Is there anything else I need to add that I haven't thought of yet that is just good machining practice or things that are advisable? I'm modifying a generic fanuc to run on Mach3.

Thanks in advance.