Absolute homing

More
2 years 4 months ago #303059 by andypugh
Replied by andypugh on topic Absolute homing
Late to the party here, but what happens if you connect halui.machine.is-on to halui.home-all, with standard absolute homing configured in the INI?

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

More
2 years 4 months ago #303073 by eduard
Replied by eduard on topic Absolute homing
This iw working now. Welcome to the party.

But still have to comment out everything about servo homing, and from the ini as well.

But now when the machine is on, everything is homed automagically.

# ABSOLUTE HOMING ON ALL AXES
# If internal homing is commented out on all drives and in the INI file (#HOMEMOD=el8_homecomp), this will home the machine when powering on.
net machine-on  halui.machine.is-on => halui.home-all

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

More
2 years 4 months ago - 2 years 4 months ago #303099 by Aciera
Replied by Aciera on topic Absolute homing
Just as a follow up, as you seem to have it mostly working.
Looking at the compile result of 'el8_homecomp.comp' (ie 'el8_homecomp.c') I see this 'do_homing' function:

Code:
bool do_homing(void) { int joint_num; int homing_flag = 0; bool beginning_allhomed = get_allhomed(); do_homing_sequence(); /* loop thru joints, treat each one individually */ for (joint_num = 0; joint_num < all_joints; joint_num++) { if (!H[joint_num].joint_in_sequence) { continue; } if (!GET_JOINT_ACTIVE_FLAG(&joints[joint_num])) { continue; } // CUSTOM joint homing state machine for everybody: homing_flag += custom_1joint_state_machine(joint_num); } if ( homing_flag > 0 ) { /* one or more joint is homing */ homing_active = 1; } else { /* is a homing sequence in progress? */ if (sequence_state == HOME_SEQUENCE_IDLE) { /* no, single joint only, we're done */ homing_active = 0; } } // return 1 if homing completed this period if (!beginning_allhomed && get_allhomed()) {homing_active=0; return 1;} return 0; }


While in my test component I get this:

Code:
bool do_homing(void) { int joint_num; int homing_flag = 0; bool beginning_allhomed = get_allhomed(); do_homing_sequence(); /* loop thru joints, treat each one individually */ for (joint_num = 0; joint_num < all_joints; joint_num++) { if (!H[joint_num].joint_in_sequence) { continue; } if (!GET_JOINT_ACTIVE_FLAG(&joints[joint_num])) { continue; } if (customH[joint_num].is_custom_homing) { // CUSTOM joint homing state machine: homing_flag += custom_1joint_state_machine(joint_num); } else { // DEFAULT joint homing state machine: homing_flag += base_1joint_state_machine(joint_num); } } if ( homing_flag > 0 ) { /* one or more joint is homing */ homing_active = 1; } else { /* is a homing sequence in progress? */ if (sequence_state == HOME_SEQUENCE_IDLE) { /* no, single joint only, we're done */ homing_active = 0; } } // return 1 if homing completed this period if (!beginning_allhomed && get_allhomed()) {homing_active=0; return 1;} return 0; }

So the 'el8_homecomp.c' does not contain the switch between CUSTOM and DEFAULT homing:

Code:
if (customH[joint_num].is_custom_homing) { // CUSTOM joint homing state machine: homing_flag += custom_1joint_state_machine(joint_num); } else { // DEFAULT joint homing state machine: homing_flag += base_1joint_state_machine(joint_num); }

Looks like it was maybe not intended for the user to be able to choose between the homing method.
Last edit: 2 years 4 months ago by Aciera.

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

More
2 years 4 months ago #303102 by rodw
Replied by rodw on topic Absolute homing
If you read the homecomp docs, you can switch between linuxcnc homing and internal homing by a command line parameter (or an ini setting to load the same thing). You could run 2 different configs
It was never designed to mix and match methods in the one machine configuration

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

More
2 years 4 months ago - 2 years 4 months ago #303103 by Aciera
Replied by Aciera on topic Absolute homing

It was never designed to mix and match methods in the one machine configuration


Not sure what makes you think that as the homecomp doc clearly states that it is intended to enable the user to setup each joint to use the default or the custom homing routine:

Code:
This module creates input hal pins joint.n.request-custom-homing that enable an alternate joint homing state machine for requested joints.


linuxcnc.org/docs/html/man/man9/homecomp.9.html

This seems to work just fine in the testing I have done and I don't really see why it shouldn't work as homing is done for each joint.

The only reason 'el8-homecomp.comp' does not offer that option is that the author of that particular homing component decided to remove that functionality.


[edit]
That is what I meant with this comment (ie 'it' meaning 'el8-homecomp.comp'):

Looks like it was maybe not intended for the user to be able to choose between the homing method.

Last edit: 2 years 4 months ago by Aciera.

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

More
2 years 4 months ago #303123 by rodw
Replied by rodw on topic Absolute homing
Please try my cia402 homecomp.
github.com/rodw-au/cia402_homecomp/tree/main

I went back to the original homecomp code so it should work. I only get small bursts of time to work on this so I forget what is meant to be supported. (My first homecomp was obsoleted by massive changes to the framework)

Note my pin  names are different. There is a PR there to change them back to the default names which I am deliberating over accepting or not. Give me your thoughts on this.

I've had some help from scottlaird and was hoping once this is tested, it would be distributed with the hal ethercat driver.
The following user(s) said Thank You: Aciera, DPFlex

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

Time to create page: 0.280 seconds
Powered by Kunena Forum