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,3 @@
touchy
A gtk-based gui for touchpad configurations

View File

@@ -0,0 +1 @@
gladevcp -- glade based gui demos

View File

@@ -0,0 +1,30 @@
# touchy doesn't use halui, so just set these boxes to permanently active
setp gladevcp.status 1
setp gladevcp.settings 1
setp gladevcp.commands 1
# show the current spindle speed in the top hoizontal bar
net spindle-speed spindle.0.speed-out => gladevcp.spindle-rpm-hbar
# the first and second labels show prepared and current tool
# unlinkp iocontrol.0.tool-prep-number
# unlinkp hal_manualtoolchange.number
# net tool-prepared iocontrol.0.tool-prep-number => gladevcp.prepared-tool hal_manualtoolchange.number
# net tool-number iocontrol.0.tool-number => gladevcp.current-tool
net cb1 gladevcp.check => gladevcp.led1
net b1 gladevcp.button => gladevcp.led2
net tb1 gladevcp.toggle => gladevcp.led3
net rb1 gladevcp.radio1 => gladevcp.led4
net rb2 gladevcp.radio2 => gladevcp.led5
net rb3 gladevcp.radio3 => gladevcp.led6
net hscale1 gladevcp.scale => gladevcp.scale-value
net combobox1 gladevcp.combo-s => gladevcp.combo-value
net spin1 gladevcp.spin-f => gladevcp.spin-value
# the MDI Toggle action is called with the values of some of the HAL pins
# as parameters like so:
# O<oword> call [${spin-f}] [${check}] [${toggle}] [${scale}] [${spin-f}] [${combo-s}]

View File

@@ -0,0 +1,165 @@
# EMC controller parameters for a simulated machine.
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-TOUCHY-GLADEVCP
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x7FFFFFFF
DEBUG = 0x10
[DISPLAY]
DISPLAY = touchy
# add GladeVCP panel as a tab
EMBED_TAB_NAME=GladeVCP demo
EMBED_TAB_COMMAND=gladevcp -c gladevcp -x {XID} -u hitcounter.py -H gladevcp-touchy.hal manual-example.ui
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# EMBED_TAB_NAME = Tools
# EMBED_TAB_COMMAND = xterm -into {XID} -rv -fn lucidasanstypewriter-bold-14 -e watch -n1 cat simpockets.tbl
[FILTER]
#No Content
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = sim.var
# gladevcp Demo specific Oword subs live here
SUBROUTINE_PATH = ../../nc_files/gladevcp_lib
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
BASE_PERIOD = 0
# Servo task period, in nano-seconds
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALFILE = core_sim.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.2
MAX_LINEAR_VELOCITY = 4
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = simpockets.tbl
TOOL_CHANGE_POSITION = 0 0 2
RANDOM_TOOLCHANGER = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
# Second axis
[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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
# Third axis
[AXIS_Z]
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
[MACROS]
MACRO=increment xinc yinc
MACRO=probe-hole maxradius

View File

@@ -0,0 +1 @@
../../hitcounter.py

View File

@@ -0,0 +1 @@
../../manual-example.hal

View File

@@ -0,0 +1 @@
../../manual-example.ui

View File

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

View File

@@ -0,0 +1,60 @@
<?xml version="1.0"?>
<interface>
<object class="GtkWindow" id="window1">
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">2</property>
<property name="row_spacing">2</property>
<property name="homogeneous">True</property>
<child>
<object class="HAL_Gremlin" id="hal_gremlin1">
<property name="visible">True</property>
<property name="double_buffered">False</property>
<property name="enable_dro">False</property>
</object>
</child>
<child>
<object class="HAL_Gremlin" id="hal_gremlin2">
<property name="visible">True</property>
<property name="double_buffered">False</property>
<property name="view">y</property>
<property name="enable_dro">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="HAL_Gremlin" id="hal_gremlin3">
<property name="visible">True</property>
<property name="double_buffered">False</property>
<property name="view">x</property>
<property name="enable_dro">False</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="HAL_Gremlin" id="hal_gremlin4">
<property name="visible">True</property>
<property name="double_buffered">False</property>
<property name="view">p</property>
<property name="enable_dro">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -0,0 +1,3 @@
net Xvel => touchy-misc.hal_graph_vel_x
net Yvel => touchy-misc.hal_graph_vel_y
net Zvel => touchy-misc.hal_graph_vel_z

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<requires lib="gladevcp" version="0.0"/>
<object class="GtkWindow" id="window1">
<property name="can-focus">False</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="n-rows">3</property>
<property name="n-columns">3</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="HAL_Graph" id="hal_graph_vel_x">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="autoscale">True</property>
<property name="bg-color">#ffffffffffff</property>
<property name="fg-color">#ffff00000000</property>
<property name="label">X Velocity</property>
<property name="tick">100</property>
</object>
</child>
<child>
<object class="HAL_Graph" id="hal_graph_vel_y">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="autoscale">True</property>
<property name="bg-color">#ffffffffffff</property>
<property name="fg-color">#0000ffff0000</property>
<property name="label">Y Velocity</property>
<property name="tick">100</property>
</object>
<packing>
<property name="top-attach">1</property>
<property name="bottom-attach">2</property>
</packing>
</child>
<child>
<object class="HAL_Graph" id="hal_graph_vel_z">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="autoscale">True</property>
<property name="bg-color">#ffffffffffff</property>
<property name="fg-color">#00000000ffff</property>
<property name="label">Z Velocity</property>
<property name="tick">100</property>
</object>
<packing>
<property name="top-attach">2</property>
<property name="bottom-attach">3</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -0,0 +1,161 @@
# EMC controller parameters for a simulated machine.
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-TOUCHY
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x7FFFFFFF
DEBUG = 0x10
[DISPLAY]
DISPLAY = touchy
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# EMBED_TAB_NAME = Tools
# EMBED_TAB_COMMAND = xterm -into {XID} -rv -fn lucidasanstypewriter-bold-14 -e watch -n1 cat simpockets.tbl
EMBED_TAB_NAME = Plot
EMBED_TAB_COMMAND = gladevcp -x {XID} touchy-gremlin.ui
EMBED_TAB_NAME = Velocity
EMBED_TAB_COMMAND = gladevcp -x {XID} -H touchy-misc.hal touchy-misc.ui
[FILTER]
#No Content
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = sim.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
BASE_PERIOD = 0
# Servo task period, in nano-seconds
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALFILE = core_sim.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.2
MAX_LINEAR_VELOCITY = 4
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = simpockets.tbl
TOOL_CHANGE_POSITION = 0 0 2
RANDOM_TOOLCHANGER = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
# Second axis
[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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
# Third axis
[AXIS_Z]
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
[MACROS]
MACRO=increment xinc yinc
MACRO=probe-hole maxradius

View File

@@ -0,0 +1,9 @@
pyngcgui configs for touchy
Demonstrate gladevcp apps:
pyngcgui -- subroutine app
gremlin_view -- gremlin with some buttons
The pyngcgui configs include a shell script
(hwsim.sh) to simulate the hardware buttons
and mpg that can be used with touchy.

View File

@@ -0,0 +1 @@
../../gremlin_view.ui

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# simulate hardware buttons and jogwheel for touchy
# Note: some pins are not used in some configs
# identity kins assumed: connect one-to-one joints & axis letters
halcmd net :xen touchy.jog.wheel.x joint.0.jog-enable axis.x.jog-enable
halcmd net :yen touchy.jog.wheel.y joint.1.jog-enable axis.y.jog-enable
halcmd net :zen touchy.jog.wheel.z joint.2.jog-enable axis.z.jog-enable
halcmd net :scale touchy.jog.wheel.increment
halcmd net :scale joint.0.jog-scale axis.x.jog-scale
halcmd net :scale joint.1.jog-scale axis.y.jog-scale
halcmd net :scale joint.2.jog-scale axis.z.jog-scale
halcmd net :counts touchy.wheel-counts
halcmd net :counts joint.0.jog-counts axis.x.jog-counts
halcmd net :counts joint.1.jog-counts axis.y.jog-counts
halcmd net :counts joint.2.jog-counts axis.z.jog-counts
sim_pin \
touchy.cycle-start/mode=pulse \
touchy.abort/mode=pulse \
halui.program.pause/mode=pulse \
motion.feed-hold/mode=hold \
touchy.jog.continuous.x.negative/mode=hold \
touchy.jog.continuous.x.positive/mode=hold \
touchy.jog.continuous.y.negative/mode=hold \
touchy.jog.continuous.y.positive/mode=hold \
touchy.jog.continuous.z.negative/mode=hold \
touchy.jog.continuous.z.positive/mode=hold \
:counts/mode=pulse \
>/dev/null

View File

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

View File

@@ -0,0 +1,156 @@
[EMC]
VERSION = 1.1
MACHINE = pyngcgui-touchy demo
DEBUG = 0x0
[DISPLAY]
EMBED_TAB_NAME = Pyngcgui
EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui_touchy_popupkeyboard.ui
EMBED_TAB_NAME = Gremlinview
EMBED_TAB_COMMAND = gladevcp -x {XID} gremlin_view.ui
# these are interpreted by ngcgui:
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
# nom2 -- no m2 terminator (use %)
# these are interpreted by touchy:
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = rectangle_probe.ngc
NGCGUI_SUBFILE = arc2.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = qpocket.ngc
NGCGUI_SUBFILE = ""
DISPLAY = touchy
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
[RS274NGC]
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
PARAMETER_FILE = sim.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 0
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALFILE = LIB:basic_sim.tcl
HALUI = halui
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.2
MAX_LINEAR_VELOCITY = 4
[EMCIO]
TOOL_TABLE = sim.tbl
TOOL_CHANGE_POSITION = 0 0 2
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
[MACROS]
MACRO=increment xinc yinc
MACRO=probe-hole maxradius
[APPLICATIONS]
# delay required to wait for pins created by the gui
DELAY = 5
APP = ./hwsim.sh

View File

@@ -0,0 +1,6 @@
pyngcgui_touchy
Demonstrate gladevcp apps:
pyngcgui -- subroutine app
gremlin_view -- gremlin with some buttons

View File

@@ -0,0 +1,7 @@
pyngcgui_touchy
Demostrar aplicaciones gladevcp:
pyngcgui -- aplicación de subrutina
gremlin_view -- gremlin con algunos botones

View File

@@ -0,0 +1,147 @@
[EMC]
VERSION = 1.1
MACHINE = pyngcgui-touchy-lathe demo
[DISPLAY]
PROGRAM_PREFIX = ../../nc_files
EMBED_TAB_NAME = Pyngcgui
EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui_touchy_popupkeyboard.ui
EMBED_TAB_NAME = Gremlinview
EMBED_TAB_COMMAND = gladevcp -x {XID} gremlin_view.ui
NGCGUI_FONT = Helvetica -12 normal
# for startup NGCGUI_PREAMBLE, NGCGUI_SUBFILE, NGCGUI_POSTAMBLE
# items, specifly:
# a) absolute filename (start with /)
# b) relative filename: search directories specified by
# [DISPLAY]PROGRAM_PREFIX and [RS274NGC]SUBROUTINE_PATH
NGCGUI_PREAMBLE = lathe_std.ngc
NGCGUI_SUBFILE = id.ngc
NGCGUI_SUBFILE = od.ngc
NGCGUI_SUBFILE = taper-od.ngc
NGCGUI_SUBFILE = g76base.ngc
NGCGUI_SUBFILE = g76diam.ngc
# specify "" for a custom tab page
NGCGUI_SUBFILE = ""
DISPLAY = touchy
LATHE = 1
EDITOR = gedit
# use tooltable columns for: diam front back orien
TOOL_EDITOR = tooledit diam front back orien
CYCLE_TIME = 0.100
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
MAX_SPINDLE_OVERRIDE = 1.0
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
[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
[RS274NGC]
PARAMETER_FILE = sim-lathe.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib/lathe:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
[TRAJ]
COORDINATES = X Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.0
MAX_LINEAR_VELOCITY = 3.333334
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
[EMCIO]
TOOL_TABLE = lathe.tbl
TOOL_CHANGE_POSITION = 1 0 1
TOOL_CHANGE_WITH_SPINDLE_ON = 1
[KINS]
# note joint 1 is not used
KINEMATICS = trivkins coordinates=xyz
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 3.333334
MAX_ACCELERATION = 20.0
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 3.333334
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.333334
MAX_ACCELERATION = 20.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 5.0
HOME_LATCH_VEL = 1.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
[JOINT_1]
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 3.333334
MAX_ACCELERATION = 20.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 5.0
HOME_LATCH_VEL = 1.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
[APPLICATIONS]
# delay required to wait for pins created by the gui
DELAY = 5
APP = ./hwsim.sh

View File

@@ -0,0 +1,5 @@
pyngcgui config for touchy lathe config
Demonstrate gladevcp apps:
pyngcgui -- subroutine app
gremlin_view -- gremlin with some buttons

View File

@@ -0,0 +1,5 @@
configuración de pyngcgui touchy para torno
Demostrar aplicaciones gladevcp:
pyngcgui -- aplicación de subrutina
gremlin_view -- gremlin con algunos botones

View File

@@ -0,0 +1,165 @@
[EMC]
VERSION = 1.1
MACHINE = pyngcgui-touchy demo
DEBUG = 0x0
[DISPLAY]
EMBED_TAB_NAME = Pyngcgui
EMBED_TAB_COMMAND = gladevcp -x {XID} pyngcgui_touchy_popupkeyboard.ui
EMBED_TAB_NAME = Gremlinview
EMBED_TAB_COMMAND = gladevcp -x {XID} gremlin_view.ui
# these are interpreted by ngcgui:
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
# nom2 -- no m2 terminator (use %)
# these are interpreted by touchy:
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = rectangle_probe.ngc
NGCGUI_SUBFILE = arc2.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = qpocket.ngc
NGCGUI_SUBFILE = ""
DISPLAY = touchy
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
[RS274NGC]
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
PARAMETER_FILE = sim.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 0
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
HALFILE = LIB:hookup_moveoff.tcl
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.2
MAX_LINEAR_VELOCITY = 4
[EMCIO]
TOOL_TABLE = sim.tbl
TOOL_CHANGE_POSITION = 0 0 2
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
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
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
[MACROS]
MACRO=increment xinc yinc
MACRO=probe-hole maxradius
[APPLICATIONS]
# delay required to wait for pins created by the gui
DELAY = 5
APP = ./hwsim.sh
APP = moveoff_gui \
-size 20 -loc center \
-axes xyz \
-noentry \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0

View File

@@ -0,0 +1,23 @@
moveoff demo for touchy
modifies pyngcgui_touchy.ini to use:
[HAL]
...
HALFILE = hookup_move.tcl
HALUI = halui
APP = moveoff_gui \
-size 20 -loc center \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
Simulation configurations usually connect the motor-pos-cmd and motor-pos-fb pins together (shortcircuited). This configuration is also applicable to open-loop (stepper systems) and makes it possible for simulations to run with no external hardware. Servo systems use separate paths for command and feedback and the servo loop is completed with hal components (often using a pid component).
This separated connection is needed to verify that the hookup_moveoff script works correctly with both servo and stepper system configurations.
For more usage info:
$ man moveoff
$ moveoff_gui --help | more

View File

@@ -0,0 +1,23 @@
demo moveoff para touchy
modifica pyngcgui_touchy.ini para usar:
[HAL]
...
HALFILE = hookup_move.tcl
HALUI = halui
APP = moveoff_gui \
-size 20 -loc center \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
Las configuraciones de simulación generalmente conectan los pines motor-pos-cmd y motor-pos-fb (cortocircuitados). Esta configuración también es aplicable en bucle abierto (sistemas paso a paso) y hace posible que las simulaciones se ejecuten sin hardware externo. Los servosistemas utilizan rutas separadas para el comando y la retroalimentación y el lazo servo se completa con componentes hal (a menudo utilizando un componente pid).
Esta conexión separada es necesaria para verificar que la secuencia de comandos hookup_moveoff funcione correctamente con configuraciones de servos y sistemas paso a paso.
Para más información de uso:
$ man moveoff
$ moveoff_gui --help | more

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="default_width">712</property>
<property name="default_height">200</property>
<child>
<object class="PyNgcGui" id="pyngcgui1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_keyboard">True</property>
<property name="debug">False</property>
<property name="verbose">False</property>
<property name="send_function_name">default_send</property>
<property name="send_to_dir">touchy</property>
<property name="control_font_name"></property>
</object>
</child>
</object>
</interface>

View File

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

View File

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

View File

@@ -0,0 +1,151 @@
# EMC controller parameters for a simulated machine.
[MACROS]
MACRO=increment xinc yinc
MACRO=probe-hole maxradius
[EMC]
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-TOUCHY
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x7FFFFFFF
DEBUG = 0
[DISPLAY]
DISPLAY = touchy
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# EMBED_TAB_NAME = Tools
# EMBED_TAB_COMMAND = xterm -into {XID} -rv -fn lucidasanstypewriter-bold-14 -e watch -n1 cat simpockets.tbl
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = sim.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
BASE_PERIOD = 0
# Servo task period, in nano-seconds
SERVO_PERIOD = 1000000
[HAL]
HALFILE = core_sim.hal
# add a test panel so people can actually test the screen
HALCMD = loadusr gladevcp --always_above -c touchy_test touchy_test_panel.glade
POSTGUI_HALFILE = touchy_postgui.hal
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 1.2
MAX_LINEAR_VELOCITY = 4
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
[AXIS_Y]
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
[AXIS_Z]
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
# First axis
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
# Second axis
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
# Third axis
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
# section for main IO controller parameters -----------------------------------
[EMCIO]
# tool table file
TOOL_TABLE = simpockets.tbl
TOOL_CHANGE_POSITION = 0 0 2
RANDOM_TOOLCHANGER = 1

View File

@@ -0,0 +1,7 @@
touchy.ini -- a touchscreen gui
External buttons required:
touchy.cycle-start
touchy.abort
External Jogwheel recommended

View File

@@ -0,0 +1,7 @@
touchy.ini: una interfaz gráfica de usuario con pantalla táctil
Botones externos requeridos:
touchy.cycle-start
touchy.abort
Jogwheel externo recomendado

View File

@@ -0,0 +1,24 @@
# Include your customized HAL commands here
# The commands in this file are run after TOUCHY starts
# connect out test panel controls to TOUCHY
# In a real machine you would connect similarly to REAL buttons
net TEST-MPG touchy_test.mpg =>
net TEST-MPG touchy.wheel-counts
net TEST-MPG axis.x.jog-counts joint.0.jog-counts
net TEST-MPG axis.y.jog-counts joint.1.jog-counts
net TEST-MPG axis.z.jog-counts joint.2.jog-counts
net TEST-JOG-ENABLE-X touchy.jog.wheel.x => axis.x.jog-enable joint.0.jog-enable
net TEST-JOG-ENABLE-Y touchy.jog.wheel.y => axis.y.jog-enable joint.1.jog-enable
net TEST-JOG-ENABLE-Z touchy.jog.wheel.z => axis.z.jog-enable joint.2.jog-enable
net TEST-JOG-INCR touchy.jog.wheel.increment =>
net TEST-JOG-INCR axis.x.jog-scale joint.0.jog-scale
net TEST-JOG-INCR axis.y.jog-scale joint.1.jog-scale
net TEST-JOG-INCR axis.z.jog-scale joint.2.jog-scale
net TEST-CYCLE-START touchy_test.cycle-start-button => touchy.cycle-start
net TEST-SPINDLE-SPEED spindle.0.speed-out => touchy_test.spindle-speed

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<requires lib="gladevcp" version="0.0"/>
<object class="GtkWindow" id="window1">
<property name="can-focus">False</property>
<property name="accept-focus">False</property>
<child>
<object class="State_Sensitive_Table" id="state_sensitive_table1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-homed">False</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="HAL_HBar" id="spindle-speed">
<property name="height-request">50</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bg-color">#bebebebebebe</property>
<property name="max">1500</property>
<property name="min">-1500</property>
<property name="shiny">True</property>
<property name="target-color">#a0a02020f0f0</property>
<property name="target-width">5</property>
<property name="text-template">%d</property>
<property name="z0-border">0.75</property>
<property name="z0-color">#0000ffff0000</property>
<property name="z1-border">0.89999997615814209</property>
<property name="z1-color">#ffffffff0000</property>
<property name="z2-color">#ffff00000000</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes"> This panel is
For SIM TESTING Only</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="2"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="Hal_Dial" id="mpg">
<property name="height-request">250</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="center-color">#bdefbdefbdef</property>
<property name="label">MPG</property>
<property name="scale-adjustable">False</property>
<property name="show-counts">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xscale">0.5</property>
<property name="yscale">0.5</property>
<child>
<object class="HAL_Button" id="cycle-start-button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="ypad">4</property>
<property name="label" translatable="yes">Cycle
Start</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="2"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>