weird behavior on Z homing

More
25 Nov 2012 07:07 #26911 by Psykhon
Hi:
My gantry has been working flawessly with linuxcnc driving it trogh the parallel port and G540 . I have installed a 5i25 and boy it was hard to configure a new hal but give me the chance to learn a lot, love linuxcnc more each day B)

However just found that the Z axis homing secuence is doing something wrong, it searchs for home, then back off normally, but when it supose to "latch", the steper stops but the dro in axis keeps moving. Spent hours digging trough the forum but cant find anything like this .

here is the new hal for the 5i25
# 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=0 num_3pwmgens=0 num_stepgens=3  " 
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


#loadrt charge_pump
#addf charge-pump servo-thread
#setp    hm2_5i25.0.gpio.005.is_output true
#net charge-pump     =>  hm2_5i25.0.gpio.005.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 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         62.5
setp   hm2_5i25.0.stepgen.00.maxvel           80

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 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         62.5
setp   hm2_5i25.0.stepgen.01.maxvel           80

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         62.5
setp   hm2_5i25.0.stepgen.02.maxvel           80

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

# ---setup spindle control signals---

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

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

the ini file
# 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

[EMC]
MACHINE = ProtoCNC
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 = 1
PROGRAM_PREFIX = /home/psykhon/linuxcnc/nc_files
INCREMENTS = 100mm 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
#DEFAULT_LINEAR_VELOCITY = 0.250000
#MAX_LINEAR_VELOCITY = 1.000000
#MIN_LINEAR_VELOCITY = 0.010000
#DEFAULT_ANGULAR_VELOCITY = 0.250000
#MAX_ANGULAR_VELOCITY = 1.000000
#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 = ProtoCNC.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]
MDI_COMMAND = G53 g0 X0Y0Z0
MDI_COMMAND = G0 x0y0z0

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 6.50
MAX_LINEAR_VELOCITY = 200.00

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

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 1 #0.005
MIN_FERROR = .25 # 0.0005
MAX_VELOCITY = 80
MAX_ACCELERATION = 50.0
# these are in nanoseconds
DIRSETUP   = 200
DIRHOLD    = 200
STEPLEN    = 1000
STEPSPACE  = 2000
STEP_SCALE = 400.2
BACKLASH = 0.05
MIN_LIMIT = -0.001
MAX_LIMIT = 570.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -3.000000
HOME_LATCH_VEL = -1
HOME_SEQUENCE = 1
HOME_USE_INDEX = NO
HOME_SEQUENCE = 2

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 1 #0.005
MIN_FERROR = .25 # 0.0005
MAX_VELOCITY = 80
MAX_ACCELERATION = 50.0
# these are in nanoseconds
DIRSETUP   = 200
DIRHOLD    = 200
STEPLEN    = 1000
STEPSPACE  = 2000
STEP_SCALE = 400.1
BACKLASH = 0.05
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 580.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -3.000000
HOME_LATCH_VEL = -1
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 1 #0.005
MIN_FERROR = .25 # 0.0005
MAX_VELOCITY = 80
MAX_ACCELERATION = 50.0
# these are in nanoseconds
DIRSETUP   = 200
DIRHOLD    = 200
STEPLEN    = 1000
STEPSPACE  = 2000
STEP_SCALE = 315.0  
MIN_LIMIT = -150.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 3.000000
HOME_LATCH_VEL = 1
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0


#.348401641368
#********************
# Spindle 
#********************
[SPINDLE_9]

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

More
25 Nov 2012 07:10 #26912 by Psykhon
Replied by Psykhon on topic weird behavior on Z homing
this is the hal there has been working with the LPT port for more than 2 years
# Generated by stepconf at Thu Dec 15 18:27:08 2011
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out  "
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd <= motion.spindle-speed-out
net spindle-cw <= motion.spindle-forward
net dout-02 <= motion.digital-out-02

net dout-02 => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
setp parport.0.pin-07-out-invert 1
net zdir => parport.0.pin-07-out
net charge-pump => parport.0.pin-16-out
net spindle-cw => parport.0.pin-17-out


net home-x <= parport.0.pin-10-in
net home-y <= parport.0.pin-11-in
net home-z <= parport.0.pin-12-in
net estop-ext <= parport.0.pin-15-in-not


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 20200
setp stepgen.0.dirsetup 20200
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net home-x => axis.0.home-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 20200
setp stepgen.1.dirsetup 20200
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
net home-y => axis.1.home-sw-in

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 20200
setp stepgen.2.dirsetup 20200
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable
net home-z => axis.2.home-sw-in

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

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed 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 its ini
# Generated by stepconf at Thu Dec 15 18:27:08 2011
# If you make changes to this file, they will be
# overwritten when you run stepconf again



[EMC]
MACHINE = my-mill
DEBUG = 0

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
PROGRAM_PREFIX = /home/psykhon/emc2/nc_files
INCREMENTS = 100mm 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm .005mm
EMBED_TAB_NAME = CAM_View
EMBED_TAB_COMMAND = camview-emc -C camviewcfg -g togle-caa.ui -H campins.hal -w {XID}
PYVCP=panel.xml

[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 = emc.var

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

[HAL]
HALFILE = my-mill.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
HALUI =	                     halui

[HALUI]
MDI_COMMAND = G0 X0 Y0 Z0
MDI_COMMAND = G53 G0 X0 Y0 Z0

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 6.50
MAX_LINEAR_VELOCITY = 65.00

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

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 50.0
STEPGEN_MAXACCEL = 62.5
BACKLASH = 0.05
SCALE = 400.2
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 570.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -3.000000
HOME_LATCH_VEL = -1.587500
HOME_SEQUENCE = 1

#era 400.8

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
BACKLASH = 0.05
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 62.5
SCALE = 400.1			
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 580.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -3.000000
HOME_LATCH_VEL = -1.587178
HOME_SEQUENCE = 2

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 80
MAX_ACCELERATION = 500
STEPGEN_MAXACCEL = 625
SCALE = 315.348401641368
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -150.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 3.000000
HOME_LATCH_VEL = 1.587178
HOME_SEQUENCE = 0

[HALUI]
MDI_COMMAND = G0 X0 Y0 Z0



Any help its much appreciated
Also, if a video is of any help, ill upload it gladly

thanks in advance

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

More
25 Nov 2012 07:36 #26913 by BigJohnT
Replied by BigJohnT on topic weird behavior on Z homing
That does sound like an electrical issue to me. Watch the home switch pin in the Show Hal Configuration watch window as you home to see if it changes states.

John

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

More
25 Nov 2012 07:49 - 25 Nov 2012 07:50 #26914 by Psykhon
Replied by Psykhon on topic weird behavior on Z homing
Switch seems to work fine, checked electricall and on hal meter and hal scope

Wath seems very strange to me its that dro keeps going on but stepper doesnt, also, the other two axes behave normal
Last edit: 25 Nov 2012 07:50 by Psykhon.

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

More
25 Nov 2012 08:02 - 25 Nov 2012 08:04 #26915 by Psykhon
Replied by Psykhon on topic weird behavior on Z homing
this is wath the normal homing secuence on X looks on the scope

X homing

and this is waths doing on Z
Z homing
Last edit: 25 Nov 2012 08:04 by Psykhon.

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

More
25 Nov 2012 18:32 #26917 by cncbasher
in your ini file add

HOME_OFFSET=
HOME_SEARCH_VEL=
HOME_LATCH_VEL=
HOME_FINAL_VEL= 10 ( This entry your missing )
HOME_USE_INDEX=
HOME_SEQUENCE=

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

More
25 Nov 2012 18:44 #26918 by cncbasher
I presume your using a single input for both your home & limit switch , so perhaps change ...

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

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

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

More
25 Nov 2012 23:11 #26927 by PCW
Replied by PCW on topic weird behavior on Z homing
Not homing related, but you should be able to get the G540 charge pump working if you wish.
the 5I25 G540 config has an extra stepgen connected to the chargepump pin (stepgen 4)
by setting this stepgen to velocity mode, and with the right scaling you can generate the 16KHz
waveform the G540 requires. Something like this:

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 machine-is-enabled hm2_5i25.0.stepgen.04.enable

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

More
26 Nov 2012 00:05 - 26 Nov 2012 00:06 #26929 by Psykhon
Replied by Psykhon on topic weird behavior on Z homing

in your ini file add

HOME_OFFSET=
HOME_SEARCH_VEL=
HOME_LATCH_VEL=
HOME_FINAL_VEL= 10 ( This entry your missing )
HOME_USE_INDEX=
HOME_SEQUENCE=

Just tried, same results

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

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


this throws "hit limit in home state 10" error and "joint 2 on limit switch error"

is there a way to put , in hal scope, the step pulses that is been sended to the stepper and the ones that feeds the DRO? Im asking this because this more and more seems like a bug to me and would like to provide all the information possible. Also, how can generate a detailed log just for this homing secuence?
Last edit: 26 Nov 2012 00:06 by Psykhon.

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

More
26 Nov 2012 00:08 #26930 by Psykhon
Replied by Psykhon on topic weird behavior on Z homing

Not homing related, but you should be able to get the G540 charge pump working if you wish.
the 5I25 G540 config has an extra stepgen connected to the chargepump pin (stepgen 4)
by setting this stepgen to velocity mode, and with the right scaling you can generate the 16KHz
waveform the G540 requires. Something like this:

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 machine-is-enabled hm2_5i25.0.stepgen.04.enable

Great! I have posposed the charge pump until the Z homing issue was fixed but ill try this righ away :cheer: TXS A LOT!

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

Moderators: PCWjmelson
Time to create page: 0.264 seconds
Powered by Kunena Forum