Auto Home when Linux CNC starts

More
28 Dec 2018 05:41 - 28 Dec 2018 08:18 #123002 by CrashCNC
Is there a way to automatically home when Axis starts?

What can be added to the .ini? Or does it need to be a custom HAL function? linuxcnc.org/docs/2.4/html/gui_halui.html

Matt
Last edit: 28 Dec 2018 08:18 by CrashCNC.

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

More
28 Dec 2018 23:26 #123041 by cmorley
I would try loading a python program that sets homing using the python linuxcnc module.
Something like:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import linuxcnc
c = linuxcnc.command()
c.home(-1)
c.wait_complete()

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

More
29 Dec 2018 05:20 #123054 by CrashCNC
Good idea.

I'm familiar with the python script but have no idea how to make that code automatically launch when starting the axis GUI.

Any insight?

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

More
29 Dec 2018 08:26 #123057 by cmorley
load it with HAL in the post_gui file:

loadusr python PATH_OF_SCRIPT

would probably work, but you would need to add to the script to clear estop and turn the machine on.

I must say it scares me a bit about what you are doing... I hope you have a good reason and safety plan :)

Chris M

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

More
30 Dec 2018 23:38 #123176 by newbynobi
Have you seen NO_FORCE_HOMING in INI settings?

Or execute the python script through halui.machine_is_on

What you are doing is dangerous, so do not blame anyboddy if something goes wrong!


Norbert

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

Time to create page: 0.075 seconds
Powered by Kunena Forum