Estop & Spindle

More
10 Apr 2015 02:12 - 10 Apr 2015 02:13 #57650 by Psykhon
Estop & Spindle was created by Psykhon
Hi:
Just upgrade a straigth grinder to a water cooled spindle (1.5kw chinese) with a danfoss vfd. Got it working except that when I hit the estop, it stops but starts again when estop is released, I wish it stays off
My hal
# Generated by PNCconf at Sat Nov 24 12:40:44 2012
# If you make changes to this file, they will be
# 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_pci config=" num_encoders=0 num_pwmgens=1 num_3pwmgens=0 num_stepgens=5" 
setp     hm2_5i25.0.watchdog.timeout_ns 10000000

loadrt debounce cfg=4 # change the 4 to the number you want
addf debounce.0 servo-thread
setp debounce.0.delay 1 

setp     hm2_5i25.0.pwmgen.pwm_frequency 100000
setp     hm2_5i25.0.pwmgen.pdm_frequency 6000000
setp     hm2_5i25.0.watchdog.timeout_ns 10000000


addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf hm2_5i25.0.write         servo-thread
addf hm2_5i25.0.pet_watchdog  servo-thread

# charge pump 
setp hm2_5i25.0.stepgen.04.dirsetup 100
setp hm2_5i25.0.stepgen.04.dirhold 100
setp hm2_5i25.0.stepgen.04.steplen 100
setp hm2_5i25.0.stepgen.04.stepspace 100
setp hm2_5i25.0.stepgen.04.position-scale 16000 # 16000 steps per machine unit
setp hm2_5i25.0.stepgen.04.step_type 2 # quadrature for square wave output
setp hm2_5i25.0.stepgen.04.control-type 1 # velocity mode
setp hm2_5i25.0.stepgen.04.maxaccel 0
setp hm2_5i25.0.stepgen.04.maxvel 0
setp hm2_5i25.0.stepgen.04.velocity-cmd 1 # one machine unit per second so 16KHz

net estop-out hm2_5i25.0.stepgen.04.enable iocontrol.0.user-enable-out







# external output signals

# --- ESTOP-OUT ---
#setp hm2_5i25.0.gpio.000.is_output true
#net estop-out hm2_5i25.0.gpio.000.out

# external input signals

# --- HOME-X ---
net home-x     <=  hm2_5i25.0.gpio.013.in

# --- HOME-Y ---

net yhome-raw <= hm2_5i25.0.gpio.014.in => debounce.0.1.in
net yhome-filtered debounce.0.1.out => axis.1.home-sw-in

#net home-y     <=  hm2_5i25.0.gpio.014.in

# --- HOME-Z ---
net home-z     <=  hm2_5i25.0.gpio.015.in

# --- ESTOP-IN ---
net estop-ext <= hm2_5i25.0.gpio.003.in_not





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

# Step Gen signals/setup

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

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


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

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

#*******************
#  AXIS Ysetp hm2_5i25.0.gpio.000.is_output true
#*******************

# Step Gen signals/setup

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

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

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

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

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

# Step Gen signals/setup

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

net z-pos-fb     axis.2.motor-pos-fb   <=  hm2_5i25.0.stepgen.02.position-fb
net z-pos-cmd    axis.2.motor-pos-cmd  =>  hm2_5i25.0.stepgen.02.position-cmd
net z-enable     axis.2.amp-enable-out =>  hm2_5i25.0.stepgen.02.enable
setp    hm2_5i25.0.gpio.010.invert_output true


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

net home-z     =>  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


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

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

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


net spindle-vel-cmd     => hm2_5i25.0.pwmgen.00.value
net machine-is-enabled      => hm2_5i25.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            <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-on                 <=  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             =>  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
#et 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


#  ---digital in / out signals---

#  ---estop signals---

net estop-out     <=  iocontrol.0.user-enable-out
net estop-ext 	  =>  iocontrol.0.emc-enable-in

#  ---motion control signals---estop
net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled


#  ---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

Also, Is it possible to establish a minimum pwm value, so it starts at a specified speed when its started manually in axis?

Thanks !
Last edit: 10 Apr 2015 02:13 by Psykhon.

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

More
10 Apr 2015 06:16 #57652 by PCW
Replied by PCW on topic Estop & Spindle
probably
net machine-is-enabled   => hm2_5i25.0.pwmgen.00.enable
should be
net spindle-on   => hm2_5i25.0.pwmgen.00.enable

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

More
10 Apr 2015 20:34 #57662 by Psykhon
Replied by Psykhon on topic Estop & Spindle
Thank you PCW!!!! that works

now, is it posible to start de spiondle at a minimum value?

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

More
10 Apr 2015 20:46 #57664 by andypugh
Replied by andypugh on topic Estop & Spindle

is it posible to start de spiondle at a minimum value?


There are a few ways to do this.
One way is with www.linuxcnc.org/docs/html/man/man9/limit1.9.html
loadrt limit1 count=1
addf limit1.0 servo-thread
setp limit1.0.min 5000
setp limit1.0.max 50000

net spindle-vel-cmd limit1.0.in
net spindle-vel-cmd-limited limit1.0.out => hm2_5i25.0.pwmgen.00.value

You will need to remove the line that links spindle-vel-cmd and pwmgen.0

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

More
02 Jul 2015 08:11 #60322 by upa-de
Replied by upa-de on topic Estop & Spindle
I am having a similar issue.

Running: g540, 5i25, running 2.6.8, setup using pncconf. vfd to g540 parport 17, gpio 7 for spindle control. When i am in linuxcnc and the etop is out the spindle doesn't run. Besides only being able to select from 0 rpm or 24,000 rpm, no matter how i increase speed. When linuxcnc is closed and the e-stop is out the spindle will run at full speed. How do i fix this issue?

I've read up and have made suggested changes to no avail.

Could someone also suggest how i configure a (this may not be relevant to this issue):"digital spindle-at-speed signal typically connected to a VFD drive. " taked from: Mesa configuration Is this possible with a 5i25?

For what it is worth i can move x,y,z and home (i need to change the gpio location for home, i keep going back into pncconf).

thanks.

hal:
# Generated by PNCconf at Wed Jul  1 19:05:19 2015
# If you make changes to this file, they will be
# 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_pci config=" num_encoders=1 num_pwmgens=1 num_3pwmgens=0 num_stepgens=4  " 
setp     hm2_5i25.0.pwmgen.pwm_frequency 100000
setp     hm2_5i25.0.pwmgen.pdm_frequency 6000000
setp     hm2_5i25.0.watchdog.timeout_ns 10000000
loadrt hal_parport cfg="0x0278 out"
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
loadrt charge_pump

addf parport.0.read servo-thread
addf charge-pump servo-thread
addf parport.0.write servo-thread
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf abs.spindle                 servo-thread
addf lowpass.spindle             servo-thread
addf hm2_5i25.0.write         servo-thread
addf hm2_5i25.0.pet_watchdog  servo-thread

# external output signals

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


# --- X-ENABLE ---
net x-enable parport.0.pin-02-out

# --- X-ENABLE ---
net x-enable parport.0.pin-03-out

# --- Y-ENABLE ---
net y-enable parport.0.pin-04-out

# --- Y-ENABLE ---
net y-enable parport.0.pin-05-out

# --- Z-ENABLE ---
net z-enable parport.0.pin-06-out

# --- Z-ENABLE ---
net z-enable parport.0.pin-07-out

# --- X-ENABLE ---
net x-enable parport.0.pin-08-out

# --- X-ENABLE ---
net x-enable parport.0.pin-09-out

# --- CHARGE-PUMP ---
net charge-pump parport.0.pin-16-out

# external input signals

# --- HOME-Y ---
net home-y     <=  hm2_5i25.0.gpio.000.in

# --- HOME-X ---
net home-x     <=  hm2_5i25.0.gpio.003.in

# --- HOME-Z ---
net home-z     <=  hm2_5i25.0.gpio.005.in

# --- PROBE-IN ---
net probe-in     <=  hm2_5i25.0.gpio.016.in


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

# Step Gen signals/setup

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

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

# Step Gen signals/setup for tandem axis stepper

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

net x2-pos-fb                            <=  hm2_5i25.0.stepgen.03.position-fb
net x-pos-cmd                            =>  hm2_5i25.0.stepgen.03.position-cmd
net x-enable                             =>  hm2_5i25.0.stepgen.03.enable

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

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

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

# Step Gen signals/setup

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

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

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

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

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

# Step Gen signals/setup

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

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

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

net home-z     =>  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

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

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

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


net spindle-vel-cmd-rps     => hm2_5i25.0.pwmgen.00.value
net spindle-on   => hm2_5i25.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            <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-on                 <=  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             =>  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

#  ---charge pump signals---
# net estop-out       =>  charge-pump.enable
# net charge-pump     <=  charge-pump.out

#  ---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

ini:
# Generated by PNCconf at Wed Jul  1 19:05:19 2015
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = 719cnc
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/shop/linuxcnc/nc_files
PYVCP = pyvcp-panel.xml
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 3.333333
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 3.333333
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xyz

[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

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

[HOSTMOT2]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=5i25

[HAL]
HALUI = halui
HALFILE = 719cnc.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.33
MAX_LINEAR_VELOCITY = 3.33

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

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 3.33333333333
MAX_ACCELERATION = 2.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 4.2
STEPGEN_MAXACCEL = 2.5
# these are in nanoseconds
DIRSETUP   = 700
DIRHOLD    = 700
STEPLEN    = 1500
STEPSPACE  = 2500
STEP_SCALE = 2000.0
MIN_LIMIT = -0.001
MAX_LIMIT = 44.5
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = -0.116667
HOME_LATCH_VEL = -0.016667
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 3.33333333333
MAX_ACCELERATION = 2.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 4.2
STEPGEN_MAXACCEL = 2.5
# these are in nanoseconds
DIRSETUP   = 700
DIRHOLD    = 700
STEPLEN    = 1500
STEPSPACE  = 2500
STEP_SCALE = -2000.0
MIN_LIMIT = -0.001
MAX_LIMIT = 26.5
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = -0.116667
HOME_LATCH_VEL = -0.016667
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 2

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 3.33333333333
MAX_ACCELERATION = 2.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 4.2
STEPGEN_MAXACCEL = 2.5
# these are in nanoseconds
DIRSETUP   = 700
DIRHOLD    = 700
STEPLEN    = 1500
STEPSPACE  = 2500
STEP_SCALE = 2000.0
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
HOME_OFFSET = -0.100000
HOME_SEARCH_VEL = -0.116667
HOME_LATCH_VEL = -0.016667
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0

#********************
# Spindle 
#********************
[SPINDLE_9]
OUTPUT_SCALE = 10

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

More
02 Jul 2015 08:27 #60326 by PCW
Replied by PCW on topic Estop & Spindle
One thing you might want to start with is setting the PWM frequency to the G540s suggested 50 Hz

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

More
02 Jul 2015 09:13 #60327 by upa-de
Replied by upa-de on topic Estop & Spindle
I can now change rpm, thanks! The scale is not correct. i have tried adding:
OUTPUT_SCALE = 10.0
OUTPUT_MIN_LIMIT = -10.0
OUTPUT_MAX_LIMIT =10.0

it didnt work

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

More
02 Jul 2015 11:53 #60329 by PCW
Replied by PCW on topic Estop & Spindle
if you maximum spindle speed is 24000 RPM you would need to set the PWM scale to 24000

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

More
02 Jul 2015 21:50 #60344 by upa-de
Replied by upa-de on topic Estop & Spindle
When you say PWM scale do you mean:
OUTPUT_SCALE = 24000
OUTPUT_MIN_LIMIT = -24000
OUTPUT_MAX_LIMIT =24000

or something with this:
# ---PWM Generator signals/setup---
setp   hm2_5i25.0.pwmgen.00.output-type 1
setp   hm2_5i25.0.pwmgen.00.scale [SPINDLE_9]OUTPUT_SCALE


net spindle-vel-cmd-rps     => hm2_5i25.0.pwmgen.00.value
net spindle-on   => hm2_5i25.0.pwmgen.00.enable

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

More
02 Jul 2015 22:06 - 02 Jul 2015 22:23 #60347 by PCW
Replied by PCW on topic Estop & Spindle
setp   hm2_5i25.0.pwmgen.00.scale  [SPINDLE_9]OUTPUT_SCALE

Shows that the PWM scale is set from the OUTPUT_SCALE value in the
SPINDLE_9 section of the ini file.

So you edit the ini file and change OUTPUT_SCALE in the SPINDLE_9 section of the INI file


OUTPUT_MIN_LIMIT and OUTPUT_MAX_LIMIT seem to be unused
Last edit: 02 Jul 2015 22:23 by PCW.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum