claude init
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
# Lagun milling machine configuration for GMOCCAPY GUI
|
||||
# Based on lagun config (PNCconf Fri Jul 26 13:18:08 2024)
|
||||
# Modified to use GMOCCAPY instead of AXIS
|
||||
# Using LinuxCNC version: Master (2.9)
|
||||
#
|
||||
# Hardware: Mesa 5i24 FPGA card (hm2_pci)
|
||||
# Axes: X, Y (dual encoder: motor + linear scale), Z (linear scale only)
|
||||
# Pendant: XHC WHB04B-6 wireless
|
||||
# Spindle: On/off relay (no speed control)
|
||||
# Units: Imperial (inches)
|
||||
|
||||
# --- General EMC settings ---
|
||||
[EMC]
|
||||
MACHINE = my_LinuxCNC_machine
|
||||
DEBUG = 0
|
||||
VERSION = 1.1
|
||||
|
||||
# --- GUI configuration ---
|
||||
[DISPLAY]
|
||||
DISPLAY = gmoccapy
|
||||
POSITION_OFFSET = RELATIVE
|
||||
@@ -17,6 +26,7 @@ MIN_SPINDLE_OVERRIDE = 0.500000
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
PROGRAM_PREFIX = /home/linuxcnc/linuxcnc/nc_files
|
||||
# Jog increments available in the GUI (inches)
|
||||
INCREMENTS = 0.1000 0.0500 0.0100 0.0050 0.0010 0.0005 0.0001
|
||||
DEFAULT_LINEAR_VELOCITY = 3.0
|
||||
MAX_LINEAR_VELOCITY = 1.000000
|
||||
@@ -29,6 +39,7 @@ GEOMETRY = xyz
|
||||
CYCLE_TIME = 100
|
||||
DEFAULT_SPINDLE_SPEED = 500
|
||||
|
||||
# --- File type filters for loading programs ---
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
@@ -37,23 +48,31 @@ gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python3
|
||||
|
||||
# --- Task controller ---
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.010
|
||||
|
||||
# --- G-code interpreter ---
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = linuxcnc.var
|
||||
# Startup: G20=inch, G40=cancel cutter comp, G90=absolute, G94=feed/min,
|
||||
# G97=RPM mode, G64 P0.001=path blending tolerance 0.001"
|
||||
RS274NGC_STARTUP_CODE = G20 G40 G90 G94 G97 G64 P0.001
|
||||
|
||||
# --- Motion controller ---
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
# 1ms servo period
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
# --- Mesa 5i24 FPGA card ---
|
||||
[HMOT]
|
||||
# **** This is for info only ****
|
||||
CARD0=hm2_5i24.0
|
||||
|
||||
# --- HAL file loading order ---
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = lagun.hal
|
||||
@@ -61,6 +80,16 @@ HALFILE = xhc-whb04b-6.hal
|
||||
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||
SHUTDOWN = shutdown.hal
|
||||
|
||||
# --- MDI commands for HALUI (pendant macro buttons) ---
|
||||
# Index 00: (unused, debug)
|
||||
# Index 01: Halve X coordinate (macro button 1)
|
||||
# Index 02: Halve Y coordinate (macro button 2)
|
||||
# Index 03: (unused, debug)
|
||||
# Index 04: (unused, debug)
|
||||
# Index 05: Zero X in current work offset (macro button 5)
|
||||
# Index 06: Zero Y in current work offset (macro button 6)
|
||||
# Index 07: Zero Z in current work offset (macro button 7)
|
||||
# Index 08-14: (unused, debug or reserved)
|
||||
[HALUI]
|
||||
MDI_COMMAND=(DEBUG,<1>)
|
||||
MDI_COMMAND=G10 L20 P0 X[#<_x>/2.0]
|
||||
@@ -78,24 +107,34 @@ SHUTDOWN = shutdown.hal
|
||||
MDI_COMMAND=(DEBUG,<13>)
|
||||
MDI_COMMAND=(DEBUG,<14>)
|
||||
|
||||
# --- Kinematics ---
|
||||
[KINS]
|
||||
JOINTS = 3
|
||||
KINEMATICS = trivkins coordinates=XYZ
|
||||
|
||||
# --- Trajectory planner ---
|
||||
[TRAJ]
|
||||
COORDINATES = XYZ
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 3.0
|
||||
MAX_LINEAR_VELOCITY = 1.00
|
||||
# Allow motion without homing first
|
||||
NO_FORCE_HOMING = 1
|
||||
|
||||
# --- I/O controller ---
|
||||
[EMCIO]
|
||||
EMCIO = io
|
||||
CYCLE_TIME = 0.100
|
||||
TOOL_TABLE = tool.tbl
|
||||
# Raise quill before tool change
|
||||
TOOL_CHANGE_QUILL_UP = 1
|
||||
|
||||
#******************************************
|
||||
# X AXIS - Joint 0
|
||||
# Dual feedback: motor encoder (enc 03) + linear scale (enc 00)
|
||||
# PWM output: pwmgen.00
|
||||
# Enable relay: GPIO 046 (active low)
|
||||
#******************************************
|
||||
[AXIS_X]
|
||||
MAX_VELOCITY = 1.0
|
||||
@@ -113,8 +152,7 @@ MAX_ACCELERATION = 30.0
|
||||
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
|
||||
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
|
||||
|
||||
|
||||
|
||||
# Motor encoder PID gains (velocity loop)
|
||||
P = 0
|
||||
I = 0
|
||||
D = 4
|
||||
@@ -123,6 +161,7 @@ FF0 = 0
|
||||
FF1 = 0.6
|
||||
FF2 = 0
|
||||
|
||||
# Linear scale PID gains (position correction loop)
|
||||
P_LIN = 300
|
||||
I_LIN = 500
|
||||
D_LIN = 0
|
||||
@@ -131,6 +170,7 @@ BIAS = 0
|
||||
DEADBAND = 0.0005
|
||||
MAX_OUTPUT = 0
|
||||
|
||||
# Encoder scales (counts per inch)
|
||||
ENCODER_LIN_SCALE = 5085.5
|
||||
ENCODER_MTR_SCALE = -27939.6
|
||||
# 5.4 is the ratio between linear and motor scales, roughly
|
||||
@@ -149,6 +189,12 @@ HOME_SEQUENCE = 2
|
||||
OUTPUT_SCALE = 1
|
||||
OUTPUT_OFFSET = 0
|
||||
|
||||
#******************************************
|
||||
# Y AXIS - Joint 1
|
||||
# Dual feedback: motor encoder (enc 04) + linear scale (enc 01)
|
||||
# PWM output: pwmgen.02
|
||||
# Enable relay: (shares Z-axis GPIO 044 line)
|
||||
#******************************************
|
||||
[AXIS_Y]
|
||||
MAX_VELOCITY = 1.0
|
||||
MAX_ACCELERATION = 30.0
|
||||
@@ -165,6 +211,7 @@ MAX_ACCELERATION = 30.0
|
||||
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
|
||||
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
|
||||
|
||||
# Motor encoder PID gains (velocity loop)
|
||||
P = 0
|
||||
I = 0
|
||||
D = 5
|
||||
@@ -173,6 +220,7 @@ FF0 = 0
|
||||
FF1 = 0.6
|
||||
FF2 = 0
|
||||
|
||||
# Linear scale PID gains (position correction loop)
|
||||
P_LIN = 350
|
||||
I_LIN = 500
|
||||
D_LIN = 0
|
||||
@@ -181,6 +229,7 @@ BIAS = 0
|
||||
DEADBAND = 0
|
||||
MAX_OUTPUT = 1
|
||||
|
||||
# Encoder scales (counts per inch)
|
||||
ENCODER_LIN_SCALE = 5085.4
|
||||
ENCODER_MTR_SCALE = 27453.6
|
||||
# these are in nanoseconds
|
||||
@@ -194,10 +243,17 @@ MAX_LIMIT = +12
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEQUENCE = 3
|
||||
|
||||
# Negative scale inverts direction
|
||||
OUTPUT_SCALE = -1
|
||||
OUTPUT_OFFSET = 0
|
||||
#******************************************
|
||||
|
||||
#******************************************
|
||||
# Z AXIS - Joint 2
|
||||
# Single feedback: linear scale only (enc 02), no motor encoder
|
||||
# PWM output: pwmgen.04
|
||||
# Enable relay: GPIO 044 (active low), gated by z-override AND logic
|
||||
# z-override allows M101/M102 to disable CNC Z for manual quill use
|
||||
#******************************************
|
||||
[AXIS_Z]
|
||||
MAX_VELOCITY = 1.0
|
||||
@@ -210,6 +266,8 @@ TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
FERROR = 0.5
|
||||
# SETTING MIN_FERROR TO 100 ALLOWS Z AXIS TO DO WHATEVER. IDEALLY ITS 0.2
|
||||
# This is a workaround: when z-override disables the Z servo, the quill
|
||||
# can be moved manually and would trip a normal following error limit.
|
||||
MIN_FERROR = 100
|
||||
MAX_VELOCITY = 1.0
|
||||
MAX_ACCELERATION = 30.0
|
||||
@@ -217,6 +275,7 @@ MAX_ACCELERATION = 30.0
|
||||
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
|
||||
STEPGEN_MAXVEL = 1.25
|
||||
STEPGEN_MAXACCEL = 37.50
|
||||
# Linear scale PID gains (single loop, no motor encoder on Z)
|
||||
P = 200
|
||||
I = 300
|
||||
D = 2
|
||||
@@ -237,12 +296,15 @@ MAX_LIMIT = +1.0
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
# Negative scale inverts direction
|
||||
OUTPUT_SCALE = -1
|
||||
OUTPUT_OFFSET = 0
|
||||
|
||||
# Encoder scale (counts per inch)
|
||||
ENCODER_LIN_SCALE = -10075
|
||||
#******************************************
|
||||
|
||||
# --- Spindle PID (not actively used; relay on/off only) ---
|
||||
[SPINDLE_0]
|
||||
P = 0
|
||||
I = 0
|
||||
|
||||
Reference in New Issue
Block a user