- Posts: 118
- Thank you received: 18
I would agree with this. The code that controls homing is spread around 10 or so files. Not much editing/addition is required but it is quite a tangled web.I don't think its possible to home without modifying homing.c as the LCNC velocities seem to override the internal ones.
That's basically what is required. You create the variable HOME_EXTERNAL or in my HOME_AUTO =1 for the .ini file then you can use that to set a bit (that you have created), then in the homing file LinuxCNC knows to ignore the error during homing. It may not be that elegant but it works.My thought was to add a new flag to homing configuration called HOME_EXTERNAL that bypassed all of the stuff linuxcnc does in homing.c until homing is completed except all the homing offsets etc. To do this I modified the bitmap in homing.h
Then in homing.c, I jump down the homing sequence_state if this flag is set.
I might add, I had to dig deep to remember how bitmaps worked!
I will have to have a look at this. A comp file that handles the mode switching and brake at the appropriate time would be nice. Might even be able to delete a few rungs on the ladder.What Dominc has provided though is a way to eliminate using M codes to change modes by tying the mode changes with a home to index signal.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
oops, the second block of code should start with sudo not udo
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.