Manual tool change + tool lengh touch off
- axel88
- Offline
- Senior Member
- Posts: 54
- Thank you received: 3
I've a switch at a defined position in the mill-area. If i start a milling progress my milling machine goes to the defined position and drives the tool against the switch (in Z-direction). Then Axis knows the Tool offset. After a manual tool change Axis runs the same procedure.
So far I've to less experience with emc to know how or why not this would work.
Is it possible to do it only with an instruction block in the G-code? Or do I have to Change somthing in the HAL?
Would it be possible to abuse the Z-Axis home switch and just run an "home instruction" every tool change?
Axel
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23563
- Thank you received: 4859
EMC can be instructed to go to a specific, absolute, XYZ position for tool change
EMC2 can do a Z probe from a G-code instruction and store the result in a memory location.
G-code can use the value in that memory location to set the tool length.
I am not sure how to put it all together.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
- Posts: 1150
- Thank you received: 184
Thats exactly what I'm looking for since long time.
I was wondering if such functiuonalty is connected to the probe input ?
THX Mike
Please Log in or Create an account to join the conversation.
- axel88
- Offline
- Senior Member
- Posts: 54
- Thank you received: 3
EMC2 can do a Z probe from a G-code instruction and store the result in a memory location.
G-code can use the value in that memory location to set the tool length.
So if you know these things, wouldn't it be enough to write a gcode-instruction-block and for e.g.copy paste it to every tool change in my*.ngc ?
Or ist it impossible for the gcode to route to an absolute coordinate of the mill machine?
If anyone has any code exaples i would like to experiment with them.
Please Log in or Create an account to join the conversation.
- axel88
- Offline
- Senior Member
- Posts: 54
- Thank you received: 3
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23563
- Thank you received: 4859
So if you know these things, wouldn't it be enough to write a gcode-instruction-block and for e.g.copy paste it to every tool change in my*.ngc ?
Or ist it impossible for the gcode to route to an absolute coordinate of the mill machine?
If you are happy to do that, then it is easy, and it needn't be anything as ugly as a copy and paste.
You can move in absolute machine coordinates with G53 using a line like
G53 G0 X10 Y10.
(You need a new G53 on each line, it is non modal).
You would then use a G38 probe to the touch sensor.
The whole thing could be a subroutine, eg create a file called "toolprobe.ngc" with all the G-code in then put
O <toolprobe> CALL in your G-code program.
(some guidance on using subroutines is here: wiki.linuxcnc.org/emcinfo.pl?SubProgramFiles )
What I am not sure how to do is to make it all happen automatically when you issue an M6 command.
Please Log in or Create an account to join the conversation.
- axel88
- Offline
- Senior Member
- Posts: 54
- Thank you received: 3
What I am not sure how to do is to make it all happen automatically when you issue an M6 command.
I think this should/could be a job for the postprocessor.
Has anyone experience with touch off probe hardware:
-Just a normal switch (could be unprecise)
- an induktice switch ( I could imagine that the induction is influenced by the size of the tool?)
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23563
- Thank you received: 4859
www.indoor.flyer.co.uk/probe.htm is a good example of the design.
www.cnczone.com/forums/digitizing_laser_...ade_touch_probe.html is a very cheap and easy version of the design.
For a tool-length probe you would leave off the ptobe rod.
If your tools will always be conductive (not necessarily a safe assumption with some of the coated tips, though ordinary carbide conducts well) you could just land on a spring-loaded plate and let the electrical contact be the tool-to-plate contact.
Please Log in or Create an account to join the conversation.
- axel88
- Offline
- Senior Member
- Posts: 54
- Thank you received: 3
If i follow the tool-length-probe.ngc example i touch of with
G38.2 Z0 f50 (f50 is modified)
when I try to run
G91 g0Z.2 (off the switch) I get the error:" Probe tripped during non-probe MDI command"
This could be solved by running the probe slower (f30) but if I want to have a big safety distance this could take a long time
Is there a better command to release the switch that ignores that the probe is pressed?
Second Error:
I touched of my tool the first time, joged a bit with the manual control, changed the tool length and run a G30. If I try to touch of again(G38.2 Z0 f30) I get "Startpoint to close to probe point"
Please Log in or Create an account to join the conversation.
- axel88
- Offline
- Senior Member
- Posts: 54
- Thank you received: 3
Code Target state Direction Signal Error
G38.2 Contact Toward workpiece Yes
G38.3 Contact Toward workpiece No
G38.4 No Contact Away from workpiece Yes
G38.5 No Contact Away from workpiece No
which shouldn't cause an error, I get one
Please Log in or Create an account to join the conversation.