HAL Verknüpfungen

More
26 Oct 2023 15:23 #283869 by Tchefter
HAL Verknüpfungen was created by Tchefter
Hallo Zusammen,
ich stehe mal wieder auf dem Schlauch.
Ich möchte gerne über zwei Push-Buttons meine Maschine aktivieren, also im Prinzip wie über die Tastatur F1 und F2
PB1: EStop entriegeln PB2 Maschine anschalten. Wieder über PB2 Maschine abschalten und PB1 Estop rein.
Wenn ich die HALUI anschaue gibt es ja 
Für PB1
halui.estop.activate bit in
halui.estop.is-activated bit out
halui.estop.reset bit in

Für PB2
halui.machine.is-on bit out
halui.machine.off bit in
halui.machine.on bit in

Irgend wie muss da sicherlich bei PB1 halui.estop.reset bit in abgefragt werden und beu PB2 halui.machine.is-on bit out abgefragt werden.
Aber wie verknüpfe ich das miteinander das ich nur zwei PBs benötige, oder denke ich da zu einfach und man braucht tats. mehrere PBs?
Vielen Dank für ein Schubs und vll. ein kleines Beispiel :)

Gruß Fritz

Hello everyone,
I'm on the fence again.
I would like to activate my machine using two push buttons, basically like using the keyboard F1 and F2
PB1: Unlock EStop PB2 Switch on machine. Switch off the machine again via PB2 and put in PB1 Estop.
When I look at the HALUI there is
For PB1
halui.estop.activate bit in
halui.estop.is-activated bit out
halui.estop.reset bit in

For PB2
halui.machine.is-on bit out
halui.machine.off bit in
halui.machine.on bit in

Somehow PB1 must be queried for halui.estop.reset bit in and PB2 halui.machine.is-on bit out must be queried.
But how do I combine this so that I only need two PBs, or am I thinking too simply and you actually need several PBs?
Thank you for a nudge and perhaps a small example :)

Greetings Fritz

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

More
02 Nov 2023 22:52 #284390 by tommylight
Replied by tommylight on topic HAL Verknüpfungen
# --- ESTOP-EXT ---
net estop-ext <= [HMOT](CARD0).7i77.0.0.input-04
or whatever the push button 1 is attached to
for machine enable i have no clue, but probably halui.machine.on
net halui.machine.on <= [HMOT](CARD0).7i77.0.0.input-05
The following user(s) said Thank You: Tchefter

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

More
03 Nov 2023 06:14 #284414 by Tchefter
Replied by Tchefter on topic HAL Verknüpfungen
Thank you Tommy.
I will give it a try the nex days.

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

More
03 Nov 2023 08:33 #284420 by Tchefter
Replied by Tchefter on topic HAL Verknüpfungen
Im Moment hab ich es so hin bekommen net estop-btn <= parport.1.pin-15-in-not => halui.estop.activate => halui.estop.reset 
Bei dem ersten Druck auf den Taster entriegelt der Not-Aus, bei dem zweiten Druck springt er von Aus sofort wieder auf Ein, also entriegelt. Was auch klar ist, da der die Anweisung reset und activate ist. Wie bekomme ich das hin das er prüft ob der Not Aus entriegelt oder aktiviert ist? Muss das über "and" und "or" gehen? Wie binde ich das ein?

At the moment I got it like this: net estop-btn <= parport.1.pin-15-in-not => halui.estop.activate => halui.estop.reset
When you press the button for the first time, the emergency stop unlocks; when you press it the second time, it immediately jumps from off to on again, i.e. unlocked. Which is also clear because the reset and activate instructions are. How do I get it to check whether the emergency stop is unlocked or activated? Does it have to go via “and” and “or”? How do I incorporate this?

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

More
03 Nov 2023 09:59 #284427 by MaHa
Replied by MaHa on topic HAL Verknüpfungen
Ich habe eine Idee zusammengebastelt, keine Ahnung ob das funktioniert, basierend auf

linuxcnc.org/docs/stable/html/man/man9/toggle2nist.9.html
net estop-reset-btn <= parport.1.pin-15-in-not
net estop-on toggle2nist.0.is-on  <= halui.estop.is-activated
net toggle2nist.0.in <= estop-reset-btn
net toggleon halui.estop.activate <= toggle2nist.0.on
net toggleoff halui.estop.reset <= toggle2nist.0.off
The following user(s) said Thank You: Tchefter

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

More
03 Nov 2023 10:08 #284428 by Tchefter
Replied by Tchefter on topic HAL Verknüpfungen
@Maha: WOW  vielen Dank! Werde ich probieren!!!
Muss jetzt leider los zur Spätschicht - gebe wieder Bescheid!
Gruß Fritz

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

More
03 Nov 2023 13:37 #284449 by tommylight
Replied by tommylight on topic HAL Verknüpfungen
E-stop button can not be a normal button, it has to be the big red one that stays pushed down after pressing it and needs to be twisted to release.
The e-stop logic in LinuxCNC is made to work with that type of switch.
The following user(s) said Thank You: Tchefter

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

More
04 Nov 2023 07:46 #284510 by Tchefter
Replied by Tchefter on topic HAL Verknüpfungen
Hallo MaHa,
ich habe dein Beispiel ausprobiert, leider bekomme ich es nicht ins laufen.
Die Fehlermeldung kommt in der 3. Zeile "estop-reset-btn does not exists"
Aber vielen Dank nochmal für deine investierte Zeit in mein Problem :)

@tommy - thanks for your description!
 

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

More
04 Nov 2023 08:51 #284511 by MaHa
Replied by MaHa on topic HAL Verknüpfungen
Ich bin halt immer unterwegs und kann das nicht testen. Ein neuer Versuch:
net estop-reset-btn   toggle2nist.0.in   parport.1.pin-15-in-not
net estop-on toggle2nist.0.is-on  <= halui.estop.is-activated
net toggleon halui.estop.activate <= toggle2nist.0.on
net toggleoff halui.estop.reset <= toggle2nist.0.off
The following user(s) said Thank You: Tchefter

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

More
04 Nov 2023 09:28 #284513 by Tchefter
Replied by Tchefter on topic HAL Verknüpfungen
Kein Problem und dafür einen extra Dank!!!
Leider tut die Variante nicht.
In der HAL Konfig ist  toggle2nist.0.is-on gelb bei nicht gedrücktem oder gedrücktem Button.
Bei gedrückten Button ist toggle2nist.0.in zus. gelb

 

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

Time to create page: 0.321 seconds
Powered by Kunena Forum