User button to toggle jog
23 Dec 2021 21:30 #229831
by Andyi
User button to toggle jog was created by Andyi
Hi,
is it possible to connect a toggle button to jog the selected axis at the current jog speed? I.e. replicate click and hold the jog + / - buttons on the AXIS UI. Spent all evening in the freezing cold shed trying to get it working.
Many thanks in advance.
Andy
is it possible to connect a toggle button to jog the selected axis at the current jog speed? I.e. replicate click and hold the jog + / - buttons on the AXIS UI. Spent all evening in the freezing cold shed trying to get it working.
Many thanks in advance.
Andy
Please Log in or Create an account to join the conversation.
24 Dec 2021 01:16 #229845
by rodw
Replied by rodw on topic User button to toggle jog
Normally you would use a binary coded switch for scale and axis select combined with a MPG. (The binary switch saves in pins).There is an example in the docs
linuxcnc.org/docs/2.8/html/examples/mpg.html
linuxcnc.org/docs/2.8/html/examples/mpg.html
Please Log in or Create an account to join the conversation.
24 Dec 2021 01:26 - 24 Dec 2021 17:14 #229848
by Michael
Replied by Michael on topic User button to toggle jog
Axis doesn't have a pin that comes out to interface with the jog speed. If you just want a toggle you can setp a jog speed for halui to use.
Gymoccapy has a lot more ui options but I am not familiar with all of them.
Gymoccapy has a lot more ui options but I am not familiar with all of them.
Last edit: 24 Dec 2021 17:14 by Michael.
Please Log in or Create an account to join the conversation.
24 Dec 2021 08:53 #229868
by Andyi
Replied by Andyi on topic User button to toggle jog
Many thanks for the replies.
A bit of general background...
I'm still on release 2.7.14 as it works fine for my needs
I use Linuxcnc on my home brew BF30 based cnc mill for home projects i.e. not commercial, so its only my tooling / fingers at risk.
www.cnczone.com/forums/benchtop-machines/107594-cnc-cad.html
A few years back, I added a homebrew pendant to the mill - very very useful. I used the info in the link sent by rodw.
Based on what Michael posted, there isn't a "simple" way to do this by linking the button state to a magic "jog selected axis" pin in HAL.
I had a look in the AXIS source code and as far as I can tell, AXIS imports the linuxcnc module and then controls via the command interface in this case the jog method (I'm no expert in python btw ).
So, for the current question, I can see three possible solutions (given that I dont want to move away from AXIS as it just works for me)...
1. Use a SIM_ENCODER component controlled via some user buttons in axis to simulate me continuously turning the MPG encoder wheel
2. Create a new stepgen component controlled via some user buttons in axis and multiplex the pulses to X, Y, Z or A.
3. Somehow create jog_on / jog_off (shamelessly borrowed from AXIS source ) buttons that call homebrew python code that command the selected axis to jog.
I like option 3 as it opens a gate way for me to link axis, python and linuxcnc but I dont have any experience in doing this.
Any comments / thoughts on the above would be grately appreciated.
Regards
Andy
A bit of general background...
I'm still on release 2.7.14 as it works fine for my needs
I use Linuxcnc on my home brew BF30 based cnc mill for home projects i.e. not commercial, so its only my tooling / fingers at risk.
www.cnczone.com/forums/benchtop-machines/107594-cnc-cad.html
A few years back, I added a homebrew pendant to the mill - very very useful. I used the info in the link sent by rodw.
Based on what Michael posted, there isn't a "simple" way to do this by linking the button state to a magic "jog selected axis" pin in HAL.
I had a look in the AXIS source code and as far as I can tell, AXIS imports the linuxcnc module and then controls via the command interface in this case the jog method (I'm no expert in python btw ).
So, for the current question, I can see three possible solutions (given that I dont want to move away from AXIS as it just works for me)...
1. Use a SIM_ENCODER component controlled via some user buttons in axis to simulate me continuously turning the MPG encoder wheel
2. Create a new stepgen component controlled via some user buttons in axis and multiplex the pulses to X, Y, Z or A.
3. Somehow create jog_on / jog_off (shamelessly borrowed from AXIS source ) buttons that call homebrew python code that command the selected axis to jog.
I like option 3 as it opens a gate way for me to link axis, python and linuxcnc but I dont have any experience in doing this.
Any comments / thoughts on the above would be grately appreciated.
Regards
Andy
Please Log in or Create an account to join the conversation.
24 Dec 2021 17:17 #229905
by cakeslob
Replied by cakeslob on topic User button to toggle jog
Im still unsure what you are trying to do. did you want like 6 buttons or something? like x+ x-?
Please Log in or Create an account to join the conversation.
24 Dec 2021 17:21 #229906
by Michael
Replied by Michael on topic User button to toggle jog
For option 3 you may find someone has already done half the work for you with a PyVCP panel that you can add into axis.
linuxcnc.org/docs/2.8/html/gui/pyvcp-examples.html
Tell us more about your MPG setup. Most MPG's have a selector switch already and this could be used to change the jog speed also. You may already have the components to do what you want just need to get creative with the implementation. Share your files to see what you already have going.
linuxcnc.org/docs/2.8/html/gui/pyvcp-examples.html
Tell us more about your MPG setup. Most MPG's have a selector switch already and this could be used to change the jog speed also. You may already have the components to do what you want just need to get creative with the implementation. Share your files to see what you already have going.
Please Log in or Create an account to join the conversation.
24 Dec 2021 18:40 #229916
by Andyi
Replied by Andyi on topic User button to toggle jog
What I am I trying to do?
I want a simple one click method to run the selected axis at the selected jog speed until I command the machine to stop. This would need a + and a - button to set the direction.
Quite often I face stock using the jog feature and have to hold the keyboard key down until the cut finishes.
I want a simple one click method to run the selected axis at the selected jog speed until I command the machine to stop. This would need a + and a - button to set the direction.
Quite often I face stock using the jog feature and have to hold the keyboard key down until the cut finishes.
Please Log in or Create an account to join the conversation.
24 Dec 2021 18:41 #229917
by Andyi
Replied by Andyi on topic User button to toggle jog
I'll look through info in the link many thanks. I'll post files after Xmas.
Please Log in or Create an account to join the conversation.
24 Dec 2021 19:20 #229918
by cakeslob
Replied by cakeslob on topic User button to toggle jog
I was afraid thats what you were looking for, that sounds dangerous as shit but ill see what I can do with usercommand file.
wouldnt you rather use MDI or the NGCGUI conversational wizzard? that seems safer...
wouldnt you rather use MDI or the NGCGUI conversational wizzard? that seems safer...
Please Log in or Create an account to join the conversation.
24 Dec 2021 22:45 #229933
by Andyi
Replied by Andyi on topic User button to toggle jog
Sure, open suggestions. I my context, I am happy that the risk is low.
The mill is limited to 20in/min, never operates unattended and I am the sole user. Worst case would be tool crash which TBH is more likely when running gcode from Fusion rather than emulating a simple "powered" axis.
The mill is limited to 20in/min, never operates unattended and I am the sole user. Worst case would be tool crash which TBH is more likely when running gcode from Fusion rather than emulating a simple "powered" axis.
Please Log in or Create an account to join the conversation.
Time to create page: 0.319 seconds