I successfully converted my turnkey IHCNC mill to use EMC2 running on Linux. Unless I am mistaken, the mill runs smoother now (axis movements are quieter), and the computer it is running on is nothing to brag about. I commandeered the PC that came with the mill to use as my CAD/CAM/EAD/web surfboard/... machine (now multibooting Linux and XP) and I pushed an older machine out into the workshop. I couldn't be happier. I love Linux!!!
Anyhow, it took me a while to get EMC2 configured, so I'm sharing my configuration files in this post in the offhand chance someone else would like to try out Linux to control their mill. Look in the attached files for information regarding my mill and control PC.
I just got things working this weekend, so I haven't spent much time with the mill since moving over to Linux, but I'm confident that the configuration files are accurate...maybe not so confident about the low end PC that's controlling the mill, but I haven't had any problems yet...
Be nice, I'm just trying to share (I get a lot of slack about being a Linux enthusiast...).
Here's the config file text for those that just want to peek...
**************************************************
IndustrialHobbies.ini
**************************************************
# IndustrialHobbies 4 Axis Turnkey Mill with VFD
# Model: 7045FG, SN: 1300, DOM: 11/23/2008
# Linux 2.6.32-122-rtai Ubuntu 10.04 (linuxcnc.org)
# Shuttle XPC SK43G
# AMD Sempron 2800+ (2GHz)
# 512 Mb shared with video, 434 Mb available
[EMC]
MACHINE = IndustrialHobbies
DEBUG = 0
[DISPLAY]
DISPLAY = axis
EDITOR = gnome-terminal -e vim
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 2
PROGRAM_PREFIX = /home/robertb/emc2/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
[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 = emc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 27777
SERVO_PERIOD = 1000000
[HAL]
HALFILE = IndustrialHobbies.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
MAX_ANGULAR_VELOCITY = 100.00
DEFAULT_ANGULAR_VELOCITY = 10.00
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.18
MAX_LINEAR_VELOCITY = 1.80
NO_FORCE_HOMING = 1
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_0]
TYPE = LINEAR
HOME = 16.0
MAX_VELOCITY = 1.71004788134
MAX_ACCELERATION = 15.0
STEPGEN_MAXACCEL = 18.75
SCALE = 20000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 31.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.050000
HOME_LATCH_VEL = 0.025000
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_1]
TYPE = LINEAR
HOME = 6.0
MAX_VELOCITY = 1.71004788134
MAX_ACCELERATION = 15.0
STEPGEN_MAXACCEL = 18.75
SCALE = 20000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 12.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.050000
HOME_LATCH_VEL = 0.025000
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_2]
TYPE = LINEAR
HOME = 10.0
MAX_VELOCITY = 1.7
MAX_ACCELERATION = 15.0
STEPGEN_MAXACCEL = 18.75
SCALE = 20000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = 0.0
*************************************
IndustrialHobbies.hal
*************************************
################################################## #
# IndustrialHobbies 4 Axis Turnkey Mill with VFD
# Model: 7045FG, SN: 1300, DOM: 11/23/2008
#================================================= =
# Linux 2.6.32-122-rtai Ubuntu 10.04 (linuxcnc.org)
# Shuttle XPC SK43G
# AMD Sempron 2800+ (2GHz)
# 512 Mb shared with video, 434 Mb available
################################################## #
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out "
setp parport.0.reset-time 3500
loadrt stepgen step_type=0,0,0,0,0 ctrl_type=p,p,p,p,v
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
################################################## #
# Output pin assignments
################################################## #
setp parport.0.pin-01-out-invert 1
net coolant-flood => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
setp parport.0.pin-03-out-invert 1
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
setp parport.0.pin-05-out-invert 1
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
setp parport.0.pin-07-out-invert 1
net spindle-cw => parport.0.pin-08-out
setp parport.0.pin-08-out-invert 1
net spindle-out => parport.0.pin-09-out
setp parport.0.pin-16-out-invert 1
net adir => parport.0.pin-16-out
setp parport.0.pin-17-out-invert 1
net astep => parport.0.pin-17-out
setp parport.0.pin-17-out-reset 1
################################################## #
# Input pin assignments
################################################## #
net min-home-x <= parport.0.pin-10-in
net min-home-y <= parport.0.pin-11-in
net max-home-z <= parport.0.pin-12-in
net shared-limits <= parport.0.pin-13-in
net estop-ext <= parport.0.pin-15-in
################################################## #
# Flood control
################################################## #
net coolant-flood <= iocontrol.0.coolant-flood
################################################## #
# X-Axis
# Gecko G320 controller
################################################## #
setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 16700
setp stepgen.0.dirsetup 16700
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net min-home-x => axis.0.home-sw-in
net min-home-x => axis.0.neg-lim-sw-in
net shared-limits => axis.0.pos-lim-sw-in
################################################## #
# Y-Axis
# Gecko G320 controller
################################################## #
setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 16700
setp stepgen.1.dirsetup 16700
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
net min-home-y => axis.1.home-sw-in
net min-home-y => axis.1.neg-lim-sw-in
net shared-limits => axis.1.pos-lim-sw-in
################################################## #
# Z-Axis Vertical
# Gecko G320 controller
################################################## #
setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 16700
setp stepgen.2.dirsetup 16700
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable
net max-home-z => axis.2.home-sw-in
net max-home-z => axis.2.pos-lim-sw-in
net shared-limits => axis.2.neg-lim-sw-in
################################################## #
# A-Axis Rotary Table
# Gecko G210 controller
################################################## #
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 36500
setp stepgen.3.dirsetup 17500
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
net aenable axis.3.amp-enable-out => stepgen.3.enable
################################################## #
# Spindle cnc4pc C6 Variable Speed Controller
################################################## #
loadrt scale count=1
setp scale.0.in 0
setp scale.0.gain 0.86
addf scale.0 servo-thread
setp stepgen.4.position-scale [SPINDLE]SCALE
setp stepgen.4.maxvel [SPINDLE]MAX_VELOCITY
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 20000
setp stepgen.4.dirsetup 20000
setp stepgen.4.maxaccel [SPINDLE]STEPGEN_MAXACCEL
net spindle-enable <= motion.spindle-on => stepgen.4.enable
net spindle-cmd motion.spindle-speed-out => scale.0.in
net spindle-freq <= scale.0.out => stepgen.4.velocity-cmd
net spindle-out <= stepgen.4.step
net spindle-cw <= stepgen.4.dir
################################################## #
# Emergency Stop
################################################## #
net estop-ext => iocontrol.0.emc-enable-in
################################################## #
# Tools
################################################## #
loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed 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