- Posts: 3
- Thank you received: 0
automatic calibration
- Fredrik2556
- Topic Author
- Offline
- New Member
-
Less
More
9 years 5 months ago #93841
by Fredrik2556
automatic calibration was created by Fredrik2556
Hi
I wonder if there is a way of doing automatic Z calibration in LinuxCNC? I have got a pad mounted on position x,y 0,0 and I want the mill to go to this position and lower the Z until it touches the pad (it outputs a 5V signal then). The software should then set the Z position to the thickness of the pad. Is this possible?
Best regards
Fredrik
I wonder if there is a way of doing automatic Z calibration in LinuxCNC? I have got a pad mounted on position x,y 0,0 and I want the mill to go to this position and lower the Z until it touches the pad (it outputs a 5V signal then). The software should then set the Z position to the thickness of the pad. Is this possible?
Best regards
Fredrik
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
9 years 5 months ago #93842
by Todd Zuercher
Replied by Todd Zuercher on topic automatic calibration
Yes that is not very hard. A simple O-sub can handle it. Then if you want to trigger it from a button (vcp or real) that isn't hard either.
Is your pad position is in the machine absolute position (G53 X0 Y0) and do you want to use tool offsets or just machine coordinates for setting your Z?
Here is a sub I use to probe the material surface height on a cnc router. It just uses a metal pad laid on the surface and a wire clipped to the tool and sets the ZG54 offset
The code would be similar for setting a tool length offset. You'd probably want to add a G53X0Y0 to move to your probe position, and it would use G10 L10 P#5400 instead of G10 L2 P1. Some of the other variables may need changed as well.
Is your pad position is in the machine absolute position (G53 X0 Y0) and do you want to use tool offsets or just machine coordinates for setting your Z?
Here is a sub I use to probe the material surface height on a cnc router. It just uses a metal pad laid on the surface and a wire clipped to the tool and sets the ZG54 offset
Code:
o<probe-z> sub
M66 E0 L0 (reads probe thickness setting from a user input)
#1=#5399 (0.02" probe thickness)
F10 (probe feed rate)
G38.2Z-1.0 (probe command)
G53 G0Z 0.0
#2=#5063 (Z probe result coordinate)
(debug, #5223) (old G54 Z offset)
#3=[#2-#1]
(debug, #3)
#4=[#5223+#3]
(debug, #4)
G10 L2 P1 Z[#4] (Change G54 Z offset)
o<probe-z> endsub
%
The code would be similar for setting a tool length offset. You'd probably want to add a G53X0Y0 to move to your probe position, and it would use G10 L10 P#5400 instead of G10 L2 P1. Some of the other variables may need changed as well.
Please Log in to join the conversation.
9 years 5 months ago #93848
by andypugh
Yes, and it is possible to have this happen automatically whenever there is an M6 tool-change command.
A sample config can be seen here:
github.com/LinuxCNC/linuxcnc/tree/master...h-tool-length-switch
But you should also be able to select that config from the CNC menu on your machine and exeriment with it (note that it is a sim config and won't actually move hardware in its current form)
Replied by andypugh on topic automatic calibration
Fredrik2556 wrote: I wonder if there is a way of doing automatic Z calibration in LinuxCNC? I have got a pad mounted on position x,y 0,0 and I want the mill to go to this position and lower the Z until it touches the pad
Yes, and it is possible to have this happen automatically whenever there is an M6 tool-change command.
A sample config can be seen here:
github.com/LinuxCNC/linuxcnc/tree/master...h-tool-length-switch
But you should also be able to select that config from the CNC menu on your machine and exeriment with it (note that it is a sim config and won't actually move hardware in its current form)
Please Log in to join the conversation.
Time to create page: 0.076 seconds
