318 lines
7.3 KiB
INI
Executable File
318 lines
7.3 KiB
INI
Executable File
# 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
|
|
POSITION_FEEDBACK = ACTUAL
|
|
MAX_FEED_OVERRIDE = 2.000000
|
|
MAX_SPINDLE_OVERRIDE = 1.000000
|
|
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
|
|
MIN_LINEAR_VELOCITY = 0.016670
|
|
DEFAULT_ANGULAR_VELOCITY = 12.000000
|
|
MAX_ANGULAR_VELOCITY = 180.000000
|
|
MIN_ANGULAR_VELOCITY = 1.666667
|
|
EDITOR = gedit
|
|
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
|
|
png = image-to-gcode
|
|
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
|
|
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]
|
|
MDI_COMMAND=G10 L20 P0 Y[#<_y>/2.0]
|
|
MDI_COMMAND=(DEBUG,<4>)
|
|
MDI_COMMAND=(DEBUG,<5>)
|
|
MDI_COMMAND=G10 L20 P0 X0
|
|
MDI_COMMAND=G10 L20 P0 Y0
|
|
MDI_COMMAND=G10 L20 P0 Z0
|
|
MDI_COMMAND=(DEBUG,<5>)
|
|
MDI_COMMAND=(DEBUG,<9>)
|
|
MDI_COMMAND=(DEBUG,<10>)
|
|
MDI_COMMAND=(DEBUG,<2>)
|
|
MDI_COMMAND=(DEBUG,<12>)
|
|
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
|
|
MAX_ACCELERATION = 30.0
|
|
MIN_LIMIT = -24.0
|
|
MAX_LIMIT = +24.0
|
|
|
|
[JOINT_0]
|
|
TYPE = LINEAR
|
|
HOME = 0.0
|
|
FERROR = 0.5
|
|
MIN_FERROR = 0.2
|
|
MAX_VELOCITY = 100.0
|
|
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
|
|
|
|
FF0 = 0
|
|
FF1 = 0.6
|
|
FF2 = 0
|
|
|
|
# Linear scale PID gains (position correction loop)
|
|
P_LIN = 300
|
|
I_LIN = 500
|
|
D_LIN = 0
|
|
|
|
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
|
|
|
|
# these are in nanoseconds
|
|
DIRSETUP = 10000
|
|
DIRHOLD = 10000
|
|
STEPLEN = 5000
|
|
STEPSPACE = 5000
|
|
STEP_SCALE = 200.0
|
|
MIN_LIMIT = -24.0
|
|
MAX_LIMIT = +24.0
|
|
HOME_OFFSET = 0.0
|
|
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
|
|
MIN_LIMIT = -12.0
|
|
MAX_LIMIT = +12.0
|
|
|
|
[JOINT_1]
|
|
TYPE = LINEAR
|
|
HOME = 0.0
|
|
FERROR = 0.5
|
|
MIN_FERROR = 0.2
|
|
MAX_VELOCITY = 100.0
|
|
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
|
|
|
|
FF0 = 0
|
|
FF1 = 0.6
|
|
FF2 = 0
|
|
|
|
# Linear scale PID gains (position correction loop)
|
|
P_LIN = 350
|
|
I_LIN = 500
|
|
D_LIN = 0
|
|
|
|
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
|
|
DIRSETUP = 10000
|
|
DIRHOLD = 10000
|
|
STEPLEN = 5000
|
|
STEPSPACE = 5000
|
|
STEP_SCALE = 200.0
|
|
MIN_LIMIT = -12
|
|
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
|
|
MAX_ACCELERATION = 30.0
|
|
MIN_LIMIT = -4.0
|
|
MAX_LIMIT = 1.0
|
|
|
|
[JOINT_2]
|
|
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
|
|
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
|
|
# 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
|
|
FF0 = 0
|
|
FF1 = 1
|
|
FF2 = 0
|
|
BIAS = 0
|
|
DEADBAND = 0
|
|
MAX_OUTPUT = 0
|
|
# these are in nanoseconds
|
|
DIRSETUP = 10000
|
|
DIRHOLD = 10000
|
|
STEPLEN = 5000
|
|
STEPSPACE = 5000
|
|
STEP_SCALE = 200.0
|
|
MIN_LIMIT = -4.0
|
|
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
|
|
D = 0
|
|
FF0 = 1
|
|
FF1 = 0
|
|
FF2 = 0
|
|
BIAS = 0
|
|
DEADBAND = 0
|
|
MAX_OUTPUT = 2000
|