[Home]History of KX3

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Revision 12 . . June 9, 2009 12:14 pm by Thorium [Added stepper generator for spindle]
Revision 11 . . (edit) April 28, 2009 10:10 am by Thorium
  

Difference (from prior major revision) (no other diffs)

Changed: 24c24

KX3.INI configuration file



Sample KX3.INI configuration file




Changed: 44c44
INTRO_TIME = 5
INTRO_TIME = 2

Changed: 61,62c61,62
BASE_PERIOD = 29000
SERVO_PERIOD = 1000000
BASE_PERIOD = 30000
SERVO_PERIOD = 600000

Changed: 87,88c87,88
MAX_ACCELERATION = 200.0
STEPGEN_MAXACCEL = 250.0
MAX_ACCELERATION = 400.0
STEPGEN_MAXACCEL = 500.0

Changed: 95,96c95,96
HOME_SEARCH_VEL = -30.000000
HOME_LATCH_VEL = 1.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = 5.000000

Changed: 104,105c104,105
MAX_ACCELERATION = 200.0
STEPGEN_MAXACCEL = 250.0
MAX_ACCELERATION = 400.0
STEPGEN_MAXACCEL = 500.0

Changed: 112,113c112,113
HOME_SEARCH_VEL = -30.000000
HOME_LATCH_VEL = 1.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = 5.000000

Changed: 121,122c121,122
MAX_ACCELERATION = 200.0
STEPGEN_MAXACCEL = 250.0
MAX_ACCELERATION = 400.0
STEPGEN_MAXACCEL = 500.0

Changed: 129,130c129,130
HOME_SEARCH_VEL = 40.000000
HOME_LATCH_VEL = -1.000000
HOME_SEARCH_VEL = 50.000000
HOME_LATCH_VEL = -5.000000

Added: 133a134


Changed: 137c138

KX3.HAL configuration file



Sample KX3.HAL configuration file




Changed: 141,142c142
* This file was originally created using STEPCONF, and then modified to resolve the ESTOP issue.
* Todo: I am currently cheating, and tricking the KX3 mill to run with a PWM spindle config (which works). The proper way is to add a 5th step generator for the spindle.
* This file was originally created using STEPCONF, and then modified to resolve the ESTOP issue and to add a 5th stepper generator controlling the spindle.

Added: 145a146


Changed: 151c152
loadrt stepgen step_type=0,0,0
loadrt stepgen step_type=0,0,0,0,0 ctrl_type=p,p,p,p,v

Changed: 153c154,155
net estop-out iocontrol.0.user-enable-out
loadrt scale
net estop-out iocontrol.0.user-enable-out #Charge pump must not be connected to ESTOP!

Changed: 155c157
loadrt pwmgen output_type=0


Removed: 160d161
addf pwmgen.make-pulses base-thread

Removed: 168d168
addf pwmgen.update servo-thread

Changed: 170,177c170,196
net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-enable <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 500.0
setp pwmgen.0.scale 47500.0
setp pwmgen.0.offset 0.00789473684211
setp pwmgen.0.dither-pwm true
net spindle-cw <= motion.spindle-forward
setp scale.0.in 0

# adjust spindle speed here if required
setp scale.0.gain 0.9

# The suggested gain was not scientifically tested, but based on the motor speed maxing out at approx S3500, which is the theoretical maximum for a KX3.

setp scale.0.offset -50
# A negative offset appears to yield the best results for low speeds allowing for approx 60 rpm at S60.

addf scale.0 servo-thread
setp stepgen.4.position-scale 1
setp stepgen.4.maxvel 3500 # maximum for standard KX3
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 20000
setp stepgen.4.dirsetup 20000
setp stepgen.4.maxaccel 2000

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 => parport.0.pin-14-out

net spindle-cw => parport.0.pin-16-out


Removed: 179,180d197
setp parport.0.pin-01-out-invert 1
net spindle-cw => parport.0.pin-01-out

Removed: 194d210
net spindle-pwm => parport.0.pin-14-out

Added: 254a271,272



LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
Search:
Published under a Creative Commons License