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,15 @@
The simtcl configuration files make use of the tcl language for configuration instead of the more common ".hal" files.
Configurations in this directory also demonstrate the use of a twopass method of processing ".hal" and ".tcl" files. This method is enabled by the ini file setting of [HAL]TWOPASS=anything. With twopass processing, the loadrt specifiers for a module can be specified in multiple places.
o twopass_compat
verify compatibility with .hal halfiles
o twopass_basic
use LIB example basic_sim
Notes:
Conventionally, hal is configured with ".hal" files which contain instructions in the halcmd language. With ".tcl" files, common programming facilities like looping and testing are available too.
Hal configuration files are specified by ini file [HAL]HALFILE items which can name either ".hal" or ".tcl" files.

View File

@@ -0,0 +1 @@
../../sim.tbl

View File

@@ -0,0 +1,110 @@
# twopass_base.inc
[DISPLAY]
DISPLAY = axis
CYCLE_TIME = 0.100
HELP_FILE = doc/help.txt
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
MAX_SPINDLE_OVERRIDE = 1.0
MAX_LINEAR_VELOCITY = 1.2
DEFAULT_LINEAR_VELOCITY = .25
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
#EDITOR = geany
TOOL_EDITOR = tooledit
INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil, 1mm, .1mm, 1/8000 in
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[RS274NGC]
PARAMETER_FILE = sim.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 0
SERVO_PERIOD = 1000000
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.2
POSITION_FILE = position.txt
MAX_LINEAR_VELOCITY = 1.2
[KINS]
JOINTS = 3
KINEMATICS = trivkins
[AXIS_X]
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_SEQUENCE = 1
[AXIS_Y]
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -8.0
MAX_LIMIT = 1.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
MIN_LIMIT = -8.0
MAX_LIMIT = 1.0
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_SEQUENCE = 0
[EMCIO]
TOOL_TABLE = sim.tbl
TOOL_CHANGE_POSITION = 0 0 0
TOOL_CHANGE_QUILL_UP = 1

View File

@@ -0,0 +1,17 @@
# twopass_basic: demo/test using LIB:basic_sim.tcl
#INCLUDE twopass_base.inc
[EMC]
VERSION = 1.1
MACHINE = twopass_basic
[HAL]
# include this line with any non_null argument to enable twopass processing:
TWOPASS = on
# or use this line to enable debugging options:
# TWOPASS = on,verbose,nodelete
HALFILE = LIB:basic_sim.tcl

View File

@@ -0,0 +1 @@
twopass_basic -- demonstrates twopass processing using LIB:basic_sim.tcl

View File

@@ -0,0 +1 @@
twopass_basic -- demuestra procesamiento twopass usando LIB:basic_sim.tcl

View File

@@ -0,0 +1,16 @@
# twopass_compat: demo/test compatibility with LIB: hal files
#INCLUDE twopass_base.inc
[EMC]
VERSION = 1.1
MACHINE = twopass_compat
[HAL]
# include this line with any non_null argument to enable twopass processing:
TWOPASS = on
# or use this line to enable debugging options:
# TWOPASS = on,verbose,nodelete
HALFILE = LIB:core_sim.hal
HALFILE = LIB:axis_manualtoolchange.hal
HALFILE = LIB:simulated_home.hal

View File

@@ -0,0 +1 @@
twopass_compat -- verifies compatibility with the existing ".hal" files used by sim/axis.ini

View File

@@ -0,0 +1 @@
twopass_compat -- verifica compatibilidad con archivos ".hal" existentes usados por sim/axis.ini