- Posts: 174
- Thank you received: 13
im not looking to get in the middle of anything
Sorry gene, I didnt mean there are new pins, I was just describing how the theoretical new pin would work.
The axisui pin axisui.jog.x is already broken out is similar to halui.axis.x.is-selected
I figured the thing gene is asking about would resemble halui.axis.x.select / then connect the mpg signals to something with logic from here linuxcnc.org/docs/html/hal/components.html
Eitherway, Ive hit mt ceiling for what I know. Here is my attempt to tie the jog select pin to a halpin. 3 new axisui pins , when high they set the jog.
The problem is i dont know how events (or python) work so the command must be invoked before anything changes. could probably do this a fancier way with comparing position or some shit but im not to good with computers.
You can load it as a usercommand file, and test it out. zoom plus button sets the halpin and clear plot does the command to set jog z enabled. the new halpins are axisui.jog-is-x , axisui.jog-is-y , axisui.jog-is-z
I dont know how to make the command run automatically or how you would connect your mpg halpins to it
Code:W = root_window.tk.call def jog_select_x(): if hal.get_value ('axisui.jog-is-x') == 1: activate_ja_widget ("x") def jog_select_y(): if hal.get_value ('axisui.jog-is-y') == 1: activate_ja_widget ("y") def jog_select_z(): if hal.get_value ('axisui.jog-is-z') == 1: activate_ja_widget ("z") def jogg_z(): hal.set_p('axisui.jog-is-z','1') def user_hal_pins(): # create new hal pins #mycomp = hal.component('feed') comp.newpin('jog-is-x', hal.HAL_BIT, hal.HAL_IN) comp.newpin('jog-is-y', hal.HAL_BIT, hal.HAL_IN) comp.newpin('jog-is-z', hal.HAL_BIT, hal.HAL_IN) # view p W(".toolbar.clear_plot","configure" ,"-text","jog-z" ,"-command","jog_select_z" ,"-activebackground","steelblue1" ,"-helptext","VIEW P" ,"-font","mono 10 " ,"-compound","top" ,"-borderwidth","1" ,"-width","10" ); # view p W(".toolbar.view_zoomin","configure" ,"-text","set-z" ,"-command","jogg_z" ,"-activebackground","steelblue1" ,"-helptext","VIEW P" ,"-font","mono 10 " ,"-compound","top" ,"-borderwidth","1" ,"-width","10" ); TclCommands.jog_select_x = jog_select_x TclCommands.jog_select_y = jog_select_y TclCommands.jog_select_z = jog_select_z TclCommands.jogg_z = jogg_z commands = TclCommands(root_window) could this become part of axisrc? Then a git pull wouldn't see it and kill it... Thank you
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.