Eliminates multiple file copies and removes unneeded sym links by
taking advantage of the search path (HALLIB_PATH) used by the
linuxcnc script
0) move most configs/common/*.hal files to lib/hallib/
1) eliminate copy_configs etc. from Makefile
2) remove sym links that are no longer needed for
the relocated hal files
3) also move most-used halfiles (not managed by make)
simulated_home.hal
sim_spindle_encoder.hal
locking_indexer.hal
lathe.hal
gantrysim.hal
simulated-gantry-home.hal
simulated_limits.hal
tripodsim.hal
servo_sim.hal
4) lib/hallib/README: update and reorganize
5) pickconfig: make convenience link for HALLIB_DIR
The linuxcnc script prints the name of halfiles when they
are found using the search path (.:HALLIB_DIR) but the
HALLIB_DIR pathname may be long so this patch has pickconfig.tcl
make a sym link in the copied config directory
A user can use the link to copy a halfile to make local modifications,
for example:
$ cd ~/linuxcnc/configs/sim.config.name # sim config created by pickconfig
$ cp hallib/halfilename halfilename # copy lib file for local mods
6) update docs: Running-linuxCNC.txt
Notes:
a) affected configs require no changes as the linuxcnc script will
find files using HALLIB_PATH (defined in scripts/linuxcnc.in)
b) postgui halfiles are not affected since processing depends on gui
c) not working (but has not for a long time):
configs/sim/axis/remap/iocontrol-removed/iocontrol-removed.ini
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
51 lines
1.8 KiB
Text
51 lines
1.8 KiB
Text
# core HAL config file for simulation
|
|
|
|
# first load all the RT modules that will be needed
|
|
# kinematics
|
|
loadrt trivkins
|
|
# motion controller, get name and thread periods from ini file
|
|
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
|
|
# load 6 differentiators (for velocity and accel signals
|
|
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
|
|
# load additional blocks
|
|
loadrt hypot names=vel_xy,vel_xyz
|
|
|
|
# add motion controller functions to servo thread
|
|
addf motion-command-handler servo-thread
|
|
addf motion-controller servo-thread
|
|
# link the differentiator functions into the code
|
|
addf ddt_x servo-thread
|
|
addf ddt_xv servo-thread
|
|
addf ddt_y servo-thread
|
|
addf ddt_yv servo-thread
|
|
addf ddt_z servo-thread
|
|
addf ddt_zv servo-thread
|
|
addf vel_xy servo-thread
|
|
addf vel_xyz servo-thread
|
|
|
|
# create HAL signals for position commands from motion module
|
|
# loop position commands back to motion module feedback
|
|
net Xpos axis.0.motor-pos-cmd => axis.0.motor-pos-fb ddt_x.in
|
|
net Ypos axis.1.motor-pos-cmd => axis.1.motor-pos-fb ddt_y.in
|
|
net Zpos axis.2.motor-pos-cmd => axis.2.motor-pos-fb ddt_z.in
|
|
|
|
# send the position commands thru differentiators to
|
|
# generate velocity and accel signals
|
|
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
|
|
net Xacc <= ddt_xv.out
|
|
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
|
|
net Yacc <= ddt_yv.out
|
|
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
|
|
net Zacc <= ddt_zv.out
|
|
|
|
# Cartesian 2- and 3-axis velocities
|
|
net XYvel vel_xy.out => vel_xyz.in1
|
|
net XYZvel <= vel_xyz.out
|
|
|
|
# estop loopback
|
|
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
|
|
|
# create signals for tool loading loopback
|
|
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
|
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
|
|