Compare commits
5 Commits
0847110969
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55d0704e0f | ||
|
|
96e6fcad01 | ||
|
|
16c03621bd | ||
|
|
f0404bb24d | ||
|
|
c84cf74c18 |
@@ -13,7 +13,8 @@
|
||||
"WebFetch(domain:github.com)",
|
||||
"WebFetch(domain:raw.githubusercontent.com)",
|
||||
"WebFetch(domain:forum.linuxcnc.org)",
|
||||
"WebFetch(domain:www.forum.linuxcnc.org)"
|
||||
"WebFetch(domain:www.forum.linuxcnc.org)",
|
||||
"Bash(file:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
47
CLAUDE.md
Normal file
47
CLAUDE.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# CLAUDE.md
|
||||
|
||||
## Project
|
||||
LinuxCNC configuration and custom G-code macro library for a Lagun milling machine.
|
||||
|
||||
## Structure
|
||||
- `configs/lagun_gmoccapy/` — machine config (INI, HAL, tool table, pendant)
|
||||
- `nc_files/subs/` — macro subroutines (auto-loaded via SUBROUTINE_PATH)
|
||||
- `nc_files/programs/` — standalone part programs
|
||||
- `nc_files/HEMA/`, `HEMS/`, `HEQJ/` — project-specific part programs
|
||||
- `nc_files/*.ngc` — older part programs (root level)
|
||||
- `datasheets/` — Mesa board PDFs
|
||||
|
||||
## Key docs
|
||||
- `nc_files/MACROS.md` — macro API reference
|
||||
- `nc_files/OFFSETS.md` — work offsets, tool offsets, cutter comp quick reference
|
||||
- `nc_files/TOOLS.md` — deep dive on tool changes and GMOCCAPY interface
|
||||
- `configs/lagun_gmoccapy/README.md` — machine config, wiring, HAL, pendant mapping
|
||||
|
||||
## Macro conventions
|
||||
- All macros in `nc_files/subs/` use lowercase filenames (LinuxCNC matches `o<name>` to `name.ngc`)
|
||||
- Mode bitmask is always the FIRST positional arg (#1) for macros that accept it
|
||||
- Z heights come from globals `#<_z_top>` and `#<_z_bot>`, not positional args
|
||||
- Tool diameter comes from `#5410` (built-in LinuxCNC param, requires T M6 G43 first)
|
||||
- Optional globals: `#<_z_clearance>`, `#<_rampang>`, `#<_stepover>`
|
||||
- M101/M102 enable/disable Z-axis CNC control (for manual quill operation)
|
||||
|
||||
## When editing macros
|
||||
- Do not change functional behavior without asking — these run on a real mill
|
||||
- The `o<number>` labels (o1, o101, etc.) must be unique within each file
|
||||
- LinuxCNC G-code uses `[expressions]` for math, `#<name>` for named params, `#N` for positional args
|
||||
- `G90.1` = absolute arc centers (I/J), `G91.1` = incremental arc centers — check which mode each macro uses
|
||||
- Test calls should never appear after `endsub` (they execute on every load)
|
||||
|
||||
## When editing caller programs
|
||||
- Programs set `#<_z_top>` and `#<_z_bot>` before macro calls
|
||||
- Mode arg is first: `o<pocket_circ> call [0] [x][y] [d] [fincut]`
|
||||
- Commented-out calls (`;o<...>`) should keep their format consistent with active calls
|
||||
|
||||
## Machine details
|
||||
- 3-axis mill: X (+-24"), Y (+-12"), Z (-4" to +1")
|
||||
- Mesa 5i24 FPGA + 7i52 servo interface + 7i37-TA isolated I/O
|
||||
- Dual PID on X and Y (motor encoder + linear scale, outputs summed)
|
||||
- Z has special override mechanism (M101/M102 via logic AND gate)
|
||||
- GMOCCAPY GUI, XHC WHB04B-6 wireless pendant
|
||||
- Units: inches
|
||||
- Manual tool change (no ATC)
|
||||
@@ -27,9 +27,9 @@
|
||||
5218 0.000000
|
||||
5219 0.000000
|
||||
5220 1.000000
|
||||
5221 7.046981
|
||||
5222 0.266575
|
||||
5223 -2.928337
|
||||
5221 -6.512164
|
||||
5222 3.676288
|
||||
5223 -3.122360
|
||||
5224 0.000000
|
||||
5225 0.000000
|
||||
5226 0.000000
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
5218 0.000000
|
||||
5219 0.000000
|
||||
5220 1.000000
|
||||
5221 7.046981
|
||||
5222 0.266575
|
||||
5223 -2.928337
|
||||
5221 -6.512164
|
||||
5222 3.676288
|
||||
5223 -3.122360
|
||||
5224 0.000000
|
||||
5225 0.000000
|
||||
5226 0.000000
|
||||
|
||||
@@ -75,6 +75,6 @@ show_preview_on_offset = False
|
||||
use_keyboard_shortcuts = True
|
||||
offset_axis_y = 0.0
|
||||
offset_axis_x = 0.0
|
||||
offset_axis_z = 0.0
|
||||
tool_in_spindle = 3
|
||||
offset_axis_z = -0.003
|
||||
tool_in_spindle = 5
|
||||
|
||||
|
||||
18
nc_files/THF-AIRPANEL.ngc
Normal file
18
nc_files/THF-AIRPANEL.ngc
Normal file
@@ -0,0 +1,18 @@
|
||||
#<_z_clearance> = 0.500
|
||||
|
||||
M03 ; Start spindle
|
||||
F10 ; Feed
|
||||
|
||||
#<_z_top> = 0.25
|
||||
#<_z_bot> = 0.0
|
||||
|
||||
#<d> = 0.5
|
||||
o<frame_circ> call [+4] [1.25][-4.025] [#<d>]
|
||||
o<frame_circ> call [+4] [4.00][-4.025] [#<d>]
|
||||
o<frame_circ> call [+4] [4.00][-1.805] [#<d>]
|
||||
|
||||
o<frame_rect> call [+4+8] [-.175][.175] [5.425][-4.425]
|
||||
|
||||
M05 ; Stop Spindle
|
||||
M30 ; End Program
|
||||
%
|
||||
@@ -4,8 +4,8 @@
|
||||
; Requires tool loaded (uses #5410 for diameter)
|
||||
; Optional global: #<_z_clearance>
|
||||
o<frame_circ> sub
|
||||
; o<frame_circ> call [mode] [x][y] [diameter] [fincut]
|
||||
; #1=mode #2=x #3=y #4=diameter #5=fincut
|
||||
(o<frame_circ> call [mode] [x][y] [diameter] [fincut])
|
||||
(#1=mode #2=x #3=y #4=diameter #5=fincut)
|
||||
|
||||
#<M_CONVENTIONAL> = [FIX[#1/1] MOD 2 EQ 1]
|
||||
#<M_OUTSIDE> = [FIX[#1/8] MOD 2 EQ 1]
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
; Requires tool loaded (uses #5410 for diameter)
|
||||
; Optional global: #<_z_clearance>
|
||||
o<frame_rect> sub
|
||||
; o<frame_rect> call [mode] [x1][y1] [x2][y2] [radius]
|
||||
; #1=mode #2=x1 #3=y1 #4=x2 #5=y2 #6=radius
|
||||
(o<frame_rect> call [mode] [x1][y1] [x2][y2] [radius])
|
||||
(#1=mode #2=x1 #3=y1 #4=x2 #5=y2 #6=radius)
|
||||
|
||||
#<M_CONVENTIONAL> = [FIX[#1/1] MOD 2 EQ 1]
|
||||
#<M_OUTSIDE> = [FIX[#1/8] MOD 2 EQ 1]
|
||||
|
||||
Reference in New Issue
Block a user