######################################################################## # Spindle speed control # # PWM ouputs the duty cycle it is told by tormachspindle comp # # assume standard spindle until UI sets it setp tormachspindle.spindle-type 0 # for high speed spindle set is-hispeed to 1 # if set the spindle comp will ignore spindle-type # and use hispeed-min and hispeed-max # this override is temporary until the UI support hispeed directly #setp tormachspindle.is-hispeed 1 setp tormachspindle.hispeed-min 500 setp tormachspindle.hispeed-max 4000 # allow UI to access min/max for high speed spindle # do not net these until the UI code is changed to set them explicitly # or the setp command above will not stick and they will be set to 0 #net spindle-hispeed-min tormachspindle.hispeed-min #net spindle-hispeed-max tormachspindle.hispeed-max # these let the UI read the min/max maintained by the comp based on spindle type net spindle-min-speed tormachspindle.min-speed net spindle-max-speed tormachspindle.max-speed # the UI sets the spindle type net spindle-type tormachspindle.spindle-type # assume high range until UI sets it setp tormachspindle.belt-position 1 net spindle-range tormachspindle.belt-position net spindle-range-alarm tormachspindle.speed-alarm setp tormachspindle.lowbelt-min-rpm [SPINDLE]LO_RANGE_MIN setp tormachspindle.lowbelt-max-rpm [SPINDLE]LO_RANGE_MAX setp tormachspindle.lowbelt-ratio [SPINDLE]LO_RANGE_PULLEY_RATIO setp tormachspindle.highbelt-min-rpm [SPINDLE]HI_RANGE_MIN setp tormachspindle.highbelt-max-rpm [SPINDLE]HI_RANGE_MAX setp tormachspindle.highbelt-ratio [SPINDLE]HI_RANGE_PULLEY_RATIO # frequencies sent to stepgen to achieve low belt speeds # 500 Hz -> 6 Hz at VFD -> 175 RPM at spindle (770) # 10900 Hz -> 120 Hz at VFD -> 3250 RPM at spindle (770) # 500 Hz -> 6 Hz at VFD -> 100 RPM at spindle (1100-2-3) # 10900 Hz -> 120 Hz at VFD -> 2000 RPM at spindle (1100-2-3) # 1600 Hz -> 300 RPM at spindle (1100-1) # 10900 Hz -> 1750 RPM at spindle (1100-1) setp tormachspindle.lowbelt-min-mcb-freq [SPINDLE]MIN_MCB_FREQUENCY setp tormachspindle.lowbelt-max-mcb-freq [SPINDLE]MAX_MCB_FREQUENCY # PWM setp tormachspindle.lowbelt-min-pwm-dc 0 setp tormachspindle.lowbelt-max-pwm-dc 76.0 # frequencies sent to stepgen to achieve high belt speeds # 500 Hz -> 6 Hz at VFD -> 525 RPM at spindle (770) # 10900 Hz -> 120 Hz at VFD -> 10200 RPM at spindle (770) # 500 Hz -> 6 Hz at VFD -> 250 RPM at spindle (1100-2-3) # 10900 Hz -> 120 Hz at VFD -> 5140 RPM at spindle (1100-2-3) # 1600 Hz -> 800 RPM at spindle (1100-1) # 10900 Hz -> 4500 RPM at spindle (1100-1) setp tormachspindle.highbelt-min-mcb-freq [SPINDLE]MIN_MCB_FREQUENCY setp tormachspindle.highbelt-max-mcb-freq [SPINDLE]MAX_MCB_FREQUENCY # PWM setp tormachspindle.highbelt-min-pwm-dc 0 setp tormachspindle.highbelt-max-pwm-dc 76.0 # speed-out is displayed by UI when program running net spindle-speed-fb-rpm tormachspindle.speed-out net spindle-speed-cmd motion.spindle-speed-out tormachspindle.speed-in # connect output of spindle comp to pwmgen net spindle-speed tormachspindle.mcb-pwm-out hm2_[HOSTMOT2](BOARD).0.pwmgen.01.value # spindle at speed parameters for tormachspindle component setp tormachspindle.startup-delay [SPINDLE]STARTUP_DELAY # time to reach max speed from stopped setp tormachspindle.seconds-to-max-rpm [SPINDLE]SECONDS_TO_MAX_RPM # connect spindle comp at-speed output to motion ## net spindle-at-speed tormachspindle.at-speed motion.spindle-at-speed # spindle enable # P3 pin 1 gpio 000 #setp hm2_[HOSTMOT2](BOARD).0.gpio.017.is_output 1 # spindle direction # P3 pin 16 gpio 005. Also routed through m200 comp to deal with spindle encoder setp hm2_[HOSTMOT2](BOARD).0.gpio.022.is_output 1 setp hm2_[HOSTMOT2](BOARD).0.gpio.024.is_output 1 net spindle-fwd motion.spindle-forward => hm2_[HOSTMOT2](BOARD).0.gpio.024.out net spindle-rev motion.spindle-reverse => hm2_[HOSTMOT2](BOARD).0.gpio.022.out # UI access to stop spindle while in feedhold / INTERP_PAUSED #net spindle-disable tormachspindlem200.disable # need to insert the spindle component between motion.spindle-on and the 440 # commanded 0 RPM (as from an open enclosure door) still turns the spindle slowly if left enabled net spindle-on tormachspindle.enable-in motion.spindle-on # net spindle-enable-out tormachspindle.enable-out hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable tormachspindle.spindle-on hm2_[HOSTMOT2](BOARD).0.gpio.017.out setp hm2_[HOSTMOT2](BOARD).0.pwmgen.01.output-type 1 setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 10 setp hm2_[HOSTMOT2](BOARD).0.pwmgen.01.scale 100.0 net spindle-speed tormachspindle.mcb-pwm-out hm2_[HOSTMOT2](BOARD).0.pwmgen.01.value # max RPM when enclosure door open net enc-door-open-max-rpm tormachspindle.enc-door-open-max-rpm # ATC uses this pin for BT30 configs -- this is a stub newsig orient-status float sets orient-status 0 ########################################################################