Import LinuxCNC source tree
This commit is contained in:
5
configs/sim/axis/external_offsets/M111
Executable file
5
configs/sim/axis/external_offsets/M111
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
halcmd setp axisui.notifications-clear-info 1
|
||||
sleep .1
|
||||
halcmd setp axisui.notifications-clear-info 0
|
||||
exit 0
|
||||
4
configs/sim/axis/external_offsets/README
Normal file
4
configs/sim/axis/external_offsets/README
Normal file
@@ -0,0 +1,4 @@
|
||||
eoffset_demo.ini ----- Basic demo (XYZ)
|
||||
jwp_z.ini ------------ Jog while paused (Z) demo
|
||||
dynamic_offsets.ini -- Z offset waveforms demo
|
||||
opa.ini -------------- Offset per Angle (XZC) demo
|
||||
43
configs/sim/axis/external_offsets/circles.ngc
Normal file
43
configs/sim/axis/external_offsets/circles.ngc
Normal file
@@ -0,0 +1,43 @@
|
||||
(info: Multiple circles at radius R, use 0 for current val)
|
||||
;Notes:
|
||||
; 1) z axis not altered (remains at current z)
|
||||
; 2) for inside polygon cutting (fnum==0):
|
||||
; start with rfraction negative
|
||||
; and gradually increase rfraction to zero as program runs
|
||||
; multiple circles
|
||||
; 3) for outside polygon cutting (fnum==1):
|
||||
; start with rfraction positive
|
||||
; and gradually decrease to zero as program runs multiple
|
||||
; circles
|
||||
;
|
||||
; Alternate method for polygons:
|
||||
; 1) use #<radius>=0 and jog to safe starting position
|
||||
; 2) use #<revs>=1, run program for one revolution
|
||||
; 3) Run program repeatedly and manually jog x (radius)
|
||||
; before each program start to increase/decrease
|
||||
; current radius for inside/outside polygon respectively
|
||||
|
||||
o<circles> sub
|
||||
#<radius> = #1 (= 1 R 0==>current)
|
||||
#<aspeed> = #2 (= 8 aspeed: RPM)
|
||||
#<lspeed> = #3 (= 10 lspeed: units/sec)
|
||||
#<revs> = #4 (= 1 +/- Revolutions)
|
||||
|
||||
#<c> = #<_c> ;starting value
|
||||
#<ctarget> = [#<c> + #<revs> * 360]
|
||||
#<arate> = [#<aspeed> * 360]
|
||||
|
||||
m111 ;clear prior info messages
|
||||
o<if1> if [#<radius> EQ 0]
|
||||
#<ref_radius> = #<_x> ;use current x
|
||||
o<if1> else
|
||||
#<ref_radius> = #<radius>
|
||||
f#<lspeed> g1 x#<ref_radius>
|
||||
o<if1> endif
|
||||
(debug, ref_radius=#<ref_radius>)
|
||||
|
||||
m68 e0 q#<ref_radius> ; set ref_radius for eoffsets
|
||||
|
||||
f#<arate> g1 c#<ctarget> ; circles at arate
|
||||
|
||||
o<circles> endsub
|
||||
33
configs/sim/axis/external_offsets/dyn_demo.ngc
Normal file
33
configs/sim/axis/external_offsets/dyn_demo.ngc
Normal file
@@ -0,0 +1,33 @@
|
||||
#<xmax> = 9
|
||||
#<ymax> = 4
|
||||
#<zmax> = 3
|
||||
#<rct> = 100
|
||||
#<feed> = 100
|
||||
|
||||
#<x1> = #<xmax>
|
||||
#<y1> = 0
|
||||
#<z1> = [#<zmax> * 0.5]
|
||||
|
||||
#<x2> = #<xmax>
|
||||
#<y2> = #<ymax>
|
||||
#<z2> = 0
|
||||
|
||||
#<x3> = 0
|
||||
#<y3> = #<ymax>
|
||||
#<z3> = #<zmax>
|
||||
|
||||
m111 ;clear notifications
|
||||
g61
|
||||
g0 x0 y0 z0
|
||||
|
||||
o<rpt> repeat [#<rct>]
|
||||
f #<feed>
|
||||
g0 x 0 y 0 z 0
|
||||
g1 x #<x1> y #<y1> z #<z1>
|
||||
g1 x #<x2> y #<y2> z #<z2>
|
||||
g1 x #<x3> y #<y3> z #<z3>
|
||||
g1 x 0 y 0 z 0
|
||||
o<rpt> endrepeat
|
||||
|
||||
m111 ;clear notifications
|
||||
m2
|
||||
27
configs/sim/axis/external_offsets/dynamic_offsets.halscope
Normal file
27
configs/sim/axis/external_offsets/dynamic_offsets.halscope
Normal file
@@ -0,0 +1,27 @@
|
||||
THREAD servo-thread
|
||||
MAXCHAN 8
|
||||
HMULT 4
|
||||
HZOOM 1
|
||||
HPOS 5.186916e-01
|
||||
CHAN 1
|
||||
SIG E:z-offset
|
||||
VSCALE -1
|
||||
VPOS 0.398564
|
||||
VOFF 0.000000e+00
|
||||
CHAN 2
|
||||
SIG G:waveform
|
||||
VSCALE -1
|
||||
VPOS 0.398564
|
||||
VOFF 0.000000e+00
|
||||
CHAN 4
|
||||
SIG G:reset
|
||||
VSCALE 2
|
||||
VPOS 0.961120
|
||||
VOFF 0.000000e+00
|
||||
CHAN 3
|
||||
PIN joint.2.motor-pos-cmd
|
||||
VSCALE 0
|
||||
VPOS 0.900000
|
||||
VOFF 0.000000e+00
|
||||
TMODE 0
|
||||
RMODE 0
|
||||
83
configs/sim/axis/external_offsets/dynamic_offsets.ini
Normal file
83
configs/sim/axis/external_offsets/dynamic_offsets.ini
Normal file
@@ -0,0 +1,83 @@
|
||||
[APPLICATIONS]
|
||||
# delay because some items are done in postgui
|
||||
DELAY = 5
|
||||
APP = halscope -i dynamic_offsets.halscope
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl -no_sim_spindle
|
||||
POSTGUI_HALFILE = dynamic_offsets_panel.hal
|
||||
|
||||
[EMC]
|
||||
MACHINE = Dynamic External Offsets
|
||||
VERSION = 1.1
|
||||
|
||||
[DISPLAY]
|
||||
PYVCP = dynamic_offsets_panel.xml
|
||||
DISPLAY = axis
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_LINEAR_VELOCITY = 2
|
||||
OPEN_FILE = ./dyn_demo.ngc
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[RS274NGC]
|
||||
USER_M_PATH = .
|
||||
PARAMETER_FILE = sim.var
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZ
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
|
||||
[KINS]
|
||||
JOINTS = 3
|
||||
KINEMATICS = trivkins coordinates=XYZ
|
||||
|
||||
[AXIS_X]
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
MIN_LIMIT = -1
|
||||
MAX_LIMIT = 10
|
||||
|
||||
[AXIS_Y]
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
MIN_LIMIT = -1
|
||||
MAX_LIMIT = 10
|
||||
|
||||
[AXIS_Z]
|
||||
# Note:give half to external_offsets:
|
||||
OFFSET_AV_RATIO = 0.5
|
||||
|
||||
# Note: modified in pyvcp panel:
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 50
|
||||
|
||||
MIN_LIMIT = -5
|
||||
MAX_LIMIT = 5
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 50
|
||||
32
configs/sim/axis/external_offsets/dynamic_offsets.txt
Normal file
32
configs/sim/axis/external_offsets/dynamic_offsets.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
dynamic_offsets
|
||||
|
||||
A sinewave is applied to the Z coordinate external offset
|
||||
|
||||
The waveform amplitdude and frequency are set by pyvcp panel spinboxes.
|
||||
|
||||
The Z coordinate max acceleration and max velocity settings (from the ini file) can be modified with pyvcp panel spinboxes.
|
||||
|
||||
Usage:
|
||||
1) Estop OFF (F1)
|
||||
2) Machine ON (F2)
|
||||
3) HOME All (Ctrl-Home)
|
||||
4) A halscope application is started to
|
||||
show the offset waveforms and the
|
||||
z coordinate response
|
||||
5) Enable the dynamic offset waveform
|
||||
with the panel 'Z enable' checkbox
|
||||
5) Use the panel to adjust:
|
||||
Waveform: amplitude, frequency
|
||||
Z Coordinate: max accel, max vel
|
||||
|
||||
Notes:
|
||||
The dynamic waveform is applied with and without
|
||||
running a program.
|
||||
|
||||
MDI cannot be started with non-zero external
|
||||
offsets -- disable the Z offsets and toggle
|
||||
the machine On/Off to zero offsets.
|
||||
|
||||
Changes to the Z max accel, max vel are not
|
||||
made while a program or mdi move is in progress.
|
||||
|
||||
37
configs/sim/axis/external_offsets/dynamic_offsets_es.txt
Normal file
37
configs/sim/axis/external_offsets/dynamic_offsets_es.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
dynamic_offsets
|
||||
|
||||
Se aplica una onda sinusoidal al desplazamiento externo de la coordenada Z
|
||||
|
||||
El amplitud y frecuencia de la forma de onda se establecen mediante spinboxes de un panel pyvcp.
|
||||
|
||||
La configuración de aceleración máxima y velocidad máxima de coordenadas Z (del archivo ini) se puede modificar con los spinboxes del panel pyvcp.
|
||||
|
||||
Uso:
|
||||
1) Estop OFF (F1)
|
||||
2) Máquina ON (F2)
|
||||
3) HOME Todo (Ctrl-Inicio)
|
||||
4) Se inicia una aplicación de halscope
|
||||
para mostrar los offsets de formas
|
||||
de onda y la respuesta de
|
||||
la coordenada z
|
||||
5) Habilitar la forma de onda de
|
||||
offset dinamico con la casilla 'Habilitar Z'
|
||||
del panel
|
||||
6) Use el panel para ajustar:
|
||||
Forma de onda: amplitud, frecuencia
|
||||
Coordenada Z: max accel, max vel
|
||||
|
||||
Notas:
|
||||
La forma de onda dinámica se aplica
|
||||
con y sin ejecutar un programa.
|
||||
|
||||
MDI no puede iniciarse con offsets
|
||||
externos que no sean cero: deshabilite
|
||||
los offsets Z y active/desactive la
|
||||
máquina para offsets cero.
|
||||
|
||||
Los cambios en max accel y max vel
|
||||
de Z no se realizan mientras
|
||||
un programa o movimiento mdi esté
|
||||
en progreso.
|
||||
|
||||
46
configs/sim/axis/external_offsets/dynamic_offsets_panel.hal
Normal file
46
configs/sim/axis/external_offsets/dynamic_offsets_panel.hal
Normal file
@@ -0,0 +1,46 @@
|
||||
loadrt siggen names=gen
|
||||
loadrt scale names=scalea
|
||||
loadrt conv_float_s32 names=cvt
|
||||
loadrt not names=nota
|
||||
loadrt or2 names=or2a
|
||||
|
||||
addf gen.update servo-thread
|
||||
addf scalea servo-thread
|
||||
addf cvt servo-thread
|
||||
addf nota servo-thread
|
||||
addf or2a servo-thread
|
||||
|
||||
setp gen.offset 0.0
|
||||
|
||||
# scaling -----------------------------------------------------------
|
||||
# these should be reciprocals:
|
||||
# 1 unit (inch) --> 10000 counts
|
||||
setp axis.z.eoffset-scale 0.0001
|
||||
setp scalea.gain 10000
|
||||
|
||||
net E:amplitude <= pyvcp.gen-amplitude => gen.amplitude
|
||||
net E:frequency <= pyvcp.gen-frequency => gen.frequency
|
||||
|
||||
# can also use sawtooth (others inappropriate on a reset)
|
||||
net G:waveform <= gen.sine => scalea.in
|
||||
net G:swaveform <= scalea.out => cvt.in
|
||||
net G:counts <= cvt.out => axis.z.eoffset-counts
|
||||
|
||||
net E:enable <= pyvcp.z-enable => axis.z.eoffset-enable
|
||||
net E:enable => nota.in
|
||||
|
||||
net E:disable <= nota.out => or2a.in1
|
||||
|
||||
net E:z-offset <= axis.z.eoffset => pyvcp.z-offset-f
|
||||
|
||||
net E:limited <= motion.eoffset-limited => pyvcp.eoffset-limited
|
||||
|
||||
net E:active <= motion.eoffset-active => pyvcp.eoffset-active
|
||||
|
||||
net E:reset <= pyvcp.reset => or2a.in0
|
||||
|
||||
net E:ini-accel <= pyvcp.ini-accel => ini.z.max_acceleration
|
||||
net E:ini-vel <= pyvcp.ini-vel => ini.z.max_velocity
|
||||
|
||||
net G:reset <= or2a.out => axis.z.eoffset-clear
|
||||
net G:reset => gen.reset
|
||||
166
configs/sim/axis/external_offsets/dynamic_offsets_panel.xml
Normal file
166
configs/sim/axis/external_offsets/dynamic_offsets_panel.xml
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
<vbox>
|
||||
<label>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>4</bd>
|
||||
<text>"Z-Eoffset"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<checkbutton>
|
||||
<anchor>"w"</anchor>
|
||||
<halpin>"z-enable"</halpin>
|
||||
<text>"Z enable offsets"</text>
|
||||
<initval>0</initval>
|
||||
</checkbutton>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"eoffset-limited"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"red"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Offset Limited"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"eoffset-active"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"gold"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" OffsetActive"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<number>
|
||||
<halpin>"z-offset-f"</halpin>
|
||||
<format>"+8.4f"</format>
|
||||
<width>"13"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<label>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>4</bd>
|
||||
<text>"INI A/V"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Accel:"</text>
|
||||
<font>"monospace,bold"</font>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"ini-accel"</halpin>
|
||||
<width>6</width>
|
||||
<font>"bold"</font>
|
||||
<format>"8.2f"</format>
|
||||
<max_>386.0</max_>
|
||||
<min_>1</min_>
|
||||
<resolution>1.0</resolution>
|
||||
<initval>40</initval>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>" Vel:"</text>
|
||||
<font>"monospace,bold"</font>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"ini-vel"</halpin>
|
||||
<width>6</width>
|
||||
<font>"bold"</font>
|
||||
<format>"8.2f"</format>
|
||||
<min_>0.2</min_>
|
||||
<max_>100</max_>
|
||||
<resolution>.1</resolution>
|
||||
<initval>2</initval>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<label>
|
||||
<text>"Generator"</text>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>4</bd>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>" Freq:"</text>
|
||||
<font>"monospace,bold"</font>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"gen-frequency"</halpin>
|
||||
<width>6</width>
|
||||
<font>"bold"</font>
|
||||
<format>"8.2f"</format>
|
||||
<max_>10.0</max_>
|
||||
<min_>0.0</min_>
|
||||
<resolution>0.1</resolution>
|
||||
<initval>1.0</initval>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>" Hgt:"</text>
|
||||
<font>"monospace,bold"</font>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"gen-amplitude"</halpin>
|
||||
<width>6</width>
|
||||
<font>"bold"</font>
|
||||
<format>"8.2f"</format>
|
||||
<min_>0.0</min_>
|
||||
<max_>2.0</max_>
|
||||
<resolution>0.1</resolution>
|
||||
<initval>0.2</initval>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<button>
|
||||
<halpin>"reset"</halpin>
|
||||
<bd>3</bd>
|
||||
<width>1</width>
|
||||
<text>"ResetGen"</text>
|
||||
<font>"bold",10</font>
|
||||
</button>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</pyvcp>
|
||||
1
configs/sim/axis/external_offsets/eoffset.tbl
Normal file
1
configs/sim/axis/external_offsets/eoffset.tbl
Normal file
@@ -0,0 +1 @@
|
||||
T1 P1 D0.125 Z0.5
|
||||
16
configs/sim/axis/external_offsets/eoffsets.hal
Normal file
16
configs/sim/axis/external_offsets/eoffsets.hal
Normal file
@@ -0,0 +1,16 @@
|
||||
#---------------------------------------------------------------
|
||||
# note: axis.L.eoffset-enables are controlled by pyvcp panel
|
||||
# external offset input scale:
|
||||
setp axis.x.eoffset-scale 0.1
|
||||
setp axis.y.eoffset-scale 0.1
|
||||
setp axis.z.eoffset-scale 0.1
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# convenience signals for use with eoffsets_monitor.tcl:
|
||||
net e:xcounts => axis.x.eoffset-counts
|
||||
net e:ycounts => axis.y.eoffset-counts
|
||||
net e:zcounts => axis.z.eoffset-counts
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# for pyvcp panel
|
||||
net e:limited <= motion.eoffset-limited
|
||||
104
configs/sim/axis/external_offsets/eoffsets.ini
Normal file
104
configs/sim/axis/external_offsets/eoffsets.ini
Normal file
@@ -0,0 +1,104 @@
|
||||
# Notes:
|
||||
# 1) [AXIS_n]OFFSET_AV_RATIO= controls external offsets a,v
|
||||
# Allowed values are 0.0 <= OFFSET_AV_RATIO <= 0.9
|
||||
# Value of 0.0 disables external offsets
|
||||
# Disallowed values are superseded with msg to stdout
|
||||
# 2) Immediate homing herein
|
||||
# ([JOINT_*]HOME_SEQUENCE=0, other HOME_* items omitted)
|
||||
# 3) uncomment [JOINT_0]HOME_SEARCH_VEL,HOME_LATCH_VEL
|
||||
# to demonstrate non-zero joint.0.motor-offset
|
||||
|
||||
[APPLICATIONS]
|
||||
APP = sim_pin --title "MPG Simulator" \
|
||||
e:xcounts \
|
||||
e:ycounts \
|
||||
e:zcounts
|
||||
|
||||
# make sure [xyz]:ecounts are zero if machine off:
|
||||
APP = eoffsets_monitor.tcl
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl -no_use_hal_manualtoolchange
|
||||
HALFILE = eoffsets.hal
|
||||
POSTGUI_HALFILE = eoffsets_panel.hal
|
||||
|
||||
[EMC]
|
||||
MACHINE = External Offsets Demo
|
||||
VERSION = 1.1
|
||||
|
||||
[DISPLAY]
|
||||
PYVCP = eoffsets_panel.xml
|
||||
DISPLAY = axis
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_LINEAR_VELOCITY = 2
|
||||
OPEN_FILE = ./eoffsets.ngc
|
||||
|
||||
TKPKG = Ngcgui 1.0
|
||||
NGCGUI_FONT = Helvetica -12 normal
|
||||
NGCGUI_SUBFILE = queuebuster.ngc
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = .
|
||||
USER_M_PATH = .
|
||||
PARAMETER_FILE = sim.var
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = eoffset.tbl
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZ
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
|
||||
[KINS]
|
||||
JOINTS = 3
|
||||
KINEMATICS = trivkins coordinates=XYZ
|
||||
|
||||
[AXIS_X]
|
||||
OFFSET_AV_RATIO = 0.2
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
MIN_LIMIT = -0.1
|
||||
MAX_LIMIT = 10
|
||||
|
||||
[AXIS_Y]
|
||||
OFFSET_AV_RATIO = 0.2
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
MIN_LIMIT = -0.1
|
||||
MAX_LIMIT = 5
|
||||
|
||||
[AXIS_Z]
|
||||
OFFSET_AV_RATIO = 0.2
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
MIN_LIMIT = -1
|
||||
MAX_LIMIT = 1
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
35
configs/sim/axis/external_offsets/eoffsets.ngc
Normal file
35
configs/sim/axis/external_offsets/eoffsets.ngc
Normal file
@@ -0,0 +1,35 @@
|
||||
#<xmax> = 9
|
||||
#<ymax> = 4
|
||||
#<zdepth> = 0
|
||||
#<feed> = 20
|
||||
|
||||
#<x1> = [0.25 * #<xmax>]
|
||||
#<y1> = [0.66 * #<ymax>]
|
||||
#<z1> = 0
|
||||
|
||||
#<x2> = [0.50 * #<xmax>]
|
||||
#<y2> = 0
|
||||
#<z2> = -.5
|
||||
|
||||
#<x3> = [0.75 * #<xmax>]
|
||||
#<y3> = 0
|
||||
#<z3> = 0
|
||||
|
||||
#<x4> = #<x3>
|
||||
#<y4> = #<y1>
|
||||
#<z4> = 0
|
||||
|
||||
m111 ;clear notifications
|
||||
g61
|
||||
g0x0y0z0
|
||||
|
||||
f #<feed>
|
||||
g1 x #<x1> y #<y1> z #<z1>
|
||||
g1 x #<x2> y #<y2> z #<z2>
|
||||
g1 x #<x3> y #<y3> z #<z3>
|
||||
g1 x #<x4> y #<y4> z #<z4>
|
||||
g1 x #<xmax> y #<ymax>
|
||||
g0x0y0z0
|
||||
|
||||
m111 ;clear notifications
|
||||
m2
|
||||
26
configs/sim/axis/external_offsets/eoffsets.txt
Normal file
26
configs/sim/axis/external_offsets/eoffsets.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
eoffsets.ini
|
||||
|
||||
Usage:
|
||||
1) Estop OFF (F1)
|
||||
2) Machine ON (F2)
|
||||
3) HOME All (Ctrl-Home)
|
||||
4) Explore external offset functionality
|
||||
using the sim_pin gui to alter the
|
||||
per-axis hal pins:
|
||||
|
||||
e:xcounts (sig to => axis.x.eoffset-counts)
|
||||
e:ycounts (sig to => axis.y.eoffset-counts)
|
||||
e:zcounts (sig to => axis.z.eoffset-counts)
|
||||
e:clearall (sig to => axis.*.eoffset-clear)
|
||||
|
||||
-------------------------------------------
|
||||
Note: The external offset interface is
|
||||
similar to the interface for wheel jogging:
|
||||
|
||||
Input hal pins:
|
||||
axis.L.eoffset-enable (bit)
|
||||
axis.L.eoffset-clear (bit)
|
||||
axis.L.eoffset-scale (float)
|
||||
axis.L.eoffset-counts (s32)
|
||||
|
||||
Requested offset == counts*scale
|
||||
26
configs/sim/axis/external_offsets/eoffsets_es.txt
Normal file
26
configs/sim/axis/external_offsets/eoffsets_es.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
eoffsets.ini
|
||||
|
||||
Uso:
|
||||
1) Estop OFF (F1)
|
||||
2) Máquina ON (F2)
|
||||
3) HOME Todo (Ctrl-Home)
|
||||
4) Explorar funcionalidad de offset
|
||||
externos usando gui sim_pin para
|
||||
alterar los pines hal por eje:
|
||||
|
||||
e:xcounts (señal a => axis.x.eoffset-counts)
|
||||
e:ycounts (señal a=> axis.y.eoffset-counts)
|
||||
e:zcounts (señal a=> axis.z.eoffset-counts)
|
||||
e:clearall (señal a=> axis.*.eoffset-clear)
|
||||
|
||||
-------------------------------------------
|
||||
Note: El interface de offsets externos es
|
||||
similar al de jog por volante:
|
||||
|
||||
Pines Input hal:
|
||||
axis.L.eoffset-enable (bit)
|
||||
axis.L.eoffset-clear (bit)
|
||||
axis.L.eoffset-scale (float)
|
||||
axis.L.eoffset-counts (s32)
|
||||
|
||||
Offset solicitado == counts*scale
|
||||
27
configs/sim/axis/external_offsets/eoffsets_monitor.tcl
Executable file
27
configs/sim/axis/external_offsets/eoffsets_monitor.tcl
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/tclsh
|
||||
# script to ensure e:[xyz]counts are zero if machine off
|
||||
|
||||
package require Hal
|
||||
set ::prog [file tail [info script]]
|
||||
set ::periodic_delay_ms 200
|
||||
|
||||
proc monitor_ecounts {} {
|
||||
catch {after cancel $::a_id}
|
||||
if { ![hal getp halui.machine.is-on]
|
||||
&& ( 0 != [hal gets e:xcounts]
|
||||
|| 0 != [hal gets e:ycounts]
|
||||
|| 0 != [hal gets e:zcounts]) } {
|
||||
# handle deferred connection to signal
|
||||
if [catch { hal sets e:xcounts 0
|
||||
hal sets e:ycounts 0
|
||||
hal sets e:zcounts 0
|
||||
} msg] {
|
||||
puts stderr msg=$msg
|
||||
puts stderr "$::prog exiting"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
set ::a_id [after $::periodic_delay_ms monitor_ecounts]
|
||||
}
|
||||
monitor_ecounts
|
||||
vwait ::forever
|
||||
49
configs/sim/axis/external_offsets/eoffsets_panel.hal
Normal file
49
configs/sim/axis/external_offsets/eoffsets_panel.hal
Normal file
@@ -0,0 +1,49 @@
|
||||
# existing (basic_sim.tcl) signals for display:
|
||||
net J0:pos-cmd => pyvcp.motor-pos-cmd.0-f
|
||||
net J1:pos-cmd => pyvcp.motor-pos-cmd.1-f
|
||||
net J2:pos-cmd => pyvcp.motor-pos-cmd.2-f
|
||||
|
||||
# motor-offset (display only):
|
||||
net E:motor-offset.0 <= joint.0.motor-offset => pyvcp.motor-offset.0-f
|
||||
net E:motor-offset.1 <= joint.1.motor-offset => pyvcp.motor-offset.1-f
|
||||
net E:motor-offset.2 <= joint.2.motor-offset => pyvcp.motor-offset.2-f
|
||||
|
||||
# controls for demo (from sim_pin setp, no pin source):
|
||||
# note these are teleop pos-cmds (not coord motion)
|
||||
net E:x-pos-cmd => axis.x.pos-cmd => pyvcp.x-pos-cmd-f
|
||||
net E:y-pos-cmd => axis.y.pos-cmd => pyvcp.y-pos-cmd-f
|
||||
net E:z-pos-cmd => axis.z.pos-cmd => pyvcp.z-pos-cmd-f
|
||||
|
||||
# eoffset (display only):
|
||||
net E:x-offset <= pyvcp.x-offset-f => axis.x.eoffset
|
||||
net E:y-offset <= pyvcp.y-offset-f => axis.y.eoffset
|
||||
net E:z-offset <= pyvcp.z-offset-f => axis.z.eoffset
|
||||
|
||||
# offset-request (display only):
|
||||
net E:x-offset-request <= axis.x.eoffset-request
|
||||
net E:x-offset-request => pyvcp.x-offset-request-f
|
||||
|
||||
net E:y-offset-request <= axis.y.eoffset-request
|
||||
net E:y-offset-request => pyvcp.y-offset-request-f
|
||||
|
||||
net E:z-offset-request <= axis.z.eoffset-request
|
||||
net E:z-offset-request => pyvcp.z-offset-request-f
|
||||
|
||||
# enables
|
||||
net E:x-enable <= pyvcp.x-enable => axis.x.eoffset-enable
|
||||
net E:y-enable <= pyvcp.y-enable => axis.y.eoffset-enable
|
||||
net E:z-enable <= pyvcp.z-enable => axis.z.eoffset-enable
|
||||
|
||||
# scale factors
|
||||
net E:x-scale <= pyvcp.x-scale => axis.x.eoffset-scale
|
||||
net E:y-scale <= pyvcp.y-scale => axis.y.eoffset-scale
|
||||
net E:z-scale <= pyvcp.z-scale => axis.z.eoffset-scale
|
||||
|
||||
# clears
|
||||
net E:clearall <= pyvcp.clearall
|
||||
net E:clearall => axis.x.eoffset-clear
|
||||
net E:clearall => axis.y.eoffset-clear
|
||||
net E:clearall => axis.z.eoffset-clear
|
||||
|
||||
# pyvcp led:
|
||||
net e:limited <= motion.eoffset-limited => pyvcp.limited
|
||||
382
configs/sim/axis/external_offsets/eoffsets_panel.xml
Normal file
382
configs/sim/axis/external_offsets/eoffsets_panel.xml
Normal file
@@ -0,0 +1,382 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
|
||||
<vbox>
|
||||
<label>
|
||||
<text>"Motor-pos-cmd"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"J0:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"motor-pos-cmd.0-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"cyan"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"J1:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"motor-pos-cmd.1-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"cyan"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"J2:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"motor-pos-cmd.2-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"cyan"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<label>
|
||||
<text>"Motor-offset"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"J0:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"motor-offset.0-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"white"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"J1:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"motor-offset.1-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"white"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"J2:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"motor-offset.2-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"white"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<label>
|
||||
<text>"Axis-pos-cmd"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>" X:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"x-pos-cmd-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"greenyellow"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>" Y:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"y-pos-cmd-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"greenyellow"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>" Z:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"z-pos-cmd-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"greenyellow"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<label>
|
||||
<text>"Eoffsets(act/req)"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>5</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"limited"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"red"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Offset Limited"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"Xa:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"x-offset-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"Ya:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"y-offset-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"Za:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"z-offset-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"Xr:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"x-offset-request-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"orange"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"Yr:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"y-offset-request-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"orange"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<text>"Zr:"</text>
|
||||
<font>"monospace"</font>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"z-offset-request-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"orange"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Xenable"</text>
|
||||
</label>
|
||||
<checkbutton>
|
||||
<anchor>"w"</anchor>
|
||||
<halpin>"x-enable"</halpin>
|
||||
<text>""</text>
|
||||
<initval>0</initval>
|
||||
</checkbutton>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>""</text>
|
||||
<padx>0</padx>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"x-scale"</halpin>
|
||||
<min_> 0.1</min_>
|
||||
<max_>10.0</max_>
|
||||
<width>4</width>
|
||||
<initval>0.1</initval>
|
||||
<resolution>0.1</resolution>
|
||||
<format>"4.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Yenable"</text>
|
||||
</label>
|
||||
<checkbutton>
|
||||
<anchor>"w"</anchor>
|
||||
<halpin>"y-enable"</halpin>
|
||||
<text>""</text>
|
||||
<padx>0</padx>
|
||||
<initval>0</initval>
|
||||
</checkbutton>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>""</text>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"y-scale"</halpin>
|
||||
<min_> 0.1</min_>
|
||||
<max_>10.0</max_>
|
||||
<width>4</width>
|
||||
<initval>0.1</initval>
|
||||
<resolution>0.1</resolution>
|
||||
<format>"4.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Zenable"</text>
|
||||
</label>
|
||||
<checkbutton>
|
||||
<anchor>"w"</anchor>
|
||||
<halpin>"z-enable"</halpin>
|
||||
<text>""</text>
|
||||
<padx>0</padx>
|
||||
<initval>0</initval>
|
||||
</checkbutton>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>""</text>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"z-scale"</halpin>
|
||||
<min_> 0.1</min_>
|
||||
<max_>10.0</max_>
|
||||
<width>4</width>
|
||||
<initval>0.1</initval>
|
||||
<resolution>0.1</resolution>
|
||||
<format>"4.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<button>
|
||||
<halpin>"clearall"</halpin>
|
||||
<bd>3</bd>
|
||||
<width>1</width>
|
||||
<text>"ClearOffsets"</text>
|
||||
<font>"bold",10</font>
|
||||
</button>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</pyvcp>
|
||||
86
configs/sim/axis/external_offsets/jwp_z.ini
Normal file
86
configs/sim/axis/external_offsets/jwp_z.ini
Normal file
@@ -0,0 +1,86 @@
|
||||
# Notes:
|
||||
# 1) [AXIS_n]OFFSET_AV_RATIO= controls external offsets a,v
|
||||
# Allowed values are 0.0 <= OFFSET_AV_RATIO <= 0.9
|
||||
# Value of 0.0 disables external offsets
|
||||
# Disallowed values are superseded with msg to stdout
|
||||
# 2) Immediate homing herein
|
||||
# ([JOINT_*]HOME_SEQUENCE=0, other HOME_* items omitted)
|
||||
# 3) uncomment [JOINT_0]HOME_SEARCH_VEL,HOME_LATCH_VEL
|
||||
# to demonstrate non-zero joint.0.motor-offset
|
||||
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE = jwp_z_panel.hal
|
||||
|
||||
[EMC]
|
||||
MACHINE = Jog-While-Pause Z Demo
|
||||
VERSION = 1.1
|
||||
|
||||
[DISPLAY]
|
||||
PYVCP = jwp_z_panel.xml
|
||||
DISPLAY = axis
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_LINEAR_VELOCITY = 2
|
||||
OPEN_FILE = ./jwp_z.ngc
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[RS274NGC]
|
||||
USER_M_PATH = .
|
||||
PARAMETER_FILE = sim.var
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZ
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
|
||||
[KINS]
|
||||
JOINTS = 3
|
||||
KINEMATICS = trivkins coordinates=XYZ
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -1
|
||||
MAX_LIMIT = 11
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -1
|
||||
MAX_LIMIT = 5
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[AXIS_Z]
|
||||
# Note: low OFFSET_AV_RATIO:
|
||||
OFFSET_AV_RATIO = 0.05
|
||||
MIN_LIMIT = -1
|
||||
MAX_LIMIT = 1
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 2
|
||||
MAX_ACCELERATION = 20
|
||||
35
configs/sim/axis/external_offsets/jwp_z.ngc
Normal file
35
configs/sim/axis/external_offsets/jwp_z.ngc
Normal file
@@ -0,0 +1,35 @@
|
||||
#<xmax> = 10
|
||||
#<ymax> = 5
|
||||
#<zsafe> = 0.5
|
||||
#<feed> = 100
|
||||
|
||||
#<x1> = [0.25 * #<xmax>]
|
||||
#<y1> = [0.66 * #<ymax>]
|
||||
|
||||
#<x2> = [0.50 * #<xmax>]
|
||||
#<y2> = [0.33 * #<ymax>]
|
||||
|
||||
#<x3> = [0.75 * #<xmax>]
|
||||
#<y3> = [0.33 * #<ymax>]
|
||||
|
||||
m111 ;clear notifications
|
||||
g61
|
||||
g0 x0 y0 z#<zsafe>
|
||||
(debug, Enter offsets only when paused, s to continue)
|
||||
m0
|
||||
m111
|
||||
|
||||
f #<feed>
|
||||
g0 z0
|
||||
g1 x #<x1> y #<y1>
|
||||
g1 x #<x2> y #<y2>
|
||||
g1 x #<x3> y #<y3>
|
||||
g1 x #<xmax> y #<ymax>
|
||||
|
||||
g0 z#<zsafe>
|
||||
(debug, Program End: Clear offsets, s to continue)
|
||||
m0
|
||||
g0 x0 y0
|
||||
|
||||
m111 ;clear notifications
|
||||
m2
|
||||
16
configs/sim/axis/external_offsets/jwp_z.txt
Normal file
16
configs/sim/axis/external_offsets/jwp_z.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
jwp_z.ini
|
||||
|
||||
Usage:
|
||||
1) Estop OFF (F1)
|
||||
2) Machine ON (F2)
|
||||
3) HOME All (Ctrl-Home)
|
||||
4) Run program (R)
|
||||
5) initial pause:
|
||||
adjust z offset (+Incr/-Decr)
|
||||
6) Resume (S)
|
||||
7) Pause (P)
|
||||
adjust z offset (+Incr/-Decr)
|
||||
8) Resume (R)
|
||||
9) Final pause
|
||||
return offset to zero (+Incr/-Decr)
|
||||
or Clear
|
||||
16
configs/sim/axis/external_offsets/jwp_z_es.txt
Normal file
16
configs/sim/axis/external_offsets/jwp_z_es.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
jwp_z.ini
|
||||
|
||||
Uso:
|
||||
1) Estop OFF (F1)
|
||||
2) Máquina ON (F2)
|
||||
3) HOME Todo (Ctrl-Home)
|
||||
4) Correr programa (R)
|
||||
5) pausa inicial:
|
||||
ajuste z offset (+Incr/-Decr)
|
||||
6) Reanudar (S)
|
||||
7) Pausa (P)
|
||||
ajuste z offset (+Incr/-Decr)
|
||||
8) Reanudar (R)
|
||||
9) Pausa final
|
||||
volver offset a zero (+Incr/-Decr)
|
||||
o borrar
|
||||
17
configs/sim/axis/external_offsets/jwp_z_panel.hal
Normal file
17
configs/sim/axis/external_offsets/jwp_z_panel.hal
Normal file
@@ -0,0 +1,17 @@
|
||||
loadrt updown names=zctr
|
||||
addf zctr servo-thread
|
||||
|
||||
net E:z-plus <= pyvcp.z-plus => zctr.countup
|
||||
net E:z-minus <= pyvcp.z-minus => zctr.countdown
|
||||
net E:z-counts <= zctr.count => axis.z.eoffset-counts
|
||||
net E:z-scale <= pyvcp.z-scale => axis.z.eoffset-scale
|
||||
net E:z-offset <= axis.z.eoffset => pyvcp.z-offset-f
|
||||
net E:limited <= motion.eoffset-limited => pyvcp.limited
|
||||
net E:active <= motion.eoffset-active => pyvcp.eoffset-active
|
||||
net E:paused <= halui.program.is-paused => axis.z.eoffset-enable
|
||||
net E:paused => pyvcp.paused
|
||||
|
||||
net E:clearall <= pyvcp.clearall
|
||||
net E:clearall => axis.x.eoffset-clear
|
||||
net E:clearall => axis.y.eoffset-clear
|
||||
net E:clearall => axis.z.eoffset-clear
|
||||
112
configs/sim/axis/external_offsets/jwp_z_panel.xml
Normal file
112
configs/sim/axis/external_offsets/jwp_z_panel.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
<vbox>
|
||||
<label>
|
||||
<text>"Eoffsets"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"paused"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"springgreen"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Paused"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"limited"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"red"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Offset Limited"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"eoffset-active"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"gold"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" OffsetActive"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<number>
|
||||
<halpin>"z-offset-f"</halpin>
|
||||
<format>"+8.4f"</format>
|
||||
<width>"13"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Scale:"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<spinbox>
|
||||
<halpin>"z-scale"</halpin>
|
||||
<min_>0.0</min_>
|
||||
<max_>1.0</max_>
|
||||
<width>6</width>
|
||||
<initval>0.01</initval>
|
||||
<resolution>0.01</resolution>
|
||||
<format>"8.2f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
</hbox>
|
||||
<button>
|
||||
<halpin>"z-plus"</halpin>
|
||||
<text>"+ Incr"</text>
|
||||
<bd>4</bd>
|
||||
<font>"bold",10</font>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"z-minus"</halpin>
|
||||
<bd>4</bd>
|
||||
<width>1</width>
|
||||
<text>"- Decr"</text>
|
||||
<font>"bold",10</font>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"clearall"</halpin>
|
||||
<bd>4</bd>
|
||||
<width>1</width>
|
||||
<text>"Clear"</text>
|
||||
<font>"bold",10</font>
|
||||
</button>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</pyvcp>
|
||||
47
configs/sim/axis/external_offsets/opa.hal
Normal file
47
configs/sim/axis/external_offsets/opa.hal
Normal file
@@ -0,0 +1,47 @@
|
||||
loadrt eoffset_per_angle names=xo
|
||||
setp xo.k 10000
|
||||
setp xo.fnum 2
|
||||
addf xo servo-thread
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# required standard connections to xo
|
||||
net E:angle <= axis.c.pos-cmd
|
||||
net E:angle => xo.angle
|
||||
|
||||
net E:is-on <= halui.machine.is-on
|
||||
net E:is-on => xo.is-on
|
||||
|
||||
net E:active <= motion.eoffset-active
|
||||
net E:active => xo.active
|
||||
|
||||
net E:radius-ref <= motion.analog-out-00
|
||||
net E:radius-ref => xo.radius-ref
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# required standard connections from xo
|
||||
net E:eoffset-enable <= xo.enable-out
|
||||
net E:eoffset-enable => axis.x.eoffset-enable
|
||||
|
||||
net E:clear <= xo.clear
|
||||
net E:clear => axis.x.eoffset-clear
|
||||
|
||||
net E:scale <= xo.kreciprocal
|
||||
net E:scale => axis.x.eoffset-scale
|
||||
|
||||
net E:kcounts <= xo.kcounts
|
||||
net E:kcounts => axis.x.eoffset-counts
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# signals with sink elsewhere (sim: opa_panel.hal)
|
||||
net E:x-eoffset <= axis.x.eoffset
|
||||
|
||||
# convenience pin, use as required:
|
||||
net E:is-off <= xo.is-off
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# signals with source elsewhere (sim: opa_panel.hal)
|
||||
net E:enable-in => xo.enable-in
|
||||
net E:fnum => xo.fnum
|
||||
net E:rfraction => xo.rfraction
|
||||
net E:fmult => xo.fmult
|
||||
net E:start-angle => xo.start-angle
|
||||
87
configs/sim/axis/external_offsets/opa.ini
Normal file
87
configs/sim/axis/external_offsets/opa.ini
Normal file
@@ -0,0 +1,87 @@
|
||||
[APPLICATIONS]
|
||||
DELAY = 3
|
||||
# For assessing system accel/vel:
|
||||
# (particularly when using func3 square wave modulation)
|
||||
APP = sim_pin ini.x.max_acceleration ini.x.max_velocity
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
HALFILE = opa.hal
|
||||
POSTGUI_HALFILE = opa_panel.hal
|
||||
|
||||
[EMC]
|
||||
MACHINE = External Offset(X) per Angle(C) Demo
|
||||
VERSION = 1.1
|
||||
|
||||
[DISPLAY]
|
||||
PYVCP = opa_panel.xml
|
||||
DISPLAY = axis
|
||||
OPEN_FILE = opa_demo.ngc
|
||||
GEOMETRY = !CXZ
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_LINEAR_VELOCITY = 2
|
||||
MAX_ANGULAR_VELOCITY = 60
|
||||
|
||||
TKPKG = Ngcgui 1.0
|
||||
NGCGUI_FONT = Helvetica -12 normal
|
||||
NGCGUI_SUBFILE = circles.ngc
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = .
|
||||
USER_M_PATH = .
|
||||
PARAMETER_FILE = sim.var
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = eoffset.tbl
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XZC
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
|
||||
[KINS]
|
||||
JOINTS = 3
|
||||
KINEMATICS = trivkins coordinates=XZC
|
||||
|
||||
[AXIS_X]
|
||||
OFFSET_AV_RATIO = 0.5
|
||||
MAX_VELOCITY = 5
|
||||
# increase MAX_ACCELERATION to improve
|
||||
# waveform tracking:
|
||||
MAX_ACCELERATION = 50
|
||||
|
||||
[AXIS_Z]
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 10
|
||||
|
||||
[AXIS_C]
|
||||
MAX_VELOCITY = 60
|
||||
MAX_ACCELERATION = 600
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 10
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = ANGULAR
|
||||
HOME_SEQUENCE = 0
|
||||
MAX_VELOCITY = 60
|
||||
MAX_ACCELERATION = 600
|
||||
41
configs/sim/axis/external_offsets/opa.txt
Normal file
41
configs/sim/axis/external_offsets/opa.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
opa.ini Offset per Angle
|
||||
|
||||
Demonstrates external offsets using the
|
||||
hal component: eoffset_per_angle.
|
||||
|
||||
A simulation for an XZC machine offsets
|
||||
the transverse (X) coordinate based on
|
||||
the rotary coordinate (C) angle.
|
||||
|
||||
($ man eoffset_per_angle for more info)
|
||||
|
||||
Usage:
|
||||
1) Estop OFF (F1)
|
||||
2) Machine ON (F2)
|
||||
3) HOME All (Ctrl-Home)
|
||||
4) Run (R)
|
||||
5) Enable/Disable offsets using pyvcp
|
||||
panel On/Off buttons
|
||||
6) Select parameters:
|
||||
Astart ----- starting angle
|
||||
fmult ------ frequency multiplier
|
||||
rfraction -- amplitude (radius fraction)
|
||||
func ------- function
|
||||
0 polygon (inside)
|
||||
1 polygon (outside)
|
||||
2 sine wave
|
||||
3 square wave
|
||||
|
||||
Notes:
|
||||
|
||||
1) The effective radius used for computing
|
||||
external offsets is set using the
|
||||
motion.analog-out-00 hal pin and
|
||||
controlled by the sample program or
|
||||
by MDI ( M68 E0 Q some_radius_value )
|
||||
|
||||
2) Offset fidelity is dependent upon inifile
|
||||
settings for [AXIS_X] items:
|
||||
MAX_VELOCITY
|
||||
MAX_ACCELERATION
|
||||
OFFSET_AV_RATIO
|
||||
15
configs/sim/axis/external_offsets/opa_demo.ngc
Normal file
15
configs/sim/axis/external_offsets/opa_demo.ngc
Normal file
@@ -0,0 +1,15 @@
|
||||
; opa_demo.ngc:
|
||||
; invoke subroutine circles.ngc for multiple circles (#<revs>)
|
||||
; with:
|
||||
; x = #<radius>
|
||||
; z = #<_z>
|
||||
|
||||
#<radius> = 1
|
||||
#<z> = #<_z> ; current value
|
||||
#<aspeed> = 8 ; angular speed (RPM)
|
||||
#<lspeed> = 10 ; linear speed (units/minute)
|
||||
#<revs> = 100
|
||||
|
||||
g0 x#<radius> z#<z>
|
||||
o<circles> call [#<radius>][#<aspeed>][#<lspeed>][#<revs>]
|
||||
m2
|
||||
45
configs/sim/axis/external_offsets/opa_es.txt
Normal file
45
configs/sim/axis/external_offsets/opa_es.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
opa.ini Offset por Ángulo
|
||||
|
||||
Demuestra offsets externos utilizando
|
||||
el componente hal: eoffset_per_angle.
|
||||
|
||||
Una simulación para una máquina XZC
|
||||
desplaza la coordenada transversal
|
||||
(X) basada en el ángulo de la
|
||||
coordenada giratoria (C).
|
||||
|
||||
($ man eoffset_per_angle)
|
||||
|
||||
Uso:
|
||||
1) Estop OFF (F1)
|
||||
2) Máquina ON (F2)
|
||||
3) HOME Todo (Ctrl-Inicio)
|
||||
4) Ejecutar (R)
|
||||
5) Activar/Desactivar offsets usando
|
||||
los botones de encendido/apagado
|
||||
del panel pyvcp
|
||||
6) Seleccionar parámetros:
|
||||
Ainicio --- ángulo de inicio
|
||||
fmult ----- multiplicador de frecuencia
|
||||
rfracción - amplitud (fracción de radio)
|
||||
func ------ función
|
||||
0 polígono (dentro)
|
||||
1 polígono (exterior)
|
||||
2 ondas sinusoidales
|
||||
Onda cuadrada 3
|
||||
|
||||
Notas:
|
||||
|
||||
1) El radio efectivo utilizado para
|
||||
calcular los offsets externos se
|
||||
establece utilizando el pin de
|
||||
movimiento motion.analog-out-00
|
||||
y controlado por el programa de
|
||||
muestra o por MDI (M68 E0 Q valor_radio)
|
||||
|
||||
2) La fidelidad del offset depende de
|
||||
la configuración de archivos para
|
||||
los elementos de [AXIS_X]:
|
||||
MAX_VELOCITY
|
||||
MAX_ACCELERATION
|
||||
OFFSET_AV_RATIO
|
||||
31
configs/sim/axis/external_offsets/opa_panel.hal
Normal file
31
configs/sim/axis/external_offsets/opa_panel.hal
Normal file
@@ -0,0 +1,31 @@
|
||||
loadrt flipflop names=ff1
|
||||
addf ff1 servo-thread
|
||||
setp ff1.data 0
|
||||
|
||||
net P:wave-start <= pyvcp.wave-start
|
||||
net P:wave-start => ff1.set
|
||||
|
||||
net P:wave-stop <= pyvcp.wave-stop
|
||||
net P:wave-stop => ff1.clk
|
||||
|
||||
net P:limited <= motion.eoffset-limited
|
||||
net P:limited => pyvcp.eoffset-limited
|
||||
|
||||
net P:paused <= halui.program.is-paused
|
||||
net P:paused => pyvcp.paused
|
||||
|
||||
#----------------------------------------------
|
||||
# signals created in opa.hal
|
||||
net E:enable-in <= ff1.out
|
||||
net E:enable-in => pyvcp.waveon
|
||||
|
||||
net E:fnum <= pyvcp.fnum-i
|
||||
net E:rfraction <= pyvcp.rfraction
|
||||
net E:fmult <= pyvcp.fmult
|
||||
net E:start-angle <= pyvcp.start-angle
|
||||
|
||||
net E:is-off => ff1.reset
|
||||
net E:eoffset-enable => pyvcp.eoffset-enable
|
||||
net E:x-eoffset => pyvcp.x-offset-f
|
||||
net E:radius-ref => pyvcp.radius-ref
|
||||
net E:active => pyvcp.eoffset-active
|
||||
231
configs/sim/axis/external_offsets/opa_panel.xml
Normal file
231
configs/sim/axis/external_offsets/opa_panel.xml
Normal file
@@ -0,0 +1,231 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<label>
|
||||
<text>"X Offset"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<label>
|
||||
<text>"per"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<label>
|
||||
<text>"C Angle"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
<text>"o"</text>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"x-offset-f"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
<text>"r"</text>
|
||||
</label>
|
||||
<number>
|
||||
<halpin>"radius-ref"</halpin>
|
||||
<format>"+10.4f"</format>
|
||||
<width>"10"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"skyblue"</fg>
|
||||
<font>"bold"</font>
|
||||
</number>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"eoffset-limited"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"red"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Offset Limit"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"eoffset-enable"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"gold"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" OffsetOn"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"eoffset-active"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"gold"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" OffsetActive"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"paused"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"springgreen"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Paused"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<padx>0</padx>
|
||||
<font>"monospace"</font>
|
||||
</label>
|
||||
<led>
|
||||
<halpin>"waveon"</halpin>
|
||||
<size>15</size>
|
||||
<on_color>"cyan"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" WaveOn"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<button>
|
||||
<halpin>"wave-start"</halpin>
|
||||
<text>"On"</text>
|
||||
<width>"3"</width>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"wave-stop"</halpin>
|
||||
<text>"Off"</text>
|
||||
<width>"3"</width>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"start-angle"</halpin>
|
||||
<min_>-90.0</min_>
|
||||
<max_>90.0</max_>
|
||||
<width>4</width>
|
||||
<initval>0</initval>
|
||||
<resolution>5</resolution>
|
||||
<format>"3.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Astart"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"fmult"</halpin>
|
||||
<min_>1.0</min_>
|
||||
<max_>20.0</max_>
|
||||
<width>4</width>
|
||||
<initval>6</initval>
|
||||
<resolution>1</resolution>
|
||||
<format>"3.1f"</format>
|
||||
<font>"bold"</font>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"fmult"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"rfraction"</halpin>
|
||||
<min_>-0.9</min_>
|
||||
<max_>0.9</max_>
|
||||
<width>4</width>
|
||||
<initval>0.0</initval>
|
||||
<resolution>.1</resolution>
|
||||
<format>"3.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"rfraction"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>" fnum:"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
<scale>
|
||||
<font>"monospace"</font>
|
||||
<width>"10"</width>
|
||||
<halpin>"fnum"</halpin>
|
||||
<resolution>1</resolution>
|
||||
<orient>VERTICAL</orient>
|
||||
<initval>0</initval>
|
||||
<min_>0</min_>
|
||||
<max_>3</max_>
|
||||
<param_pin>1</param_pin>
|
||||
</scale>
|
||||
</hbox>
|
||||
|
||||
</vbox>
|
||||
</vbox>
|
||||
</pyvcp>
|
||||
45
configs/sim/axis/external_offsets/queuebuster.ngc
Normal file
45
configs/sim/axis/external_offsets/queuebuster.ngc
Normal file
@@ -0,0 +1,45 @@
|
||||
o<queuebuster> sub
|
||||
#<xmax> = #1 (=9)
|
||||
#<ymax> = #2 (=3)
|
||||
#<feed> = #3 (=100)
|
||||
#<ct> = #4 (=100)
|
||||
#<use_m6> = #5 (=0)
|
||||
#<use_m66> = #6 (=0)
|
||||
#<use_m38> = #7 (=0)
|
||||
#<pauseatend> = #8 (=1)
|
||||
|
||||
g20 g61 g90 ;inches, exactpath,absolute
|
||||
g0 x0y0z0
|
||||
f#<feed>
|
||||
o<loop> repeat [#<ct>]
|
||||
m111
|
||||
g1 x#<xmax> y0
|
||||
|
||||
o<um6> if [#<use_m6> GT 0]
|
||||
(debug, m6 queuebuster follows)
|
||||
t1m6 ;QB toolchange
|
||||
o<um6> endif
|
||||
|
||||
o<um66> if [#<use_m66> GT 0]
|
||||
(debug, m66 queuebuster follows)
|
||||
m66p0l0 ;QB wait on input l0=immediate
|
||||
o<um66> endif
|
||||
|
||||
o<um38> if [#<use_m38> GT 0]
|
||||
(debug, g38.3 queuebuster follows)
|
||||
g38.3z-.2 ; QB probe
|
||||
g1 z0
|
||||
o<um38> endif
|
||||
|
||||
g1 y#<ymax>
|
||||
g1 x0
|
||||
g1 x0 y0
|
||||
o<pas> if [#<pauseatend> GT 0]
|
||||
(debug, Paused, s to continue)
|
||||
m0
|
||||
o<pas> endif
|
||||
o<loop> endrepeat
|
||||
o<queuebuster> endsub
|
||||
|
||||
; bad: t0m6 g38.3
|
||||
; ok: m66
|
||||
Reference in New Issue
Block a user