Custom user Button Touchoff in Axis
- EW_CNC
-
Topic Author
- Offline
- Premium Member
-
- Posts: 107
- Thank you received: 24
I set it up two ways.
First in .ini file:
BUTTON_5_NAME = Touchoff\X0 Y0
BUTTON_5_CODE = G10 L20 P1 X0 Y0
Second in .ini file:
BUTTON_13_NAME = Touchoff
BUTTON_13_CODE = o<touchoff> call
touchoff .ngc
O<touchoff> sub
G20
g10 l20 p0 x0 y0
G53 G0 Z[5 - 0.25]
O<touchoff> endsub
M2
Both ways work, but I’m having one issue. If I have the program loaded first, it will set the coordinates to X0 Y0, but the display will not update to show the parts at actual position. Is there something that can be done to have it refresh the display? Is this just in Axis or does Gmoccapy perform the same?
What method are other users using?
EW
Attachments:
Please Log in or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
- Posts: 5717
- Thank you received: 2093
g10 l20 p0 x0 y0 \ %axis-remote --reload
I don't think there is a solution for Gmoccapy.
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
- Posts: 10955
- Thank you received: 3638
I don't think there is a solution for Gmoccapy.
There might be. Gmoccappy has its own macro buttons. I use them for x,y touchoff using a laser pointer.
I've never bothered to look at the screen preview but maybe that will work becasue its using a Gmoccapy feature, not a plasmac feature. Check the gmoccapy documents fro details. Its well documented.
Please Log in or Create an account to join the conversation.
- EW_CNC
-
Topic Author
- Offline
- Premium Member
-
- Posts: 107
- Thank you received: 24

You might want to consider adding it in PlasmaC documentation as a user button option.
phillc54 wrote:
For Axis you could try:
g10 l20 p0 x0 y0 \ %axis-remote --reload
this will set the coordinates then reload the program which refreshes the preview.
Many Thanks,
Earl W
Please Log in or Create an account to join the conversation.
- snowgoer540
-
- Offline
- Moderator
-
- Posts: 2398
- Thank you received: 787
G10 L20 P0 X0 Y0 \ %axis-remote --reload \ %axis-remote --clear
Please Log in or Create an account to join the conversation.
- snowgoer540
-
- Offline
- Moderator
-
- Posts: 2398
- Thank you received: 787
I did this today, and found it a little annoying that it didn't clear the live plot (thick yellow line of where you'd jogged around) as well. A little digging around, and guess work, and I discovered that this does both:
G10 L20 P0 X0 Y0 \ %axis-remote --reload \ %axis-remote --clear
One more thing would could be added to make this button perfect... it needs to re-zoom, to bring it back to the center of the screen and sized correctly. If I click "top view" it does what's needed, but I dont know how to do that via code. Any ideas?
Please Log in or Create an account to join the conversation.
- EW_CNC
-
Topic Author
- Offline
- Premium Member
-
- Posts: 107
- Thank you received: 24
I keep hitting the top view Z button to center the plot. I probably wouldn't need to, but it sure is ease of mind to see that it touched off correctly before I start to cut. I liked your addition to clear the plot. Thanks all for contributing to PlasmaC. I checked around, but with my limited understanding of LinuxCNC I didn't find a solution to centering the plot.
Please Log in or Create an account to join the conversation.
- snowgoer540
-
- Offline
- Moderator
-
- Posts: 2398
- Thank you received: 787
snowgoer540 you took the words right out of my mouth!
I keep hitting the top view Z button to center the plot. I probably wouldn't need to, but it sure is ease of mind to see that it touched off correctly before I start to cut. I liked your addition to clear the plot. Thanks all for contributing to PlasmaC. I checked around, but with my limited understanding of LinuxCNC I didn't find a solution to centering the plot.
Hmm, I did poke around the Axis manual as well, but I couldnt come up with anything. I'll see if I can find anything over on the axis portion of this forum that already exists, maybe I'll ask there as well.
Please Log in or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
- Posts: 5717
- Thank you received: 2093
Please Log in or Create an account to join the conversation.
- snowgoer540
-
- Offline
- Moderator
-
- Posts: 2398
- Thank you received: 787
There is nothing I know of as standard. It probably wouldn't be too difficult to create something in plasmac_axis.py.
I wouldn't even know where to start

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