🎓 Lesson 8
D5
Macro Programming for Adaptive Feeds
Macro programming for adaptive feeds is a way to write smart CNC code that automatically adjusts cutting speed and feed rate based on real-time conditions like material hardness or tool wear.
🎯 Learning Objectives
- ✓ Calculate adaptive feed rate multipliers using real-time torque and thrust sensor data
- ✓ Design a parameterized G-code macro that adjusts feed rate based on measured RQD (Rock Quality Designation)
- ✓ Analyze macro logic flow to identify failure modes under sensor dropout or outlier readings
- ✓ Explain how macro-based adaptive feeds reduce bit wear and improve hole straightness in heterogeneous strata
📖 Why This Matters
In modern automated drill rigs used for blast-hole drilling—especially in hard-rock open-pit mines—static feed rates cause excessive bit wear in competent zones and inefficient penetration in fractured zones. Macro programming enables the CNC controller to act like an 'on-board engineer', adjusting feeds in real time using embedded sensors. This directly improves hole quality, reduces non-productive time, and extends consumable life—key drivers of blasting efficiency and cost per tonne.
📘 Core Principles
Adaptive feed macros rely on three foundational layers: (1) Sensor integration—converting analog signals (e.g., hydraulic pressure, motor current, vibration RMS) into scaled G-code variables; (2) Parametric logic—using IF/WHILE statements, arithmetic expressions, and variable assignment (e.g., #101 = #100 * 0.85) to map sensor values to feed adjustments; and (3) Safety governance—enforcing hard limits (e.g., min/max F-value, timeout thresholds) to prevent runaway behavior. Unlike full adaptive control (which requires servo-level feedback), macro-based adaptation operates at the G-code interpreter level—making it deployable on standard Fanuc, Siemens, or Mitsubishi CNC drill controllers without hardware upgrades.
📐 Adaptive Feed Rate Multiplier
The core scaling factor adjusts nominal feed (F_nom) based on normalized torque deviation from baseline. It applies linear gain limiting to avoid overshoot while preserving responsiveness.
Torque-Based Feed Multiplier
F_mult = CLAMP(1 + K × ((T_meas / T_base) − 1), F_min, F_max)Calculates real-time feed rate scaling factor based on deviation of measured torque from expected baseline torque.
Variables:
| Symbol | Name | Unit | Description |
|---|---|---|---|
| F_mult | Feed multiplier | dimensionless | Scalar applied to programmed feed rate (F) to adjust actual feed |
| K | Adaptation gain | dimensionless | Tuning factor controlling sensitivity to torque deviation (typically 0.3–0.8) |
| T_meas | Measured torque | kN·m | Real-time average torque over current drill interval |
| T_base | Baseline torque | kN·m | Expected torque for target rock type and bit configuration |
| F_min | Minimum feed multiplier | dimensionless | Lower safety bound (prevents stalling) |
| F_max | Maximum feed multiplier | dimensionless | Upper safety bound (prevents bit overload) |
Typical Ranges:
Granite drilling (LF90 rig): 1.05 – 1.25
Weathered shale: 0.55 – 0.75
💡 Worked Example
Problem: A rotary blast-hole drill measures average motor torque of 142 kN·m over a 1.5 m interval. Baseline torque for granite is 120 kN·m ±10%. System gain K = 0.6, with min/max multiplier bounds of 0.4 and 1.3. Calculate adaptive feed multiplier.
1.
Step 1: Compute torque deviation ratio = 142 / 120 = 1.183
2.
Step 2: Apply gain: multiplier = 1 + K × (1.183 − 1) = 1 + 0.6 × 0.183 = 1.110
3.
Step 3: Clamp result to [0.4, 1.3] → final multiplier = 1.110 (within safe bounds)
Answer:
The result is 1.110, which falls within the safe range of 0.4–1.3.
🏗️ Real-World Application
At BHP’s Olympic Dam mine (South Australia), a fleet of Boart Longyear LF90 drill rigs implemented Fanuc macro-based adaptive feeds in 2022. Using real-time hydraulic pressure (proxy for rock resistance) and depth-encoded RPM, macros adjusted feed rate every 0.5 m. Over six months, bit life increased by 22%, hole deviation decreased from 1.8% to 1.1% RMS, and average penetration rate improved 9% in mixed quartzite–shale sequences—without changing bit geometry or rig hydraulics.