Automatic tool change and manual tool change

More
15 Nov 2024 23:29 - 15 Nov 2024 23:33 #314577 by greg23_78
I'm in the process of remapping  M6 , and I'd like to do the same as GuiHue (forum.linuxcnc.org/49-basic-configuratio...et-coordinates-found).
I have modified the program so that it corresponds to my machine and without use probe.
The automatic change tool works but I can't get the manual tool change part to work.

I'm having problems with this part
O220 else
            ; The tool's pocket number is not within the range of the rack and the tool needs to be removed manually
            ; Tool is still at safe Z height from before
            (print, Pocket is not within range, moving to manual change positon)
            G53 G0 X #<_ini[ATC]CHANGEX> Y #<_ini[ATC]CHANGEY>
            G53 G0 Z #<_ini[ATC]CHANGEZ>
            ;(MSG, Please remove tool manually from spindle using release button. Afterwards press OK)
            ; Abuse M6 for a dialog with the user by briefly killing the requested tool and replacing it with T0
            T0
            M6
            T#<newtool>
            ; Turn off flush and close drawbar to eliminate noise
            ; clamp tool
            ; TOOL_CLAMP 1; TOOL_RELEASE 0; FLUSH_OFF1; FLUSH_ON 0
            M65 P0
            G4 P0.2
            ; Check if the tool is really gone (LOW)
o220 endif
        O320 else
            ; The tool's pocket number is not within the range of the rack and the tool needs to picked up at the manual change position
            (print, Selected pocket is not within range, moving to manual pick up)
            ; rapid move to manual pick up position
            G53 G0 Z[#<_ini[AXIS_Z]MAX_LIMIT>-0.1]
            G53 G0 X[#<_ini[ATC]CHANGEX>] Y[#<_ini[ATC]CHANGEY>]
            G53 G0 Z[#<_ini[ATC]CHANGEZ>]
            ; using the code being remapped here means 'use builtin behaviour' and should trigger the usual message
            (print, Now trigger M6 to tell the user which tool to pick)
            M6
            ; Check  1: the drawbar is locked LOW L4 immediately
            ; check 2: there is a tool in the spindle HIGH L3 immediately
            (print, A tool is manually loaded and we can continue with measurement)
        O320 ENDIF

no window appears (on axis) asking me to remove the old tool or insert the new tool.

I think this is due to my hal

My hal
#  ---manual tool change signals---

#net tool-change-request    <= iocontrol.0.tool-change
#net tool-change-confirmed  => iocontrol.0.tool-changed
#net tool-number            <= iocontrol.0.tool-prep-number

#  ---Use external manual tool change dialog---

#loadusr -W hal_manualtoolchange
#net tool-change-request    =>  hal_manualtoolchange.change
#net tool-change-confirmed  <=  hal_manualtoolchange.changed
#net tool-number            =>  hal_manualtoolchange.number

#  ---ignore tool prepare requests---

net tool-prep-loop iocontrol.0.tool-prepare     iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change     iocontrol.0.tool-change


when I use "external manual tool change dialog" the message appears but my automatic part no longer works.
what should i reactivate?
Last edit: 15 Nov 2024 23:33 by greg23_78.

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

More
14 Dec 2024 18:40 #316665 by andypugh
Replied by andypugh on topic Automatic tool change and manual tool change
One possibility might be to trigger the hal_manualtoolchange using a G-code "digital output", ie M62 and M63 and to wait for the user to press OK with M66

linuxcnc.org/docs/stable/html/gcode/m-code.html#mcode:m62-m65

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

Time to create page: 0.051 seconds
Powered by Kunena Forum