Solved : Setup Basic Z Touch Off
04 Dec 2020 13:01 #191023
by AlexDoran
Setup Basic Z Touch Off was created by AlexDoran
Hi there, i want setup a basic Z Touch off button in my gmoccapy GUI. I have read the documentation 'on the wiki but i dont want to configure it how the wiki suggests, where you have a fixed Probe location and have to set the workpiece height.
Is there a way to to just have a simple MDI / Macro button and probe at the current location to set Z Height? I tried following a few other tutorials but it seems they dont work for gmoccapy.
Is there a way to to just have a simple MDI / Macro button and probe at the current location to set Z Height? I tried following a few other tutorials but it seems they dont work for gmoccapy.
Please Log in or Create an account to join the conversation.
04 Dec 2020 14:12 #191028
by JohnnyCNC
Replied by JohnnyCNC on topic Setup Basic Z Touch Off
You should be able to do that. I was using Axis when I built this but is should work for you also. I just set the touch-plate on top of the stock and touch off by pushing a button on my touch-plate. Pushing the button causes the execution of this gcode.
In my .ini file
[HALUI]
MDI_COMMAND=o100 call
In my pyvcp-panel.xml. I used this before I had the physical button.
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<!--
Include your PyVCP panel here.
The contents of this file will not be overwritten when you run stepconf again.
-->
<button>
<halpin>"oTouchPlateProbeButton"</halpin>
<text>"Touch Off Z"</text>
<font>('fixed',10)</font>
</button>
</pyvcp>
See post #107650 for a picture of my touch-plate.
<pre>
o100 sub
G20
( Set current Z position to 0 so that we will always be moving down )
G10 L20 P0 Z0
( Probe to Z-.5 at F2 [Uses machine units, I work in inch, this is meant to be slow!] )
G38.2 Z-.25 f2
( Set Z0 at point where probe triggers with offset of +1.008 [this is the thickness of my touch plate. You must adjust this for your plate / setup] )
(G10 L20 = Set Coordinate System // P - coordinate system 0-9 0 = Not active)
G10 L20 P1 Z1.008
( Rapid up to Z.5 above the material )
(G10 L20 P1)
(Use machine coordinates)
G90
G53 G0
(Incremental mode)
G91
(Rapid Z up 1 inches)
G0 Z1
o100 endsub
</pre>
In my .ini file
[HALUI]
MDI_COMMAND=o100 call
In my pyvcp-panel.xml. I used this before I had the physical button.
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<!--
Include your PyVCP panel here.
The contents of this file will not be overwritten when you run stepconf again.
-->
<button>
<halpin>"oTouchPlateProbeButton"</halpin>
<text>"Touch Off Z"</text>
<font>('fixed',10)</font>
</button>
</pyvcp>
See post #107650 for a picture of my touch-plate.
The following user(s) said Thank You: Sadmeatball, AlexDoran
Please Log in or Create an account to join the conversation.
04 Dec 2020 14:40 - 04 Dec 2020 14:59 #191032
by AlexDoran
Replied by AlexDoran on topic Setup Basic Z Touch Off
I got a Macro setup but gmoccapy is just simply being a bitch for some reason.
Everytime I push the button it just gives an error "File not Open". I have no idea what that even means, my config is I think exactly how it should be.
If i open the macro file as if to run it as a program then the MDI / Macro button will work - surely you dont need to open the file in gmocappy before using the button?
Everytime I push the button it just gives an error "File not Open". I have no idea what that even means, my config is I think exactly how it should be.
If i open the macro file as if to run it as a program then the MDI / Macro button will work - surely you dont need to open the file in gmocappy before using the button?
Last edit: 04 Dec 2020 14:59 by AlexDoran.
Please Log in or Create an account to join the conversation.
04 Dec 2020 20:48 - 04 Dec 2020 20:49 #191069
by rodw
Replied by rodw on topic Setup Basic Z Touch Off
The macro buttons are ideal for this. This example moves to my laser pointer position and touches off both X&Y
laser_off.ngc
ini file
laser_off.ngc
; goto Laser position offset and touch off
O<laser_off> sub
G21
G91
G0 X -40.685 Y -26.595
g10 l20 p0 x0 y0
O<laser_off> endsub
M2
ini file
# section for main IO controller parameters -----------------------------------
[MACROS]
MACRO = laser_on
MACRO = laser_off
Last edit: 04 Dec 2020 20:49 by rodw.
Please Log in or Create an account to join the conversation.
04 Dec 2020 22:07 #191077
by AlexDoran
Replied by AlexDoran on topic Setup Basic Z Touch Off
Mine is setup exactly the same, but I cannot run any Macros.
I NEED to have a program loaded and ready to run, and then when I push the button it appears to search through the loaded program for that subroutine?
If I click the button without a file loaded it just says File Not Open
I NEED to have a program loaded and ready to run, and then when I push the button it appears to search through the loaded program for that subroutine?
If I click the button without a file loaded it just says File Not Open
Please Log in or Create an account to join the conversation.
05 Dec 2020 01:19 #191089
by rodw
Replied by rodw on topic Setup Basic Z Touch Off
Sounds like its not finding your gcode. I have it in the config folder
Please Log in or Create an account to join the conversation.
05 Dec 2020 10:37 #191116
by newbynobi
Replied by newbynobi on topic Setup Basic Z Touch Off
@Alex
it is glas ball looking!
What gmoccapy release do you use?
Is it master or 2.8?
What is the output in the terminal window=
Why do you not post your config folder and the macros?
Norbert
it is glas ball looking!
What gmoccapy release do you use?
Is it master or 2.8?
What is the output in the terminal window=
Why do you not post your config folder and the macros?
Norbert
The following user(s) said Thank You: AlexDoran
Please Log in or Create an account to join the conversation.
06 Dec 2020 16:13 #191227
by AlexDoran
Replied by AlexDoran on topic Setup Basic Z Touch Off
Hi Norbert,
I am using just release 2.8 i think, its just the version included with LinuxCNC, latest download available from the website.
I have attached a ZIP folder of my config and the Macros, its setup exactly the same as the example, but when i click the button it gives the error message "File Not Open"
I think it can see my files, because when i point it to the wrong folder the buttons disappear
Thank you for the help and for the GUI too
I am using just release 2.8 i think, its just the version included with LinuxCNC, latest download available from the website.
I have attached a ZIP folder of my config and the Macros, its setup exactly the same as the example, but when i click the button it gives the error message "File Not Open"
I think it can see my files, because when i point it to the wrong folder the buttons disappear
Thank you for the help and for the GUI too
Attachments:
Please Log in or Create an account to join the conversation.
11 Dec 2020 00:16 #191632
by AlexDoran
Replied by AlexDoran on topic Setup Basic Z Touch Off
Bump?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19123
- Thank you received: 6406
11 Dec 2020 00:58 #191636
by tommylight
Replied by tommylight on topic Setup Basic Z Touch Off
Sorry can not help, have yet to use a probe.
Please Log in or Create an account to join the conversation.
Time to create page: 0.134 seconds