Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
# Generated by stepconf at Wed Sep 26 07:51:20 2012
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0x378 out "
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd <= spindle.0.speed-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net astep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net adir => parport.0.pin-09-out
net charge-pump => parport.0.pin-16-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 15200
setp stepgen.0.dirsetup 15200
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 15200
setp stepgen.1.dirsetup 15200
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 15200
setp stepgen.2.dirsetup 15200
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

View File

@@ -0,0 +1,120 @@
# Generated by stepconf at Wed Sep 26 07:51:20 2012
# If you make changes to this file, they will be
# overwritten when you run stepconf again
[EMC]
# The version string for this INI file.
VERSION = 1.1
MACHINE = Gecko_540B4
DEBUG = 0
[DISPLAY]
DISPLAY = axis
#EDITOR = geany
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = ../../nc_files/
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
[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
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 23000
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALFILE = Gecko_540B4.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00
[EMCIO]
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -100.0
MAX_LIMIT = 100.0
MAX_VELOCITY = 0.20652173913
MAX_ACCELERATION = 2.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 0.20652173913
MAX_ACCELERATION = 2.0
STEPGEN_MAXACCEL = 2.5
SCALE = 200000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -100.0
MAX_LIMIT = 100.0
HOME_OFFSET = 0.0
[AXIS_Y]
MIN_LIMIT = -100.0
MAX_LIMIT = 100.0
MAX_VELOCITY = 0.20652173913
MAX_ACCELERATION = 1.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 0.20652173913
MAX_ACCELERATION = 1.0
STEPGEN_MAXACCEL = 1.25
SCALE = 200000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -100.0
MAX_LIMIT = 100.0
HOME_OFFSET = 0.0
[AXIS_Z]
MIN_LIMIT = -100.0
MAX_LIMIT = 100.0
MAX_VELOCITY = 0.20652173913
MAX_ACCELERATION = 2.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 0.20652173913
MAX_ACCELERATION = 2.0
STEPGEN_MAXACCEL = 2.5
SCALE = 200000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -100.0
MAX_LIMIT = 100.0
HOME_OFFSET = 0.0

View File

@@ -0,0 +1,140 @@
<?xml version="1.0" ?>
<stepconf>
<property name="ahomepos" type="int" value="0"/>
<property name="ahomesw" type="int" value="0"/>
<property name="ahomevel" type="float" value="0.0"/>
<property name="alatchdir" type="int" value="0"/>
<property name="aleadscrew" type="int" value="100"/>
<property name="amaxacc" type="int" value="2"/>
<property name="amaxlim" type="int" value="100"/>
<property name="amaxvel" type="int" value="0"/>
<property name="amicrostep" type="int" value="1"/>
<property name="aminlim" type="int" value="-100"/>
<property name="apulleyden" type="int" value="1"/>
<property name="apulleynum" type="int" value="1"/>
<property name="ascale" type="int" value="0"/>
<property name="asteprev" type="int" value="200"/>
<property name="axes" type="int" value="0"/>
<property name="classicladder" type="bool" value="False"/>
<property name="createshortcut" type="bool" value="False"/>
<property name="createsymlink" type="bool" value="False"/>
<property name="customhal" type="int" value="1"/>
<property name="digitsin" type="float" value="15.0"/>
<property name="digitsout" type="float" value="15.0"/>
<property name="dirhold" type="float" value="200.0"/>
<property name="dirsetup" type="float" value="200.0"/>
<property name="drivertype" type="string" value="gecko540"/>
<property name="floatsin" type="float" value="10.0"/>
<property name="floatsout" type="float" value="10.0"/>
<property name="halui" type="bool" value="False"/>
<property name="ioaddr" type="string" value="0x378"/>
<property name="ioaddr2" type="string" value="Enter Address"/>
<property name="ioaddr3" type="string" value="Enter Address"/>
<property name="ladderconnect" type="bool" value="True"/>
<property name="ladderhaltype" type="int" value="0"/>
<property name="laddername" type="string" value="custom.clp"/>
<property name="latency" type="float" value="15000.0"/>
<property name="machinename" type="string" value="Gecko_540B4"/>
<property name="manualtoolchange" type="bool" value="True"/>
<property name="md5sums" type="eval" value="[('/home/john/linuxcnc/configs/Gecko_540B4/README', 'd6795c1e5c02e4d01df374bed0ecb468'), ('/home/john/linuxcnc/configs/Gecko_540B4/Gecko_540B4.ini', 'afbe6ca64d782a9c579a7e28220e24b2'), ('/home/john/linuxcnc/configs/Gecko_540B4/Gecko_540B4.hal', '0b77650d27113f38df9ab36c05e6f2f5')]"/>
<property name="modbus" type="bool" value="False"/>
<property name="number_pports" type="int" value="1"/>
<property name="period" type="int" value="25000"/>
<property name="pin1" type="string" value="unused-output"/>
<property name="pin10" type="string" value="unused-input"/>
<property name="pin10inv" type="bool" value="False"/>
<property name="pin11" type="string" value="unused-input"/>
<property name="pin11inv" type="bool" value="False"/>
<property name="pin12" type="string" value="unused-input"/>
<property name="pin12inv" type="bool" value="False"/>
<property name="pin13" type="string" value="unused-input"/>
<property name="pin13inv" type="bool" value="False"/>
<property name="pin14" type="string" value="unused-output"/>
<property name="pin14inv" type="bool" value="False"/>
<property name="pin15" type="string" value="unused-input"/>
<property name="pin15inv" type="bool" value="False"/>
<property name="pin16" type="string" value="charge-pump"/>
<property name="pin16inv" type="bool" value="False"/>
<property name="pin17" type="string" value="unused-output"/>
<property name="pin17inv" type="bool" value="False"/>
<property name="pin1inv" type="bool" value="False"/>
<property name="pin2" type="string" value="xstep"/>
<property name="pin2inv" type="bool" value="False"/>
<property name="pin3" type="string" value="xdir"/>
<property name="pin3inv" type="bool" value="False"/>
<property name="pin4" type="string" value="ystep"/>
<property name="pin4inv" type="bool" value="False"/>
<property name="pin5" type="string" value="ydir"/>
<property name="pin5inv" type="bool" value="False"/>
<property name="pin6" type="string" value="zstep"/>
<property name="pin6inv" type="bool" value="False"/>
<property name="pin7" type="string" value="zdir"/>
<property name="pin7inv" type="bool" value="False"/>
<property name="pin8" type="string" value="astep"/>
<property name="pin8inv" type="bool" value="False"/>
<property name="pin9" type="string" value="adir"/>
<property name="pin9inv" type="bool" value="False"/>
<property name="pp2_direction" type="int" value="0"/>
<property name="pp3_direction" type="int" value="0"/>
<property name="pyvcp" type="bool" value="False"/>
<property name="pyvcpconnect" type="bool" value="False"/>
<property name="pyvcphaltype" type="int" value="0"/>
<property name="pyvcpname" type="string" value="blank.xml"/>
<property name="s32in" type="float" value="10.0"/>
<property name="s32out" type="float" value="10.0"/>
<property name="spindlecarrier" type="float" value="100.0"/>
<property name="spindlecpr" type="float" value="100.0"/>
<property name="spindlefiltergain" type="float" value="0.01"/>
<property name="spindlenearscale" type="float" value="1.5"/>
<property name="spindlepwm1" type="float" value="0.2"/>
<property name="spindlepwm2" type="float" value="0.8"/>
<property name="spindlespeed1" type="float" value="100.0"/>
<property name="spindlespeed2" type="float" value="800.0"/>
<property name="stepspace" type="float" value="2000.0"/>
<property name="steptime" type="float" value="1000.0"/>
<property name="tempexists" type="int" value="0"/>
<property name="units" type="int" value="0"/>
<property name="usespindleatspeed" type="bool" value="False"/>
<property name="xhomepos" type="float" value="0.0"/>
<property name="xhomesw" type="float" value="0.0"/>
<property name="xhomevel" type="float" value="0.05"/>
<property name="xlatchdir" type="int" value="0"/>
<property name="xleadscrew" type="float" value="100.0"/>
<property name="xmaxacc" type="float" value="2.0"/>
<property name="xmaxlim" type="float" value="100.0"/>
<property name="xmaxvel" type="float" value="1.0"/>
<property name="xmicrostep" type="float" value="10.0"/>
<property name="xminlim" type="float" value="-100.0"/>
<property name="xpulleyden" type="float" value="1.0"/>
<property name="xpulleynum" type="float" value="1.0"/>
<property name="xscale" type="float" value="200000.0"/>
<property name="xsteprev" type="float" value="200.0"/>
<property name="yhomepos" type="float" value="0.0"/>
<property name="yhomesw" type="float" value="0.0"/>
<property name="yhomevel" type="float" value="0.05"/>
<property name="ylatchdir" type="int" value="0"/>
<property name="yleadscrew" type="float" value="100.0"/>
<property name="ymaxacc" type="float" value="1.0"/>
<property name="ymaxlim" type="float" value="100.0"/>
<property name="ymaxvel" type="float" value="1.0"/>
<property name="ymicrostep" type="float" value="10.0"/>
<property name="yminlim" type="float" value="-100.0"/>
<property name="ypulleyden" type="float" value="1.0"/>
<property name="ypulleynum" type="float" value="1.0"/>
<property name="yscale" type="float" value="200000.0"/>
<property name="ysteprev" type="float" value="200.0"/>
<property name="zhomepos" type="float" value="0.0"/>
<property name="zhomesw" type="float" value="0.0"/>
<property name="zhomevel" type="float" value="0.05"/>
<property name="zlatchdir" type="int" value="0"/>
<property name="zleadscrew" type="float" value="100.0"/>
<property name="zmaxacc" type="float" value="2.0"/>
<property name="zmaxlim" type="float" value="100.0"/>
<property name="zmaxvel" type="float" value="1.0"/>
<property name="zmicrostep" type="float" value="10.0"/>
<property name="zminlim" type="float" value="-100.0"/>
<property name="zpulleyden" type="float" value="1.0"/>
<property name="zpulleynum" type="float" value="1.0"/>
<property name="zscale" type="float" value="200000.0"/>
<property name="zsteprev" type="float" value="200.0"/>
</stepconf>

View File

@@ -0,0 +1,13 @@
Gecko_540B4 configuration for a 4 axis machine with X Y Z A axes.
To use the charge pump on a G540 your base period must be set to 50,000 or lower. Otherwise disable the charge pump feature.
The Stepconf Wizard XML file is included so you can open it up and customize the configuration to suit your machine. After installing this configuration move the Gecko_540B4.stepconf file to the configs directory, then run the Stepconf Wizard and select Modify a configuration already created with this program.
Run the latency test to determine your max jitter and enter that in the Stepconf Wizard.
Set the axis limits, gearing for each axis.
Customize as needed to suit your machine.

View File

@@ -0,0 +1,2 @@
# Include your customized HAL commands here
# This file will not be overwritten when you run stepconf again

View File

@@ -0,0 +1,3 @@
# Include your customized HAL commands here
# The commands in this file are run after the AXIS GUI (including PyVCP panel) starts

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number