Import LinuxCNC source tree
This commit is contained in:
69
configs/sim/axis/ja_tests/xyzx_mpg/README
Normal file
69
configs/sim/axis/ja_tests/xyzx_mpg/README
Normal file
@@ -0,0 +1,69 @@
|
||||
xyzx_gantry configs using:
|
||||
trivkins coordinates=xyzx kintype=BOTH
|
||||
|
||||
xyzx.ini -- includes sim_pin simulation for wheel jogging
|
||||
xyzx-xhc-hb04.ini -- uses an xhc-hb04 pendant (18 button model)
|
||||
|
||||
Usage:
|
||||
|
||||
1) F1 (estop off)
|
||||
F2 (machine on)
|
||||
Ctrl-HOME (home, switch automatically to teleop mode)
|
||||
|
||||
2) Teleop mode jogging:
|
||||
|
||||
keyboard jog: Left/Right arrows------ x
|
||||
Up/Dn arrows----------- y
|
||||
PgUp/Dn---------------- z
|
||||
left/right bracket----- x
|
||||
|
||||
mpg jog: rotary x/wheel -------- x
|
||||
rotary y/wheel -------- y
|
||||
rotary z/wheel -------- z
|
||||
rotary a/wheel -------- none
|
||||
|
||||
sim_pin jog jog:x-0 +/- ----------- x
|
||||
jog:y-1 +/- ----------- y
|
||||
jog:z-2 +/- ----------- z
|
||||
jog:3 +/- ----------- none
|
||||
|
||||
3) To switch to joint mode in axis gui, use '$' key
|
||||
|
||||
4) Joint mode jogging:
|
||||
|
||||
keyboard jog: Left/Right arrows------ joint_0
|
||||
Up/Dn arrows----------- joint_1
|
||||
PgUp/Dn---------------- joint_2
|
||||
left/right bracket----- joint_3
|
||||
|
||||
mpg jog: rotary x/wheel -------- joint_0
|
||||
rotary y/wheel -------- joint_1
|
||||
rotary z/wheel -------- joint_2
|
||||
rotary a/wheel -------- joint_3
|
||||
|
||||
sim_pin jog jog:x-0 +/- ----------- joint_0
|
||||
jog:y-1 +/- ----------- joint_1
|
||||
jog:z-2 +/- ----------- joint_2
|
||||
jog:3 +/- ----------- joint_3
|
||||
|
||||
Notes:
|
||||
a) For simplicity, the configs connect:
|
||||
joint.N.motor=pos-cmd => joint.0.motor-pos-fb
|
||||
and use immediate homing (no home switch logic).
|
||||
|
||||
b) The configs use [KINS]AUTOTELEOP= to automatically
|
||||
switch to teleop mode after homing.
|
||||
|
||||
c) The LIB:xhc-hb04.tcl script handles configurations
|
||||
with known kinematics -- trivkins for the configs
|
||||
provided here.
|
||||
|
||||
d) For a machine configured as xyzx, the 0,1,2 --> x,y,z
|
||||
connections are handled automatically by LIB:xhc-hb04.tcl.
|
||||
Additional hal connections to allow jogging joint_3
|
||||
are done in a postgui hal file (xhc-hb04-postgui.hal).
|
||||
|
||||
In practice, independent joint jogging of joint_0 and joint_3
|
||||
may rack a gantry or cause other problems if not used with
|
||||
extreme care.
|
||||
|
||||
19
configs/sim/axis/ja_tests/xyzx_mpg/xhc-hb04-postgui.hal
Normal file
19
configs/sim/axis/ja_tests/xyzx_mpg/xhc-hb04-postgui.hal
Normal file
@@ -0,0 +1,19 @@
|
||||
# optional postgui hal file to allow MPG wheel jog of joint_3
|
||||
# using the fourth xhc-hb04 rotary switch position (labeled 'a')
|
||||
|
||||
# connect to existing signals:
|
||||
net pendant:jog-scale => joint.3.jog-scale
|
||||
net pendant:wheel-counts => pendant_util.in3
|
||||
|
||||
# make new signals and connections for optionalj3 jogging:
|
||||
net optionalj3:enable <= xhc-hb04.jog.enable-a
|
||||
net optionalj3:enable => joint.3.jog-enable
|
||||
|
||||
net optionalj3:filtered <= pendant_util.out3
|
||||
net optionalj3:filtered => joint.3.jog-counts
|
||||
|
||||
# scale3 value is: kvalue * scale_for_rotary_switch_a
|
||||
# kvalue=100 is a constant defined in xhc-hb04.tcl
|
||||
# scale_for_rotary_switch_a=1 defined in xhc-hb04.inc
|
||||
setp pendant_util.scale3 100
|
||||
|
||||
100
configs/sim/axis/ja_tests/xyzx_mpg/xhc-hb04.inc
Normal file
100
configs/sim/axis/ja_tests/xyzx_mpg/xhc-hb04.inc
Normal file
@@ -0,0 +1,100 @@
|
||||
[XHC_HB04_CONFIG]
|
||||
# specify layout = n for LIB:xhc-hb04-layout{n}.cfg files
|
||||
layout = 2
|
||||
# coords: specify upto 4 letters from set {x y z a b c u v w}
|
||||
# coords: switch labels are xyza but any unique 4 letters
|
||||
# from the set {xyxabcuvw} can be used (if the coord exists)
|
||||
coords = x y z
|
||||
# lowpass settings:
|
||||
# coef: slows rate of change of output, range: 0 < coef < 1
|
||||
coefs = 1 1 1 1
|
||||
# scale plus or minus, rotaries may require larger scale factor:
|
||||
scales = 1 1 1 1
|
||||
# jogmode normal(default) or vnormal
|
||||
jogmode = normal
|
||||
# sequence 1: 0.001,0.010,0.100,1.000 (mm-based machine)
|
||||
# sequence 2: 0.001,0.005,0.010,0.020 (inch-based machine)
|
||||
# sequence 3: 0.001,0.010,0.100
|
||||
# sequence 4: 0.001,0.005,0.010,0.020,0.050,0.100
|
||||
# sequence 5: 0.001,0.010,0.050,0.100,1.000
|
||||
sequence = 2
|
||||
# require_pendant = no: create xhc-hb04 hal pins when pendant not
|
||||
# connected at startup
|
||||
require_pendant = no
|
||||
# inch_or_mm = in | mm
|
||||
inch_or_mm = in
|
||||
# mpg_accels: provision for reduced acceleration for manual mode jogging
|
||||
mpg_accels = 20 20 20 20
|
||||
|
||||
[XHC_HB04_BUTTONS]
|
||||
# use button names according to layout file LIB:xhc-hb04-layout{n}.cfg
|
||||
# note: "start-pause" is connected for standard behavior
|
||||
# controlling halui.pause/halui.resume/halui.run
|
||||
# these are examples, edit as required:
|
||||
|
||||
goto-zero = halui.mdi-command-00
|
||||
# synthesized per-axis buttons for goto-zero button:
|
||||
goto-zero-x = ""
|
||||
goto-zero-y = ""
|
||||
goto-zero-z = ""
|
||||
goto-zero-a = ""
|
||||
|
||||
start-pause = std_start_pause
|
||||
rewind = halui.program.step
|
||||
# probe-input for simulating a probe:
|
||||
probe-z = motion.probe-input
|
||||
macro-3 = halui.mdi-command-03
|
||||
|
||||
half = halui.spindle.0.stop
|
||||
# synthesized per-axis buttons for half button:
|
||||
half-x = ""
|
||||
half-y = ""
|
||||
half-z = ""
|
||||
half-a = ""
|
||||
|
||||
zero = ""
|
||||
# synthesized per-axis buttons for zero button:
|
||||
zero-x = halui.mdi-command-12
|
||||
zero-y = halui.mdi-command-13
|
||||
zero-z = halui.mdi-command-14
|
||||
zero-a = halui.mdi-command-15
|
||||
|
||||
safe-z = halui.mdi-command-10
|
||||
# in this sim, home-all only works first time, hold down till finished:
|
||||
home = halui.home-all
|
||||
macro-1 = halui.mdi-command-01
|
||||
macro-2 = halui.mdi-command-02
|
||||
spindle = halui.spindle.0.start
|
||||
step = xhc-hb04.stepsize-up
|
||||
mode = ""
|
||||
macro-6 = halui.mdi-command-06
|
||||
macro-7 = halui.mdi-command-07
|
||||
stop = halui.program.stop
|
||||
reset = halui.estop.activate
|
||||
|
||||
[HALUI]
|
||||
# these are examples, edit as required:
|
||||
# a halui hal pin is created for each MDI_COMMAND below
|
||||
# halui.mdi-command-00, halui.mdi-command-01,... etc
|
||||
MDI_COMMAND=G0 X0 Y0 Z0
|
||||
MDI_COMMAND=(debug, example: mdi-01)
|
||||
MDI_COMMAND=(debug, example: mdi-02)
|
||||
#03 M110: clears notifications
|
||||
MDI_COMMAND=M110
|
||||
MDI_COMMAND=(debug, example: mdi-04)
|
||||
MDI_COMMAND=(debug, example: mdi-05)
|
||||
MDI_COMMAND=(debug, example: mdi-06)
|
||||
#07 M101: example print to stdout
|
||||
MDI_COMMAND=M101
|
||||
MDI_COMMAND=(debug, example: mdi-08)
|
||||
MDI_COMMAND=(debug, example: mdi-09)
|
||||
MDI_COMMAND=(debug, example: mdi-10)
|
||||
MDI_COMMAND=(debug, example: mdi-11)
|
||||
#12
|
||||
MDI_COMMAND= G10 L20 P0 X0
|
||||
#13
|
||||
MDI_COMMAND= G10 L20 P0 Y0
|
||||
#14
|
||||
MDI_COMMAND= G10 L20 P0 Z0
|
||||
#15
|
||||
MDI_COMMAND= G10 L20 P0 C0
|
||||
13
configs/sim/axis/ja_tests/xyzx_mpg/xyzx-xhc-hb04.ini
Normal file
13
configs/sim/axis/ja_tests/xyzx_mpg/xyzx-xhc-hb04.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
#INCLUDE xyzx_base.inc
|
||||
#INCLUDE xhc-hb04.inc
|
||||
|
||||
[APPLICATIONS]
|
||||
APP = halshow xyzx.halshow
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
HALFILE = LIB:xhc-hb04.tcl
|
||||
|
||||
# optional, use to support jogging of joint_3:
|
||||
POSTGUI_HALFILE = ./xhc-hb04-postgui.hal
|
||||
26
configs/sim/axis/ja_tests/xyzx_mpg/xyzx.halshow
Normal file
26
configs/sim/axis/ja_tests/xyzx_mpg/xyzx.halshow
Normal file
@@ -0,0 +1,26 @@
|
||||
pin+motion.teleop-mode
|
||||
sig+pendant:wheel-counts
|
||||
|
||||
pin+joint.0.jog-enable
|
||||
pin+joint.1.jog-enable
|
||||
pin+joint.2.jog-enable
|
||||
pin+joint.3.jog-enable
|
||||
|
||||
pin+joint.0.jog-scale
|
||||
pin+joint.1.jog-scale
|
||||
pin+joint.2.jog-scale
|
||||
pin+joint.3.jog-scale
|
||||
|
||||
pin+joint.0.motor-pos-cmd
|
||||
pin+joint.1.motor-pos-cmd
|
||||
pin+joint.2.motor-pos-cmd
|
||||
pin+joint.3.motor-pos-cmd
|
||||
|
||||
pin+axis.x.jog-enable
|
||||
pin+axis.y.jog-enable
|
||||
pin+axis.z.jog-enable
|
||||
|
||||
pin+axis.x.pos-cmd
|
||||
pin+axis.y.pos-cmd
|
||||
pin+axis.z.pos-cmd
|
||||
|
||||
17
configs/sim/axis/ja_tests/xyzx_mpg/xyzx.ini
Normal file
17
configs/sim/axis/ja_tests/xyzx_mpg/xyzx.ini
Normal file
@@ -0,0 +1,17 @@
|
||||
#INCLUDE xyzx_base.inc
|
||||
|
||||
[APPLICATIONS]
|
||||
# wheel jog simulation:
|
||||
APP = sim_pin \
|
||||
jog:x-0 \
|
||||
jog:y-1 \
|
||||
jog:z-2 \
|
||||
jog:3 \
|
||||
>/dev/null
|
||||
APP = halshow xyzx.halshow
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
HALFILE = ./xyzx_jog.hal
|
||||
|
||||
88
configs/sim/axis/ja_tests/xyzx_mpg/xyzx_base.inc
Normal file
88
configs/sim/axis/ja_tests/xyzx_mpg/xyzx_base.inc
Normal file
@@ -0,0 +1,88 @@
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = trivkins xyzx KINEMATICS_BOTH
|
||||
DEBUG = 0
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=xyzx kinstype=BOTH
|
||||
JOINTS = 4
|
||||
|
||||
[DISPLAY]
|
||||
JOG_AXES = XYZX
|
||||
DISPLAY = axis
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
CYCLE_TIME = 0.100
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = xyzx.var
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
SERVO_PERIOD = 1000000
|
||||
[TRAJ]
|
||||
NO_FORCE_HOMING = 1
|
||||
COORDINATES = X Y Z X
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 10.0
|
||||
DEFAULT_LINEAR_ACCELERATION = 200.0
|
||||
MAX_LINEAR_VELOCITY = 10.0
|
||||
MAX_LINEAR_ACCELERATION = 200.0
|
||||
|
||||
[AXIS_X]
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200
|
||||
[AXIS_Y]
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200
|
||||
[AXIS_Z]
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200.0
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200.0
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200.0
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = LINEAR
|
||||
MAX_LIMIT = 1e10
|
||||
MIN_LIMIT = -1e10
|
||||
MAX_VELOCITY = 10
|
||||
MAX_ACCELERATION = 200.0
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
38
configs/sim/axis/ja_tests/xyzx_mpg/xyzx_jog.hal
Normal file
38
configs/sim/axis/ja_tests/xyzx_mpg/xyzx_jog.hal
Normal file
@@ -0,0 +1,38 @@
|
||||
# connect joint and axis jog pins together for corresponding items
|
||||
net jog:x-0 axis.x.jog-counts
|
||||
net jog:x-0 joint.0.jog-counts
|
||||
|
||||
net jog:y-1 axis.y.jog-counts
|
||||
net jog:y-1 joint.1.jog-counts
|
||||
|
||||
net jog:z-2 axis.z.jog-counts
|
||||
net jog:z-2 joint.2.jog-counts
|
||||
|
||||
net jog:3 joint.3.jog-counts
|
||||
|
||||
net jog:enable joint.0.jog-enable
|
||||
net jog:enable joint.1.jog-enable
|
||||
net jog:enable joint.2.jog-enable
|
||||
net jog:enable joint.3.jog-enable
|
||||
net jog:enable axis.x.jog-enable
|
||||
net jog:enable axis.y.jog-enable
|
||||
net jog:enable axis.z.jog-enable
|
||||
sets jog:enable 1
|
||||
|
||||
net jog:scale joint.0.jog-scale
|
||||
net jog:scale joint.1.jog-scale
|
||||
net jog:scale joint.2.jog-scale
|
||||
net jog:scale joint.3.jog-scale
|
||||
net jog:scale axis.x.jog-scale
|
||||
net jog:scale axis.y.jog-scale
|
||||
net jog:scale axis.z.jog-scale
|
||||
sets jog:scale 1
|
||||
|
||||
net jog:vmode joint.0.jog-vel-mode
|
||||
net jog:vmode joint.1.jog-vel-mode
|
||||
net jog:vmode joint.2.jog-vel-mode
|
||||
net jog:vmode joint.3.jog-vel-mode
|
||||
net jog:vmode axis.x.jog-vel-mode
|
||||
net jog:vmode axis.y.jog-vel-mode
|
||||
net jog:vmode axis.z.jog-vel-mode
|
||||
sets jog:vmode 1
|
||||
Reference in New Issue
Block a user