Import LinuxCNC source tree
This commit is contained in:
259
configs/sim/axis/xhc-hb04/README
Normal file
259
configs/sim/axis/xhc-hb04/README
Normal file
@@ -0,0 +1,259 @@
|
||||
These sim configurations demonstrate use of an XHC-HB04 wireless MPG pendant in LinuxCNC using a HAL module created by Frederic Rible (frible@teaser.fr) (Copyright (C) 2013). Ref:
|
||||
|
||||
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Using_A_XHC-HB04_Wireless_MPG_Pendant
|
||||
|
||||
The HAL module is designed for the XHC-HB04 V3.0 identified as USB device 10CE:EB70.
|
||||
Most of the pendant features are handled:
|
||||
- buttons converted to hal pins
|
||||
- jog wheel with variable scale (use stepsize-up or stepsize-down pin to change in sequence)
|
||||
- sequences provided include:
|
||||
(0.001,0.010,0.100,1.000) typ for mm-base machine
|
||||
(0.001,0.005,0.010,0.020) typ for inch-base machine
|
||||
- LCD screen displays machine and relative positions
|
||||
|
||||
Sim configurations are provided for two known button configurations:
|
||||
|
||||
layout1 -- 16 buttons
|
||||
layout2 -- 18 buttons (more common)
|
||||
|
||||
The button names are defined in the files LIB:xhc-hb04-layout*.cfg in a stanza labeled XHC-HB04 with definitions as BUTTON=XX:name where XX is a hexadecimal code used by the device.
|
||||
|
||||
Example:
|
||||
[XHC-HB04]
|
||||
BUTTON=01:button-stop
|
||||
BUTTON=03:button-rewind
|
||||
...
|
||||
|
||||
A hal pin (Type=bit, Dir=OUT) is created for each button, for example:
|
||||
xhc-hb04.button-stop
|
||||
xhc-hb04.button-rewind
|
||||
...
|
||||
|
||||
If the configuration file includes buttons named:
|
||||
button-zero
|
||||
button-goto-zero
|
||||
button-half
|
||||
then the driver creates additional buttons for these that are active only if the joint is selected by the rotary switch. These synthesized buttons are:
|
||||
button-zero-x
|
||||
button-zero-y
|
||||
button-zero-z
|
||||
button-zero-a
|
||||
button-goto-zero-x
|
||||
button-goto-zero-y
|
||||
button-goto-zero-z
|
||||
button-goto-zero-a
|
||||
button-half-x
|
||||
button-half-y
|
||||
button-half-z
|
||||
button-half-a
|
||||
As with real buttons, the synthesized buttons have hal pins named:
|
||||
xhc-hb04.button-zero-x
|
||||
xhc-hb04.button-zero-y
|
||||
etc.
|
||||
|
||||
|
||||
Additional hal pins are created by the xhc-hb04 driver and connected as required by the halfile included for the demo configurations.
|
||||
|
||||
A working and connected xhc-hb04 device is required for the demonstration configurations. If not connected, the sim configs will start without pendant functionality.
|
||||
|
||||
----------------------------------
|
||||
A udev rules file is needed to give correct permissions for USB access. With a deb install, the rules file is installed as /lib/udev/rules.d/99-xhc.rules
|
||||
|
||||
If using a Run-In-Place (RIP) build, create a file in the location for user-installed rules: /etc/udev/rules.d/99-xhc.rules and include a rule to specify the applicable product and vendor codes and allows both read and write access to the user.
|
||||
|
||||
Example udev rule:
|
||||
ATTR{idProduct}=="eb70", ATTR{idVendor}=="10ce", MODE="0666", OWNER="root", GROUP="plugdev"
|
||||
|
||||
This rule uses mode 0666 to provide read and write access to owner,group,world -- e.g., everyone.
|
||||
|
||||
----------------------------------
|
||||
The sim configurations use a single halfile: LIB:xhc-hb04.tcl. This halfile uses a custom comp file (xhc_hb04_util.comp) and can be added to existing configurations by adding an ini file entry for:
|
||||
[HAL]HALFILE = LIB:xhc-hb04.tcl
|
||||
|
||||
This HALFILE entry should follow other HALFILE entries.
|
||||
|
||||
Optional configuration ini file items and the defaults values are:
|
||||
|
||||
[XHC_HB04_CONFIG]
|
||||
threadname = servo-thread (optional, default: servo-thread)
|
||||
layout = 2 (optional, 1: 16 buttons | 2: 18 buttons, default: 2)
|
||||
coords = x y z a (optional, 4 max, default: x y z a)
|
||||
coefs = 1 1 1 1 (optional, filter coefs 0 < coef < 1, default: 1 1 1 1)
|
||||
mpg_accels = 1 2 2 200 (optional: reduced accelerations for jogging)
|
||||
(in machine_units/sec/sec like:)
|
||||
( [AXIS_L]MAX_ACCELERATION,[JOINT_n]MAX_ACCELERATION)
|
||||
scales = 1 1 1 1 (optional, plus/minus factors, default: 1 1 1 1)
|
||||
require_pendant = yes (optional, yes | no, default: yes)
|
||||
inch_or_mm = in (optional, in | mm for display icon, default: mm)
|
||||
jogmode = normal (optional, normal | vnormal default: normal)
|
||||
sequence = 1 (optional, 1 | 2 | 3 | 4 | 5, default: 1)
|
||||
1: 0.001,0.010,0.100,1.000 (typ for mm machine)
|
||||
2: 0.001,0.005,0.010,0.020 (typ for inch machine)
|
||||
3: 0.001,0.010,0.100
|
||||
4: 0.001,0.005,0.010,0.020,0.050,0.100
|
||||
5: 0.001,0.010,0.050,0.100,1.000
|
||||
|
||||
The filter coefs can be used to slow the response to wheel steps but are usually not needed since the xhc-hb04 component implements smoothing.
|
||||
|
||||
The movement per wheel increment is normally controlled by connecting the STEP button to the hal pin xhc-hb04.stepsize-up (or xhc-hb04.stepsize-down). Each press of the STEP button will cause the wheel increment to increase according to the sequence specified. The sequence starts over after the maximum value is reached.
|
||||
|
||||
The scale factor for each joint can be set with the scales item.
|
||||
|
||||
When require_pendant = no, the xhc-hb04 hal pins will be created even if the pendant is not connected at startup. A new connection, a disconnect, and a reconnect are supported.
|
||||
----------------------------------
|
||||
jogmodes:
|
||||
normal: position mode, the joint will move exactly regardless of how long it takes. Beware: the machine may keep moving after you stop rotating the jog wheel.
|
||||
|
||||
vnormal: velocity mode, the joint will stop when the wheel stops. Beware: the amount moved per wheel detent may be less than specified if the machine velocity and acceleration cannot accomplish the move in time.
|
||||
|
||||
----------------------------------
|
||||
sequence: Typically use 1 for mm-based machine, 2 for inch-based machine
|
||||
|
||||
----------------------------------
|
||||
Pendant buttons are connected to hal pins with ini file items.
|
||||
Examples:
|
||||
[XHC_HB04_BUTTONS]
|
||||
stop = halui.program.stop
|
||||
goto-zero = halui.mdi-command-00
|
||||
step = xhc-hb04.stepsize-up
|
||||
rewind = halui.program.step
|
||||
macro-1 = halui.mdi-command-01
|
||||
mode = "" (placeholder)
|
||||
|
||||
With the above items, connections are made as:
|
||||
Signal_name Source pin Destination pin
|
||||
----------------- ---------------------------- ------------------------
|
||||
pendant:stop <== xhc-hb04.button-stop ==> halui.program.stop
|
||||
pendant:goto-zero <== xhc-hb04.button-goto-zero ==> halui.mdi-command-00
|
||||
pendant:step <== xhc-hb04.button-step ==> xhc-hb04.stepsize-up
|
||||
etc ...
|
||||
|
||||
|
||||
Note: halui MDI commands are defined in a [HALUI] stanza:
|
||||
[HALUI]
|
||||
MDI_COMMAND = G0 X0 Y0 Z0
|
||||
MDI_COMMAND = M101
|
||||
|
||||
The commands are assigned to pins (Type=bit, Dir=IN) named halui.mdi-command-nn where
|
||||
nn corresponds to their ordered appearance beginning with nn=00. (man halui for more information)
|
||||
----------------------------------
|
||||
A application named monitor-xhc-hb04 is included to monitor disconnects and reconnects of the pendant. This script runs in the background and will pop up a message when the pendant is disconnected or reconnected. Usage is optional; if used it is specified with ini file entry:
|
||||
[APPLICATIONS]APP = monitor-xhc-hb04
|
||||
|
||||
(Note: when using require_pendant=1, disconnects are detected but reconnects are not supported)
|
||||
----------------------------------
|
||||
See the manpage for xhc-hb04 for details on the xhc-hb04 component
|
||||
----------------------------------
|
||||
|
||||
The demo ini files are examples using the axis gui in a simulator configuration.
|
||||
These files use #INCLUDE directives to include files for the basic machine
|
||||
and for the pendant layout.
|
||||
|
||||
For example, the organization for the xhc-hb04-layout2.ini file is:
|
||||
|
||||
#INCLUDE inch_base.inc | Conventional items for an inch based sim
|
||||
#INCLUDE layout2.inc | All button items ([XHC_HB04_BUTTONS],[HALUI])
|
||||
|
||||
[EMC] | Machine identifier
|
||||
MACHINE = |
|
||||
|
||||
[HAL] | HAL items
|
||||
HALFILE = |
|
||||
... |
|
||||
HALFILE = |
|
||||
HALFILE = LIB:xhc-hb04.tcl | xhc-hb04 configuration script
|
||||
HALUI = halui | Halui specifier
|
||||
|
||||
[XHC_HB04_CONFIG] | All config items used by LIB:xhc-hb04.tcl
|
||||
layout = |
|
||||
coords = |
|
||||
coefs = |
|
||||
scales = |
|
||||
jogmode = |
|
||||
sequence = |
|
||||
require_pendant = |
|
||||
inch_or_mm = |
|
||||
mpg_accels = |
|
||||
|
||||
[APPLICATIONS] | Optional auxiliary scripts
|
||||
APP = monitor-xhc-hb04 | Connection monitor script
|
||||
|
||||
----------------------------------
|
||||
|
||||
Adding an xhc-hb04 to an existing configuration.
|
||||
|
||||
Recommended procedure is to create a new configuration based on an existing configuration.
|
||||
|
||||
Copy all files from an existing (working) configuration directory
|
||||
to a new directory and edit the configuration ini file to:
|
||||
a) add [HAL]HALFILE = LIB:xhc-hb04.tcl
|
||||
(this entry should follow other HALFILE entries)
|
||||
b) (optional) add [APPLICATIONS]APP = monitor-xhc-hb04
|
||||
to monitor disconnects/connects of pendant
|
||||
c) add stanza [XHC_HB04_CONFIG] to configure pendant
|
||||
d) include stanzas [XHC_HB04_BUTTONS] and [HALUI] to
|
||||
define button actions (these may be in a separate
|
||||
#INCLUDE file -- see the demo examples)
|
||||
|
||||
The entries in the new or updated stanzas should be customized for your machine.
|
||||
|
||||
----------------------------------
|
||||
Note: For identity kinematics (trivkins), the LIB:xhc-hb04.tcl script connects
|
||||
axis and joint pins having a one-to-one correspondence to support jogging
|
||||
in both joint and teleop motion modes.
|
||||
|
||||
For unknown kinematics (e.g., non-identity kinematics), the LIB:xhc-hb04
|
||||
script connects the axis coordinate specified by:
|
||||
[XHC_HB04_CONFIG]coords=
|
||||
for world mode (teleop) jogging. No connections are made for joint
|
||||
mode jogging of individual joints.
|
||||
|
||||
If wheel jogging for joints in joint motion mode is wanted for configs with
|
||||
non-identity kinematics, use additional Hal connections to connect the
|
||||
appropriate joint jog pins.
|
||||
|
||||
Example: non-identity kinematics having a rotary axis (c) that has a
|
||||
one-to-one correspondence to a single joint (3). The LIB:xhc-hb04.tcl
|
||||
script makes Hal connections for axis c as:
|
||||
|
||||
pendant:jog-c <= xhc-hb04.jog.enable-a
|
||||
=> axis.c.jog-enable
|
||||
pendant:jog-scale <= pendant_util.divide-by-k-out
|
||||
=> axis.c.jog-scale
|
||||
pendant:wheel-counts-c-filtered <= pendant_util.out3
|
||||
=> axis.c.jog-counts
|
||||
|
||||
To add joint jogging for joint 3 (with scaling identical to world scaling),
|
||||
add supplemental hal commands:
|
||||
|
||||
net pendant:jog-c => joint.3.jog-enable
|
||||
net pendant:jog-scale => joint.3.jog-scale
|
||||
net pendant:wheel-counts-c-filtered => joint.3.jog-counts
|
||||
|
||||
These connections could be added in an additional [HAL]HALFILE= or
|
||||
by using [HAL]HALCMD= lines in the ini file
|
||||
|
||||
Similar connections could be made for other joints having a one-to-one
|
||||
correspondence to an axis coordinate.
|
||||
|
||||
For joints having no direct correspondence to an axis coordinate, joint jog pin
|
||||
connections can be made as in the example above but altered connections may be
|
||||
required for proper scaling. Make the joint jog pin connections using an axis
|
||||
coord letter for a position of the pendant rotary axis selector switch. The
|
||||
joint jogging will occur for that switch position when LinuxCNC is in joint
|
||||
motion mode.
|
||||
|
||||
----------------------------------
|
||||
Notes:
|
||||
|
||||
1) In earlier versions of xhc-hb04.tcl, mpg_accels used a helper
|
||||
script (xhc-hb04-accels) to multiplex reduced accel values during
|
||||
world mode jogging.
|
||||
The current implementation uses pins now provided by the motion
|
||||
module:
|
||||
axis.L.jog-accel-fraction
|
||||
joint.N.jog-accel-fraction
|
||||
|
||||
2) Support for spindle override is supported using the
|
||||
halui pins: halui.spindle.0.override.* as applicable to
|
||||
default single spindle usage.
|
||||
100
configs/sim/axis/xhc-hb04/inch_base.inc
Normal file
100
configs/sim/axis/xhc-hb04/inch_base.inc
Normal file
@@ -0,0 +1,100 @@
|
||||
[DISPLAY]
|
||||
DISPLAY = axis
|
||||
CYCLE_TIME = 0.100
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
MAX_SPINDLE_OVERRIDE = 1.0
|
||||
PROGRAM_PREFIX = ../../nc_files/
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
EDITOR = geany
|
||||
GEOMETRY = XYZABCUVW
|
||||
INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python3
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = sim-9axis.var
|
||||
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
|
||||
# for demo of M110:
|
||||
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = sim.tbl
|
||||
TOOL_CHANGE_POSITION = 0 0 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -10.0
|
||||
MAX_LIMIT = 10.0
|
||||
MAX_VELOCITY = 1.2
|
||||
MAX_ACCELERATION = 20.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 1.2
|
||||
MAX_ACCELERATION = 20.0
|
||||
MIN_LIMIT = -10.0
|
||||
MAX_LIMIT = 10.0
|
||||
HOME_SEARCH_VEL = 5.0
|
||||
HOME_LATCH_VEL = 1.0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -10.0
|
||||
MAX_LIMIT = 10.0
|
||||
MAX_VELOCITY = 1.2
|
||||
MAX_ACCELERATION = 20.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 1.2
|
||||
MAX_ACCELERATION = 20.0
|
||||
MIN_LIMIT = -10.0
|
||||
MAX_LIMIT = 10.0
|
||||
HOME_SEARCH_VEL = 5.0
|
||||
HOME_LATCH_VEL = 1.0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -2.0
|
||||
MAX_LIMIT = 4.0
|
||||
MAX_VELOCITY = 1.2
|
||||
MAX_ACCELERATION = 20.0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 1.2
|
||||
MAX_ACCELERATION = 20.0
|
||||
MIN_LIMIT = -2.0
|
||||
MAX_LIMIT = 4.0
|
||||
HOME_SEARCH_VEL = 5.0
|
||||
HOME_LATCH_VEL = 1.0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[AXIS_C]
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = ANGULAR
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
HOME_SEARCH_VEL = 0.0
|
||||
HOME_LATCH_VEL = 0.0
|
||||
HOME_SEQUENCE = 0
|
||||
14
configs/sim/axis/xhc-hb04/inch_trivkins.inc
Normal file
14
configs/sim/axis/xhc-hb04/inch_trivkins.inc
Normal file
@@ -0,0 +1,14 @@
|
||||
[TRAJ]
|
||||
NO_FORCE_HOMING = 1
|
||||
COORDINATES = X Y Z C
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 1.0
|
||||
DEFAULT_ANGULAR_VELOCITY = 45.0
|
||||
POSITION_FILE = position9.txt
|
||||
MAX_LINEAR_VELOCITY = 1.2
|
||||
MAX_ANGULAR_VELOCITY = 90.0
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=xyzc
|
||||
JOINTS = 4
|
||||
53
configs/sim/axis/xhc-hb04/layout1.inc
Normal file
53
configs/sim/axis/xhc-hb04/layout1.inc
Normal file
@@ -0,0 +1,53 @@
|
||||
[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:
|
||||
stop = halui.program.stop
|
||||
start-pause = std_start_pause
|
||||
rewind = halui.program.step
|
||||
safe-z = halui.mdi-command-01
|
||||
# in this sim, home-all only works first time, hold down till finished:
|
||||
home = halui.home-all
|
||||
x2 = halui.mdi-command-02
|
||||
y2 = halui.mdi-command-03
|
||||
# probe-input for simulating a probe:
|
||||
probe-z = motion.probe-input
|
||||
x0 = halui.mdi-command-04
|
||||
y0 = halui.mdi-command-05
|
||||
z0 = halui.mdi-command-06
|
||||
|
||||
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 = ""
|
||||
|
||||
step = xhc-hb04.stepsize-up
|
||||
mode = ""
|
||||
spindle = ""
|
||||
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)
|
||||
MDI_COMMAND=(debug, example: mdi-12)
|
||||
MDI_COMMAND=(debug, example: mdi-13)
|
||||
MDI_COMMAND=(debug, example: mdi-14)
|
||||
MDI_COMMAND=(debug, example: mdi-15)
|
||||
72
configs/sim/axis/xhc-hb04/layout2.inc
Normal file
72
configs/sim/axis/xhc-hb04/layout2.inc
Normal file
@@ -0,0 +1,72 @@
|
||||
[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
|
||||
100
configs/sim/axis/xhc-hb04/mm_base.inc
Normal file
100
configs/sim/axis/xhc-hb04/mm_base.inc
Normal file
@@ -0,0 +1,100 @@
|
||||
[DISPLAY]
|
||||
DISPLAY = axis
|
||||
CYCLE_TIME = 0.100
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
MAX_SPINDLE_OVERRIDE = 1.0
|
||||
PROGRAM_PREFIX = ../../nc_files/
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
EDITOR = geany
|
||||
GEOMETRY = XYZABCUVW
|
||||
INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python3
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = sim-9axis.var
|
||||
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
|
||||
# for demo of M110:
|
||||
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = sim_mm.tbl
|
||||
TOOL_CHANGE_POSITION = 0 0 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
HOME_SEARCH_VEL = 127
|
||||
HOME_LATCH_VEL = 25.4
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
HOME_SEARCH_VEL = 127
|
||||
HOME_LATCH_VEL = 25.4
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -50.8
|
||||
MAX_LIMIT = 101.6
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
MIN_LIMIT = -50.8
|
||||
MAX_LIMIT = 101.6
|
||||
HOME_SEARCH_VEL = 127
|
||||
HOME_LATCH_VEL = 25.4
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[AXIS_C]
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = ANGULAR
|
||||
MAX_VELOCITY = 90.0
|
||||
MAX_ACCELERATION = 1200.0
|
||||
HOME_SEARCH_VEL = 0.0
|
||||
HOME_LATCH_VEL = 0.0
|
||||
HOME_SEQUENCE = 1
|
||||
14
configs/sim/axis/xhc-hb04/mm_trivkins.inc
Normal file
14
configs/sim/axis/xhc-hb04/mm_trivkins.inc
Normal file
@@ -0,0 +1,14 @@
|
||||
[TRAJ]
|
||||
NO_FORCE_HOMING = 1
|
||||
COORDINATES = X Y Z C
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 1.0
|
||||
DEFAULT_ANGULAR_VELOCITY = 45.0
|
||||
POSITION_FILE = position9.txt
|
||||
MAX_LINEAR_VELOCITY = 1.2
|
||||
MAX_ANGULAR_VELOCITY = 90.0
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins
|
||||
JOINTS = 4
|
||||
1
configs/sim/axis/xhc-hb04/sim.tbl
Symbolic link
1
configs/sim/axis/xhc-hb04/sim.tbl
Symbolic link
@@ -0,0 +1 @@
|
||||
../../sim.tbl
|
||||
1
configs/sim/axis/xhc-hb04/sim_mm.tbl
Symbolic link
1
configs/sim/axis/xhc-hb04/sim_mm.tbl
Symbolic link
@@ -0,0 +1 @@
|
||||
../../sim_mm.tbl
|
||||
43
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.ini
Normal file
43
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.ini
Normal file
@@ -0,0 +1,43 @@
|
||||
#INCLUDE inch_base.inc
|
||||
#INCLUDE inch_trivkins.inc
|
||||
#INCLUDE layout1.inc
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = xhc-hb04 layout1 demo
|
||||
|
||||
[HAL]
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
HALFILE = LIB:xhc-hb04.tcl
|
||||
HALUI = halui
|
||||
|
||||
[XHC_HB04_CONFIG]
|
||||
# specify layout = n for LIB:xhc-hb04-layout{n}.cfg files
|
||||
layout = 1
|
||||
# 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 c
|
||||
# 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 = yes|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 = 1 2 20 600
|
||||
|
||||
[APPLICATIONS]
|
||||
APP = monitor-xhc-hb04
|
||||
39
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.txt
Normal file
39
configs/sim/axis/xhc-hb04/xhc-hb04-layout1.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
xhc-hb04-layout1
|
||||
|
||||
16 buttons:
|
||||
|
||||
---------------------------------------
|
||||
|RESET | |
|
||||
---------------------------------------
|
||||
|Stop |Start/Pause|Rewind |Probe-Z |
|
||||
---------------------------------------
|
||||
|GotoZero| X2 | Y2 |Safe-Z |
|
||||
---------------------------------------
|
||||
| X=0 | Y=0 | Z=0 | Home |
|
||||
---------------------------------------
|
||||
|STEP | Mode |Spindle| |
|
||||
---------------------------------------
|
||||
| Off |
|
||||
| X |
|
||||
| Y |
|
||||
| Rotary -------> Z |
|
||||
| Switch A |
|
||||
| Spindle |
|
||||
| Feed |
|
||||
---------------------------------------
|
||||
|
||||
Button codes defined in LIB:xhc-hb04-layout1.cfg
|
||||
|
||||
The Start/Pause button can be connected for standard behavior with:
|
||||
[XHC_HB04_BUTTON]start-pause = std_start_pause
|
||||
|
||||
The STEP button is normally connected with:
|
||||
[XHC_HB04_BUTTON]step = xhc-hb04.stepsize-up
|
||||
|
||||
The other buttons can be connected to hal pins -- typically halui provided pins.
|
||||
|
||||
MDI commands can be executed using halui.mdi-command-nn pins defined in the ini file with entries like: [HALUI]MDI_COMMAND = mdi_command
|
||||
|
||||
The rotary switch selects the axis, spindle.0, or feedoverride for control by the jogwheel.
|
||||
|
||||
The switch positions (xyza) can be defined to any available axis (xyzc for instance).
|
||||
40
configs/sim/axis/xhc-hb04/xhc-hb04-layout1_es.txt
Normal file
40
configs/sim/axis/xhc-hb04/xhc-hb04-layout1_es.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
xhc-hb04-layout1
|
||||
|
||||
16 botones:
|
||||
|
||||
---------------------------------------
|
||||
|RESET | |
|
||||
---------------------------------------
|
||||
|Stop |Start/Pause|Rewind |Probe-Z |
|
||||
---------------------------------------
|
||||
|GotoZero| X2 | Y2 |Safe-Z |
|
||||
---------------------------------------
|
||||
| X=0 | Y=0 | Z=0 | Home |
|
||||
---------------------------------------
|
||||
|STEP | Mode |Spindle| |
|
||||
---------------------------------------
|
||||
| Off |
|
||||
| X |
|
||||
| Y |
|
||||
| Rotary -------> Z |
|
||||
| Switch A |
|
||||
| Spindle |
|
||||
| Feed |
|
||||
---------------------------------------
|
||||
|
||||
Button codes defined in LIB:xhc-hb04-layout1.cfg
|
||||
|
||||
El botón Start/Pause se puede conectar para un comportamiento estándar con:
|
||||
[XHC_HB04_BUTTON]start-pause = std_start_pause
|
||||
|
||||
El botón STEP normalmente está conectado con:
|
||||
[XHC_HB04_BUTTON]step = xhc-hb04.stepsize-up
|
||||
|
||||
Los otros botones se pueden conectar a los pines hal, típicamente pines provistos de halui.
|
||||
|
||||
Los comandos MDI se pueden ejecutar usando los pines halui.mdi-command-nn definidos en el archivo ini con entradas como: [HALUI]MDI_COMMAND = mdi_command
|
||||
|
||||
|
||||
El interruptor giratorio selecciona el eje, el spindle.0 o el ajuste de velocidad para el control mediante la rueda.
|
||||
|
||||
Las posiciones del interruptor (xyza) se pueden definir para cualquier eje disponible (xyzc, por ejemplo).
|
||||
43
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini
Normal file
43
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini
Normal file
@@ -0,0 +1,43 @@
|
||||
#INCLUDE inch_base.inc
|
||||
#INCLUDE inch_trivkins.inc
|
||||
#INCLUDE layout2.inc
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = xhc-hb04 layout2 demo
|
||||
|
||||
[HAL]
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
HALFILE = LIB:xhc-hb04.tcl
|
||||
HALUI = halui
|
||||
|
||||
[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 c
|
||||
# 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 = yes|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 = 1 2 20 600
|
||||
|
||||
[APPLICATIONS]
|
||||
APP = monitor-xhc-hb04
|
||||
39
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.txt
Normal file
39
configs/sim/axis/xhc-hb04/xhc-hb04-layout2.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
xhc-hb04-layout2
|
||||
|
||||
18 buttons:
|
||||
|
||||
---------------------------------------
|
||||
|RESET |Stop | |
|
||||
---------------------------------------
|
||||
|GotoZero|Start/Pause|Rewind |Probe-Z |
|
||||
---------------------------------------
|
||||
|Spindle | =1/2 | =0 |Safe-Z |
|
||||
---------------------------------------
|
||||
|GotoHome|Macro-1 |Macro-2|Macro-3 |
|
||||
---------------------------------------
|
||||
|STEP |Mode |Macro-6|Macro-7 |
|
||||
---------------------------------------
|
||||
| Off |
|
||||
| X |
|
||||
| Y |
|
||||
| Rotary -------> Z |
|
||||
| Switch A |
|
||||
| Spindle |
|
||||
| Feed |
|
||||
---------------------------------------
|
||||
|
||||
Button codes defined in LIB:xhc-hb04-layout2.cfg
|
||||
|
||||
The Start/Pause button can be connected for standard behavior with:
|
||||
[XHC_HB04_BUTTON]start-pause = std_start_pause
|
||||
|
||||
The STEP button is normally connected with:
|
||||
[XHC_HB04_BUTTON]step = xhc-hb04.stepsize-up
|
||||
|
||||
The other buttons can be connected to hal pins -- typically halui provided pins.
|
||||
|
||||
MDI commands can be executed using halui.mdi-command-nn pins defined in the ini file with entries like: [HALUI]MDI_COMMAND = mdi_command
|
||||
|
||||
The rotary switch selects the axis, spindle.0, or feedoverride for control by the jogwheel.
|
||||
|
||||
The switch positions (xyza) can be defined to any available axis (xyzc for instance).
|
||||
40
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_es.txt
Normal file
40
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_es.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
xhc-hb04-layout2
|
||||
|
||||
18 botones:
|
||||
|
||||
---------------------------------------
|
||||
|RESET |Stop | |
|
||||
---------------------------------------
|
||||
|GotoZero|Start/Pause|Rewind |Probe-Z |
|
||||
---------------------------------------
|
||||
|Spindle | =1/2 | =0 |Safe-Z |
|
||||
---------------------------------------
|
||||
|GotoHome|Macro-1 |Macro-2|Macro-3 |
|
||||
---------------------------------------
|
||||
|STEP |Mode |Macro-6|Macro-7 |
|
||||
---------------------------------------
|
||||
| Off |
|
||||
| X |
|
||||
| Y |
|
||||
| Rotary -------> Z |
|
||||
| Switch A |
|
||||
| Spindle |
|
||||
| Feed |
|
||||
---------------------------------------
|
||||
|
||||
Códigos de botón definidos en LIB:xhc-hb04-layout2.cfg
|
||||
|
||||
El botón Start/Pause se puede conectar para un comportamiento estándar con:
|
||||
[XHC_HB04_BUTTON]start-pause = std_start_pause
|
||||
|
||||
El botón STEP normalmente está conectado con:
|
||||
[XHC_HB04_BUTTON]step = xhc-hb04.stepsize-up
|
||||
|
||||
Los otros botones se pueden conectar a los pines hal, típicamente pines provistos de halui.
|
||||
|
||||
Los comandos MDI se pueden ejecutar usando los pines halui.mdi-command-nn definidos en el archivo ini con entradas como: [HALUI]MDI_COMMAND = mdi_command
|
||||
|
||||
El interruptor giratorio selecciona el eje, spindle.0 o ajuste de velocidad para el control mediante la rueda.
|
||||
|
||||
Las posiciones del interruptor (xyza) se pueden definir para cualquier eje disponible (xyzc, por ejemplo).
|
||||
|
||||
43
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini
Normal file
43
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini
Normal file
@@ -0,0 +1,43 @@
|
||||
#INCLUDE mm_base.inc
|
||||
#INCLUDE mm_trivkins.inc
|
||||
#INCLUDE layout2.inc
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = xhc-hb04 layout2 mm demo
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
HALFILE = LIB:xhc-hb04.tcl
|
||||
|
||||
[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 c
|
||||
# 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 = 1
|
||||
# require_pendant = yes|no: create xhc-hb04 hal pins when pendant noti
|
||||
# connected at startup
|
||||
require_pendant = no
|
||||
# inch_or_mm = in | mm
|
||||
inch_or_mm = mm
|
||||
# mpg_accels: provision for reduced acceleration for manual mode jogging
|
||||
mpg_accels = 50 50 500 600
|
||||
|
||||
[APPLICATIONS]
|
||||
APP = monitor-xhc-hb04
|
||||
1
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.txt
Symbolic link
1
configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.txt
Symbolic link
@@ -0,0 +1 @@
|
||||
xhc-hb04-layout2.txt
|
||||
Reference in New Issue
Block a user