Why does external switch not work?

More
15 Jan 2017 16:44 #85824 by Holzwurm56
Hello,
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.

More
15 Jan 2017 17:07 #85827 by newbynobi
Hallo Hans,

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.

More
15 Jan 2017 17:43 #85829 by bevins
net cycle-start hm2_5i25.0.7i77.0.0.input-12 halui.mode.auto halui.program.run

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.

More
15 Jan 2017 17:49 #85830 by Holzwurm56
Hallo Norbert,
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.

More
15 Jan 2017 20:16 #85846 by Holzwurm56
Hello,
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.

More
15 Jan 2017 20:26 #85848 by Holzwurm56
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

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

More
15 Jan 2017 20:48 - 15 Jan 2017 22:14 #85850 by bevins

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.
Last edit: 15 Jan 2017 22:14 by bevins.

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

More
17 Jan 2017 06:40 #85894 by Holzwurm56
Hello Bevins,
many thanks for your answer. It works perfectly.

Hans

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

More
17 Jan 2017 09:58 - 17 Jan 2017 10:02 #85897 by Holzwurm56
Hello,
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
Last edit: 17 Jan 2017 10:02 by Holzwurm56.

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

More
17 Jan 2017 10:02 - 17 Jan 2017 10:09 #85899 by newbynobi
Why do you call manual mode for stop?

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.

Last edit: 17 Jan 2017 10:09 by newbynobi.

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

Time to create page: 0.171 seconds
Powered by Kunena Forum