Solved tormach_mill_ui.py

Results 1 to 1 of 1

Thread: tormach_mill_ui.py

  1. #1
    Member Arrow22's Avatar
    Join Date
    Feb 2022
    Posts
    2
    Downloads
    0
    Uploads
    0

    Lightbulb tormach_mill_ui.py

    Okay, Been having some issues with my 440. No Touch Screen!!!
    Decided to get a Macro Keyboard - X-Keys XK-60
    Then found out that PathPilot has CRAP hotkeys.
    So I had to create my own. Here is how.

    From a Fully Booted and Homed Tormach Machine...
    First, Note the Version you are currently running. It will be next to the tool number window. Mine is v2.8.3
    Press ctrl/alt/x - A terminal window should come up
    type:
    cp ./v2.8.3/python/tormach_mill_ui.py ./gcode/

    This gives you the main user interface file and puts it in a Folder you can access remotely
    (I am not a Linux guru in any way)
    Do a search for foo
    self.ctrl_keyboard_shortcuts = (
    #(gtk.keysyms.a, self.button_list['foo']),
    #(gtk.keysyms.b, self.button_list['bar']),
    #(gtk.keysyms.c, self.button_list['baz'])
    )
    comes up
    I edited it to this
    self.ctrl_keyboard_shortcuts = (
    #(gtk.keysyms.a, self.button_list['foo']),
    #(gtk.keysyms.b, self.button_list['bar']),
    #(gtk.keysyms.c, self.button_list['baz']),
    (gtk.keysyms.X, self.button_list['ref_x']),
    (gtk.keysyms.Y, self.button_list['ref_y']),
    (gtk.keysyms.Z, self.button_list['ref_z']),
    (gtk.keysyms.A, self.button_list['ref_a']),
    (gtk.keysyms.R, self.button_list['reset']),
    (gtk.keysyms.T, self.button_list['goto_g30'])
    )
    and saved it back to the machine

    Back to terminal I typed
    cp ./gcode/tormach_mill_ui.py ./v2.8.3/python/
    and rebooted the machine

    It worked!!!!!!!

    Each new update needs to be patched - obviously - as the update has a new tormach_mill_ui.py in the new version's folder.
    Other functionality can be HotKeyed by doing a search for ref_x. The other functions are obvious, just tie what you want to a key.

    The above code is for CTRL-SHIFT keys, if you want alt keys, add to the table above it:
    self.alt_keyboard_shortcuts = (
    (gtk.keysyms.r, self.button_list['cycle_start']),
    (gtk.keysyms.R, self.button_list['cycle_start']),
    (gtk.keysyms.s, self.button_list['stop']),
    (gtk.keysyms.S, self.button_list['stop']),
    (gtk.keysyms.f, self.button_list['coolant']),
    (gtk.keysyms.F, self.button_list['coolant'])
    )

    VERY IMPORTANT: keep an eye on the commas. Each line ends in one except the last.
    and if you use a CAP as the key, SHIFT will have to be pressed as well.

    I will be posting my templates and code changes in a few days.

    Thank you for listening.....

    Arrow22

    Last edited by RaderSidetrack; 02-06-2022 at 12:16 PM.


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

tormach_mill_ui.py

tormach_mill_ui.py