Background
PathPilot is a dedicated machine controller designed specifically for Tormach machine tools. It shares common code with the open source LinuxCNC project, with Tormach specific additions. If your CAM system already supports a LinuxCNC post, this would be a good starting point for a PathPilot post.
PathPilot control implements 98 percent of the Fanuc standard. The entire list of supported codes is located below.
Deviations from Fanuc G-code
Mill/Router
G07, G09 not supported
G12, G13 pocketing canned cycles are not supported
G52 local coordinate system offset is not supported. See G92 below
PathPilot supports G54 – G59, G59.1, G59.2, and G59.3 as well as G54.1 P1 - P500 (G54.1 P2 = G55) for work offset systems
G74 tapping cycle for left-hand threads is not supported
G87, G88 boring cycles are not supported
The number of tool offsets for mills is 1000
Tool changes are expressed as either “Txx M06” or “M06 Txx” on one line or by “Txx” and “M06” on separate lines
It is recommended to set the machine to path blending mode for most situations with G64. “G64” is equivalent to “G64 P0.005” and is recommend to be set on a separate line at the beginning of a program.
For roughing toolpaths P can be increased and Q can be specified. There are greatly diminishing returns setting Q larger than 0.002
Lathe
Diameter mode only – PathPilot does not allow programming in radius values
G07, G09 are not supported
PathPilot uses G33.1 in place of G32 for spindle-synched moves
G50 max RPM in CSS is not supported. See G96 below for max CSS rpm
G75 peck groove is not supported. Instead program G73 for chip break
G70-73 roughing cycles not supported
The number of tool offsets for lathes is 99
Tool changes are expressed as “Txx” or “Txxnn”
“Txx” of the tool call will both call the tool number and apply the geometry offset
“nn” of the tool call will call the wear offset
If a turret is installed calling tools 1-8 will automatically command the turret to rotate to pocket 1-8
If additional tools are installed in a given pocket, you must first call that pocket (eg, “T07”) and then call the desired tool offset (eg, “T1717”)
If a quick change tool post (QCTP) is installed an M0 or other break for the tool change is not needed, PathPilot will automatically pause at the tool call for a manual tool change
Miscellaneous
It is highly recommended to include a G30 command before a tool change.
Cancelling a canned cycle with G80 also cancels the motion mode. This means that you must explicitly call a G00 or G01 after cancelling a canned cycle before using axis values on a line.
G28/G30 moves cannot be made in G91 – machine must be in G90 before a G28 or G30 is executed
G41/G42 cutter compensation entry move must be a straight G01 move and must be greater than the tool radius
Characters such as “$” or “%” at the beginning/end of a program should not be used
End of block characters, “;”, should not be used
Sample Programs
Sample mill/router program
Sample lathe program
Sample plasma program
PathPilot Supported G and M Codes
G Codes
Motion | Name | Description | Supported Machines | |||
---|---|---|---|---|---|---|
Mill | Router | Lathe | Plasma | |||
G0 | Rapid Motion | This command produces coordinated motion to the destination point at the rapid traverse rate. Axis words (X, Y, Z, or A) are optional, except that at least one must be used. | X | X | X | X |
G1 | Coordinated Motion | This command produces coordinated motion to the destination point at the specified traverse rate. Axis words (X, Y, Z, or A) are optional, except that at least one must be used. If a feed rate (F) is not specified on the line with G1, one must have been previously specified. | X | X | X | X |
G2 | Coordinated Helical Motion CW | This command produces coordinated motion to the destination point in a clockwise circular or helical arc at the specified traverse rate. | X | X | X | X |
G3 | Coordinated Helical Motion CCW | This command produces coordinated motion to the destination point in a counter clockwise circular or helical arc at the specified traverse rate. | X | X | X | X |
G4 | Dwell | This command produces a period of no activity for the amount of time specified by the P argument (P is specified in seconds). | X | X | X | X |
G10 L1 | Set Tool Table (Absolute) | This command sets the tool table entry of the tool specified by P to the value of the given arguments. P - tool number R - radius of the tool I - front angle (lathe) J - back angle (lathe) Q - tip orientation (lathe) | X | X | X | X |
G10 L2 | Set Coordinate System (Absolute) | This command sets the origin of the specified coordinate system to the value of the given arguments. P - coordinate system (1-500) X, Y, Z, A - axes R - rotation about the Z axis (degrees) | X | X | X | X |
G10 L10 | Set Tool Table | This command sets the tool table entry of the tool specified by P so that the current coordinates become the given arguments. P - tool number R - radius of the tool I - front angle (lathe) J - back angle (lathe) Q - tip orientation (lathe) | X | X | X | X |
G10 L20 | Set Coordinate System | This command sets the origin of the specified coordinate system so that the current coordinates become the given arguments. P - coordinate system (1-500) X, Y, Z, A - axes R - rotation about the Z axis (degrees) | X | X | X | X |
G15 | Workpiece Probe | This command will move the Z axis in a probing move towards the workpiece. The ohmic sensor or Z axis touch piece will trigger the end of the probing move depending on machine settings. | - | - | - | X |
G16 | Pierce | This command will move the Z axis to the parameter #<_PierceHeight> in G53 coordinates then command the plasma source to pierce a workpiece. | - | - | - | X |
G17 | Set Plane | This command will set the current plane to XY . | X | X | X | X |
G18 | Set Plane | This command will set the current plane to ZX. | X | X | X | X |
G19 | Set Plane | This command will set the current plane to YZ. | X | X | X | X |
G20 | Set Units | This command will set units to inches. | X | X | X | X |
G21 | Set Units | This command will set units to millimeters. | X | X | X | X |
G28 | Return to Predefined Position | This command will make a rapid move in G53 coordinate to the position specified by the values of parameters 5161-5166 (default 0s). If an X, Y, Z, or A value is given in conjunction with a G28 command the axis values will be treated as an offset from the G28 position to move to. The machine will first move to the offset position, then move to the final G28 position. Cutter compensation must be disabled during G28 moves. | X | X | X | X |
G28.1 | Return to Predefined Position | This command will store the current location in G53 coordinates to the parameters 5161-5166. | X | X | X | X |
G30 | Return to Predefined Position | This command will make a rapid move in G53 coordinate to the position specified by the values of parameters 5181-5186 (default 0s). If an X, Y, Z, or A value is given in conjunction with a G30 command the axis values will be treated as an offset from the G30 position to move to. The machine will first move to the offset position, then move to the final G30 position. Cutter compensation must be disabled during G30 moves. | X | X | X | X |
G30.1 | Return to Predefined Position | This command will store the current location in G53 coordinates to the parameters 5181-5186. | X | X | X | X |
G33.1 | Spindle Synchronized Motion | This command will synchronize the motion of the specified axis to the spindle rotation (only Z should be specified). An optional I argument can be used to command a different spindle speed for return. Use of an I argument will result in the starting plane being overshot during return by the distance multiplied by the I value. Peck tapping can be commanded by programming successive G33.1 cycles at increasing depths. For each G33.1 cycle the starting Z position should be identical. K - distance moved per spindle revolution I - spindle return speed multiplier | X | - | - | - |
G37 | Tool Measurement | This command will start a tool length measurement or tool breakage cycle. H and P arguments are optional. H - specifies the tool length offset to store (if not specified the current active offset will be used) P - existence commands a tool breakage check. The P value specifies the tolerance from the stored offset that is acceptable. | X | - | - | - |
G37.1 | Tool Measurement | This command will rapid move the Z axis to the G53 Z0 location, rapid move to the stored X and Y ETS coordinates, then rapid move to the stored Z ETS coordinate. | X | - | - | - |
G38.2 | Straight Probe | This command probes towards the workpiece, stops on contact, and signals an error if no contact is made. At least one axis word must be specified. | X | X | - | - |
G38.3 | Straight Probe | This command probes towards the workpiece and stops on contact. At least one axis word must be specified. | X | X | - | - |
G38.4 | Straight Probe | This command probes towards the workpiece, stops on loss of contact, and signals an error if contact is not lost. At least one axis word must be specified. | X | X | - | - |
G38.5 | Straight Probe | This command probes towards the workpiece and stops on loss of contact. At least one axis word must be specified. | X | X | - | - |
G40 | Cutter Compensation | This command will turn cutter compensation off. | X | X | X | X |
G41 | Cutter Compensation | This command turns cutter compensation on on the left side of the programmed tool path, with an optional D argument for the tool offset to use. If D is not specified the active tool offset is used. | X | X | X | X |
G41.1 | Dynamic Cutter Compensation | This command turns dynamic cutter compensation on on the left side of the programmed tool path, identical to G41 except with the D argument calling out the tool diameter. | X | X | X | X |
G42 | Cutter Compensation | This command turns cutter compensation on on the right side of the programmed tool path, with an optional D argument for the tool offset to use. If D is not specified the active tool offset is used. | X | X | X | X |
G42.1 | Dynamic Cutter Compensation | This command turns dynamic cutter compensation on on the left side of the programmed tool path, identical to G41 except with the D argument calling out the tool diameter. | X | X | X | X |
G43 | Tool Offset Selection | This command applies the tool offset number specified by an H argument. For plasma, this should always be set to H1. | X | - | X | X |
G47 | Engrave Sequential Serial Number | This command will engrave a serial number into a part, incrementing from an internal counter in PathPilot. Z - depth of cut of engraving R - retract height between numbers X - the starting X position, or the left side of the serial number – if omitted, the current X position is assumed. Y - the starting Y position, or the bottom side of the serial number – if omitted, the current Y position is assumed. P - the X extent (width) in current units (inches or millimeters) of the engraved number Q - the Y extent (height) in current units (inches or millimeters) of the engraved number D - the requested number of decimals of the engraved number – if the requested D value exceeds the number of decimals in the serial number, the serial number will show leading zeros. If the requested D value is less than the number of decimals in the serial number, only the digits of the serial number will show. Cutter comp must be disabled before calling G47. | X | X | - | - |
G49 | Tool Offset Cancellation | This command cancels a tool length offset. | X | X | X | X |
G53 | Work Coordinate | This command sets the machine to move in machine coordinates. Non-modal. At least one axis word must be specified. | X | X | X | X |
G54 | Work Coordinate | This command sets the machine to move in the first work coordinate. Modal. | X | X | X | X |
G54.1 | Work Coordinate | This command sets the machine to move in the work coordinate specified with a P value. Modal. G54.1 P1 is equivalent to G54, etc. | X | X | X | X |
G55 | Work Coordinate | This command sets the machine to move in the second work coordinate. Modal. | X | X | X | X |
G56 | Work Coordinate | This command sets the machine to move in the third work coordinate. Modal. | X | X | X | X |
G57 | Work Coordinate | This command sets the machine to move in the forth work coordinate. Modal. | X | X | X | X |
G58 | Work Coordinate | This command sets the machine to move in the fifth work coordinate. Modal. | X | X | X | X |
G59 | Work Coordinate | This command sets the machine to move in the sixth work coordinate. Modal. | X | X | X | X |
G59.1 | Work Coordinate | This command sets the machine to move in the seventh work coordinate. Modal. | X | X | X | X |
G59.2 | Work Coordinate | This command sets the machine to move in the eighth work coordinate. Modal. | X | X | X | X |
G59.3 | Work Coordinate | This command sets the machine to move in the ninth work coordinate. Modal. | X | X | X | X |
G61 | Exact Stop Mode | This command sets the machine to move in exact stop mode where the machine will move to each point in a program, stop, and then begin to move to the next point. If two moves are exactly co-linear the movement will not stop during transition from the first point to the second point. | X | X | X | X |
G64 | Path Blending Mode | This command sets the machine to move in path blending mode where an allowed deviation from the programmed path is allowed based on option P and Q arguments. G64 without P or Q arguments commands the best possible speed to be maintained no matter how far from the programmed point motion would be. If G64 is specified with no arguments it is equivalent to “G64 P.005”. P - allowable deviation from the programmed path Q - naive cam detector. Commanded points less than Q from a straight line will be deleted and motion segments will be combined into a single path G64 must be specified in inch units, not metric. | X | X | X | X |
G73 | Peck Drilling Cycle | This cycle drills a hole with peck retracts of .01”/.254 mm. X - the X starting location to begin the cycle Y - the Y starting location to begin the cycle Z - the Z location to drill to R - the retract plane to end the cycle Q - the Z increment for pecks to be applied at F - the feed rate to drill at | X | - | - | - |
G76 | Lathe Threading Cycle | This cycle cuts an ID or OD thread in multiple passes. | - | - | X | - |
G80 | Cancel Canned Cycles | This command cancels all canned cycles. | X | X | X | X |
G81 | Drilling Cycle | This cycle is intended to drill a hole. X - the X starting location to begin the cycle Y - the Y starting location to begin the cycle Z - the Z location to drill to R - the retract plane to end the cycle Q - the Z increment for pecks to be applied at F - the feed rate to drill at L (optional) - specifies the number of times that the cycle should be run. Can be used in either absolute or incremental mode. | X | X | - | - |
G82 | Drilling Cycle With Dwell | This cycle is identical to the G81 cycle except that it adds a P value (specified in seconds) to dwell at the bottom of the hole. | X | X | - | - |
G83 | Peck Drilling Cycle | This cycle is identical to the G73 cycle except that the retract is to the coordinate specified by R. | X | X | - | - |
G84 | Tapping Cycle | This cycle is intended to tap a hole. X - the X starting location to begin the cycle Y - the Y starting location to begin the cycle Z - the Z location to tap to R - the retract plane to end the cycle P (optional)- the number of seconds to dwell at the Z location F - the feed rate to tap at Spindle speed must be specified before a G84 cycle. | X | - | - | - |
G85 | Boring/Reaming Cycle | This cycle is identical to the G81 cycle except that the retract is performed at the F feed rate, not the rapid traverse rate. | X | X | - | - |
G86 | Boring Cycle | This cycle is identical to the G82 cycle except that after the dwell and prior to the retract the spindle is turned off . | X | X | - | - |
G88 | Boring Cycle | This cycle is identical to the G82 cycle except that after the dwell and prior to the retract the spindle is turned off and the program is paused so the operator can retract the spindle manually. | X | X | - | - |
G89 | Boring Cycle | This cycle is identical to the G82 cycle except that after the dwell and prior to the retract the spindle is turned off and the retract is is performed at the F feed rate, not the rapid traverse rate. | X | X | - | - |
G90 | Distance Mode | This command specifies absolute distance mode. | X | X | X | X |
G90.1 | Distance Mode | This command specifies absolute distance mode for arc offsets. | X | X | X | X |
G91 | Distance Mode | This command specifies incremental distance mode. | X | X | X | X |
G91.1 | Distance Mode | This command specified incremental distance mode for arc offsets. | X | X | X | X |
G92 | Coordinate System Offset | This command specifies a global offset shift such that the current position has the values given. All work offsets are shifted, not only the active work offset. At least one axis must be specified. The values of a G92 shift are stored in parameters #5211-5219. | X | X | X | X |
G92.1 | Coordinate System Offset | This command disables any active G92 offsets and clears the offset from parameters #5211-5219. | X | X | X | X |
G92.2 | Coordinate System Offset | This command disables any active G92 offsets but does not clear the offset from parameters #5211-5219. | X | X | X | X |
G92.3 | Coordinate System Offset | This command reenables a G92 offset with the values stored in parameters #5211-5219. | X | X | X | X |
G93 | Feed Rate Mode | This command specified inverse time mode where the feed rate specified by F commands the machine to complete the move in 1/F minutes. G0 moves are not effected by inverse time mode. | X | X | X | X |
G94 | Feed Rate Mode | This command specifies units per minute mode where the feed rate specified by F commands the machine to complete the move by moving F inches/mm/degrees per minute. | X | X | X | X |
G95 | Feed Rate Mode | This command specifies units per revolution mode where the feed rate specified by F commands the machine to complete the move by moving F inches/mm per spindle rotation. | - | - | X | - |
G96 | Spindle Control Mode | This command specifies that the spindle will rotate in constant surface speed mode according to the surface speed set by S (required). D (optional) - sets the maximum spindle speed. | - | - | X | - |
G97 | Spindle Control Mode | This command specifies that the spindle will rotate in RPM mode according to the RPM set by S. | X | X | X | - |
G98 | Canned Cycle Return | This command specifies that the canned cycle should be cancelled and that the machine should return to the Z position that the machine was in last before the canned cycle was started if that Z position is lower than the position specified by the R word. | X | X | X | - |
G99 | Canned Cycle Return | This command specifies that the canned cycle should be cancelled and that the machine should return to the position specified by the R word of the canned cycle. | X | X | X | - |
M Codes
Command | Name | Description | Supported Machines | |||
---|---|---|---|---|---|---|
Mill | Router | Lathe | Plasma | |||
M0 | Program Stop | This command temporarily stops the program, regardless of the status of the optional stop button setting. To resume the program the cycle start button must be pressed. | X | X | X | X |
M1 | Optional Program Stop | This command temporarily stops the program when the optional stop button is enabled. To resume the program the cycle start button must be pressed. | X | X | X | X |
M2 | Program End | This command ends the program but does not rewind to the beginning of the program for restart. | X | X | X | X |
M3 | Rotate Spindle CW | This command turns the spindle on to rotate clockwise at the RPM specified by a S command. | X | X | X | - |
M4 | Rotate Spindle CCW | This command turns the spindle on to rotate counter-clockwise at the RPM specified by a S command. | X | X | X | - |
M5 | Stop Spindle Rotation | This command turns the spindle off. | X | X | X | - |
M6 | Tool Change | This command begins a tool change sequence. The tool to change to must have been previously specified by a T command, but the T call can be on a previous line. If the current or called tool is not stored in the ATC, or there is not an ATC installed, the machine will prompt the operator to remove the tool manually and continue once cycle start is pressed. If the current and called tools are stored in the ATC the tool change sequence will be completed automatically. It is recommended to specify a G43 command on the same line as a tool change. | X | X | - | - |
M7 | Mist Coolant On | This command turns mist coolant on. If a Smart Cool unit is installed additional functionality is possible with E/P/R/Q arguments (reference TD10422 if a Smart Cool is installed). | X | - | - | - |
M8 | Flood Coolant On | This command turns flood coolant on. If a Smart Cool unit is installed additional functionality is possible with E/P/R/Q arguments (reference TD10422 if a Smart Cool is installed). | X | - | X | - |
M9 | All Coolant Off | This command turns both mist and flood coolant off. | X | - | X | - |
M10 | Collet Closer Unclamp | This command unclamps the collet closer. OD/ID clamping is selected in PathPilot. | - | - | X | - |
M11 | Collet Closer Clamp | This command clamps the collet closer. OD/ID clamping is selected in PathPilot. | - | - | X | - |
M19 | Spindle Orient | This command orients the spindle to a specified position. R and Q arguments are required to be specified. R - position to rotate from 0 degrees. Q - Number of seconds This command is not able to be commanded to perform broaching operations! | X | - | - | - |
M30 | Program End and Rewind | This command ends the program and rewinds to the beginning of the program for restart. | X | X | X | X |
M48 | Enable Speed/Feed Rate Override | This command enables both spindle speed and feed rate overrides. | X | X | X | X |
M49 | Disable Speed/Feed Rate Override | This command disables both spindle speed and feed rate overrides. | X | X | X | X |
M50 | Enable/Disable Feed Override | This command enables only the feed rate override when entered with a “P1” argument or disables the feed rate override when entered with a “P0” argument. | X | X | X | X |
M51 | Enable/Disable Speed Override | This command enables only the spindle speed override when entered with a “P1” argument or disables the spindle speed override when entered with a “P0” argument. | X | X | X | X |
M61 | Set Tool Number | This command sets the current tool number to that specified with a Q parameter. Use of this command is discouraged in favor of M6. | X | X | X | X |
M64 | Turn On Output | This command turns on a digital output of a USB IO module (reference TD10163 if a USB IO module is installed). | X | X | X | X |
M65 | Turn Off Output | This command turns off a digital output of a USB IO module (reference TD10163 if a USB IO module is installed). | X | X | X | X |
M66 | Wait On Input | This command will wait until the specified state of a digital input of a USB IO module is seen (reference TD10163 if a USB IO module is installed). | X | X | X | X |
M70 | Save Modal State | This command saves the current modal state of the following commands:
| X | X | X | X |
M71 | Invalidate Saved Modal State | This command deletes the saved state from the last M70 command. | X | X | X | X |
M72 | Restore Save Modal State | This command restores the saved state from the last M70 command. | X | X | X | X |
M73 | Restore Saved Modal State In Subprogram | This command is used in an o-word subroutine and saves the current modal state from the calling program and automatically restores the modal state when the subroutine is finished. | X | X | X | X |
M98 | Call Subroutine | This command calls a numbered internal subprogram, eg “M98 O100 L10”. O - specifies the subprogram to run, equivalent to “o100 sub”. Required. L - specifies the number of times to run the subprogram. Optional, if not specified the subprogram will be run once. | X | X | X | X |
M99 | Return From Subroutine/Repeat | This command A) returns from a numbered internal subroutine if an M98 is specified in the program or B) if no M98 is specified in the program it will rewind the program to the beginning to create an endless loop. If an M98 is specified in a program M99 must placed at the end of the o-word subroutine and M98 must be specified before the o-word subroutine. | X | X | X | X |
M301 | Camera Control | This command begins a video recording by an attached camera. | X | X | X | X |
M302 | Camera Control | This command ends a video recording by an attached camera. | X | X | X | X |
M303 | Camera Control | This command takes a picture with an attached camera. | X | X | X | X |
Other Codes
Command | Name | Description | Supported Machines | |||
---|---|---|---|---|---|---|
Mill | Router | Lathe | Plasma | |||
F | Feed Rate | This command specifies the feed rate that the axes should move at during G1/G2/G3 moves. For linear moves specified in inches per minute (when G20 is active) or millimeters per minute (when G21 is active). For rotary moves specified in degrees per minute. | X | X | X | X |
S | Spindle Speed | This command specifies the speed the spindle will rotate at. Specified in revolutions per minute. | X | X | X | - |
T | Tool Number | This command specifies the tool number to be used in a tool change command (M6). | X | X | X | X |
/ | Block Delete | This command specifies that any code on the same line following “/” will be skipped when block delete is on. PathPilot 2.10 or later must be installed to be able to toggle block delete on/off. | X | X | X | X |
0 Comments