W axis homing not working

More
17 May 2023 18:39 #271560 by vedatech
My XWBC machine is having a problem homing the W axis. I'm testing all axes with simulated limit switches for now. X,B and C home as expected but W just runs past the limit switch and never stops - which is why I simulating it first.

My setup is linuxcnc 2.9.0~pre1 on Ubuntu 22.04  5.15.0-1037-realtime SMP PREEMPT_RT
Display is qtaxis

When I use Halshow to watch the W axis signals as I jog up from -5mm I see w-home-sw and w-pos-limit activate but w-is-home never changes.

The .ini has:

#** JOINT 3 **
[AXIS_W]
MAX_VELOCITY = 100
MAX_ACCELERATION = 586.00
MIN_LIMIT = -180.0
# Temporary to test switch mounting
#MAX_LIMIT = +180.0
MAX_LIMIT = 0.0

#*****AXIS_W**********
[JOINT_3]
TYPE = LINEAR
#HOME = 0.0
FERROR = 0.1
MIN_FERROR = 0.05
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 587.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 = 125.0
STEPGEN_MAXACCEL = 733.0
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 3000
DIRHOLD    = 3000
STEPLEN    = 3000
STEPSPACE  = 3000
STEP_SCALE = 80.0
MIN_LIMIT = -180.0
# Temporary to test switch mounting
#MAX_LIMIT = +180.0
MAX_LIMIT = 0.0
HOME = -5.0
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 0.1
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0

The HAL file has:

net w-home-sw       =>  joint.3.home-sw-in
net w-neg-limit     =>  joint.3.neg-lim-sw-in
net w-pos-limit     =>  joint.3.pos-lim-sw-in

Any suggestions?

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

More
17 May 2023 19:45 #271563 by tommylight
Does your hal file have this
net w-home-sw
attached to an input?

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

More
17 May 2023 20:30 #271566 by vedatech
Replied by vedatech on topic W axis homing not working
Yes, w-home-sw is connected to the output of a comparator which simulates the switch.
A pyvcp button selects between the real and simulated switches.
w-home-sw does switch correctly but w-is-homed never changes.

# set home switch
setp wcomp_whome.min 0.0
setp wcomp_whome.max 0.1
net w-home-sw-s <= wcomp_whome.out # => joint.3.home-sw-in

net w-home-sim pyvcp.w-home-sim => mux2-w-home.sel
net w-home-sw-r => mux2-w-home.in0
net w-home-sw-s => mux2-w-home.in1
net w-home-sw <= mux2-w-home.out

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

More
17 May 2023 21:21 #271569 by vedatech
Replied by vedatech on topic W axis homing not working
Found it! The mux2-w-home.sel somehow got inverted from the other axes so it was using the real switch input which never changed because the real machine wasn't even powered up. No problem, W works the same as all the other linear axes.
Sorry, I should have found this before posting.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.234 seconds
Powered by Kunena Forum