603,939 active members*
1,812 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    24

    How to creat new Keyboard shortcuts?

    I have set up EMC2 with four axis and now need to set up the fourth axis with a couple of shortcuts on the key board. I would like to use "Insert and Delete" keys to jog the fourth axis. Does anybody know how to do this? I have tried adding to the tkemc.tlc file but keep coming up with errors. Here is what I have added, maybe I didnt add something properly,




    proc priorDone {} {
    jogStop 2
    bind ManualBindings priorDown
    }

    proc priorDown {} {
    axisSelect 2
    bind ManualBindings {}
    after cancel priorDone
    jogPos 2
    }

    proc priorUp {} {
    global debounceTime

    after cancel priorDone
    after $debounceTime priorDone
    }

    bind ManualBindings priorDown
    bind ManualBindings priorUp

    proc nextDone {} {
    jogStop 2
    bind ManualBindings nextDown
    }

    proc nextDown {} {
    axisSelect 2
    bind ManualBindings {}
    after cancel nextDone
    jogNeg 2
    }

    proc nextUp {} {
    global debounceTime

    after cancel nextDone
    after $debounceTime nextDone
    }

    bind ManualBindings nextDown
    bind ManualBindings nextUp

    ################################################## ##############
    # Added for fourth axis

    proc insertDone {} {
    jogStop 3
    bind ManualBindings insertDown
    }

    proc insertDown {} {
    axisSelect 3
    bind ManualBindings {}
    after cancel insertDone
    jogPos 3
    }

    proc insertUp {} {
    global debounceTime

    after cancel insertDone
    after $debounceTime insertDone
    }

    bind ManualBindings insertDown
    bind ManualBindings insertUp

    proc insertDone {} {
    jogStop 3
    bind ManualBindings deleteDown
    }

    proc deleteDown {} {
    axisSelect 3
    bind ManualBindings {}
    after cancel deleteDone
    jogNeg 3
    }

    proc deleteUp {} {
    global debounceTime

    after cancel deleteDone
    after $debounceTime deleteDone
    }

    bind ManualBindings deleteDown
    bind ManualBindings deleteUp

    ################################################## #################

    bind . {tkemc_abort}

    # force explicit updates, so calls to emc_estop, for example, don't
    # always cause an NML read; they just return last latched status
    emc_update none







    Any help would be greatly appreciated. I do not understand the tcl langauge that well, so if any one out there could give me some advice as to what I am doing wrong, I would be very grateful. Thank you for your patience.

  2. #2
    Join Date
    Mar 2007
    Posts
    24
    Ok, I figured it out. Here is the revision.

    ################################################

    proc priorDone {} {
    jogStop 2
    bind ManualBindings priorDown
    }

    proc priorDown {} {
    axisSelect 2
    bind ManualBindings {}
    after cancel priorDone
    jogPos 2
    }

    proc priorUp {} {
    global debounceTime

    after cancel priorDone
    after $debounceTime priorDone
    }

    bind ManualBindings priorDown
    bind ManualBindings priorUp

    proc nextDone {} {
    jogStop 2
    bind ManualBindings nextDown
    }

    proc nextDown {} {
    axisSelect 2
    bind ManualBindings {}
    after cancel nextDone
    jogNeg 2
    }

    proc nextUp {} {
    global debounceTime

    after cancel nextDone
    after $debounceTime nextDone
    }

    bind ManualBindings nextDown
    bind ManualBindings nextUp

    ######################################

    proc insertDone {} {
    jogStop 3
    bind ManualBindings insertDown
    }

    proc insertDown {} {
    axisSelect 3
    bind ManualBindings {}
    after cancel insertDone
    jogPos 3
    }

    proc insertUp {} {
    global debounceTime

    after cancel insertDone
    after $debounceTime insertDone
    }

    bind ManualBindings insertDown
    bind ManualBindings insertUp

    proc deleteDone {} {
    jogStop 3
    bind ManualBindings deleteDown
    }

    proc deleteDown {} {
    axisSelect 3
    bind ManualBindings {}
    after cancel deleteDone
    jogNeg 3
    }

    proc deleteUp {} {
    global debounceTime

    after cancel deleteDone
    after $debounceTime deleteDone
    }

    bind ManualBindings deleteDown
    bind ManualBindings deleteUp
    ################################################## #
    bind . {tkemc_abort}


    Note: I had to use a diffrent editor from the default. I ended up using Screem HTML/XML editor.

Similar Threads

  1. Creat new Machine Set-up,
    By CharlieM in forum Uncategorised CAM Discussion
    Replies: 2
    Last Post: 01-15-2008, 06:08 AM
  2. My mill are making shortcuts??
    By spesmek in forum LinuxCNC (formerly EMC2)
    Replies: 3
    Last Post: 12-14-2007, 11:21 PM
  3. How can I creat tubular 3D enteties(with arcs)
    By PeteGallo in forum Uncategorised CAM Discussion
    Replies: 21
    Last Post: 08-07-2007, 02:12 PM
  4. Keyboard shortcuts for jog commands?
    By hindocarina in forum Mach Mill
    Replies: 6
    Last Post: 06-15-2007, 03:29 AM
  5. VCarve Pro Shortcuts
    By dighsx in forum Vectric
    Replies: 0
    Last Post: 08-01-2006, 10:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •