Unable to Home X axis

Home Forums TinyG TinyG Support Unable to Home X axis

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10019
    WJCONS
    Member

    I have set up limit switches on my Ox with a TinyG controller. The Y axis home routine works fine, but when I run a G28.2 command for the X axis, the motor always stops just short of tripping the X home switch.

    If I execute a g28.2 command for the X axis and manually press the home limit switch before the motor halts, the homing procedure works fine. If I use a G0 command to force the X motor to move to engage the switch, it will move as instructed and trip the switch.

    I have tried adjusting the X axis minimum travel to a smaller value, but when I do, the motor scaling goes haywire, and a command to move 1 inch causes the X motor to try to run past the X axis max limit.

    Why would the motor stop short only when using a homing command? This is driving me crazy. Thanks for any assistance you can provide.

    I have included the contents of my config file below.

    g20; Set units to inches g20 for inches, g21 for mm
    $mt=300; Set motor timeout to 300 seconds of non-use on any axis$st=1; All switches are normally closed
    ;(…………..Spindle settings…………..)
    $p1frq=10000; PWM frequency
    $p1csl=1000; PWM cw speed lo
    $p1csh=12000; PWM cw speed hi
    $p1cpl=0.03; PWM cw phase lo
    $p1cph=0.300; PWM cw phase hi
    $p1wsl=1000; PWM ccw speed lo
    $p1wsh=12000; PWM ccw speed hi
    $p1wpl=0.080; PWM ccw phase lo
    $p1wph=0.900; PWM ccw phase hi
    $p1pof=0.000; PWM phase off
    ;(…………..For now, set all limit switch functions to off…………..)
    $XSN=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $XSX=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $YSN=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $YSX=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $ZSN=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $ZSX=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $ASN=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    $ASX=0; 0=off, 1=homing, 2=limit, 3=limit+homing
    ;(…………..Motor 1 assignments, Z axis …………..)
    $1ma=2; Motor 1=Z axis
    $1tr=.3333; Motor travel per revolution, 12 tpi
    $1mi=4; Microstep
    $1po=0; Normal polarity
    $1pm=2; Stay powered on during any machining action
    $1sa=1.8; Step angle
    ;(…………..Motor 2 assignments, X axis …………..)
    $2ma=0; Motor 2=X axis
    $2tr=2.3562; Motor travel per revolution, pulley radius is 0.75″
    $2mi=4; Microstep
    $2po=0; Normal polarity
    $2pm=2; Stay powered on during any machining action
    $2sa=1.8; Step angle
    ;(…………..Motor 3 assignments, Y axis Left …………..)
    $3ma=1; Motor 3=Y axis, Left
    $3tr=2.3562; Motor travel per revolution, pulley radius is 0.75 inches
    $3mi=4; Microstep
    $3po=0; Normal polarity
    $3pm=2; Stay powered on during any machining action
    $3sa=1.8; Step angle
    ;(…………..Motor 4 assignments, Y axis, Right…………..)
    $4ma=1; Motor 4=Y axis, Right
    $4tr=2.3562; Motor travel per revolution, pulley radius is 0.75″
    $4mi=4; Microstep
    $4po=1; Reverse polarity
    $4pm=2; Stay powered on during any machining action
    $4sa=1.8; Step angle
    ;(…………..X Axis assignments…………..)
    $xam=1; Normal operation
    $xvm=200; Maximum velocity, inches per minute
    $xfr=30; Maximum feed rate, inches per minute
    $xtn=.95; Minimum travel
    $xtm=20.625; Maximum travel
    $xjm=1000; Maximum jerk
    ;(…………..X Axis Homing assignments…………..)
    $XJH=1000; Homing jerk
    $XJD=0.002; Junction deviation
    $XSN=1; Min switch is homing only
    $XSX=2; Max switch is limit only
    $XSV=50; Set search velocity
    $XLV=2; Set latch velocity
    $XLB=.95; Set latch backoff
    $XZB=0.2; Set zero backoff
    (…………..Y Axis assignments…………..)
    $yam=1; Normal operation
    $yvm=200; Maximum velocity, inches per minute
    $yfr=30; Maximum feed rate, inches per minute
    $ytn=.95; Minimum travel
    $ytm=28.785; Maximum travel
    $yjm=1000; Maximum jerk
    ;(…………..Y Axis Homing assignments…………..)
    $YJH=1000; Homing jerk
    $YJD=0.002; Junction deviation
    $YSN=1; Min switch is homing only
    $YSX=2; Max switch is limit only
    $YSV=50; Set search velocity
    $YLV=2; Set latch velocity
    $YLB=.95; Set latch backoff
    $YZB=0.2; Set zero backoff
    ;(…………..Z Axis assignments…………..)
    $zam=1; Normal operation
    $zvm=60; Maximum velocity, inches per minute
    $zfr=30; Maximum feed rate, inches per minute
    $ztn=-.2.25; Maximum travel
    $ztm=0.95; Minimum travel
    $zjm=1000; Maximum jerk
    ;(…………..Z Axis Homing assignments…………..)
    ;$ZJH=1000; Homing jerk
    ;$ZJD=0.002; Junction deviation
    ;$ZSN=1; Min switch is homing only
    ;$ZSX=2; Max switch is limit only
    ;$ZSV=50; Set search velocity
    ;$ZLV=2; Set latch velocity
    ;$ZLB=.95; Set latch backoff
    ;$ZZB=0.2; Set zero backoff
    ;(…………..A axis assignments……………)
    ;(…… The A max limit switch is used for the ESD……………)
    $ASN=0; Min switch is not used
    $ASX=2; Max switch is limit only

    #10020
    WJCONS
    Member

    Interesting development. Even though the X axis limit switch tested fine with a meter, I decided to change it anyway. Voila, homing works just fine now.

    #10021
    cmcgrath5035
    Moderator

    Strange.
    Perhaps a bad connection from switch into tinyG?

    Best way to communicate settings is $$ command, scrape results to a text file and post to a cloud drive, then URL here.

    good luck on next steps

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.