Program, Set Up, and Operate CNC and EDM Equipment
Red Seal Practice study guide with diagrams.
Programming, Setting Up, and Operating CNC and EDM Equipment
Introduction to Numerical Control and Electrical Discharge Machining
The modern Tool and Die Maker must master two families of computer-controlled machines: CNC (Computer Numerical Control) machining centers and EDM (Electrical Discharge Machining) machines. These machines make it possible to achieve tolerances on the order of ±0.005 mm and surface finishes of 0.2 µm Ra, which are impossible to obtain with conventional machining.
The reference standard for machine tools in Canada is CSA B149.1 (Canadian Electrical Code, Part I) for electrical aspects, and ISO 6983 (G and M codes) for programming. The Red Seal exam requires a thorough understanding of operating principles, cutting parameters, fixed cycles, and setup procedures.
Fundamental Principles of CNC Machines
Coordinate Systems and Axes
A CNC machine uses a Cartesian coordinate system. The main axes are:
The machine reference point (home position) is the absolute origin point of the machine, generally detected by limit switches or encoders. The work zero point is defined by the operator using a probe, dial indicator, or a preset tooling system.
Essential rule: the work offset (G54 to G59) must be verified before every operation. An error of 0.01 mm on the offset can result in scrapping a precision part.
Types of CNC Machines in Tool and Die Making
| Machine Type | Axes | Typical Applications | Typical Accuracy |
|---|---|---|---|
| Vertical Machining Center (VMC) | 3 to 5 axes | Dies, punches, plates | ±0.005 mm |
| Horizontal Machining Center (HMC) | 4 to 5 axes | Complex molds, prismatic parts | ±0.008 mm |
| CNC Lathe | 2 to 3 axes | Ejectors, cylindrical cores | ±0.005 mm |
| CNC Grinding Machine | 3 axes | Cutting surfaces, ground punches | ±0.002 mm |
| Wire EDM Machine | 4 to 5 axes | Precision cutting, complex shapes | ±0.003 mm |
| Sinker EDM Machine | 3 axes | Mold cavities, internal shapes | ±0.005 mm |
CNC Programming: G and M Codes
Program Structure
A CNC program follows the ISO 6983 standard (formerly RS-274D). Each block (line) contains addresses followed by numerical values. The typical structure:
O0001 (PROGRAM NUMBER 1)
N10 G90 G21 G17 G40 G49 G80
N20 G54
N30 M06 T01 (TOOL CHANGE)
N40 S1200 M03
N50 G43 H01 Z50.0
N60 G00 X0 Y0
N70 G01 Z-5.0 F100
...
N100 M30
Essential G Codes for the Tool and Die Maker
| Code | Function | Details and Pitfalls |
|---|---|---|
| G00 | Rapid positioning | Do not cut in G00; non-linear path |
| G01 | Linear interpolation | Feed rate F in mm/min |
| G02/G03 | Circular interpolation (CW/CCW) | Requires I, J, K or R; check direction |
| G17/G18/G19 | XY/XZ/YZ plane | G17 is the default; change for helical machining |
| G20/G21 | Inches/millimeters | **Frequent error**: forgetting G21 at the start of a program |
| G28 | Return to reference point | Always retract the tool before G28 |
| G40/G41/G42 | Cutter radius compensation | G41 = left, G42 = right; check cutting direction |
| G43/G44 | Tool length compensation | G43 = positive, G44 = negative; use H |
| G54-G59 | Work coordinate offsets | Verify the correct offset is active |
| G73/G83 | Drilling cycle (chip breaking/peck) | G83 with Q = depth per pass |
| G76 | Rigid tapping cycle | Requires a compression tap holder |
| G80 | Cancel fixed cycle | Always cancel before a new positioning |
| G90/G91 | Absolute/incremental positioning | G90 is the default; G91 for repetitions |
| G94/G95 | Feed in mm/min or mm/rev | G95 for threading |
Essential M Codes
| Code | Function | Remarks |
|---|---|---|
| M00 | Program stop | Manual restart required |
| M01 | Optional stop | Active if the switch is engaged |
| M02 | End of program | Does not rewind |
| M03/M04 | Spindle clockwise/counterclockwise | M04 for left-hand tools |
| M05 | Spindle stop | |
| M06 | Tool change | Wait for complete spindle stop |
| M08/M09 | Coolant ON/OFF | Check pressure before machining |
| M30 | End of program with rewind | Return to the beginning of the program |
| M98/M99 | Subprogram call/return | Use for repetitions |
Cutting Calculations for CNC
The cutting speed (Vc) in m/min is calculated:
Vc = (π × D × N) / 1000
Where:
To find the rotational speed:
N = (Vc × 1000) / (π × D)
Example: 10 mm end mill in tool steel (Vc = 25 m/min):
N = (25 × 1000) / (π × 10) = 25000 / 31.42 = 796 rpm
The feed rate (F) in mm/min:
F = N × fz × Z
Where:
Example: 2-flute end mill, fz = 0.05 mm/tooth, N = 796 rpm:
F = 796 × 0.05 × 2 = 79.6 mm/min
Cutter Radius Compensation
Radius compensation (G41/G42) is mandatory for machining precise contours. The compensation radius D is entered in the offset table. The programmed path is that of the theoretical profile; the machine offsets the tool by radius D perpendicular to the path.
Compensation rules:
Classic pitfall: if the compensation radius is too large for the profile's radius of curvature, the machine generates an alarm (compensation interference). The solution is to reduce the D radius or modify the program.
Electrical Discharge Machining (EDM)
Physical Principles
EDM uses controlled electrical discharges to remove material. The principle relies on:
The discharge frequency varies from 1 kHz to 500 kHz depending on the desired finish. The capacitance (capacitor) controls the energy of each discharge.
Critical EDM Parameters
| Parameter | Symbol | Effect on Machining |
|---|---|---|
| Intensity (current) | I (A) | Material removal rate and roughness |
| Pulse duration | Ton (µs) | Crater depth |
| Pulse pause | Toff (µs) | Particle evacuation |
| Voltage | U (V) | Spark gap distance |
| Frequency | f (Hz) | Surface finish |
| Capacitance | C (µF) | Energy per discharge |
Fundamental relationship: surface roughness (Ra) is proportional to discharge energy:
Ra ≈ K × (I × Ton)^(1/3)
Where K is a constant depending on the material.
Types of EDM
Sinker EDM
The electrode (generally graphite or copper) is machined to the negative shape of the cavity. The electrode descends vertically into the workpiece.
Applications:
Electrodes:
Electrode wear: typical volumetric wear is 0.1 to 1% of the removed volume. For finishing operations, wear can reach 5 to 10%.
Wire EDM
A brass or copper wire (diameter 0.1 to 0.3 mm) passes through the workpiece. The wire is continuously unrolled and serves as the electrode.
Applications:
Wire-specific parameters:
Calculations for EDM
The machining time in sinker EDM:
T = V / (MRR)
Where:
The material removal rate depends on the intensity:
MRR ≈ K × I
Where K ≈ 0.5 to 2 mm³/min/A depending on the material and configuration.
Example: Cavity of 20 × 15 × 10 mm in hardened steel (K = 1.0 mm³/min/A) with I = 10 A:
V = 20 × 15 × 10 = 3000 mm³
MRR = 1.0 × 10 = 10 mm³/min
T = 3000 / 10 = 300 min = 5 hours
Pitfall: this calculation ignores finishing time (which is slower) and flushing time. The actual time is generally 1.5 to 2 times greater.
Setup and Operating Procedures
Machine Preparation
Work Offset Setup
The accuracy of the work offset determines the accuracy of the part. Methods:
| Method | Accuracy | Time | Risk |
|---|---|---|---|
| Dial indicator | ±0.01 mm | 5-10 min | Low |
| Electronic probe | ±0.002 mm | 2-3 min | Low |
| Manual contact (paper) | ±0.05 mm | 1 min | High |
| Laser preset system | ±0.001 mm | 30 s | Low |
Recommended procedure:
Program Verification
Before starting production, the operator must:
Safety and Standards
CNC Safety
EDM Safety
Applicable Canadian Standards
| Standard | Application |
|---|---|
| **CSA B149.1** | Canadian Electrical Code, Part I – electrical installations |
| **CSA Z460** | Lockout and control of hazardous energies |
| **CSA Z432** | Safeguarding of machinery |
| **ISO 6983** | CNC programming (G and M codes) |
| **ISO 230** | Machine tool accuracy testing |
Troubleshooting and Problem Solving
Common CNC Problems
| Symptom | Probable Cause | Solution |
|---|---|---|
| Rough surface | Cutting speed too high | Reduce N or increase F |
| Abnormal noise | Feed rate too high | Reduce F or increase N |
| Dimension out of tolerance | Incorrect work offset | Check G54 and compensations |
| Rapid tool wear | Speed too high or insufficient coolant | Reduce Vc, check M08 |
| Overload alarms | Excessive depth of cut | Reduce depth or number of passes |
| Incorrect tool path | Incorrect radius compensation | Check G41/G42 and D |
Common EDM Problems
| Symptom | Probable Cause | Solution |
|---|---|---|
| Melted electrode | Intensity too high or insufficient flush | Reduce I, increase Toff |
| Burned surface | Dirty dielectric | Change the filter, purge the tank |
| Slow machining speed | Incorrect water conductivity | Adjust conductivity (10-20 µS/cm) |
| Broken wire (wire EDM) | Wire tension too high or speed too slow | Reduce tension, increase speed |
| Workpiece deformation | Internal stresses | Machine in successive passes, plan supports |
Parameter Optimization
CNC Machining Strategies
For machining hardened tool steel (45-60 HRC):
| Operation | Vc (m/min) | fz (mm/tooth) | Depth (mm) | Coolant |
|---|---|---|---|---|
| Roughing (carbide end mill) | 60-80 | 0.05-0.10 | 0.5-1.0 | Abundant |
| Semi-finishing | 80-100 | 0.03-0.05 | 0.2-0.5 | Abundant |
| Finishing | 100-120 | 0.01-0.03 | 0.05-0.2 | Abundant |
| Super-finishing | 120-150 | 0.005-0.01 | 0.01-0.05 | Abundant |
Golden rule: for finishing operations, the depth of cut must be at least equal to the tool radius to avoid rubbing.
EDM Strategies
| Operation | Intensity (A) | Ton (µs) | Toff (µs) | Resulting Ra (µm) |
|---|---|---|---|---|
| Roughing | 20-50 | 100-300 | 30-100 | 10-20 |
| Semi-finishing | 5-15 | 20-50 | 10-30 | 3-8 |
| Finishing | 1-5 | 5-20 | 5-15 | 1-3 |
| Super-finishing | 0.1-1 | 1-5 | 2-10 | 0.2-1 |
Principle: always start with roughing at high intensity, then progressively reduce for finishing. Each finishing pass removes approximately 0.1 to 0.2 mm of material.
Exam Tips and Answer Strategies
Typical Red Seal Questions
Problem-Solving Method
For calculation questions, follow this method:
Frequent Exam Pitfalls
Summary
Pitfalls to Avoid
Ready to test this chapter?
Practice with exam-aligned questions and timed simulations.
Start Practicing Free