disable home button while running
13 Apr 2011 15:33 #8836
by piasdom
disable home button while running was created by piasdom
hi,
i now have a home button in axis. i would like to disable it while the program
is running. in case i click it by accident and stop everything. is this possible or is
a new build/compile for emc required ?
Thanks
i now have a home button in axis. i would like to disable it while the program
is running. in case i click it by accident and stop everything. is this possible or is
a new build/compile for emc required ?
Thanks
Please Log in or Create an account to join the conversation.
13 Apr 2011 16:01 #8838
by BigJohnT
Replied by BigJohnT on topic Re:disable home button while running
I'm pretty sure EMC will not try and home when a program is running. You should try and see when running a safe program.
If not then you want to "and" the button and halui is in manual pins to your halui home pin. To do this you use the and2 component.
www.linuxcnc.org/docview/html/man/man9/and2.9.html
The and2 component takes two inputs and has one output. If both inputs are on the output is on. So one input is your button and one is the halui is in manual pin (don't know the exact name).
John
If not then you want to "and" the button and halui is in manual pins to your halui home pin. To do this you use the and2 component.
www.linuxcnc.org/docview/html/man/man9/and2.9.html
The and2 component takes two inputs and has one output. If both inputs are on the output is on. So one input is your button and one is the halui is in manual pin (don't know the exact name).
John
Please Log in or Create an account to join the conversation.
13 Apr 2011 16:10 #8839
by piasdom
Replied by piasdom on topic Re:disable home button while running
i know it would not home,it just stops everything with estop error.
but this is not in the xml file?
have no idea where to use loadrt and2.
Thanks
but this is not in the xml file?
have no idea where to use loadrt and2.
Thanks
Please Log in or Create an account to join the conversation.
13 Apr 2011 16:17 #8840
by BigJohnT
Replied by BigJohnT on topic Re:disable home button while running
The xml file only creates the pyvcp things. The and2 is a HAL component so it will be in your .hal file.
Look in your .hal file to see if you all ready have a loadrt and2 line. If not you can in your postgui.hal and add the and2 and don't forget to add it to your servo-thread with addf. The reason you do it there is you are connecting to the pyvcp button so you have to wait for it to load.
So get the and2 part added first and make sure that works...
John
Look in your .hal file to see if you all ready have a loadrt and2 line. If not you can in your postgui.hal and add the and2 and don't forget to add it to your servo-thread with addf. The reason you do it there is you are connecting to the pyvcp button so you have to wait for it to load.
So get the and2 part added first and make sure that works...
John
Please Log in or Create an account to join the conversation.
13 Apr 2011 16:21 - 13 Apr 2011 16:30 #8841
by piasdom
Replied by piasdom on topic Re:disable home button while running
i'll work on the.
but you said servo-thread, i have steppers. does that change where i put that stuff ?
and i looked in the hal file, no and2
but you said servo-thread, i have steppers. does that change where i put that stuff ?
and i looked in the hal file, no and2
Last edit: 13 Apr 2011 16:30 by piasdom. Reason: looked
Please Log in or Create an account to join the conversation.
13 Apr 2011 17:15 #8843
by BigJohnT
Replied by BigJohnT on topic Re:disable home button while running
You should have two threads the base-thread and the servo-thread. I have no idea why they are named that. The base-thread is the fast one used to generate steps and the servo-thread is a one that runs about 1/4 as fast as the base-thread. The servo-thread is the one you normally use for things like this.
It doesn't matter what kind of machine you have hal commands go in one of the hal files and pyvcp stuff goes in the xml file.
John
It doesn't matter what kind of machine you have hal commands go in one of the hal files and pyvcp stuff goes in the xml file.
John
Please Log in or Create an account to join the conversation.
13 Apr 2011 17:50 - 13 Apr 2011 17:57 #8846
by piasdom
Replied by piasdom on topic Re:disable home button while running
should i be in the axis.hal file or the custom_postgui.hal?
i added add2 to axis.hal and emc starts. when i try to add the addf in the axis.hal, it ask for another name. it says
it has only one. i assume it's the pins name it looking for ?
i added add2 to axis.hal and emc starts. when i try to add the addf in the axis.hal, it ask for another name. it says
it has only one. i assume it's the pins name it looking for ?
Last edit: 13 Apr 2011 17:57 by piasdom.
Please Log in or Create an account to join the conversation.
13 Apr 2011 18:23 #8850
by BigJohnT
Replied by BigJohnT on topic Re:disable home button while running
You can load and add the and2 in either hal file. Only the connections to any pyvcp component MUST be done in the postgui hal file.
What is your addf line?
John
What is your addf line?
John
Please Log in or Create an account to join the conversation.
13 Apr 2011 18:27 - 13 Apr 2011 18:50 #8853
by piasdom
Replied by piasdom on topic Re:disable home button while running
in the custom_postgui.hal file
loadrt and2 (it shows up in the hal configuration)
in the xml
and2.halui.joint.0.home.in0 bit in
and2.halui.mode.manual.in1 bit in
and2.halui.program.is-running.out bit out
in the xml, what do i add. <halpin>"and2"</halpin> ?
still didn't do the addf
what is "N" in addf and2.n.name
loadrt and2 (it shows up in the hal configuration)
in the xml
and2.halui.joint.0.home.in0 bit in
and2.halui.mode.manual.in1 bit in
and2.halui.program.is-running.out bit out
in the xml, what do i add. <halpin>"and2"</halpin> ?
still didn't do the addf
what is "N" in addf and2.n.name
Last edit: 13 Apr 2011 18:50 by piasdom.
Please Log in or Create an account to join the conversation.
13 Apr 2011 18:53 #8857
by piasdom
Replied by piasdom on topic Re:disable home button while running
have this in hal
addf and2 servo-thread
addf and2 servo-thread
Please Log in or Create an account to join the conversation.
Time to create page: 0.228 seconds