I can runing jog before homing on axis shell

More
10 Feb 2012 11:26 #17546 by ArcEye
Hi

If you want to hack axis, this works

Replace this section of code
def jog(*args):
    if not manual_ok(): return
    ensure_mode(emc.MODE_MANUAL)
    c.jog(*args)

# XXX correct for machines with more than six axes
jog_after = [None] * 9
jog_cont  = [False] * 9
jogging   = [0] * 9

with this
def jog(*args):
    if not manual_ok(): return
    if not manual_tab_visible(): return
    isHomed=True
    for i,h in enumerate(s.homed):
            if s.axis_mask & (1<<i):
                isHomed=isHomed and h
      
    if not isHomed: return
    ensure_mode(emc.MODE_MANUAL)
    c.jog(*args)

# XXX correct for machines with more than six axes
jog_after = [None] * 9
jog_cont  = [False] * 9
jogging   = [0] * 9

Usual caveats apply, save a copy of axis before editing.

Certainly inhibits jogging until all axes homed on my test set up with both 2.4.6 and 2.5

regards

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

More
10 Feb 2012 13:49 - 10 Feb 2012 13:49 #17557 by BigJohnT
Can you do that with .axisrc and not have to worry about upgrades over writing your changes?

John
Last edit: 10 Feb 2012 13:49 by BigJohnT.

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

More
10 Feb 2012 15:40 - 10 Feb 2012 15:41 #17565 by ArcEye
Hi John

Probably not, as I am changing an existing function definition to include a test as to whether the axes are homed before allowing jogs.

The other code I have seen for .axisrc seems to be using global tk calls, or defining a function and then calling it, rather than modifying a built in Axis function

I can generally work out what python code is doing and make adjustments but I am not a python programmer.

Can't imagine many people would have a use for this, I like to jog near home and then Ctrl H to home everything, not stand around watching one or more axis move long distances at a slow homing velocity.

Just posted it to show it was possible.

regards
Last edit: 10 Feb 2012 15:41 by ArcEye.

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

More
10 Feb 2012 15:51 #17570 by BigJohnT
Thanks,

I was just wondering out loud if you could do that. I'm not a python programmer but managed to write some simple G code generators on the wiki after much example searching :)

John

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

Time to create page: 0.189 seconds
Powered by Kunena Forum