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,25 @@
#INCLUDE moveoff_display.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,onpause,local
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
[APPLICATIONS]
APP = moveoff_gui \
-mode onpause \
-size 14 \
-loc +10+50 \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
APP = halscope -i ./moveoff.halscope

View File

@@ -0,0 +1,32 @@
Moveoff demo
Moveoff_gui options:
onpause -- offsets when program paused
local -- local controls
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
For additional info:
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui
----------------------------------------------------
Demo usage:
1) Start linuxcnc using the 1_onpause_local config.
2) Set halscope to ROLL mode.
3) <F1> (remove ESTOP)
4) <F2> (turn on machine)
5) <HOME> (home all axes)
6) <R> (Run the program)
7) <P> (Pause the program)
8) Enable offsets with the Enable Offsets checkbutton.
9) Change the x,y,z offsets sliders and observe
on halscope
10) Uncheck the Enable Offsets checkbutton to remove
offsets and allow program resumption.
11) Repeat steps 6) thru 9) but alter waypoint
backtracking with the Enable Backtrack checkbutton.

View File

@@ -0,0 +1,33 @@
Demo moveoff
Opciones Moveoff_gui:
onpause - offsets cuando el programa está en pausa
local - controles locales
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Para información adicional:
man moveoff ------- componente moveoff
man moveoff_gui --- GUI de muestra de moveoff
-------------------------------------------------- -
Uso de demostración:
1) Inicie linuxcnc usando la configuración 1_onpause_local.
2) Establezca halscope en modo ROLL.
3) <F1> (ESTOP off)
4) <F2> (máquina on)
5) <HOME> (home todos los ejes)
6) <R> (Ejecuta el programa)
7) <P> (Pausa el programa)
8) Habilite los offsets con el botón de verificación Activar Offsets.
9) Cambie los controles deslizantes de offsets x, y, z y observe
en halscope
10) Desmarque el botón Activar Offsets para eliminar
offsets y permitir la reanudación del programa.
11) Repita los pasos 6) a 9) pero modifique el retroceso del punto de referencia
con el botón Habilitar Retroceso.

View File

@@ -0,0 +1,37 @@
#INCLUDE moveoff_display.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,onpause,external
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
# simulate external controls:
HALFILE = LIB:moveoff_external.hal
[APPLICATIONS]
APP = moveoff_gui \
-mode onpause \
-size 14 \
-loc +10+50 \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
APP = halscope -i ./moveoff.halscope
# pins representing an external app for offsetting:
APP = sim_pin \
external_enable \
external_backtrack_en \
external_offset_0 \
external_offset_1 \
external_offset_2

View File

@@ -0,0 +1,46 @@
Moveoff demo
Moveoff_gui options:
onpause -- offsets when program paused
external -- external controls (simulated)
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
External controls enabled with connections in:
[HAL]HALFILE = LIB:moveoff_external.hal
External controls simulated with sim_pin:
external_enable
external_backtrack_en
external_offset_0
external_offset_1
external_offset_2
For additional info, see the manpages:
man sim_pin ------ utility for setting pins
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui
----------------------------------------------------
Demo usage:
1) Start linuxcnc using the 2_onpause_external config.
(set all sim_pin buttons to Toggle mode):
2) Set halscope to ROLL mode
3) <F1> (remove ESTOP)
4) <F2> (turn on machine)
5) <HOME> (home all axes)
6) <R> (Run the program)
7) <P> (Pause the program)
8) Enable offsets with the external_enable button
9) Change the x,y,z offsets (exernal_offset_0,1,2)
and observe on halscope
10) Remove offsets with the external_enable button
and allow program resumption.
11) Repeat steps 6) thru 9) but alter waypoint
backtracking with the external_backtrack_en button.

View File

@@ -0,0 +1,46 @@
Demo Moveoff
Opciones de Moveoff_gui:
onpause - offsets cuando el programa está en pausa
externo - controles externos (simulados)
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Controles externos habilitados con conexiones en:
[HAL]HALFILE = LIB:moveoff_external.hal
Controles externos simulados con sim_pin:
external_enable
external_backtrack_en
external_offset_0
external_offset_1
external_offset_2
Para obtener información adicional, consulte las páginas de manual:
man sim_pin ------- utilidad para configurar pines
man moveoff ------- componente de movimiento
man moveoff_gui --- GUI de muestra de moveoff
-------------------------------------------------- -
Uso de demostración:
1) Inicie linuxcnc usando la configuración 2_onpause_external.
(configure todos los botones sim_pin en el modo Alternar):
2) Establezca halscope en modo ROLL
3) <F1> (ESTOP off)
4) <F2> (máquina on)
5) <HOME> (home todos los ejes)
6) <R> (Ejecuta el programa)
7) <P> (Pausar el programa)
8) Habilite offsets con el botón external_enable
9) Cambia los offsets x, y, z (exernal_offset_0,1,2)
y observar en halscope
10) Elimine offset con el botón external_enable
y permita la reanudación del programa.
11) Repita los pasos 6) a 9) pero modifique el punto de referencia
retroceder con el botón external_backtrack_en.

View File

@@ -0,0 +1,25 @@
#INCLUDE moveoff_display.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,always,local
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
[APPLICATIONS]
APP = moveoff_gui \
-mode always \
-size 14 \
-loc +10+50 \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
APP = halscope -i ./moveoff.halscope

View File

@@ -0,0 +1,27 @@
Moveoff demo
Moveoff_gui options:
always -- offsets always available
local -- local controls
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
For additional info:
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui
----------------------------------------------------
Demo usage:
1) Start linuxcnc using the 3_always_local config.
2) Set halscope to ROLL mode.
2) <F1> (remove ESTOP)
3) <F2> (turn on machine)
Offsets are available continuously.
4) Apply offsets using +/- buttons
5) Disable offsets by unchecking the Enable Offsets
checkbutton.

View File

@@ -0,0 +1,27 @@
Demo Moveoff
Opciones de Moveoff_gui:
always - offsets siempre disponibles
local - controles locales
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Para información adicional:
man moveoff ------- componente moveoff
man moveoff_gui --- GUI de muestra de moveoff
-------------------------------------------------- -
Uso de demostración:
1) Inicie linuxcnc usando la configuración 3_always_local.
2) Establezca halscope en modo ROLL.
2) <F1> (ESTOP off)
3) <F2> (máquina on)
Los offsets están disponibles continuamente.
4) Aplicar offsets usando los botones +/-
5) Desactiva los offsets desmarcando el botón de control
Activar Offsets

View File

@@ -0,0 +1,37 @@
#INCLUDE moveoff_display.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,always,external
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
# simulate external controls:
HALFILE = LIB:moveoff_external.hal
[APPLICATIONS]
APP = moveoff_gui \
-mode always \
-size 14 \
-loc +10+50 \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
APP = halscope -i ./moveoff.halscope
# pins representing an external app for offsetting:
APP = sim_pin \
external_enable \
external_backtrack_en \
external_offset_0 \
external_offset_1 \
external_offset_2

View File

@@ -0,0 +1,28 @@
Moveoff demo
Moveoff_gui options:
always -- offsets always available
external -- external controls (simulated)
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
External controls enabled with connections in:
[HAL]HALFILE = LIB:moveoff_external.hal
External controls simulated with sim_pin:
external_enable
external_backtrack_en
external_offset_0
external_offset_1
external_offset_2
For additional info, see the manpages:
man sim_pin ------ utility for setting pins
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui

View File

@@ -0,0 +1,29 @@
Demo Moveoff
Opciones de Moveoff_gui:
always -- offsets siempre disponibles
external - controles externos (simulados)
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Controles externos habilitados con conexiones en:
[HAL]HALFILE = LIB:moveoff_external.hal
Controles externos simulados con sim_pin:
external_enable
external_backtrack_en
external_offset_0
external_offset_1
external_offset_2
Para obtener información adicional, consulte las páginas de manual:
man sim_pin ------- utilidad para configurar pines
man moveoff ------- componente moveoff
man moveoff_gui --- GUI de muestra de moveoff

View File

@@ -0,0 +1,29 @@
#INCLUDE moveoff_display.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,no_gui
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
HALFILE = LIB:hookup_moveoff.tcl
[APPLICATIONS]
APP = halshow ./moveoff.halshow
APP = halscope -i ./moveoff.halscope
APP = sim_pin \
mv.power-on \
mv.apply-offsets \
mv.move-enable \
mv.backtrack-enable \
mv.dbg-waypoint-limit-test \
mv.waypoint-sample-secs \
mv.waypoint-threshold \
mv.offset-in-2 \
mv.offset-min-2 \
mv.offset-max-2 \
mv.offset-vel-2 \
mv.offset-accel-2

View File

@@ -0,0 +1,16 @@
moveoff no_gui
This demonstration provides no gui support but pops up several general-purpose utilities to show behavior for a single axis (2 => z).
The sim_pin utility is used to set pin values that would normally be connected to a gui or set to fixed values according to inifile settings:
The utility sim_pin is used to set pins to control the component.
A halshow application widget shows a watch panel for pins associated with the z-axis offset. See the file moveoff.hal for connections.
A halscope session is started (select 'Roll' to start) to show behavior of important moveoff inputs and outputs
These utilities can be augmented or disabled using the inifile settings:
[APPLICATIONS]APP = program_name
Note: This is a Hal-only implementation and the offset positions are NOT shown on the axis gui preview.

View File

@@ -0,0 +1,17 @@
moveoff no_gui
Esta demostración no proporciona soporte gui, pero muestra varias utilidades de uso general para mostrar el comportamiento de un solo eje (2 => z).
La utilidad sim_pin se usa para establecer valores de pin que normalmente se conectarían a una gui o se establecerían en valores fijos de acuerdo con la configuración de archivos:
La utilidad sim_pin se usa para establecer pines para controlar el componente.
Un widget de la aplicación halshow muestra un panel de observación para los pines asociados con el desplazamiento del eje z. Vea el archivo moveoff.hal para las conexiones.
Se inicia una sesión halscope (seleccione 'Roll' para comenzar) para mostrar el comportamiento de las entradas y salidas importantes de moveoff
Estas utilidades pueden mostrarse o deshabilitarse usando la configuración inifile:
[APPLICATIONS]APP = nombre_programa
Nota: Esta es una implementación solo de Hal y las posiciones de offset NO se muestran en la vista previa de la gui Axis.

View File

@@ -0,0 +1,42 @@
#INCLUDE moveoff_display_6.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff zretract demo
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
# simulate external controls:
HALFILE = LIB:moveoff_external.hal
# demonstrate fixed zretract offset = 0.1234
# set offset,accel,velocity for axis 2 (z):
HALCMD = sets external_offset_2 0.1234
HALCMD = setp mv.offset-accel-2 10
HALCMD = setp mv.offset-vel-2 0.05
# backtracking not required for fixed offset:
HALCMD = sets external_backtrack_en 0
# Instead of external toggle switch, create connection
# to external_enable signal with a pyvcp panel checkbutton.
POSTGUI_HALFILE = moveoff_display_6.hal
[APPLICATIONS]
# moveoff_gui:
# 1) provides display of offset
# 2) resumes after delay
# typical use, control spindle with mv.offset-aplied pin
APP = moveoff_gui \
-mode onpause \
-size 14 \
-loc +10+50 \
-axes z \
-autoresume -delay 5 \
-no_cancel_autoresume

View File

@@ -0,0 +1,48 @@
Moveoff demo -- fixed retract on single axis (Z)
Demo:
1) Start linuxcnc using the 6_zretract config
2) A pyvpcp panel includes a checkbutton
to enable fixed offsets on program
pause.
3) Start program
4) Pause program
5) A moveoff_gui display (with no controls) will
appear showing the current Z offset. If the
checkbtton was set to enable offsets, the
offset will be applied immediately. If the
checkbutton was not set, enable the checkbutton
to apply the offset.
6) Toggle the checkbutton to OFF to
remove the fixed offset and resume the program.
7) The fixed offset will be removed after
a delay to allow for spindle reactivation.
Typically, the spindle would be gated
off for the duration the mv.offset-applied pin.
The delay allows time for the spindle to resume
speed.
8) Toggle the sim_pin external_enable switch to
1 (ON) to allow offsetting at the next program
pause -- or leave it OFF to require its
activation on the next program pause.
The ini file sets:
1) offset amount and its velocity and acceleration
2) state of the external-enable signal at startup
3) autoresume delay interval
4) location and size of the moveoff_gui display
----------------------------------------------------
Moveoff_gui options:
onpause -- offsets when program paused
local -- local controls
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
For additional info:
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui

View File

@@ -0,0 +1,47 @@
Demo Moveoff - retracción fija en un solo eje (Z)
Demo:
1) Inicie linuxcnc usando la configuración 6_zretract
2) Un panel pyvpcp incluye un botón de verificación
para habilitar offsets fijos en pausa del programa.
3) Iniciar programa
4) Pausa de programa
5) Una pantalla moveoff_gui (sin controles)
aparece mostrando el offset Z actual. Si el
botón de verificación se configuró para habilitar offsets,
se aplicarán de inmediato. Si el
el botón de verificación no se configuró, habilite el botón de verificación
para aplicar el offset.
6) Cambie el botón de verificación a APAGADO para
eliminar el offset fijo y reanude el programa.
7) El offset fijo se eliminará después de
un retraso para permitir la reactivación del husillo.
Normalmente, el husillo estaría
apagado durante la duración del pin aplicado mv.offset.
El retraso permite que el husillo se reanude
a su velocidad.
8) Cambie el interruptor sim_pin external_enable a
1 (ON) para permitir offsets en la siguiente pausa
de programa - o déjelo apagado para requerir su
activación en la próxima pausa del programa.
El archivo ini establece:
1) cantidad compensada y su velocidad y aceleración
2) estado de la señal de habilitación externa en la parada
3) intervalo de demora de autoresume
4) ubicación y tamaño de la pantalla moveoff_gui
-------------------------------------------------- -
Opciones de Moveoff_gui:
onpause - compensa cuando el programa está en pausa
local - controles locales
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Para información adicional:
man moveoff ------ componente de movimiento
man moveoff_gui --- GUI de muestra de moveoff

View File

@@ -0,0 +1,32 @@
#INCLUDE moveoff_display_7.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,onpause,external
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
# simulate external controls:
HALFILE = LIB:moveoff_external.hal
POSTGUI_HALFILE = moveoff_display_7.hal
# using pyvcp panel: -no_display disables moveoff_gui display
[APPLICATIONS]
APP = moveoff_gui \
-no_display \
-mode onpause \
-size 14 \
-loc +10+50 \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
APP = halscope -i ./moveoff.halscope

View File

@@ -0,0 +1,34 @@
Moveoff demo -- external controls with pvyvcp panel
moveoff_gui display disabled
----------------------------------------------------
Moveoff_gui options:
(Note: the moveoff_gui is used in the -no_display mode)
onpause -- offsets when program paused
external -- external controls in pyvcp panel
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
For additional info:
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui
----------------------------------------------------
Demo usage:
1) Start linuxcnc using the 7_pyvcp config.
2) <F1> (remove ESTOP)
3) <F2> (turn on machine)
4) <HOME> (home all axes)
5) <R> (Run the program)
6) <P> (Pause the program)
7) Set halscope to ROLL mode and then enable offsets
with the Enable Offsets checkbutton.
8) Change the x,y,z offsets sliders and observe
on halscope
9) Uncheck the Enable Offsets checkbutton to remove
offsets and allow program resumption.
10) Repeat steps 6) thru 9) but alter waypoint
backtracking with the Enable Backtrack checkbutton.

View File

@@ -0,0 +1,35 @@
Demo Moveoff - controles externos con panel pvyvcp
La pantalla moveoff_gui está deshabilitada
-------------------------------------------------- -
Opciones de Moveoff_gui:
(Nota: moveoff_gui se usa en el modo -no_display)
onpause - compensa cuando el programa está en pausa
external - controles externos en panel de pyvcp
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Para información adicional:
man moveoff ------ componente de movimiento
man moveoff_gui --- GUI de muestra de moveoff
-------------------------------------------------- -
Uso de demostración:
1) Inicie linuxcnc usando la configuración 7_pyvcp.
2) <F1> (eliminar ESTOP)
3) <F2> (enciende la máquina)
4) <HOME> (inicio todos los ejes)
5) <R> (Ejecuta el programa)
6) <P> (Pausa el programa)
7) Configure halscope en modo ROLL y luego habilite las compensaciones
con el botón Habilitar compensaciones.
8) Cambie los controles deslizantes de desplazamiento x, y, z y observe
en halscope
9) Desmarque el botón Habilitar compensaciones para eliminar
compensa y permite la reanudación del programa.
10) Repita los pasos 6) a 9) pero modifique el punto de referencia
retroceder con el botón Habilitar retroceso.

View File

@@ -0,0 +1,33 @@
#INCLUDE moveoff_display_8.inc
#INCLUDE moveoff_base.inc
#INCLUDE moveoff_settings.inc
[EMC]
VERSION = 1.1
MACHINE = moveoff,onpause,external
[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
# hookup a moveoff component:
HALFILE = LIB:hookup_moveoff.tcl
# simulate external controls:
HALFILE = LIB:moveoff_external.hal
# connections for gladevcp:
POSTGUI_HALFILE = moveoff_display_8.hal
# using pyvcp panel: -no_display disables moveoff_gui display
[APPLICATIONS]
APP = moveoff_gui \
-no_display \
-mode onpause \
-size 14 \
-loc +10+50 \
-axes xyz \
-autoresume -delay 4 \
-inc 0.001 -inc 0.01 -inc 0.1 -inc 1.0
APP = halscope -i ./moveoff.halscope

View File

@@ -0,0 +1,38 @@
Moveoff demo -- external controls with gladevcp panel
moveoff_gui display disabled
----------------------------------------------------
Moveoff_gui options:
(Note: the moveoff_gui is used in the -no_display mode)
onpause -- offsets when program paused
external -- external controls in pyvcp panel
Moveoff component installed and connected using:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
For additional info:
man moveoff ------ moveoff component
man moveoff_gui --- moveoff sample gui
----------------------------------------------------
Demo usage:
1) Start linuxcnc using the 8_gladevcp config.
2) <F1> (remove ESTOP)
3) <F2> (turn on machine)
4) <HOME> (home all axes)
5) <R> (Run the program)
6) <P> (Pause the program)
7) Set halscope to ROLL mode and then enable offsets
with the Enable Offsets checkbutton.
8) Change the x,y,z offsets sliders and observe
on halscope
9) Uncheck the Enable Offsets checkbutton to remove
offsets and allow program resumption.
10) Repeat steps 6) thru 9) but alter waypoint
backtracking with the Enable Backtrack checkbutton.
----------------------------------------------------
Instructions are provided in the file moveoff_display_8.inc
for testing with the gscreen gui.

View File

@@ -0,0 +1,38 @@
Demo Moveoff - controles externos con panel gladevcp
La pantalla moveoff_gui está deshabilitada
-------------------------------------------------- -
Opciones de Moveoff_gui:
(Nota: moveoff_gui se usa en el modo -no_display)
onpause - compensa cuando el programa está en pausa
external - controles externos en panel de pyvcp
Componente Moveoff instalado y conectado usando:
[HAL]HALFILE = LIB:hookup_moveoff.tcl
Para información adicional:
man moveoff ------ componente de movimiento
man moveoff_gui --- GUI de muestra de moveoff
-------------------------------------------------- -
Uso de demostración:
1) Inicie linuxcnc usando la configuración 8_gladevcp.
2) <F1> (eliminar ESTOP)
3) <F2> (enciende la máquina)
4) <HOME> (home todos los ejes)
5) <R> (Ejecuta el programa)
6) <P> (Pausa el programa)
7) Configure halscope en modo ROLL y luego habilite las compensaciones
con el botón Habilitar compensaciones.
8) Cambie los controles deslizantes de desplazamiento x, y, z y observe
en halscope
9) Desmarque el botón Habilitar compensaciones para eliminar
compensa y permite la reanudación del programa.
10) Repita los pasos 6) a 9) pero modifique el punto de referencia
retroceder con el botón Habilitar retroceso.
-------------------------------------------------- -
Las instrucciones se proporcionan en el archivo moveoff_display_8.inc
para probar con la gui gscreen.

View File

@@ -0,0 +1,32 @@
moveoff.comp is a 'Hal-only' method for providing offsets for up to nine axes (x,y,z,a,b,c,u,v,w).
The moveoff.comp component provides min, max, velocity, and acceleration limits for each axis (similar to the limit3 component).
See the manpage for more information:
$ man moveoff
The demonstration configs show:
o moveoff_gui
a simple gui
o hookup_moveoff.tcl
a script to connect a moveoff component
o moveoff.halscope
halscope configs to illustrate movement
(GUI's to not show Hal-only offset movements)
Demonstration configs:
demonstration mode controls
---------------- ------- --------------------
1 onpause_local onpause local
2 onpause_external onpause external (simulated)
3 always_local always local
4 always_external always external (simulated)
5 no_gui NA NA
6 zretract onpause pyvcp panel
7 pyvcp onpause pyvcp panel
8 gladevcp onpause gladevcp panel

View File

@@ -0,0 +1,72 @@
# halfile to connect a moveoff.comp for axis gui examples
# This halfile modifies the connections made in core_sim.hal
# to add a moveoff component and addfs its functions
# This halfile must follow core_sim.hal
# moveoff offsetting component (use names=mv is required):
loadrt moveoff names=mv
# addf the moveoff funcs in correct sequence:
addf mv.write-outputs servo-thread 3
addf mv.read-inputs servo-thread 1
# modify connections set in core_sim.hal
unlinkp joint.0.motor-pos-cmd
unlinkp joint.1.motor-pos-cmd
unlinkp joint.2.motor-pos-cmd
unlinkp joint.0.motor-pos-fb
unlinkp joint.1.motor-pos-fb
unlinkp joint.2.motor-pos-fb
# connect motor-pos-cmd pins to the component:
net Xpos joint.0.motor-pos-cmd => mv.pos-0
net Ypos joint.1.motor-pos-cmd => mv.pos-1
net Zpos joint.2.motor-pos-cmd => mv.pos-2
# generated positions with offsets ADDED are
# 'short circuited' to the feedback input pins:
net mx:plus mv.pos-plusoffset-0 => mv.fb-0
net my:plus mv.pos-plusoffset-1 => mv.fb-1
net mz:plus mv.pos-plusoffset-2 => mv.fb-2
# synthesized feedback values with offsets SUBTRACTED
# are sent back to motion:
net mx:fb mv.fb-minusoffset-0 => joint.0.motor-pos-fb
net my:fb mv.fb-minusoffset-1 => joint.1.motor-pos-fb
net mz:fb mv.fb-minusoffset-2 => joint.2.motor-pos-fb
# example setting global inputs from ini file:
setp mv.epsilon [MOVEOFF]EPSILON
setp mv.waypoint-sample-secs [MOVEOFF]WAYPOINT_SAMPLE_SECS
setp mv.waypoint-threshold [MOVEOFF]WAYPOINT_THRESHOLD
# offset rates from ini file:
setp mv.offset-vel-0 [MOVEOFF_0]MAX_VELOCITY
setp mv.offset-vel-1 [MOVEOFF_1]MAX_VELOCITY
setp mv.offset-vel-2 [MOVEOFF_2]MAX_VELOCITY
# offset accels from ini file:
setp mv.offset-accel-0 [MOVEOFF_0]MAX_ACCELERATION
setp mv.offset-accel-1 [MOVEOFF_1]MAX_ACCELERATION
setp mv.offset-accel-2 [MOVEOFF_2]MAX_ACCELERATION
# offset min, max limits
setp mv.offset-min-0 [MOVEOFF_0]MIN_LIMIT
setp mv.offset-min-1 [MOVEOFF_1]MIN_LIMIT
setp mv.offset-min-2 [MOVEOFF_2]MIN_LIMIT
setp mv.offset-max-0 [MOVEOFF_0]MAX_LIMIT
setp mv.offset-max-1 [MOVEOFF_1]MAX_LIMIT
setp mv.offset-max-2 [MOVEOFF_2]MAX_LIMIT
# overall enable for the component:
# 1 ==> enabled as soon as apply-offsets asserted
# 0 ==> external control of move-enable required
setp mv.move-enable 0
# offset values (set as required with your gui)
setp mv.offset-in-0 0
setp mv.offset-in-1 0
setp mv.offset-in-2 0

View File

@@ -0,0 +1,47 @@
THREAD servo-thread
MAXCHAN 8
HMULT 6
HZOOM 1
HPOS 0.000000e+00
CHAN 1
PIN mv.apply-offsets
VSCALE 1
VPOS 0.100000
VOFF 0.000000e+00
CHAN 2
PIN halui.program.resume
VSCALE 0
VPOS 0.200000
VOFF 0.000000e+00
CHAN 3
PIN mv.move-enable
VSCALE 1
VPOS 0.300000
VOFF 0.000000e+00
CHAN 4
PIN mv.offset-applied
VSCALE 1
VPOS 0.400000
VOFF 0.000000e+00
CHAN 5
PIN mv.offset-current-0
VSCALE 1
VPOS 0.500000
VOFF 0.000000e+00
CHAN 6
PIN mv.offset-current-1
VSCALE 1
VPOS 0.600000
VOFF 0.000000e+00
CHAN 7
PIN mv.offset-current-2
VSCALE 1
VPOS 0.700000
VOFF 0.000000e+00
CHAN 8
PIN mv.waypoint-ct
VSCALE 6
VPOS 0.900000
VOFF 0.000000e+00
TMODE 0
RMODE 0

View File

@@ -0,0 +1 @@
pin+mv.power-on pin+mv.apply-offsets pin+mv.move-enable pin+mv.backtrack-enable pin+mv.epsilon pin+mv.waypoint-sample-secs pin+mv.waypoint-threshold pin+mv.offset-in-0 pin+mv.offset-in-1 pin+mv.offset-in-2 pin+mv.offset-applied pin+mv.offset-current-0 pin+mv.offset-current-1 pin+mv.offset-current-2 pin+mv.warning pin+mv.waypoint-ct pin+mv.waypoint-percent-used pin+mv.waypoint-limit pin+halui.program.resume

View File

@@ -0,0 +1,92 @@
[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]
NO_FORCE_HOMING = 1
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 5
# POSITION_FILE = position.txt
MAX_LINEAR_VELOCITY = 5
[EMCIO]
TOOL_TABLE = sim.tbl
TOOL_CHANGE_POSITION = 0 0 0
TOOL_CHANGE_QUILL_UP = 1
[KINS]
JOINTS = 3
KINEMATICS = trivkins
[AXIS_X]
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 50.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 50.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 = 5
MAX_ACCELERATION = 50.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 50.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 = 0.12
MAX_VELOCITY = 5
MAX_ACCELERATION = 50.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 50.0
MIN_LIMIT = -8.0
MAX_LIMIT = 0.12
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_SEQUENCE = 0

View File

@@ -0,0 +1,18 @@
[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 = 5
DEFAULT_LINEAR_VELOCITY = .25
DEFAULT_SPINDLE_SPEED = 200
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

View File

@@ -0,0 +1 @@
net external_enable pyvcp.enable_offset

View File

@@ -0,0 +1,19 @@
[DISPLAY]
DISPLAY = axis
PYVCP = moveoff_display_6.xml
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 = 5
DEFAULT_LINEAR_VELOCITY = .25
DEFAULT_SPINDLE_SPEED = 200
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

View File

@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<checkbutton>
<halpin>"enable_offset"</halpin>
<text>"Enable Fixed Offset\non Pause"</text>
<initval>0</initval>
</checkbutton>
</vbox>
</pyvcp>

View File

@@ -0,0 +1,28 @@
# connections for pyvcp panel
# connect to signals created by moveoff_external.hal
# to inputs from pyvcp panel:
net external_enable <= pyvcp.enable-offset
net external_offset_0 <= pyvcp.x-offset-f
net external_offset_1 <= pyvcp.y-offset-f
net external_offset_2 <= pyvcp.z-offset-f
net external_backtrack_en <= pyvcp.enable-backtrack
# connect signal provided by moveoff_gui to pyvcp led:
net mvoff_gui:apply_offsets pyvcp.led-apply
# connect for pyvcp status items:
net led-offset-applied mv.offset-applied => pyvcp.led-active
net led-waypoint-limeit mv.waypoint-limit => pyvcp.led-waypoint-limit
net show_waypoint-percent-used mv.waypoint-percent-used => pyvcp.waypoint-percent-used
# connect for pyvcp display of current offsets:
net current_offset_0 <= mv.offset-current-0
net current_offset_0 => pyvcp.x-offset-current
net current_offset_1 <= mv.offset-current-1
net current_offset_1 => pyvcp.y-offset-current
net current_offset_2 <= mv.offset-current-2
net current_offset_2 => pyvcp.z-offset-current

View File

@@ -0,0 +1,19 @@
[DISPLAY]
DISPLAY = axis
PYVCP = moveoff_display_7.xml
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 = 5
DEFAULT_LINEAR_VELOCITY = .25
DEFAULT_SPINDLE_SPEED = 200
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

View File

@@ -0,0 +1,172 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- this is an example, the values are not
likely to be suitable for a real machine
-->
<pyvcp>
<vbox>
<label>
<text>"Moveoff Offsets"</text>
<font>"bold"</font>
</label>
<checkbutton>
<halpin>"enable-offset"</halpin>
<text>"Enable Offsets"</text>
<anchor>"w"</anchor>
<initval>0</initval>
<relief>"ridge"</relief>
<bd>3</bd>
</checkbutton>
<vbox>
<relief>"sunken"</relief>
<bd>3</bd>
<hbox>
<led>
<halpin>"led-apply"</halpin>
<on_color>"red"</on_color>
<off_color>"gray"</off_color>
<size>15</size>
</led>
<label>
<text>"Paused"</text>
</label>
</hbox>
<hbox>
<led>
<halpin>"led-active"</halpin>
<on_color>"red"</on_color>
<off_color>"gray"</off_color>
<size>15</size>
</led>
<label>
<text>"Active"</text>
</label>
</hbox>
</vbox>
<vbox>
<relief>"sunken"</relief>
<bd>3</bd>
<label>
<text>"Requested X Offset:"</text>
<anchor>"w"</anchor>
</label>
<scale>
<halpin>"x-offset"</halpin>
<resolution>0.01</resolution>
<min_>0</min_>
<max_>10</max_>
<initval>0</initval>
<param_pin>1</param_pin>
<orient>HORIZONTAL</orient>
</scale>
<hbox>
<label>
<text>"Current X:"</text>
<anchor>"w"</anchor>
</label>
<number>
<halpin>"x-offset-current"</halpin>
<format>"4.3f"</format>
<fg>"red"</fg>
<font>"bold"</font>
</number>
</hbox>
</vbox>
<vbox>
<relief>"sunken"</relief>
<bd>3</bd>
<label>
<text>"Requested Y Offset:"</text>
<anchor>"w"</anchor>
</label>
<scale>
<halpin>"y-offset"</halpin>
<resolution>0.01</resolution>
<min_>0</min_>
<max_>10</max_>
<initval>0</initval>
<param_pin>1</param_pin>
<orient>HORIZONTAL</orient>
</scale>
<hbox>
<label>
<text>"Current Y:"</text>
<anchor>"w"</anchor>
</label>
<number>
<halpin>"y-offset-current"</halpin>
<format>"4.3f"</format>
<fg>"red"</fg>
<font>"bold"</font>
</number>
</hbox>
</vbox>
<vbox>
<relief>"sunken"</relief>
<bd>3</bd>
<label>
<text>"Requested Z Offset:"</text>
<anchor>"w"</anchor>
</label>
<scale>
<halpin>"z-offset"</halpin>
<resolution>0.01</resolution>
<min_>0</min_>
<max_>10</max_>
<initval>0</initval>
<param_pin>1</param_pin>
<orient>HORIZONTAL</orient>
</scale>
<hbox>
<label>
<text>"Current Z:"</text>
<anchor>"w"</anchor>
</label>
<number>
<halpin>"z-offset-current"</halpin>
<format>"4.3f"</format>
<fg>"red"</fg>
<font>"bold"</font>
</number>
</hbox>
</vbox>
<vbox>
<relief>"ridge"</relief>
<bd>3</bd>
<checkbutton>
<halpin>"enable-backtrack"</halpin>
<text>"Enable Backtrack"</text>
<anchor>"w"</anchor>
<initval>0</initval>
</checkbutton>
<hbox>
<label>
<text>"Waypoint %:"</text>
<anchor>"w"</anchor>
</label>
<s32>
<halpin>"waypoint-percent-used"</halpin>
<fg>"red"</fg>
<font>"bold"</font>
</s32>
</hbox>
<hbox>
<led>
<halpin>"led-waypoint-limit"</halpin>
<on_color>"red"</on_color>
<off_color>"gray"</off_color>
<size>15</size>
</led>
<label>
<text>"Waypt imit"</text>
</label>
</hbox>
</vbox>
</vbox>
</pyvcp>

View File

@@ -0,0 +1,30 @@
# connections for gladevcp panel, example embed command:
# EMBED_TAB_COMMAND=halcmd loadusr -Wn gladevcp8 gladevcp -c gladevcp8 -x {XID} ./moveoff_gladevcp_8.ui
# note the expected name prefix is 'gladevcp8' (specified with -Wn arg and -c arg)
# connect to signals created by moveoff_external.hal
# to inputs from gladevcp panel:
net external_enable <= gladevcp8.enable-offset
net external_offset_0 <= gladevcp8.x-offset-f
net external_offset_1 <= gladevcp8.y-offset-f
net external_offset_2 <= gladevcp8.z-offset-f
net external_backtrack_en <= gladevcp8.enable-backtrack
# connect signal provided by moveoff_gui to gladevcp led:
net mvoff_gui:apply_offsets gladevcp8.led-apply
# connect for gladevcp status items:
net led-offset-applied mv.offset-applied => gladevcp8.led-active
net led-waypoint-limeit mv.waypoint-limit => gladevcp8.led-waypoint-limit
net show_waypoint-percent-used mv.waypoint-percent-used => gladevcp8.waypoint-percent-used
# connect for gladevcp display of current offsets:
net current_offset_0 <= mv.offset-current-0
net current_offset_0 => gladevcp8.x-offset-current
net current_offset_1 <= mv.offset-current-1
net current_offset_1 => gladevcp8.y-offset-current
net current_offset_2 <= mv.offset-current-2
net current_offset_2 => gladevcp8.z-offset-current

View File

@@ -0,0 +1,30 @@
[DISPLAY]
EMBED_TAB_NAME= moveoff gladevcp demo
EMBED_TAB_COMMAND= halcmd loadusr -Wn gladevcp8 gladevcp -c gladevcp8 -t Redmond -x {XID} ./moveoff_gladevcp_8.ui
EMBED_TAB_LOCATION = vcp_box
# halcmd options used:
# -Wn NAME wait for named component (must agree with names in moveoff_display_8.hal)
# gladevcp options:
# -c NAME set component name
# -t THEME set theme name (should be same as desktop appearance theme usually)
# -x {XID} reparent in window
# to test with gscreen, change 'DISPLAY = axis' to 'DISPLAY = gscreen'
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 = 5
DEFAULT_LINEAR_VELOCITY = .25
DEFAULT_SPINDLE_SPEED = 200
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

View File

@@ -0,0 +1,445 @@
<?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="GtkAdjustment" id="adjustment1">
<property name="lower">-1</property>
<property name="upper">1</property>
<property name="step-increment">0.01</property>
<property name="page-increment">0.01</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="lower">-1</property>
<property name="upper">1</property>
<property name="step-increment">0.01</property>
<property name="page-increment">0.01</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
<property name="lower">-1</property>
<property name="upper">1</property>
<property name="step-increment">0.01</property>
<property name="page-increment">0.01</property>
</object>
<object class="GtkWindow" id="window1">
<property name="can-focus">False</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="HAL_CheckButton" id="enable-offset">
<property name="label" translatable="yes">Enable Offsets
(while paused)</property>
<property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</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_LED" id="led-apply">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="led-blink-rate">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Paused</property>
</object>
<packing>
<property name="expand">False</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>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="HAL_LED" id="led-active">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="led-blink-rate">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Active</property>
</object>
<packing>
<property name="expand">False</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">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Requested X Offset</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_HScale" id="x-offset-f">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment1</property>
<property name="round-digits">1</property>
<property name="digits">3</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Current X:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_Label" id="x-offset-current">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="label-pin-type">1</property>
</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">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Requested Y Offset</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_HScale" id="y-offset-f">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment2</property>
<property name="round-digits">1</property>
<property name="digits">3</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Current Y:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_Label" id="y-offset-current">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="label-pin-type">1</property>
</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">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Requested Z Offset</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_HScale" id="z-offset-f">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment3</property>
<property name="round-digits">1</property>
<property name="digits">3</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Current Z:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_Label" id="z-offset-current">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="label-pin-type">1</property>
</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">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="HAL_CheckButton" id="enable-backtrack">
<property name="label" translatable="yes">Enable Backtrack</property>
<property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Waypoint %:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_Label" id="waypoint-percent-used">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">label</property>
</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">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="HAL_LED" id="led-waypoint-limit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="led-blink-rate">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Waypt limit</property>
</object>
<packing>
<property name="expand">False</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">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -0,0 +1,23 @@
[MOVEOFF]
EPSILON = 0.001
WAYPOINT_SAMPLE_SECS = 0.05
WAYPOINT_THRESHOLD = 0.05
BACKTRACK_ENABLE = 1
[MOVEOFF_0]
MAX_ACCELERATION = 60.0
MAX_VELOCITY = 6.0
MAX_LIMIT = 10.0
MIN_LIMIT = -10.0
[MOVEOFF_1]
MAX_ACCELERATION = 60.0
MAX_VELOCITY = 6.0
MAX_LIMIT = 10.0
MIN_LIMIT = -10.0
[MOVEOFF_2]
MAX_ACCELERATION = 60.0
MAX_VELOCITY = 6.0
MAX_LIMIT = 10.0
MIN_LIMIT = -10.0

View File

@@ -0,0 +1,89 @@
# removeshort.hal
# (for use following core_sim.hal and simulated_home.hal)
# (this halfile should follow core_sim.hal)
# Demonstrate that hookup_moveoff.tcl works with
# non-shortcircuit hal configurations (like a servo)
# Also: use sample-hold (mux2) to simulate a system
# with encoder measuring output when power off too
# remove usual sim signals
delsig Xpos
delsig Ypos
delsig Zpos
# add pid components, and addf in right sequence
loadrt pid names=xpid,ypid,zpid
addf xpid.do-pid-calcs servo-thread 3
addf ypid.do-pid-calcs servo-thread 3
addf zpid.do-pid-calcs servo-thread 3
# add mux2 for sample-hold on output, and addf in right sequence
# to simulate system with encoder measuring output
loadrt mux2 names=xmux,ymux,zmux
addf xmux servo-thread 6
addf ymux servo-thread 6
addf zmux servo-thread 6
# note: pid has default PGain=1, Dgain=Igain=FF0=FF1=FF2=0
setp xpid.Pgain 0
setp ypid.Pgain 0
setp zpid.Pgain 0
# pass thru input to output by using FF0=1
setp xpid.FF0 1
setp ypid.FF0 1
setp zpid.FF0 1
# enable pid in usual manner
net xenable joint.0.amp-enable-out => xpid.enable
net yenable joint.1.amp-enable-out => ypid.enable
net zenable joint.2.amp-enable-out => zpid.enable
# connect without a shortcircuit using pass-thru pid
net Xpos-cmd <= joint.0.motor-pos-cmd
net Xpos-cmd => xpid.command
# sample-hold
net sample <= motion.motion-enabled
net sample => xmux.sel
net sample => ymux.sel
net sample => zmux.sel
#---------------------------------------
net Xonposition <= xpid.output
net Xonposition => xmux.in1
# hold position when power off (in0):
net Xpos-fb => xmux.in0
net Xpos-fb <= xmux.out
net Xpos-fb => joint.0.motor-pos-fb
net Xpos-fb => comp_x.in1
net Xpos-fb => ddt_x.in
#---------------------------------------
net Yonposition <= ypid.output
net Yonposition => ymux.in1
# hold position when power off (in0):
net Ypos-fb => ymux.in0
net Ypos-fb <= ymux.out
net Ypos-cmd <= joint.1.motor-pos-cmd
net Ypos-cmd => ypid.command
net Ypos-fb => joint.1.motor-pos-fb
net Ypos-fb => comp_y.in1
net Ypos-fb => ddt_y.in
#---------------------------------------
net Zonposition <= zpid.output
net Zonposition => zmux.in1
# hold position when power off (in0):
net Zpos-fb => zmux.in0
net Zpos-fb <= zmux.out
net Zpos-cmd <= joint.2.motor-pos-cmd
net Zpos-cmd => zpid.command
net Zpos-fb => joint.2.motor-pos-fb
net Zpos-fb => comp_z.in1
net Zpos-fb => ddt_z.in

View File

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