Disable Home buttons until servo ready signal
29 Oct 2013 23:52 - 30 Oct 2013 00:44 #40394
by jtc
Disable Home buttons until servo ready signal was created by jtc
Hi.
When I turn the power button on axis, it enables the servo drives, but this drives take some time untill get enabled, so if I do the home command before they are ready I will have a joint following error.
My plans is to disable this buttons, and only enable when have the servo ready signals. but in my searchs I don't find how I can implement this...
Ideas are welcome.
Tnks.
When I turn the power button on axis, it enables the servo drives, but this drives take some time untill get enabled, so if I do the home command before they are ready I will have a joint following error.
My plans is to disable this buttons, and only enable when have the servo ready signals. but in my searchs I don't find how I can implement this...
Ideas are welcome.
Tnks.
Last edit: 30 Oct 2013 00:44 by jtc.
Please Log in or Create an account to join the conversation.
30 Oct 2013 00:42 - 30 Oct 2013 00:44 #40400
by ArcEye
Replied by ArcEye on topic Disable Home buttons until servo redy signal
Hi
It would be fairly simple to implement but will require some programming.
The easiest way is probably to alter Axis so that it creates an IN bit pin which can be linked to your servo ready signal, or whatever.
Then you can check this pin when a homing command is received.
Axis checks manual_ok() before each homing function begins, so would be quite easy to also check the servos are ready
For example
regards
My plans is to disable this buttons, and only enable when have the servo ready signals. but in my searchs I don't find how I can implement this...
It would be fairly simple to implement but will require some programming.
The easiest way is probably to alter Axis so that it creates an IN bit pin which can be linked to your servo ready signal, or whatever.
Then you can check this pin when a homing command is received.
Axis checks manual_ok() before each homing function begins, so would be quite easy to also check the servos are ready
For example
def home_axis(event=None):
if not manual_ok() or self.servos_ready : return ###
doHoming=True
if s.homed["xyzabcuvw".index(vars.current_axis.get())]:
doHoming=prompt_areyousure(_("Warning"),_("This axis is already homed, are you sure you want to re-home?"))
if doHoming:
ensure_mode(linuxcnc.MODE_MANUAL)
c.home("xyzabcuvw".index(vars.current_axis.get()))
regards
Last edit: 30 Oct 2013 00:44 by ArcEye.
Please Log in or Create an account to join the conversation.
30 Oct 2013 00:51 #40401
by andypugh
Replied by andypugh on topic Disable Home buttons until servo redy signal
I wonder if there are any HAL pins that can be used to disable manual_ok()?Axis checks manual_ok() before each homing function begins
Please Log in or Create an account to join the conversation.
30 Oct 2013 03:44 - 30 Oct 2013 03:46 #40404
by jtc
Replied by jtc on topic Disable Home buttons until servo ready signal
Tnks. I have forgotten that have to disable jog to.
A solution that use hal pins is preferential. Now only use axis for the hardware implementation, in the future it should use another screen.
The ideal situation is like after disable e-stop and before turn power on button.
I look arround no halui.machine.on, halui.machine.off and halui.machine.is-on.
If I link "servo ready" to halui.machine.on and "servo not ready" to halui.machine.off" and enable the servos when linuxcnc is on a non e-stop situation(not the best option, power on button seems to be more appropriated...) it should do the trick, but the power button will go on automatically. that isn't a good "feature"
A solution that use hal pins is preferential. Now only use axis for the hardware implementation, in the future it should use another screen.
The ideal situation is like after disable e-stop and before turn power on button.
I look arround no halui.machine.on, halui.machine.off and halui.machine.is-on.
If I link "servo ready" to halui.machine.on and "servo not ready" to halui.machine.off" and enable the servos when linuxcnc is on a non e-stop situation(not the best option, power on button seems to be more appropriated...) it should do the trick, but the power button will go on automatically. that isn't a good "feature"
Last edit: 30 Oct 2013 03:46 by jtc.
Please Log in or Create an account to join the conversation.
30 Oct 2013 16:00 - 30 Oct 2013 19:07 #40414
by ArcEye
You are not limited to halui pins.
You could always connect the servo-ready pin to an and component and attach the other and input pin to a pyVCP button pin, or just a physical switch pin and output to halui.machine.on
Then you have a physical (or virtual) override which requires to be switched before the machine comes on.
There are lots of variations on the same theme if another signal is preferred
regards
Replied by ArcEye on topic Disable Home buttons until servo ready signal
it should do the trick, but the power button will go on automatically. that isn't a good "feature"
You are not limited to halui pins.
You could always connect the servo-ready pin to an and component and attach the other and input pin to a pyVCP button pin, or just a physical switch pin and output to halui.machine.on
Then you have a physical (or virtual) override which requires to be switched before the machine comes on.
There are lots of variations on the same theme if another signal is preferred
regards
Last edit: 30 Oct 2013 19:07 by ArcEye.
Please Log in or Create an account to join the conversation.
Time to create page: 0.067 seconds