Problem with spindle start

More
07 Apr 2018 13:16 #108557 by Bordug
Hello. Please help, I can not adjust the spindle control. I work with linuxcnc for the first time and not everything is clear to me. The machine is controlled by Step / Dir, 4 axes, E-stop button, enable for drivers, probe and enable with 0-10V for spindle. At the moment I did not connect the button and sensor, but I want to adjust the spindle control. Controller Mesa 7i92 from BigJohnT and the switching board BL-MACH-V1.1. Linuxcnc does not give an error at startup, but when I try to turn on the spindle, there is no signal from the controller for this. I tried to make a configuration in pncconf for 5i25 and from there took a partition for the spindle, but it does not work. I will be very grateful for the tips.
My Hal-file:
# Generated by PNCconf at Fri May 30 19:29:27 2014
# Все изменения в этом файле будут перезаписаны
# overwritten when you run PNCconf again

loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
# loadrt probe_parport
loadrt hostmot2
# loadrt hm2_eth board_ip=10.10.10.10 config="num_stepgens=4, num_encoders=0, num_pwmgens=1"
loadrt hm2_eth board_ip=10.10.10.10 config="num_stepgens=4, num_encoders=0, num_pwmgens=1"
setp     hm2_7i92.0.pwmgen.pwm_frequency 20000
setp     hm2_7i92.0.pwmgen.pdm_frequency 6000000
setp     hm2_7i92.0.watchdog.timeout_ns 10000000
loadrt pid names=pid.s

addf hm2_7i92.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.s.do-pid-calcs                 servo-thread
addf hm2_7i92.0.write         servo-thread
# addf hm2_7i92.0.pet_watchdog  servo-thread

# external output signals

# --- MACHINE-IS-ENABLED ---
setp hm2_7i92.0.gpio.001.is_output true
net machine-is-enabled hm2_7i92.0.gpio.001.out

# --- SPINDLE-ON ---
setp hm2_7i92.0.gpio.007.is_output true
net spindle-on hm2_7i92.0.gpio.007.out

# external input signals

# --- PROBE-IN ---
net probe-in     <=  hm2_7i92.0.gpio.003.in

# --- ESTOP-EXT ---
#net estop-ext     <=  hm2_7i92.0.gpio.013.in

# --- BOTH-HOME-X ---
#net both-home-x     <=  hm2_7i92.0.gpio.019.in

# --- BOTH-Y ---
#net both-y     <=  hm2_7i92.0.gpio.023.in

#*******************
#  AXIS X
#*******************

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp   hm2_7i92.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
setp   hm2_7i92.0.stepgen.00.steplen         [AXIS_0]STEPLEN
setp   hm2_7i92.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
setp   hm2_7i92.0.stepgen.00.position-scale  [AXIS_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.00.step_type        0
setp   hm2_7i92.0.stepgen.00.control-type     0
setp   hm2_7i92.0.stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.00.maxvel          [AXIS_0]STEPGEN_MAXVEL

net x-pos-fb     axis.0.motor-pos-fb   <=  hm2_7i92.0.stepgen.00.position-fb
net x-pos-cmd    axis.0.motor-pos-cmd  =>  hm2_7i92.0.stepgen.00.position-cmd
net x-enable     axis.0.amp-enable-out =>  hm2_7i92.0.stepgen.00.enable

# ---setup home / limit switch signals---

# net both-home-x     =>  axis.0.home-sw-in
# net both-home-x     =>  axis.0.neg-lim-sw-in
# net both-home-x     =>  axis.0.pos-lim-sw-in

#*******************
#  AXIS Y
#*******************

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.01.dirsetup        [AXIS_1]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [AXIS_1]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [AXIS_1]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [AXIS_1]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [AXIS_1]STEP_SCALE
setp   hm2_7i92.0.stepgen.01.step_type        0
setp   hm2_7i92.0.stepgen.01.control-type     0
setp   hm2_7i92.0.stepgen.01.maxaccel        [AXIS_1]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.01.maxvel          [AXIS_1]STEPGEN_MAXVEL

net y-pos-fb     axis.1.motor-pos-fb   <=  hm2_7i92.0.stepgen.01.position-fb
net y-pos-cmd    axis.1.motor-pos-cmd  =>  hm2_7i92.0.stepgen.01.position-cmd
net y-enable     axis.1.amp-enable-out =>  hm2_7i92.0.stepgen.01.enable

# ---setup home / limit switch signals---

# net y-home-sw     =>  axis.1.home-sw-in
# net both-y     =>  axis.1.neg-lim-sw-in
# net both-y     =>  axis.1.pos-lim-sw-in

#*******************
#  AXIS Z
#*******************

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.02.dirsetup        [AXIS_2]DIRSETUP
setp   hm2_7i92.0.stepgen.02.dirhold         [AXIS_2]DIRHOLD
setp   hm2_7i92.0.stepgen.02.steplen         [AXIS_2]STEPLEN
setp   hm2_7i92.0.stepgen.02.stepspace       [AXIS_2]STEPSPACE
setp   hm2_7i92.0.stepgen.02.position-scale  [AXIS_2]STEP_SCALE
setp   hm2_7i92.0.stepgen.02.step_type        0
setp   hm2_7i92.0.stepgen.02.control-type     0
setp   hm2_7i92.0.stepgen.02.maxaccel        [AXIS_2]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.02.maxvel          [AXIS_2]STEPGEN_MAXVEL

net z-pos-fb     axis.2.motor-pos-fb   <=  hm2_7i92.0.stepgen.02.position-fb
net z-pos-cmd    axis.2.motor-pos-cmd  =>  hm2_7i92.0.stepgen.02.position-cmd
net z-enable     axis.2.amp-enable-out =>  hm2_7i92.0.stepgen.02.enable

# ---setup home / limit switch signals---

# net z-home-sw     =>  axis.2.home-sw-in
# net z-neg-limit     =>  axis.2.neg-lim-sw-in
# net z-pos-limit     =>  axis.2.pos-lim-sw-in

#*******************
#  AXIS A
#*******************

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.03.dirsetup        [AXIS_3]DIRSETUP
setp   hm2_7i92.0.stepgen.03.dirhold         [AXIS_3]DIRHOLD
setp   hm2_7i92.0.stepgen.03.steplen         [AXIS_3]STEPLEN
setp   hm2_7i92.0.stepgen.03.stepspace       [AXIS_3]STEPSPACE
setp   hm2_7i92.0.stepgen.03.position-scale  [AXIS_3]STEP_SCALE
setp   hm2_7i92.0.stepgen.03.step_type        0
setp   hm2_7i92.0.stepgen.03.control-type     0
setp   hm2_7i92.0.stepgen.03.maxaccel        [AXIS_3]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.03.maxvel          [AXIS_3]STEPGEN_MAXVEL

net a-pos-fb     axis.3.motor-pos-fb   <=  hm2_7i92.0.stepgen.03.position-fb
net a-pos-cmd    axis.3.motor-pos-cmd  =>  hm2_7i92.0.stepgen.03.position-cmd
net a-enable     axis.3.amp-enable-out =>  hm2_7i92.0.stepgen.03.enable

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

setp   pid.s.Pgain     [SPINDLE_9]P
setp   pid.s.Igain     [SPINDLE_9]I
setp   pid.s.Dgain     [SPINDLE_9]D
setp   pid.s.bias      [SPINDLE_9]BIAS
setp   pid.s.FF0       [SPINDLE_9]FF0
setp   pid.s.FF1       [SPINDLE_9]FF1
setp   pid.s.FF2       [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm-abs     => pid.s.command
net spindle-vel-fb-rpm-abs      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---PWM Generator signals/setup---

setp   hm2_7i92.0.pwmgen.00.output-type 1
setp   hm2_7i92.0.pwmgen.00.scale  [SPINDLE_9]OUTPUT_SCALE


net spindle-vel-cmd-rpm     => hm2_7i92.0.pwmgen.00.value
net spindle-enable      => hm2_7i92.0.pwmgen.00.enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs    <=  motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-enable             <=  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-rps         =>  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

And my Ini-file:
# Generated by PNCconf at Fri May 30 19:29:27 2014
# Все изменения в этом файле будут перезаписаны
# overwritten when you run PNCconf again

[EMC]
MACHINE = 5i25_prob_rfx2
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 = 5
PROGRAM_PREFIX = /home/nick/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 40
MAX_LINEAR_VELOCITY = 50
MIN_LINEAR_VELOCITY = 0.1
DEFAULT_ANGULAR_VELOCITY = 80
MAX_ANGULAR_VELOCITY = 100
MIN_ANGULAR_VELOCITY = 0.1
EDITOR = gedit
GEOMETRY = xyza
# ДОБАВЛЕНО!!
# добавим GladeVCP панель в виде закладки рядом с  Preview/DRO:
EMBED_TAB_NAME=Probe Screen
EMBED_TAB_COMMAND=halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -u python/probe_screen.py -x {XID} probe_icons/probe_screen.glade 
# /ДОБАВЛЕНО!!

[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
# RS274NGC_STARTUP_CODE=G64_P0.1_Q0.01
# ДОБАВЛЕНО!
# Возможность чтения INI и HAL переменных из gcode и др.
FEATURES=30
# Папка для подпрограмм
SUBROUTINE_PATH = macros
# /ДОБАВЛЕНО!

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

[HOSTMOT2]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=7i92

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

[HALUI]

[TRAJ]
AXES = 4
COORDINATES = X Y Z A
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 10
MAX_LINEAR_VELOCITY = 60

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

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 1
MIN_FERROR = 0.01
MAX_VELOCITY = 40
STEPGEN_MAXVEL = 60
MAX_ACCELERATION = 300
STEPGEN_MAXACCEL = 360
# these are in nanoseconds
DIRSETUP   = 5000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 533.333333
MIN_LIMIT = -480
MAX_LIMIT = 480.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 1
MIN_FERROR = 0.01
MAX_VELOCITY = 40
STEPGEN_MAXVEL = 60
MAX_ACCELERATION = 300
STEPGEN_MAXACCEL = 360
# these are in nanoseconds
DIRSETUP   = 5000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 533.333333
MIN_LIMIT = -280
MAX_LIMIT = 280.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 1
MIN_FERROR = 0.01
MAX_VELOCITY = 40
STEPGEN_MAXVEL = 60
MAX_ACCELERATION = 200
STEPGEN_MAXACCEL = 250
# these are in nanoseconds
DIRSETUP   = 5000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 533.333333
MIN_LIMIT = -320
MAX_LIMIT = 320
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0

[AXIS_3]
TYPE = ANGULAR
#WRAPPED_ROTARY = 1
HOME = 0.0
MAX_VELOCITY = 50
STEPGEN_MAXVEL = 70
MAX_ACCELERATION = 180.0
STEPGEN_MAXACCEL = 220.5
DIRSETUP   = 5000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 35.5555555556
FERROR = 20
MIN_FERROR = 15
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_SEQUENCE = -1

#********************
# Spindle 
#********************
[SPINDLE_9]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 5500.0
OUTPUT_SCALE = 5500
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 5500


# ДОБАВЛЕНО!
[TOOLSENSOR]
# скорость холостых перемещений
RAPID_SPEED = 600
# /ДОБАВЛЕНО!

Please Log in or Create an account to join the conversation.

More
07 Apr 2018 13:55 #108558 by PCW
Replied by PCW on topic Problem with spindle start
Are you using the 7i92_5ABOBx2D.bit firmware? (that's the 7I92 firmware that matches the common 5 Axis BOB)

Is the problem with spindle enable or the analog output?

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum