Linking virtual and physical button - same output
11 Sep 2015 13:57 #62432
by mdi
Linking virtual and physical button - same output was created by mdi
Hello! I'm new to LinuxCNC 2.6 and i ran into some problems trying to link the estop interface control (tklinux version button) to a physical estop button. Basically i managed to get the physical button (which is on pin 10) to put the machine into estop and the interface estop syncs with it. I also have an LED on Pin01, which is linked to the interface's estop, which works just fine.
The problem is the LED isn't synced with the physical estop button, so my question is: How do i link the LED to both estop 'buttons'? i would have to link estop-out (pin01 LED) to estop-ext and the interface estop(which is already linked).
This is what i have now for the estop:
I also have a similar problem with linking 4 other pyvcp buttons (which also work and are already linked to 4 outputs) to another 4 physical buttons. So again, it's kind of the same problem that i have with the estop, namely, i cannot manage to link 2 inputs to the same output.
I hope you can help me, thanks a mill.
Cheers!
The problem is the LED isn't synced with the physical estop button, so my question is: How do i link the LED to both estop 'buttons'? i would have to link estop-out (pin01 LED) to estop-ext and the interface estop(which is already linked).
This is what i have now for the estop:
setp parport.0.pin-01-out-invert 1
net estop-out => parport.0.pin-01-out aplication.led_0 #this is just a small pyvcp displaying the estop LED
net estop-ext <= parport.0.pin-10-in-not
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
I also have a similar problem with linking 4 other pyvcp buttons (which also work and are already linked to 4 outputs) to another 4 physical buttons. So again, it's kind of the same problem that i have with the estop, namely, i cannot manage to link 2 inputs to the same output.
I hope you can help me, thanks a mill.
Cheers!
Please Log in or Create an account to join the conversation.
11 Sep 2015 16:35 #62441
by cncbasher
Replied by cncbasher on topic Linking virtual and physical button - same output
you need to use an or gate i.e one pin or the other as input ..
i.e 2 inputs to 1 output .
see
linuxcnc.org/docs/html/man/man9/xor2.9.html
i'll try and dig up a example if you need it
i.e 2 inputs to 1 output .
see
linuxcnc.org/docs/html/man/man9/xor2.9.html
i'll try and dig up a example if you need it
The following user(s) said Thank You: mdi
Please Log in or Create an account to join the conversation.
11 Sep 2015 19:42 #62452
by andypugh
I think the solution might be momentary buttons and:
www.linuxcnc.org/docs/html/man/man9/toggle2nist.9.html
Replied by andypugh on topic Linking virtual and physical button - same output
I also have a similar problem with linking 4 other pyvcp buttons (which also work and are already linked to 4 outputs) to another 4 physical buttons. So again, it's kind of the same problem that i have with the estop, namely, i cannot manage to link 2 inputs to the same output.
I think the solution might be momentary buttons and:
www.linuxcnc.org/docs/html/man/man9/toggle2nist.9.html
The following user(s) said Thank You: mdi
Please Log in or Create an account to join the conversation.
11 Sep 2015 20:30 #62459
by mdi
Replied by mdi on topic Linking virtual and physical button - same output
Hello. I managed to get what i want to do with estop buttons. Thanks
But the problem with 1 button from pyvcp (application.com_1) and 1 physical button is still annoying me. I use m64 and m65 for output and m66 for that button. I dont know how to make the link between that button and that button...The button from pyvcp doesnt do anything....Any idea?
Bye bye.
But the problem with 1 button from pyvcp (application.com_1) and 1 physical button is still annoying me. I use m64 and m65 for output and m66 for that button. I dont know how to make the link between that button and that button...The button from pyvcp doesnt do anything....Any idea?
Bye bye.
Please Log in or Create an account to join the conversation.
14 Sep 2015 15:06 #62550
by mdi
Replied by mdi on topic Linking virtual and physical button - same output
Hey.
The xor2 instruction i put in the hal file.
The toogle instruction needs to be there? I entered in some files and i saw it only in tcl files....
Cheers.
The xor2 instruction i put in the hal file.
The toogle instruction needs to be there? I entered in some files and i saw it only in tcl files....
Cheers.
Please Log in or Create an account to join the conversation.
14 Sep 2015 17:18 #62554
by andypugh
You should use either the xor approach or the toggle2nist component. Using both will _not_ work twice as well as using one or the other.
Replied by andypugh on topic Linking virtual and physical button - same output
The xor2 instruction i put in the hal file.
The toogle instruction needs to be there? I entered in some files and i saw it only in tcl files....
You should use either the xor approach or the toggle2nist component. Using both will _not_ work twice as well as using one or the other.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds