Fadal G Codes M Codes Fixed Subroutines

Fadal G Codes M Codes Fixed Subroutines etc. for cnc machinists who work on Fadal VMCs.

Fadal VMC 4020 with 88HS CNC Control

G Codes

G codeDescription
G0Rapid Travel
G1Linear Interpolation
G2Circular Interpolation (Clockwise)
G3Circular Interpolation (Counter Clockwise)
G4Dwell P= Time in Milliseconds
Also: Non Modal In-position Check
G5Non Modal Rapid Travel
G8Accelerate (No Feed Ramps)
G9Decelerate (Feed Ramps)
Also: In Position Check
G10Programmable Data Input
L02= Fixture X, Y, Z, A, B, P= 0, 1-48
L10= Length, P= 1-99, R0= Amount
L12= Diameter, P= 1-99, R0= Amount
L13= Read Fixture, P= 1-24, R0= Z, R1= X, R2= Y
L14= Read Length, P= 1-99, R0= Amount
L15= Read Diameter, P= 1-99, R0= Amount
L100 to L109= R Values, P= Amount
G15YZ Circular Interpolation with the A Axis
G17XY Plane Selection
Also: Y Axis Cam Wrapping
Q= A Axis Ratio/ [5p (cam dia. in inches)]
Q= A Axis Ratio/ [(5/25.4p (cam dia. in mm)]
P0= A Axis, P1= B Axis
G17.1A/B Word Swap On
G17.2A/B Word Swap Off
G18ZX Plane
G19YZ Plane
G20Check for Inch Parameter Setting
G21Check for Metric Parameter Setting
G28Return to Zero
G28.1Return from Jog Away
G29Return from Zero
G31Probe Touch Function
G31.1Probe No Touch Function
G40Cutter Radius Compensation Cancel
G41Cutter Radius Compensation Left (climb)
G42Cutter Radius Compensation Right (conve.)
G43Tool Length Compensation Positive
G44Tool Length Compensation Negative
G45Tool Length Offset Single Expansion
G46Tool Length Offset Single Reduction
G47Tool Length Offset Double Expansion
G48Tool Length Offset Double Reduction
G49Tool Length Offset Cancel
G50Ramp Slope Control Cancel
G50.1Mirror Image Cancel
G51Ramp Slope Control
R0= Ramp Speed Value of .5 – 2.
R0+= Z Axis, R0-= XY Axis
G51.1Mirror Image
G51.2Tool Load Compensation
State Feed Rate Before the G51.2 Line
R1= Target Spindle Load
R2= Min. Percentage Feed Rate Reduction
R3= Max. Percentage Feed Rate Increase
R4= Time at Min. Feed Rate to Initiate Slide Hold
G51.3Axis Scaling
R1= Program (All three axes)
R2= X
R3= Y
R4= Z
G52Coordinate System Shift
G53Use Machine Coordinate System
G54-59Fixture Offsets 1-6
G66 Modal Subroutine Call
G67 Modal Subroutine Cancel
G68 Rotation (R0= Angle, XY= Center of Rotation)
G69 Rotation Cancel
G70 Check for Inch Parameter
G71 Check for Metric Parameter
G73Peck Drill
Q= Peck Size
P= Feed Distance before next Peck (optional)
I= Initial Peck
J= Reducing Value for Subsequent Pecks
K= Minimum Peck Size
G74Left Hand Tap
Format 1 Q= Thread Lead (1/pitch), F= RPM
Format 2 S= RPM, F= Feed (Lead * RPM)
G74.1Left Hand Rigid Tap
Format 1 Q= Thread Lead (1/pitch), F= RPM
Format 2 S= RPM, F= Feed (Lead * RPM)
G74.2Prepare for G74.1
G75Tapping Head Cycle
Format 1 Q= Thread Lead (1/pitch), F= RPM
Format 2 S= RPM, F= Feed (Lead * RPM)
G76Fine Boring
Q= Amount of Y+ Shift or
I= Amount & Direction of X Shift
J= Amount & Direction of Y Shift
G80Fixed Cycle Cancel
G81 Drill, Spot Drill
G82Center Drill, Counterbore
P= Dwell Time in Milliseconds
180,000/RPM= Dwell time for 3 revolutions
G83Deep Hole Cycle
Q= Peck Size
P= Feed Distance before next Peck (optional)
I= Initial Peck
J= Reducing Value for Subsequent Pecks
K= Minimum peck Size
G84Right Hand Tap
Format 1 Q= Thread Lead (1/pitch), F= RPM
Format 2 S= RPM, F= Feed (Lead * RPM)
G84.1Right Hand Rigid Tap
Format 1 Q= Thread Lead (1/pitch), F= RPM
Format 2 S= RPM, F= Feed (Lead * RPM)
G84.2Prepare for G84.1
G85Bore In / Out
G86Bore In / Spindle Off / Rapid Out
G87Bore In / Out
G88Bore In / Dwell / Out, P= Milliseconds
G89Bore In / Dwell / Out, P= Milliseconds
G90Absolute Positioning
G91Incremental Positioning
G91.1High Speed Execution (-2 System Only)
G91.2High Speed Execution Cancel
Also: Binary Compress / Analyzer End Point
G91.3Binary Compress / Analyzer Start Point
G92Absolute Preset
G931/T Feed Rate Specification (Inverse Time)
G94Feed Rate Specification DPM, IPM
G98Return to Initial Plane
G99Return to R0 Clearance Plane

M Codes

M codeDescription
M0Program Stop
M1Optional Stop
M2End of Program
M3Spindle On Clockwise
M3.1Sub–Spindle On Ignore Magnet CW
M3.2Acknowledge Spindle Magnet
M4Spindle On Counter Clockwise
M4.1Sub–Spindle On Ignore Magnet CCW
M4.2Acknowledge Spindle Magnet
M5Spindle Off
M6Tool Change
M7.1Servo Coolant On
M8Coolant On
M8.1Servo Coolant On
M9Coolant Off
M10Cancel Reciprocation
M11X Axis Reciprocation
M12Y Axis Reciprocation
M13Z Axis Reciprocation
M14B Axis Reciprocation
M15A Axis Reciprocation
M16C Axis Reciprocation
M17End of Subroutine
M18Cycle Cushman Indexer
M19Spindle Stop/Orient
M20Cycle General Purpose Indexer
Also: Automatic Doors Close
Also: Toggle On/Off Hydrosweep
M30End of all Subroutines
Also: End of Program (Format 2)
M31Exchange Pallets
M32Store/Load Pallet A
M32.1Load and Verify Pallet A
M33Store/Load Pallet B
M33.1Load and Verify Pallet B
M41Low Range RPM
M42High Range RPM
M45Execute Fixed Cycle
M46Positive Approach On
M47Cancel Positive Approach
M48Feed Rate and RPM Pot Active
M48.1Servo Coolant Pot Active
M48.2Dual Rotary Pot Active Pallet A
M48.3Dual Rotary Pot Active Pallet B
M49Feed Rate and RPM Pot Inactive
M49.1Servo Coolant Pot Inactive
M49.2Dual Rotary Pot Inactive Pallet A
M49.3Dual Rotary Pot Inactive Pallet B
M60-69User Attached Devices
M60 A Axis Brake On M65 TS-20 Probe Active
M61 A Axis Brake Off M66 MP-12 Probe Active
M62 B Axis Brake On M67 Laser Probe Active
M63 B Axis Brake Off M68 Delta Motor
M64 MP Probe Active M69 Wye Motor
M80Automatic Doors Open
M81Automatic Doors Close
M90Default Gain (from SV Command)
M90.1Advanced Feed Forward Gain Enable P=Gain (50-250)
M91Normal Gain
M92Intermediate Gain
M94Feed Forward
P= Angle Tolerance
Q= Line Length (Moves less than this not checked)
Example: M94 P91 Q.002
M94.1Feed Forward by Feed Rate Modification
State Feed Rate Before M94.1 Line
P= Angle
Q= Percentage change each modification
R0+= Min. Feed Rate Modification
R1+= Length to ignore M94.1
R2+= Modify feed every, this angle, from P
Example: M94.1 P170 Q10. R0+50. R1+1. R2+15.
M94.2Advanced Feed Forward On,
P= Ramp, Q= Detail Window
M95Feed Forward Cancel
M95.1Feed Forward Modify Cancel
M95.2Advanced Feed Forward Cancel
M96Roll CRC
M97Intersectional CRC
M98Execute Sub Program
P= Program #
L= # of Repetitions
M99End of Sub Program
Also: Line Jump, P= Line #, Example: M99 P#

Fixed Subroutines

SubroutinesDescription/Parameters
L9101Probe Functions
R1+1-10, See User’s Manual for details
L9201Engraving:
R1+0= Standard font
R1+1= Stencil font
R1+2= Serialized standard
R1+3= Serialized stencil
R2+= Height of letters
R3+= Angle of word
R4+= Serial increment
R0= Clearance plane Z= Final depth F= Feed rate
L93NNBolt Circle
R0= 1 (incremental X distance and direction from 1st position to center)
R1= J (incremental Y distance and direction from 1st position to center)
R2= Angular step between holes (+ angles for CCW, – angles for CW)
NN= Amount of holes
L94NNMill Boring cycle CCW:
R0+= Feed, R1+= Diameter of hole, NN= Repetitions
L95NNMill Boring cycle CW:
R0+= Feed, R1+= Diameter of hole, NN= Repetitions
L9601Rectangular pocket CCW:
R0+= Feed, R1+= Corner radius on tool, R2+= X, R3+= Y
L9701Rectangular pocket CW:
R0+= Feed, R1+= Corner radius on tool, R2+= X, R3+= Y
L9801Circular pocket CCW:
R0+= Feed, R1+= Corner radius on tool, R2+= Diameter of hole
L9901Circular pocket CW:
R0+= Feed, R1+= Corner radius on tool, R2+= Diameter of hole

NC Word Summary

NC Word SummaryDefinition
AA axis angular motion command (or optional Servo Coolant)
BB axis angular motion command
CC axis angular motion command
DTool diameter offset
EFixture offset
FFeed rate, or spindle speed for tapping
GPreparatory function
HTool length offset or Length and diameter offset for Format 1
IX axis distance to arc center or Initial peck size for drilling (G73 G83) or X axis shift in boring cycle (G76) JY axis distance to arc center or Reducing value of the initial peck (G73, G83) or Y axis shift in boring cycle (G76)
JY axis distance to arc center or Reducing value of the initial peck (G73, G83) or Y axis shift in boring cycle (G76)
KZ axis distance to arc center or Minimum peck size for drilling (G73, G83)
LSubroutine definition or call or Subprogram repeat function (M98) or Programmable data input function (G10) or Line repeat function or Fixed cycle repetitions
MMachine function code
NProgram sequence number
OProgram identification number
PDwell time in milliseconds (G04) or Percentage factor for retracting feed on tapping cycles or Fixture and tool offset number (G10) or Subprogram number (M98) or Value for R0-R9 (G10) or Sequence/ line number jump (M99) or Feed distance before peck (G73 G83) or P1 with G17 Q to use B axis during mapping or Angular tolerance for Feed Forward
QPeck size in drill cycles (G73, G83) or Thread lead in tapping cycles (G74, G75, G84) or Diameter for automatic tool diameter override (H99) or Scale factor for Flat Cam programming on the rotary table or Length tolerance to ignore Feed Forward
RSubroutine parameter input R0 through R9 R0 Plane for fixed cycle or Radius designation (circular interpolation, G2 & G3) or Tool offset value amount (G10) Parametric Variables R0, R1 – R9
SSpindle speed (RPM)
S.1Set belt range to low
S.2Set belt range to high
TTool number selector for turret
VVariables in Macros (V1-V100)
XX axis motion command
YY axis motion command
ZZ axis motion command

Character Summary

CharacterDefinition
0-9Numerical digits
A-ZAlphabetical characters
%Program start or end, rewind to start
+Plus, positive
Minus, negative
(Comment start (standard NC program), or Engraving text start (L9201 Fixed Subroutine), or Mathematical operator (Macro Programming)
.Decimal point
,Comma
EOBENTER key, carriage return / line feed (ASCII 13,10)
*Comment start
/Optional block skip
:Program identification number (Format 2)
#Macro Line Identification