Is there a signal for an axis' offset being changed?
12 Jun 2022 16:55 - 12 Jun 2022 17:09 #245011
by dannym
Is there a signal for an axis' offset being changed? was created by dannym
Again, context is a makerspace with a wide user base. I'm trying to keep things simple and intuitive.
We do make use of the "=1/2" button, but if you're not paying attention it's easy to hit it twice and screw up the coordinates.
I'm adding a button to shift the Z-axis by 0.05" in case the first attempt isn't cutting all the way through. Again, not good to accidentally press twice or more.
It'd be "nice" to only be able to press one of these once, and then it won't respond unless we rezero the appropriate axis. This makes sense to me. e.g. if you're at X=8.5" and press "=1/2", you get X=4.25". But if you accidentally double-press it, subsequent presses have no effect until you set the X=0 offset again.
But is there any signal to robustly reset that latch whenever setting the work offset for an axis? I can do that with the MPG, the "=0" button that calls G10 L20 P0 X0 can also reset that latch so "=1/2" will work again. But the MPG is not the only source of G10 L20 P0. The HAL for the XHC won't be able to see the user resetting X=0 with the panel.
Is there a way to tell if the offset is being changed via the panel too? Could I add a checker to the base thread that any time the offset parameters change since last pass, it resets the latch so "=1/2" can be used again? It would need to exclude the "=1/2" button itself changing the offset too.
I suppose, alternately, I could give these buttons a per-axis 5 second cooldown so additional presses will just be ignored. Nobody presses "=1/2" then immediately jogs back to a new X=0 origin, sets "=0" there, and jog to a new X=? and presses "=1/2" again within 5 sec. But they can "=1/2" the X axis, then switch to do "=1/2" on the Y, then forget and redo "=1/2" on the X again. Maybe I'm overthinking and we don't need to coddle every possibility, but I do think the only-once-per-origin-set is the most elegant, if such a signal is available that includes keyboard and includes panel "=0" sets not just the XHC macro.
Is that possible?
We do make use of the "=1/2" button, but if you're not paying attention it's easy to hit it twice and screw up the coordinates.
I'm adding a button to shift the Z-axis by 0.05" in case the first attempt isn't cutting all the way through. Again, not good to accidentally press twice or more.
It'd be "nice" to only be able to press one of these once, and then it won't respond unless we rezero the appropriate axis. This makes sense to me. e.g. if you're at X=8.5" and press "=1/2", you get X=4.25". But if you accidentally double-press it, subsequent presses have no effect until you set the X=0 offset again.
But is there any signal to robustly reset that latch whenever setting the work offset for an axis? I can do that with the MPG, the "=0" button that calls G10 L20 P0 X0 can also reset that latch so "=1/2" will work again. But the MPG is not the only source of G10 L20 P0. The HAL for the XHC won't be able to see the user resetting X=0 with the panel.
Is there a way to tell if the offset is being changed via the panel too? Could I add a checker to the base thread that any time the offset parameters change since last pass, it resets the latch so "=1/2" can be used again? It would need to exclude the "=1/2" button itself changing the offset too.
I suppose, alternately, I could give these buttons a per-axis 5 second cooldown so additional presses will just be ignored. Nobody presses "=1/2" then immediately jogs back to a new X=0 origin, sets "=0" there, and jog to a new X=? and presses "=1/2" again within 5 sec. But they can "=1/2" the X axis, then switch to do "=1/2" on the Y, then forget and redo "=1/2" on the X again. Maybe I'm overthinking and we don't need to coddle every possibility, but I do think the only-once-per-origin-set is the most elegant, if such a signal is available that includes keyboard and includes panel "=0" sets not just the XHC macro.
Is that possible?
Last edit: 12 Jun 2022 17:09 by dannym.
Please Log in or Create an account to join the conversation.
12 Jun 2022 19:05 #245016
by cmorley
Replied by cmorley on topic Is there a signal for an axis' offset being changed?
You didn't mention which screen you are using, nor what version of linuxcnc.
Qtaxis has a button where you can select : zero, set, 1/2 offset, set to last
So yes it's possible.
Trying to add that to AXIS/Gmoccapy would be more difficult. adding a gladevcp or qtvcp panel to them with a button would possibly be easier.
Qt does this by recording the offset change, so it's possible to reverse it.
There is no easy way (that I can think of) to get linuxcnc to tell you directly that the offset changed.
Qtaxis has a button where you can select : zero, set, 1/2 offset, set to last
So yes it's possible.
Trying to add that to AXIS/Gmoccapy would be more difficult. adding a gladevcp or qtvcp panel to them with a button would possibly be easier.
Qt does this by recording the offset change, so it's possible to reverse it.
There is no easy way (that I can think of) to get linuxcnc to tell you directly that the offset changed.
Please Log in or Create an account to join the conversation.
12 Jun 2022 19:24 #245018
by dannym
Replied by dannym on topic Is there a signal for an axis' offset being changed?
AXIS. I did think about if there was a parameter for the axis work offset I could copy after pressing =1/2, and on the next press, if the copy is the same as the current work offset, we know the =0 or Touch-Off was not used since so it's a repeat. So it would do a numerical compare between the current parameter and the prior copy and if they're the same, refuse to repeat the "=1/2" command a second time as it's got to be a mistake.
That would presume the HAL can get access to that parameter correctly, preserve it in a variable, and do a numeric= compare and only issue the =1/2 command if the compare is "false". Is the data in the 5220 block of parameters going to work this way?
That would presume the HAL can get access to that parameter correctly, preserve it in a variable, and do a numeric= compare and only issue the =1/2 command if the compare is "false". Is the data in the 5220 block of parameters going to work this way?
Please Log in or Create an account to join the conversation.
15 Jun 2022 10:32 #245177
by andypugh
Replied by andypugh on topic Is there a signal for an axis' offset being changed?
You could probably use a oneshot to make the pulses very long During the period of the onsehot the system would not even see any subsequent button presses.
Please Log in or Create an account to join the conversation.
Time to create page: 0.098 seconds