How to creat new Keyboard shortcuts?


Results 1 to 2 of 2

Thread: How to creat new Keyboard shortcuts?

  1. #1
    Registered
    Join Date
    Mar 2007
    Location
    united states
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default 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.

    Similar Threads:


  2. #2
    Registered
    Join Date
    Mar 2007
    Location
    united states
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    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.



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

How to creat new Keyboard shortcuts?

How to creat new Keyboard shortcuts?