axis vs touch offs.

More
30 Oct 2021 10:33 #224711 by Gene1934
axis vs touch offs. was created by Gene1934
As most know, I have a couple lathes. You guys renamed the 7x12 to TLM for The Little Monster as I've a 1 horse treadmill spindle motor that is quite capable of breaking things between the motor and a 5" chuck.
But the Sheldon 11x54 is a bigger machine, with all ball screws, no compound as it was broken in a fallover long before it followed me home in a u-haul van. Linuxcnc is a better compound by far anyway.

The Sheldon has a pair of MPJA 100ppr encoders mounted on a replacement apron, one for x, and one for z.
These are capable of moving the machine even if its not homed, but must be enabled first. If enabled, an edge detector resets the timeout in the disable function, so if running the machine by hand, the dial disable is always a couple minutes in the future as long as that dial is being used.

But, a huge usability problem is created.

1.Axis records key presses to to update the displayed active axis radio buttons.

2. I don't generate the edge detector signal when the dials are disabled.

3. these dials are nany times more accurate than the fixed speed jog keys as I can position the machine to .0001" accuracy with them, In real time.

4. axisui has no inputs that affect those radio buttons. So I find a touchoff point, do a touchoiff, then because I've not used the mouse to update the buttons, and the buttons control the axis the touchoff is applied to, I stand a 50/50 chance of touching off the wrong axis.  And short of rehoming the machine, there is no way to recover.

5. If I could have an axisui pin I could feed these timer reset signals to, I could be assured that the last axis moved logic in axis was always updated to the last dial used to move the machine, just as if I had used the keyboard, assuring that things were always in sync. But using a keyboard jog destroys my careful finding of a touchoff location, so it demands I find the mouse AFTER I've found the location, then find the right radiobutton and click it.

6. That is a PITA at its best. But its apparent that Chris or nor one else currently working on LinuxCNC, does not want to touch axis to add an axisui pin per axis that those of us with a dial per axis could use to make the radiobutton update automatic and always in sync. Worried about it "getting out of sync". My reasoning is that if you don't have separate dials driving separate encoders, then don't use the pin!

So whats the chances of getting those 2, or 9 as the case may be, axisui pins that do exactly what the keyboard or the mouse can do. Steer the touchoff to the last moved axis as intended. There is nothing preventing pendent users with a single dial from adding a hal selection bit of logic to steer the signal from a single dial to the correct axisui pin.  So both of us could benefit greatly from this simple to do mod to axis. But I don't speak python and anything I'd do would be canceled with the next update anyway.

I have looked at other gui's, but it seems axis is the only one with an active axis display. If there actually is another gui that has this last moved logic to steer a touchoff, please advise.
 

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
23 Nov 2021 01:04 #227353 by cakeslob
Replied by cakeslob on topic axis vs touch offs.
Ok, im not to good with computers, but I *may* be able you, but I need you to figure out some stuff., because i am espically not good with hal(or most other parts) or with actual programming logic. If you figure out how to make a halpin stay true after jogging an axis and false when the other axis jogs (would this be a latch, with a not? or something like that) , so for example (jog x+/jogx-) true => (latch ) => jog-is-x (if jog-is-x true, then jog-is-z false) something like that, then we can send that pin to axisui to tell it to axtivate jog-x in the axis ui.

On the axis end, I understand slightly more than the hal, there is an event to activate the jog, and there is a pin out exposed in axisui, thats what jog x-y-z asixui pins are, you can test this in axis, keyboard keys x y and z are bound to the very event you are looking for , they set the jog mode in axis without actually jogging the axis
root_window.bind("x", lambda event: activate_ja_widget("x"))
root_window.bind("y", lambda event: activate_ja_widget("y"))
root_window.bind("z", lambda event: activate_ja_widget("z"))

represented by axisui pins
comp.newpin("jog.x", hal.HAL_BIT, hal.HAL_OUT)
    comp.newpin("jog.y", hal.HAL_BIT, hal.HAL_OUT)
    comp.newpin("jog.z", hal.HAL_BIT, hal.HAL_OUT)

so we need to make turn them from an inny to an outy. so what im thinking is we make a comp pin, and maybe add it to user live update if needed


comp.newpin('jog-is-x', hal.HAL_BIT, hal.HAL_IN)
comp.newpin('jog-is-z', hal.HAL_BIT, hal.HAL_IN)

then some python stuff (it might look like this, I dont really know how events work)

if jog-is-x = (true) activate_ja_widget("x")

The new axisui.jog-is-x pin could then be connected to halui.axis.x.is-select, and then you could also use it for a jog pendant with selector swicth, to update axis ui. all of this can be done in usercommand/axisrc (probably) so no need to bust open axis. the 2 main problems for me are, I dont know what im doing with hal or python , and I cannot find a (non axisui)hal pin-out that is tied to what axis was jogged last. Since im not too good with computers, I may have over complicated things,

but basically, the event you need is called [activate_ja_widget("x")] , you can find it bound to the keyboard keys x y z respectively , connect that event to a new axisui pin(in usercommand), then connecting that pin to a halpin that indicates the last axis jogged. it may be done easier simply in usercommand/axisrc using purely python, but i dont know how to do that. maybe phil has already done something like that in plasmac, but i dont know.

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

More
23 Nov 2021 22:52 #227441 by Gene1934
Replied by Gene1934 on topic axis vs touch offs.
I check for added pins but have not switched anything in the base config in a year. All I know is that no new axisui pins have materialized in a plain old axis install. There are lots of input pins in the axisui list, but none have any effect on the radio buttons. I thought they should work for this and I was very disappointed to find they didn't, in fact I don't see any effect on linuxcnc's operation regardless of the state they are setp'd to.

Are they supposed to work and their not working is a bug? IDK.

Still true at 11/23/2021 16:59 ny time in WV after a fresh buildbot pull and install.

It does sound like you might be on the right track, but I make no claims of being a python coder.

What I want, is a pin or pins that I can strobe true in hal for 1 servo cycle, that will steer the radio buttons. AIUI, steering the radio buttons also steers the touchoff to the last axis moved by the keyboard, thereby maintaining the touchoff will be applied to the last axis moved just as if it had been moved, but sensitive to a one step of the motors if that is what it actually moves. If the pins aren't used, it still works like now, only from the keyboard. but the #$%^@&^ keyboard move is so gross it destroys the touchoff wanted. Chris is worried it will get out of sync, but currently its out of sync if I touch a dial, but I want to keep it in sync without having to find the mouse, move it to the radio button and click on the desired radio button in order to steer the touchoff. What I want to do is keep it in sync.

It could also be done by adding those radio buttons to the touchoff pop-up but that also would involve using the mouse so nothing is really gained. If Chris is worried, demonstrate please how it could get out of sync using the axisui signals I want. I have separate, independent dials, with separate., independent signals. There is zero chance of getting it out of sync using what I've asked for, so I don't understand his objections.

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
23 Nov 2021 23:48 #227456 by cmorley
Replied by cmorley on topic axis vs touch offs.
I explain my objection in your official request.
I agree it will work perfectly for your situation.
I said it will not if someone used the same pins with a selector switch - which would seem reasonable and common.
A custom solution is the best idea - unfortunately AXIS is difficult to modify.

There are 4 input pins for the AXIS ui and none of them are for axis selection or jogging.
Maybe you were looking at motion's axis pins?

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

More
24 Nov 2021 02:06 #227464 by cakeslob
Replied by cakeslob 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
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)
Attachments:

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

More
24 Nov 2021 02:08 #227465 by Gene1934
Replied by Gene1934 on topic axis vs touch offs.
I just checked the .hal file and all the machines motions are controlled by motion.axis or motiom.joint. Never goes anywhere near an axisui pin.

A locally built custom means I'm stuck at whatever version I patched since git gets a huge tummy ache when it finds a patchfile in a git repo. That is the main argument against building my own, So I either do without or it becomes a part of the github repo.

Or???

Thanks 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
24 Nov 2021 02:15 #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
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
24 Nov 2021 02:16 #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
24 Nov 2021 02:18 #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
24 Nov 2021 03:55 #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.

Time to create page: 0.167 seconds
Powered by Kunena Forum