Hello,
I probably found the mistake for the tool change M6. Apparently HAL component called hal_manualtoolchange does not exist for me.
For the Z axis, I have now rebuilt the reference switch so that the Z axis goes up to the proximity switch.
How do I have to adjust the .ini?
# EMC controller parameters for a simulated machine.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# General section
[EMC]
VERSION = $Revision$
MACHINE = gmoccapy
DEBUG = 0
# Sections for display options
[DISPLAY]
DISPLAY = gmoccapy
# Cycle time, in milliseconds, that display will sleep between polls
CYCLE_TIME = 100
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 15
MAX_SPINDLE_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = .5
# Max and default jog speeds in units per second
MAX_LINEAR_VELOCITY = 166
DEFAULT_LINEAR_VELOCITY = 5
MAX_ANGULAR_VELOCITY = 234
# Prefix to be used
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# list of selectable jog increments
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in
# for details see nc_files/subroutines/maco_instructions.txt
[MACROS]
MACRO = i_am_lost
MACRO = halo_world
MACRO = jog_around
MACRO = increment xinc yinc
MACRO = go_to_position X-pos Y-pos Z-pos
[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 = python
# Task controller section
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
# Part program interpreter section
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
PARAMETER_FILE = sim.var
SUBROUTINE_PATH = macros
# Motion control section
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000
# Hardware Abstraction Layer section
[HAL]
HALFILE = Robin.hal
#HALFILE = axis_manualtoolchange.hal
HALFILE = LIB:xhc-hb04.tcl
HALUI = halui
[HALUI]
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=G0 X0 Y0 Z0
#3
MDI_COMMAND= G10 L20 P0 X0
#4
MDI_COMMAND= G10 L20 P0 Y0
#5
MDI_COMMAND= G10 L20 P0 Z0
[XHC_HB04_BUTTONS]
# use button names according to layout file 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.home-all
start-pause = halui.machine.on
#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.stop
zero = halui.joint.selected.is-homed
safe-z = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home = halui.mdi-command-00
#macro-1 = halui.mdi-command-01
macro-2 = halui.mdi-command-01
spindle = halui.spindle.start
step = xhc-hb04.stepsize-up
mode = ""
# macro-6 = halui.mdi-command-06
# macro-7 = halui.mdi-command-07
stop = halui.estop.reset
reset = halui.estop.activate
zero-x = halui.mdi-command-02
zero-y = halui.mdi-command-03
zero-z = halui.mdi-command-04
[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
# scale plus or minus, rotaries may require larger scale factor:
scales = 1 -1 1 10 50 100
# jogmode normal(default) or vnormal or plus-minus
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 = 5
# require_pendant = no: create xhc-hb04 hal pins when pendant not connecte
# at startup
require_pendant = yes
inch_or_mm = mm
# mpg_accels: provision for reduced acceleration for mpg jogging
mpg_accels = 1 2 20 600
# Trajectory planner section
[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 50.00
MAX_VELOCITY = 500.00
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 13
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 1250.0
SCALE = 160.0
FERROR = 99
MIN_FERROR = 99.25
MIN_LIMIT = -100.0
MAX_LIMIT = 570
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 16
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 1
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 11
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 1250.0
SCALE = 160.0
FERROR = 99
MIN_FERROR = 99
MIN_LIMIT = -100.0
MAX_LIMIT = 500
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 11
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 2
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 11
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 1250.0
SCALE = 160.0
FERROR = 99
MIN_FERROR = 99
MIN_LIMIT = 0
MAX_LIMIT = 150
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 11
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 0
# section for main IO controller parameters
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
TOOL_CHANGE_POSITION = 100 100 -10
TOOL_CHANGE_QUILL_UP = 1