Why does external switch not work?
- Holzwurm56
- Offline
- Premium Member
- Posts: 133
- Thank you received: 0
i want to control my milling machine with external switches. The switches are working, I can see this in the hal status watch, but there is no reaction on the machine.
I have insert these lines in the hal-file:
# --- CYCLE-START ---
net cycle-start <= hm2_5i25.0.7i77.0.0.input-03
# --- ABORT ---
net abort <= hm2_5i25.0.7i77.0.0.input-04
# --- SINGLE-STEP ---
net single-step <= hm2_5i25.0.7i77.0.0.input-05
Does someone knows what i make wrong?
Thanks
Hans
Please Log in or Create an account to join the conversation.
you only connect the switch to the signal, but you missed to connect the signal to the hal pin, like halui.run or similar.
You have connected one end of a cable (signal) to the switch, and the other end to nothing.
Norbert
Please Log in or Create an account to join the conversation.
This works on my machine. Change the input to the cycle-start button input on your machine.
Please Log in or Create an account to join the conversation.
- Holzwurm56
- Offline
- Premium Member
- Posts: 133
- Thank you received: 0
ich habe mit pncconf eine Testconfig erstellt und dann die Einträge für Cycle-Start, Single-Step and Abort aus der Testconfig in die Hal eingetragen. Mehr als diese Zeilen habe ich nicht gefunden. Wo steht wo ich das andere Ende des Kabels wie eintragen müsste?
Vielen Dank
Hans
Please Log in or Create an account to join the conversation.
- Holzwurm56
- Offline
- Premium Member
- Posts: 133
- Thank you received: 0
i create with pncconf a Testconfig and the i copy the lines in the hal. Is there a mistake in the pncconf?
Thanks
Hans
Please Log in or Create an account to join the conversation.
- Holzwurm56
- Offline
- Premium Member
- Posts: 133
- Thank you received: 0
many thanks for your answer. Do you write this in the hal? Is there a entrance in a other file necessary?
Thanks
Hans
Please Log in or Create an account to join the conversation.
Hello Bevins,
many thanks for your answer. Do you write this in the hal? Is there a entrance in a other file necessary?
Thanks
Hans
I put all the code for my buttons and stuff in the custom.hal
If you add this, dont forget to comment out your other cycle-start line cause Linuxcnc will spit an error at you.
Please Log in or Create an account to join the conversation.
- Holzwurm56
- Offline
- Premium Member
- Posts: 133
- Thank you received: 0
many thanks for your answer. It works perfectly.
Hans
Please Log in or Create an account to join the conversation.
- Holzwurm56
- Offline
- Premium Member
- Posts: 133
- Thank you received: 0
i want now to create a stop with external switch. I use the command:
net abort <= hm2_5i25.0.7i77.0.0.input-5-not halui.mode.manual halui.program.stop
The switch is normally closed.
I do not find in the mode section some better than halui.mode.manual
This works not. Can some say to what is my mistake?
Thanks
Hans
Please Log in or Create an account to join the conversation.
Try:
net abort hm2_5i25.0.7i77.0.0.input-5-not => halui.program.stop
A programm can only run in auto mode, so you can also only stop it then.
Norbert
Zum Verständnis, mal etwas was ich mal in der Rubrik DEUTSCH gepostet habe
Hal net Kommandos musst du so verstehen:
net Verlängerungskaben Staubsauger <= Steckdose
net = verbinde
Verlängerungskabel = der Name der Verbindung, also des Kabels
Staubsauger _ Komponente 1 die du anschließen möchtest
<= wie soll der Strom fließen
Steckdose _ Komponente zwei der Verbindung
Nun kannst du auch sagen:
net Verlängerungskabel Staubsauger
und später dann
net Verlängerungskabel Steckdose
Hast du noch einen Polieraparat, dann kannst du zusätzlich noch sagen
net Verlängerungskabel Polierapparat
usw.
Please Log in or Create an account to join the conversation.