axis vs touch offs.

More
4 years 11 months ago #227466 by Gene1934
Replied by Gene1934 on topic axis vs touch offs.

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
 

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page < geneslinuxbox.net:6309/gene >

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

More
4 years 11 months ago #227467 by Gene1934
Replied by Gene1934 on topic axis vs touch offs.
forgot to check the notify box

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page < geneslinuxbox.net:6309/gene >

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

More
4 years 11 months ago #227468 by cmorley
Replied by cmorley on topic axis vs touch offs.
If you use the .axisrc option then the modifications are added at run time.
That means git  know nothing about it.

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

More
4 years 11 months ago #227473 by Gene1934
Replied by Gene1934 on topic axis vs touch offs.
that, no more than I know about python, looks like it might work, but I doubt it could go in axisrc in its present format? Would it get to be active in time I could put the hal linkage in postgui.hal? I don't know the exact execution order of all this.

Thank Chris.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page < geneslinuxbox.net:6309/gene >

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

More
4 years 11 months ago - 4 years 11 months ago #227474 by cakeslob
Replied by cakeslob on topic axis vs touch offs.
yeah it will *work* as an axisrc  , or just do usercommand.py, thats how i was using it.  its a lot more contained and you dont have to modify axis, that. and it is far to crude to go into axis,

there is only 1 problem with it , I dont know how to make the python commands update automatically, so the pins never switch unless you invoke the command.
yeah you have to connect them in post gui hal. I strugle with hal, so i spend most of the time trying to just hook it up to another pin to test it. you can set the pin and the and it flips the bit but it needs fixing on the command I dont know what to do


here gene check it out this is my favorite part of axis linuxcnc.org/docs/html/gui/axis.html#_user_command_file
, download the usercommand_gene.py from my post and pop it into your config folder and add this to your config file under [DISPLAY] , USER_COMMAND_FILE= usercommand_gene.py
Last edit: 4 years 11 months ago by cakeslob.

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

More
4 years 11 months ago #227475 by Gene1934
Replied by Gene1934 on topic axis vs touch offs.
I'll take a shot at that tomorrow when I have both eyes open at the same time.
Thank you cakeslob

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page < geneslinuxbox.net:6309/gene >

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

Time to create page: 0.067 seconds
Powered by Kunena Forum