My actual test configs attached. Look at first axis only.
# #######################################
#
# HAL file for HostMot2 with 3 servos
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware 
/lib/firmware/hm2
#
# See also:
# 
<http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################


# ###################################
# Core EMC/HAL Loads
# ###################################

# kinematics
loadrt trivkins
# loadrt plasmakins

# kinematics
# loadrt gantrykins

# Settings for gantrykins
# setp gantrykins.joint-0 0
# setp gantrykins.joint-1 1
# setp gantrykins.joint-2 2
# setp gantrykins.joint-3 0

# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD 
num_joints=[TRAJ]AXES

# standard components
loadrt pid num_chan=3


# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's 
going on in the syslog
#loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 
debug_pin_descriptors=1 debug_modules=1
loadrt hostmot2

# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)


# load BLDC module
loadrt bldc cfg=qi,qh,qh

# load Plasma THC module
# loadrt plasma

loadrt mux2 count=3

setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.frequency  20000

setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000

# ############# FOR DEBUGGING #############
# setp hm2_[HOSTMOT2](BOARD).0.write_address 13312 # (0x3400)
# setp hm2_[HOSTMOT2](BOARD).0.write_data 8   (divide/10)
# setp hm2_[HOSTMOT2](BOARD).0.write_strobe TRUE


# ################################################
# THREADS
# ################################################

addf hm2_[HOSTMOT2](BOARD).0.read          servo-thread

addf motion-command-handler                servo-thread
addf motion-controller                     servo-thread

addf pid.0.do-pid-calcs                    servo-thread
addf pid.1.do-pid-calcs                    servo-thread
addf pid.2.do-pid-calcs                    servo-thread

addf hm2_[HOSTMOT2](BOARD).0.write         servo-thread
addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog  servo-thread

addf bldc.0                             servo-thread
addf bldc.1                             servo-thread
addf bldc.2                             servo-thread

# addf plasma                           servo-thread

addf mux2.0                             servo-thread
addf mux2.1                             servo-thread
addf mux2.2                             servo-thread

# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################


# ################
# X [0] Axis
# ################

# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.enable
#net emcmot.00.enable => pid.0.enable

net emcmot.00.enable => bldc.0.init
net bldc.0-ok bldc.0.init-done pid.0.enable

# setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.fault-invert  1
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.deadtime        0 

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.00.scale  [AXIS_0]INPUT_SCALE

net index-0 bldc.0.index-enable hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable

# BLDC module settings
setp bldc.0.rev                         true
setp  bldc.0.scale                              -8192
setp  bldc.0.poles                              8
setp bldc.0.initvalue 0.6
# setp bldc.0.encoder-offset 0
# setp  bldc.0.pattern                          25

# Hall sensor feedback into BLDC module
#net motor.0.hall-1 hm2_[HOSTMOT2](BOARD).0.gpio.003.in => bldc.0.hall1
#net motor.0.hall-2 hm2_[HOSTMOT2](BOARD).0.gpio.004.in => bldc.0.hall2
#net motor.0.hall-3 hm2_[HOSTMOT2](BOARD).0.gpio.005.in => bldc.0.hall3

# position feedback signals
net motor.00.pos-fb     hm2_[HOSTMOT2](BOARD).0.encoder.00.position => 
pid.0.feedback axis.0.motor-pos-fb
net motor.00.vel-fb     hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => 
pid.0.feedback-deriv
net enc.0.raw           hm2_[HOSTMOT2](BOARD).0.encoder.00.rawcounts => 
bldc.0.rawcounts

# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.scale  [AXIS_0]OUTPUT_SCALE

net emcmot.00.pos-cmd   axis.0.motor-pos-cmd    => pid.0.command
net motor.00.command    pid.0.output            => bldc.0.value
# setp bldc.0.value 0.15


net pwm.00-a bldc.0.A-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.A-value
net pwm.00-b bldc.0.B-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.B-value
net pwm.00-c bldc.0.C-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.C-value


# ################
# Y [1] Axis
# ################

# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.enable
net emcmot.01.enable => pid.1.enable

# net emcmot.01.enable => bldc.1.init
# net bldc.1-ok bldc.1.init-done pid.1.enable

# setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.fault-invert  1
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.deadtime        0

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.01.scale  [AXIS_1]INPUT_SCALE

# net index-1 bldc.1.index-enable 
hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable

# BLDC module settings
setp bldc.1.scale                               -8192
setp bldc.1.poles                               8
setp bldc.1.pattern                             17

# Hall sensor feedback into BLDC module
net motor.1.hall-1 hm2_[HOSTMOT2](BOARD).0.gpio.015.in => bldc.1.hall1
net motor.1.hall-2 hm2_[HOSTMOT2](BOARD).0.gpio.016.in => bldc.1.hall2
net motor.1.hall-3 hm2_[HOSTMOT2](BOARD).0.gpio.017.in => bldc.1.hall3

# position feedback signals
net motor.01.pos-fb     hm2_[HOSTMOT2](BOARD).0.encoder.01.position     => 
pid.1.feedback axis.1.motor-pos-fb
net motor.01.vel-fb     hm2_[HOSTMOT2](BOARD).0.encoder.01.velocity     => 
pid.1.feedback-deriv
net enc.1.raw           hm2_[HOSTMOT2](BOARD).0.encoder.01.rawcounts    => 
bldc.1.rawcounts

# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.scale [AXIS_1]OUTPUT_SCALE

net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net motor.01.command  pid.1.output  =>  bldc.1.value
# setp bldc.1.value 0.25

net pwm.01-a bldc.1.A-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.A-value
net pwm.01-b bldc.1.B-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.B-value
net pwm.01-c bldc.1.C-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.C-value


# ################
# Z [2] Axis
# ################

# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable <= axis.2.amp-enable-out
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.enable
net emcmot.02.enable => pid.2.enable

# net emcmot.02.enable => bldc.2.init
# net bldc.2-ok bldc.2.init-done pid.2.enable

# setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.fault-invert  1
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.deadtime        0

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.02.scale  [AXIS_2]INPUT_SCALE

# net index-2 bldc.2.index-enable 
hm2_[HOSTMOT2](BOARD).0.encoder.02.index-enable

setp  bldc.2.scale                              -8192
setp  bldc.2.poles                              8
setp  bldc.2.pattern                            4

# Hall sensor feedback into BLDC module
net motor.2.hall-1 hm2_[HOSTMOT2](BOARD).0.gpio.027.in => bldc.2.hall1
net motor.2.hall-2 hm2_[HOSTMOT2](BOARD).0.gpio.028.in => bldc.2.hall2
net motor.2.hall-3 hm2_[HOSTMOT2](BOARD).0.gpio.029.in => bldc.2.hall3

# position feedback signals
net motor.02.pos-fb     hm2_[HOSTMOT2](BOARD).0.encoder.02.position => 
pid.2.feedback axis.2.motor-pos-fb
net motor.02.vel-fb     hm2_[HOSTMOT2](BOARD).0.encoder.02.velocity => 
pid.2.feedback-deriv
net enc.2.raw           hm2_[HOSTMOT2](BOARD).0.encoder.02.rawcounts => 
bldc.2.rawcounts

# set PID loop gains from inifile
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.scale [AXIS_2]OUTPUT_SCALE

net emcmot.02.pos-cmd axis.2.motor-pos-cmd => pid.2.command
net motor.02.command  pid.2.output  =>  bldc.2.value
# setp bldc.2.value 0.15

net pwm.02-a bldc.2.A-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.A-value
net pwm.02-b bldc.2.B-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.B-value
net pwm.02-c bldc.2.C-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.C-value

#*******************
#  SPINDLE S
#*******************

# ---setup spindle control signals---

net spindle-vel-cmd-rps    <=  motion.spindle-speed-out-rps
net spindle-vel-cmd        <=  motion.spindle-speed-out
net spindle-on             <=  motion.spindle-on
net spindle-cw             <=  motion.spindle-forward
net spindle-ccw            <=  motion.spindle-reverse
net spindle-brake          <=  motion.spindle-brake
net spindle-revs           =>  motion.spindle-revs
net spindle-at-speed       =>  motion.spindle-at-speed
net spindle-vel-fb         =>  motion.spindle-speed-in
net spindle-index-enable  <=>  motion.spindle-index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true


#******************************
# connect miscellaneous signals
#******************************

#  ---HALUI signals---

net joint-select-a        halui.joint.0.select
net x-is-homed            halui.joint.0.is-homed
net jog-x-pos             halui.jog.0.plus
net jog-x-neg             halui.jog.0.minus
net jog-x-analog          halui.jog.0.analog
net joint-select-b        halui.joint.1.select
net y-is-homed            halui.joint.1.is-homed
net jog-y-pos             halui.jog.1.plus
net jog-y-neg             halui.jog.1.minus
net jog-y-analog          halui.jog.1.analog
net joint-select-c        halui.joint.2.select
net z-is-homed            halui.joint.2.is-homed
net jog-z-pos             halui.jog.2.plus
net jog-z-neg             halui.jog.2.minus
net jog-z-analog          halui.jog.2.analog
net jog-selected-pos      halui.jog.selected.plus
net jog-selected-neg      halui.jog.selected.minus
net spindle-manual-cw     halui.spindle.forward
net spindle-manual-ccw    halui.spindle.reverse
net spindle-manual-stop   halui.spindle.stop
net machine-is-on         halui.machine.is-on
net jog-speed             halui.jog-speed 
net MDI-mode              halui.mode.is-mdi

#  ---coolant signals---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---probe signal---

net probe-in     =>  motion.probe-input

#  ---motion control signals---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---digital in / out signals---

#  ---estop signals---

net estop-out     <=  iocontrol.0.user-enable-out
net estop-out     =>  iocontrol.0.emc-enable-in

#  ---manual tool change signals---

loadusr -W hal_manualtoolchange
net tool-change-request     iocontrol.0.tool-change       =>  
hal_manualtoolchange.change
net tool-change-confirmed   iocontrol.0.tool-changed      <=  
hal_manualtoolchange.changed
net tool-number             iocontrol.0.tool-prep-number  =>  
hal_manualtoolchange.number
net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  
iocontrol.0.tool-prepared
# Generated by PNCconf at Wed May 29 20:52:34 2013
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = test4
DEBUG = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
# INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 0
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 10.0000
MAX_LINEAR_VELOCITY = 50.000000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xyz

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000

[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i23
CONFIG="firmware=hm2/5i23/SVTP6_7I39.BIT num_encoders=3 num_pwmgens=0 
num_3pwmgens=3 num_stepgens=0  " 

[HAL]
HALUI = halui
HALFILE = test4.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 10.0
MAX_LINEAR_VELOCITY = 50.0
NO_FORCE_HOMING = 1

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 5.0
MIN_FERROR = 2.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 5.0
P = 0.5
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 10.0
INPUT_SCALE = -8192.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -1000.0
MAX_LIMIT = 1000.0
HOME_OFFSET = 0.0

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 1.667
MAX_ACCELERATION = 2.0
P = 1.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 10.0
INPUT_SCALE = 8192.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 1.667
MAX_ACCELERATION = 2.0
P = 1.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 10.0
INPUT_SCALE = 8192.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0

#********************
# Spindle 
#********************
[SPINDLE_9]
# #######################################
#
# HAL file for HostMot2 with 3 servos
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware 
/lib/firmware/hm2
#
# See also:
# 
<http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################


# ###################################
# Core EMC/HAL Loads
# ###################################

# kinematics
loadrt trivkins
# loadrt plasmakins

# kinematics
# loadrt gantrykins

# Settings for gantrykins
# setp gantrykins.joint-0 0
# setp gantrykins.joint-1 1
# setp gantrykins.joint-2 2
# setp gantrykins.joint-3 0

# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD 
num_joints=[TRAJ]AXES

# standard components
loadrt pid num_chan=3


# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's 
going on in the syslog
#loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 
debug_pin_descriptors=1 debug_modules=1
loadrt hostmot2

# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)


# load BLDC module
loadrt bldc cfg=qh,qh,qh

# load Plasma THC module
# loadrt plasma

loadrt mux2 count=3

setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.frequency  20000

setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000

# ############# FOR DEBUGGING #############
# setp hm2_[HOSTMOT2](BOARD).0.write_address 13312 # (0x3400)
# setp hm2_[HOSTMOT2](BOARD).0.write_data 8   (divide/10)
# setp hm2_[HOSTMOT2](BOARD).0.write_strobe TRUE


# ################################################
# THREADS
# ################################################

addf hm2_[HOSTMOT2](BOARD).0.read          servo-thread

addf motion-command-handler                servo-thread
addf motion-controller                     servo-thread

addf pid.0.do-pid-calcs                    servo-thread
addf pid.1.do-pid-calcs                    servo-thread
addf pid.2.do-pid-calcs                    servo-thread

addf hm2_[HOSTMOT2](BOARD).0.write         servo-thread
addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog  servo-thread

addf bldc.0                             servo-thread
addf bldc.1                             servo-thread
addf bldc.2                             servo-thread

# addf plasma                           servo-thread

addf mux2.0                             servo-thread
addf mux2.1                             servo-thread
addf mux2.2                             servo-thread

# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################


# ################
# X [0] Axis
# ################

# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.enable
net emcmot.00.enable => pid.0.enable

# net emcmot.00.enable => bldc.0.init
# net bldc.0-ok bldc.0.init-done pid.0.enable

# setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.fault-invert  1
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.deadtime        0 

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.00.scale  [AXIS_0]INPUT_SCALE

# net index-0 bldc.0.index-enable 
hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable

# BLDC module settings
setp bldc.0.rev                         false
setp  bldc.0.scale                              -8192
setp  bldc.0.poles                              8
setp bldc.0.initvalue 0.4
# setp bldc.0.encoder-offset 0
setp bldc.0.pattern                             25

# Hall sensor feedback into BLDC module
net motor.0.hall-1 hm2_[HOSTMOT2](BOARD).0.gpio.003.in => bldc.0.hall1
net motor.0.hall-2 hm2_[HOSTMOT2](BOARD).0.gpio.004.in => bldc.0.hall2
net motor.0.hall-3 hm2_[HOSTMOT2](BOARD).0.gpio.005.in => bldc.0.hall3

# position feedback signals
net motor.00.pos-fb     hm2_[HOSTMOT2](BOARD).0.encoder.00.position => 
pid.0.feedback axis.0.motor-pos-fb
net motor.00.vel-fb     hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => 
pid.0.feedback-deriv
net enc.0.raw           hm2_[HOSTMOT2](BOARD).0.encoder.00.rawcounts => 
bldc.0.rawcounts

# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.scale  [AXIS_0]OUTPUT_SCALE

net emcmot.00.pos-cmd   axis.0.motor-pos-cmd    => pid.0.command
net motor.00.command    pid.0.output            => bldc.0.value
# setp bldc.0.value 0.15


net pwm.00-a bldc.0.A-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.A-value
net pwm.00-b bldc.0.B-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.B-value
net pwm.00-c bldc.0.C-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.00.C-value


# ################
# Y [1] Axis
# ################

# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.enable
net emcmot.01.enable => pid.1.enable

# net emcmot.01.enable => bldc.1.init
# net bldc.1-ok bldc.1.init-done pid.1.enable

# setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.fault-invert  1
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.deadtime        0

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.01.scale  [AXIS_1]INPUT_SCALE

# net index-1 bldc.1.index-enable 
hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable

# BLDC module settings
setp bldc.1.scale                               -8192
setp bldc.1.poles                               8
setp bldc.1.pattern                             17

# Hall sensor feedback into BLDC module
net motor.1.hall-1 hm2_[HOSTMOT2](BOARD).0.gpio.015.in => bldc.1.hall1
net motor.1.hall-2 hm2_[HOSTMOT2](BOARD).0.gpio.016.in => bldc.1.hall2
net motor.1.hall-3 hm2_[HOSTMOT2](BOARD).0.gpio.017.in => bldc.1.hall3

# position feedback signals
net motor.01.pos-fb     hm2_[HOSTMOT2](BOARD).0.encoder.01.position     => 
pid.1.feedback axis.1.motor-pos-fb
net motor.01.vel-fb     hm2_[HOSTMOT2](BOARD).0.encoder.01.velocity     => 
pid.1.feedback-deriv
net enc.1.raw           hm2_[HOSTMOT2](BOARD).0.encoder.01.rawcounts    => 
bldc.1.rawcounts

# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.scale [AXIS_1]OUTPUT_SCALE

net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net motor.01.command  pid.1.output  =>  bldc.1.value
# setp bldc.1.value 0.25

net pwm.01-a bldc.1.A-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.A-value
net pwm.01-b bldc.1.B-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.B-value
net pwm.01-c bldc.1.C-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.01.C-value


# ################
# Z [2] Axis
# ################

# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable <= axis.2.amp-enable-out
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.enable
net emcmot.02.enable => pid.2.enable

# net emcmot.02.enable => bldc.2.init
# net bldc.2-ok bldc.2.init-done pid.2.enable

# setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.fault-invert  1
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.deadtime        0

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.02.scale  [AXIS_2]INPUT_SCALE

# net index-2 bldc.2.index-enable 
hm2_[HOSTMOT2](BOARD).0.encoder.02.index-enable

setp  bldc.2.scale                              -8192
setp  bldc.2.poles                              8
setp  bldc.2.pattern                            4

# Hall sensor feedback into BLDC module
net motor.2.hall-1 hm2_[HOSTMOT2](BOARD).0.gpio.027.in => bldc.2.hall1
net motor.2.hall-2 hm2_[HOSTMOT2](BOARD).0.gpio.028.in => bldc.2.hall2
net motor.2.hall-3 hm2_[HOSTMOT2](BOARD).0.gpio.029.in => bldc.2.hall3

# position feedback signals
net motor.02.pos-fb     hm2_[HOSTMOT2](BOARD).0.encoder.02.position => 
pid.2.feedback axis.2.motor-pos-fb
net motor.02.vel-fb     hm2_[HOSTMOT2](BOARD).0.encoder.02.velocity => 
pid.2.feedback-deriv
net enc.2.raw           hm2_[HOSTMOT2](BOARD).0.encoder.02.rawcounts => 
bldc.2.rawcounts

# set PID loop gains from inifile
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.scale [AXIS_2]OUTPUT_SCALE

net emcmot.02.pos-cmd axis.2.motor-pos-cmd => pid.2.command
net motor.02.command  pid.2.output  =>  bldc.2.value
# setp bldc.2.value 0.15

net pwm.02-a bldc.2.A-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.A-value
net pwm.02-b bldc.2.B-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.B-value
net pwm.02-c bldc.2.C-value => hm2_[HOSTMOT2](BOARD).0.3pwmgen.02.C-value

#*******************
#  SPINDLE S
#*******************

# ---setup spindle control signals---

net spindle-vel-cmd-rps    <=  motion.spindle-speed-out-rps
net spindle-vel-cmd        <=  motion.spindle-speed-out
net spindle-on             <=  motion.spindle-on
net spindle-cw             <=  motion.spindle-forward
net spindle-ccw            <=  motion.spindle-reverse
net spindle-brake          <=  motion.spindle-brake
net spindle-revs           =>  motion.spindle-revs
net spindle-at-speed       =>  motion.spindle-at-speed
net spindle-vel-fb         =>  motion.spindle-speed-in
net spindle-index-enable  <=>  motion.spindle-index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true


#******************************
# connect miscellaneous signals
#******************************

#  ---HALUI signals---

net joint-select-a        halui.joint.0.select
net x-is-homed            halui.joint.0.is-homed
net jog-x-pos             halui.jog.0.plus
net jog-x-neg             halui.jog.0.minus
net jog-x-analog          halui.jog.0.analog
net joint-select-b        halui.joint.1.select
net y-is-homed            halui.joint.1.is-homed
net jog-y-pos             halui.jog.1.plus
net jog-y-neg             halui.jog.1.minus
net jog-y-analog          halui.jog.1.analog
net joint-select-c        halui.joint.2.select
net z-is-homed            halui.joint.2.is-homed
net jog-z-pos             halui.jog.2.plus
net jog-z-neg             halui.jog.2.minus
net jog-z-analog          halui.jog.2.analog
net jog-selected-pos      halui.jog.selected.plus
net jog-selected-neg      halui.jog.selected.minus
net spindle-manual-cw     halui.spindle.forward
net spindle-manual-ccw    halui.spindle.reverse
net spindle-manual-stop   halui.spindle.stop
net machine-is-on         halui.machine.is-on
net jog-speed             halui.jog-speed 
net MDI-mode              halui.mode.is-mdi

#  ---coolant signals---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---probe signal---

net probe-in     =>  motion.probe-input

#  ---motion control signals---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---digital in / out signals---

#  ---estop signals---

net estop-out     <=  iocontrol.0.user-enable-out
net estop-out     =>  iocontrol.0.emc-enable-in

#  ---manual tool change signals---

loadusr -W hal_manualtoolchange
net tool-change-request     iocontrol.0.tool-change       =>  
hal_manualtoolchange.change
net tool-change-confirmed   iocontrol.0.tool-changed      <=  
hal_manualtoolchange.changed
net tool-number             iocontrol.0.tool-prep-number  =>  
hal_manualtoolchange.number
net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  
iocontrol.0.tool-prepared
# Generated by PNCconf at Wed May 29 20:52:34 2013
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = test_qh
DEBUG = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
# INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 0
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 3.0000
MAX_LINEAR_VELOCITY = 50.000000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xyz

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000

[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i23
CONFIG="firmware=hm2/5i23/SVTP6_7I39.BIT num_encoders=3 num_pwmgens=0 
num_3pwmgens=3 num_stepgens=0  " 

[HAL]
HALUI = halui
HALFILE = test_qh.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 10.0
MAX_LINEAR_VELOCITY = 50.0
NO_FORCE_HOMING = 1

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 5.0
MIN_FERROR = 2.0
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 10.0
P = 0.5
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 10.0
INPUT_SCALE = -8192.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -1000.0
MAX_LIMIT = 1000.0
HOME_OFFSET = 0.0

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 1.667
MAX_ACCELERATION = 2.0
P = 1.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 10.0
INPUT_SCALE = 8192.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 1.667
MAX_ACCELERATION = 2.0
P = 1.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 10.0
INPUT_SCALE = 8192.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0

#********************
# Spindle 
#********************
[SPINDLE_9]
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to