Why does external switch not work?

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #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 to join the conversation.

More
9 years 9 months ago #85850 by bevins

Holzwurm56 wrote: 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 to join the conversation.

More
9 years 9 months ago #85894 by Holzwurm56
Hello Bevins,
many thanks for your answer. It works perfectly.

Hans

Please Log in to join the conversation.

More
9 years 9 months ago #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

Please Log in to join the conversation.

More
9 years 9 months ago #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.

Please Log in to join the conversation.

Time to create page: 0.121 seconds
Powered by Kunena Forum