hal_manualtoolchange as signal for manual tool change button close to spindle

More
2 years 5 months ago #300570 by N3pu
Now I have wired the button to an Input Pin and the ATC-Valve to an Output.
So I did the configuration now like this in .hal (atc_button is and2 instance):
Code:
#  ---Signale zum manuellen Werkzeugwechsel--- #net tool-change-request    <= iocontrol.0.tool-change net tool-change-confirmed  => iocontrol.0.tool-changed net tool-number            <= iocontrol.0.tool-prep-number # ---Toolchange Button Integration during M6 Call--- addf atc_button servo-thread net tool_change_request iocontrol.0.tool-change => atc_button.in0 net atc_button_on_spindle hm2_7i76e.0.7i76.0.0.input-29 => atc_button.in1 net atc_zylinder  hm2_7i76e.0.7i76.0.0.output-04 <= atc_button.out

when I now type "M6 T5" as MDI I can push my button and the ATC valve is acting.
BUT after changing the tool by hand Linuxcnc (gmocapy) still says T1 is inserted.
How is the procedure here to commit the change?

Are the nets  "tool-change-confirmed" and "tool-number " needed somewhere? Or are they just in as a standard for user adjustment / routing?!

By the way: "I have no idea how it´s done usually - cnc newbie"

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

More
2 years 5 months ago - 2 years 5 months ago #300575 by Aciera
Yes, I'd say you are lacking some feedback signals.

Try to add these to your hal:

net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net atc_zylinder iocontrol.0.tool-changed

[edit]
Note that the last line is probably not correct as you would really want a signal that reflects the tool change is complete. The usual manual toolchange has a popup window with an 'OK' button so the user can confirm that the toolchange has been completed.

[edit2]
Given the title of your topic I presume you are aware of this component but I do not know if you are actually using this along with your hardware button, which may be a good way to confirm tool change completion:
linuxcnc.org/docs/html/man/man1/hal_manualtoolchange.1.html
Last edit: 2 years 5 months ago by Aciera.

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

More
2 years 5 months ago #300589 by N3pu
thanks for your help. i have now comment one more line to use the io tool-prepared.
Code:
#  ---Signale zum manuellen Werkzeugwechsel--- #net tool-change-request    <= iocontrol.0.tool-change #net tool-change-confirmed  => iocontrol.0.tool-changed net tool-number            <= iocontrol.0.tool-prep-number # ---Toolchange Button Integration during M6 Call--- addf atc_button servo-thread net tool_change_request iocontrol.0.tool-change => atc_button.in0 net atc_button_on_spindle hm2_7i76e.0.7i76.0.0.input-29 => atc_button.in1 net atc_zylinder  hm2_7i76e.0.7i76.0.0.output-04 <= atc_button.out net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared net atc_zylinder iocontrol.0.tool-changed #  ---ignoriere Anfragen zu Werkzeug-Vorbereitungen--- #net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared

when i now push the button after M6 Tx it justfires a small pulse to the atc_zylinder and then it shows the correct toolnumber in linuxcnc.


BUT the small pulse is to short to insert the tool / unclamp. I think that pushing the button fires the tool changed and then tool-change is not active anymore.

Maybe a way could be to watch the button rising and falling edge??
or could it makes more sense to tr the hal component "manualtoolchange" out?

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

More
2 years 5 months ago #300655 by Aciera
If you need a pulse on a falling edge have a look at the 'oneshot' component, which has a parameter setting for falling edge detection:
linuxcnc.org/docs/html/man/man9/oneshot.9.html

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

Time to create page: 0.178 seconds
Powered by Kunena Forum