Browse Source

spindle works too now

xhcb04
ton, LinuxCNCMESA 4 years ago
parent
commit
06fac7271a
  1. 17
      custom.hal
  2. 8
      mesa_2019.hal
  3. 4
      mesa_2019.ini

17
custom.hal

@ -3,8 +3,14 @@
# Spindle
setp hm2_7i96.0.pwmgen.00.output-type 1
setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
#setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]MAX_RPM
#setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
setp hm2_7i96.0.pwmgen.pwm_frequency 1100
setp hm2_7i96.0.pwmgen.00.scale 12000
####setp hm2_7i96.0.pwmgen.00.offset 0.157142857143
####setp hm2_7i96.0.pwmgen.00.dither-pwm true
net spindle-cmd-rpm => hm2_7i96.0.pwmgen.00.value
net spindle-on <= spindle.0.on => hm2_7i96.0.pwmgen.00.enable
@ -18,6 +24,9 @@ net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-at-speed => spindle.0.at-speed
# Standard I/O Block - EStop, Etc
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
# external estop
@ -27,3 +36,7 @@ addf estop-latch.0 servo-thread
#net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_7i96.0.gpio.010.in
####net estop-out <= iocontrol.0.user-enable-out
####net estop-ext => iocontrol.0.emc-enable-in

8
mesa_2019.hal

@ -165,14 +165,6 @@ setp pid.3.deadband [JOINT_3]DEADBAND
setp pid.3.maxoutput [JOINT_3]MAX_OUTPUT
setp pid.3.maxerror [JOINT_3]MAX_ERROR
# Spindle
setp hm2_7i96.0.pwmgen.00.output-type 0
setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
# Standard I/O Block - EStop, Etc
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

4
mesa_2019.ini

@ -215,8 +215,8 @@ HOME_IGNORE_LIMITS = False
[SPINDLE]
SPINDLE_TYPE = openLoop
SCALE =
PWM_FREQUENCY = 20000
SCALE = 12000
PWM_FREQUENCY = 21000
MAX_RPM = 24000
MIN_RPM = 1000
DEADBAND = 0

Loading…
Cancel
Save