It's loading without error. The LCD works, the handwheel does jog the axes, and the selector knob does change the axes. But none of the buttons function, including the Step Size, so it's stuck moving by 0.001".

I have LinuxCNC 2.7.4 and the Linux Preempt-RTK. I did what was specified about adding USB permissions.

So 7i92_general_XHC20.ini is the main ini file. I added a [XHC_HB04_CONFIG] section which gives setup parameters. I added HALFILE = xhc-hb20.hal to the [HAL] section.

xhc-hb20.hal is a renamed copy of a modified xhc-hb04.hal. The homing routines don't exist, nor does an A-axis, so that's removed. Loadusr got changed to the local name "loadusr -W xhc-hb04 -I xhc-hb04-layout20.ini -H"

xhc-hb04-layout20.ini has layout2.inc added into it directly. For whatever reason layout2.inc didn't seem to be loading correctly into it so I just added it.

The HAL viewer does show there's an XHC section. However (I'm not in front of the machine now) IIRC the halui.mdi-command-01 etc didn't seem to exist under halui. I found what should have been the STEP++ pin but it didn't show TRUE when I pressed it. But I'm not sure how that works, if it's a momentary press and I just manually reload the HAL status I would probably never catch it.

Thanks,
Danny


[HOSTMOT2]
DRIVER=hm2_eth board_ip="10.10.10.10" 
# DRIVER=hm2_eth board_ip="10.10.10.10" debug=1
BOARD=7i92
CONFIG="num_encoders=0 num_stepgens=4 sserial_port_0=20xxxxxx"




[EMC]

# Name of machine, for use with display, etc.
MACHINE =               HM2-Stepper

# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG =                0x00000003
#DEBUG =                0x00000007
DEBUG = 0




[DISPLAY]

# Name of display program, e.g., tkemc
#DISPLAY =               tkemc
DISPLAY =              axis

# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME =            0.100

# Path to help file
HELP_FILE =             tkemc.txt

# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET =       RELATIVE

# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK =     ACTUAL

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE =     30

# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/

# Introductory graphic
INTRO_GRAPHIC =         emc2.gif
INTRO_TIME =            5


[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]

# Name of task controller program, e.g., milltask
TASK =                  milltask

# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME =            0.010




[RS274NGC]

# File containing interpreter variables
PARAMETER_FILE =        hm2-stepper.var




[EMCMOT]

EMCMOT =                motmod

# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT =          1.0

# Interval between tries to emcmot, in seconds
COMM_WAIT =             0.010

# Servo task period, in nanoseconds
SERVO_PERIOD =          1000000




[HAL]

# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.

# list of hal config files to run through halcmd
# files are executed in the order in which they appear

HALUI=halui


HALFILE =               7i92_general.hal
HALFILE = xhc-hb20.hal
#HALFILE = LIB:xhc-hb04.tcl
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD =               save neta




[TRAJ]

AXES =                  3
COORDINATES =           X Y Z
#HOME =                  0 0 0
LINEAR_UNITS =          inch
ANGULAR_UNITS =         degree
CYCLE_TIME =            0.001

 
DEFAULT_VELOCITY = 30
#In machines with nontrivial kinematics, the acceleration used for "teleop" 
(Cartesian space) jogs, in machine units per second per second.
DEFAULT_ACCELERATION = 60  
MAX_VELOCITY = 30
MAX_ACCELERATION = 60.0 


[AXIS_0]

# 
# Step timing is 1 us steplen + 1 us stepspace
# That gives 2 us step period = 500 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 25/1 = 50 ips
#


TYPE =              LINEAR
MAX_VELOCITY =       15
MAX_ACCELERATION =   50
MAX_JERK =   2000
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    21
STEPGEN_MAX_ACC =    96

BACKLASH =           0.000

SCALE =            1736.236364

MIN_LIMIT =             -50.0
MAX_LIMIT =             98.0

FERROR =    .0002
MIN_FERROR = .0001


#HOME =                  0.000
#HOME_OFFSET =           0.10
#HOME_SEARCH_VEL =       0.10
#HOME_LATCH_VEL =        -0.01
#HOME_USE_INDEX =        YES
#HOME_IGNORE_LIMITS =    YES

# these are in nanoseconds
DIRSETUP   =              6000
DIRHOLD    =              6000
STEPLEN    =              8000
STEPSPACE  =              8000

# PID tuning params
DEADBAND =              0
P =                     1000
I =                     0
D =                     0
FF0 =                   0
FF1 =                   1
FF2 =                                                   0.00013
BIAS =                  0
MAX_OUTPUT =                            0
MAX_ERROR =                                     0.0005

[AXIS_1]

TYPE =              LINEAR
MAX_VELOCITY =       15
MAX_ACCELERATION =   50
MAX_JERK =   2000
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    21
STEPGEN_MAX_ACC =    96

BACKLASH =           0.000

SCALE = 1736.236364


MIN_LIMIT =             -30.0
MAX_LIMIT =             60.0

FERROR =    .0002
MIN_FERROR = .0001

#HOME =                  0.000
#HOME_OFFSET =           0.10
#HOME_SEARCH_VEL =       0.10
#HOME_LATCH_VEL =        -0.01
#HOME_USE_INDEX =        YES
#HOME_IGNORE_LIMITS =    YES

# these are in nanoseconds
DIRSETUP   =              6000
DIRHOLD    =              6000
STEPLEN    =              8000
STEPSPACE  =              8000

# PID tuning params
DEADBAND =              0
P =                     1000
I =                     0
D =                     0
FF0 =                   0
FF1 =                   1
FF2 =                                                   0.00013
BIAS =                  0
MAX_OUTPUT =                            0
MAX_ERROR =                                     0.0005



[AXIS_2]

TYPE =              LINEAR
MAX_VELOCITY =      5
MAX_ACCELERATION =  30
MAX_JERK =   2000
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    6
STEPGEN_MAX_ACC =    36

BACKLASH =           0.000

SCALE = 4000

MIN_LIMIT =             -10.0
MAX_LIMIT =             20.0

FERROR =    .0002
MIN_FERROR = .0001

#HOME =                  0.000
#HOME_OFFSET =           0.10
#HOME_SEARCH_VEL =       0.10
#HOME_LATCH_VEL =        -0.01
#HOME_USE_INDEX =        YES
#HOME_IGNORE_LIMITS =    YES

# these are in nanoseconds
DIRSETUP   =              6000
DIRHOLD    =              6000
STEPLEN    =              8000
STEPSPACE  =              8000
# PID tuning params
DEADBAND =              0
P =                     1000
I =                     0
D =                     0
FF0 =                   0
FF1 =                   1
FF2 =                                                   0.00013
BIAS =                  0
MAX_OUTPUT =                            0
MAX_ERROR =                                     0.0005

[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 all manual mode 
jogging)
                          (in machine_units/sec/sec like 
[AXIS_n]MAX_ACCELERATION)
                          (this option requires: [APPLICATIONS]APP = 
xhc-hb04-accels)
scales     = 1 1 1 1      (optional, plus/minus factors, default: 1 1 1 1)
require_pendant = no     (optional, yes | no, default: yes)
inch_or_mm = in           (optional, in | mm for display icon, default: mm)
jogmode    = normal       (optional, normal | vnormal | plus-minus, default: 
normal)
sequence   = 2            (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




[EMCIO]

# Name of IO controller program, e.g., io
EMCIO =                 io

# cycle time, in seconds
CYCLE_TIME =            0.100

# tool table file
TOOL_TABLE =            tool.tbl















#INCLUDE inch_base.inc
#INCLUDE layout20.inc


[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.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.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

[EMC]
MACHINE =  xhc-hb04 layout2 
#demo

[HAL]
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 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 = 2
# require_pendant = no: create xhc-hb04 hal pins when pendant not connecte
#                       at startup
#require_pendant = yes
# 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 = xhc-hb04-accels
APP = monitor-xhc-hb04
loadusr -W xhc-hb04 -I xhc-hb04-layout20.ini -H


# Home button
#net home halui.home-all <= xhc-hb04.button-home

# Absolute position LCD
net pos-x halui.axis.0.pos-feedback => xhc-hb04.x.pos-absolute
net pos-y halui.axis.1.pos-feedback => xhc-hb04.y.pos-absolute
net pos-z halui.axis.2.pos-feedback => xhc-hb04.z.pos-absolute
#net pos-a halui.axis.3.pos-feedback => xhc-hb04.a.pos-absolute

# Relative position LCD
net pos-rel-x halui.axis.0.pos-relative => xhc-hb04.x.pos-relative
net pos-rel-y halui.axis.1.pos-relative => xhc-hb04.y.pos-relative
net pos-rel-z halui.axis.2.pos-relative => xhc-hb04.z.pos-relative
#net pos-rel-a halui.axis.3.pos-relative => xhc-hb04.a.pos-relative

# Jog wheel and axis selection button
net jog-x axis.0.jog-enable <= xhc-hb04.jog.enable-x
net jog-y axis.1.jog-enable <= xhc-hb04.jog.enable-y
net jog-z axis.2.jog-enable <= xhc-hb04.jog.enable-z
#net jog-a axis.3.jog-enable <= xhc-hb04.jog.enable-a
net jog-scale xhc-hb04.jog.scale => axis.0.jog-scale axis.1.jog-scale 
axis.2.jog-scale #axis.3.jog-scale
net jog-counts xhc-hb04.jog.counts => axis.0.jog-counts axis.1.jog-counts 
#axis.3.jog-counts
net jog-counts-neg xhc-hb04.jog.counts-neg => axis.2.jog-counts
net jog-speed halui.jog-speed <= halui.max-velocity.value

# Wheel for feedrate and spindle
setp halui.feed-override.scale 0.01
net jog-counts => halui.feed-override.counts
net jog-feed halui.feed-override.count-enable <= 
xhc-hb04.jog.enable-feed-override
net jog-feed2 halui.feed-override.value => xhc-hb04.feed-override

setp halui.spindle-override.scale 0.01
net jog-counts => halui.spindle-override.counts
net jog-spindle halui.spindle-override.count-enable <= 
xhc-hb04.jog.enable-spindle-override
net jog-spindle2 halui.spindle-override.value => xhc-hb04.spindle-override
#net spindle-rps motion.spindle-speed-cmd-rps => xhc-hb04.spindle-rps

# RESET/ESTOP button
#net estop xhc-hb04.button-reset => halui.estop.activate

# X=0, Y=0, Z=0 
#net x0 halui.mdi-command-06 xhc-hb04.button-x0
#net y0 halui.mdi-command-07 xhc-hb04.button-y0
#net z0 halui.mdi-command-08 xhc-hb04.button-z0
#net origin halui.mdi-command-09 xhc-hb04.button-goto-zero


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to