i now tried to extend the homing workflow to better align to the Linuxcnc usual homing.
my home states are :
PK_PEAxisState_axREADY -> before homing
when Homing is triggered the pokeys internal Homingprocedure does the following states
- PK_PEAxisState_axHOMINGSTART
- PK_PEAxisState_axHOMINGSEARCH
- PK_PEAxisState_axHOMINGBACK
- PK_PEAxisState_axHOMING_RESETTING
- PK_PEAxisState_axHOMING_BACKING_OFF
- ( PK_PEAxisState_axHOME ) that status of pulse engine is suppresed and
after that i have to finalize the pokeys homing procedure by a "PK_PEv2_HomingFinish" command in order to operate that joint again for tho upcoming steps there fore i added two additional steps:
PEAxisState_axReadyToFinalizeHoming - used as a indicator from pokeys.comp to pokeys_homecomp that the homing finalize command can be triggered
PK_PEAxisState_axReadyToArmEncoder in this step that index search part should take place, in that step my intention was to reset the position feedback to ZERO_POSITION, to prevent problems on pokeys due to the (softlimits on the device side).
on the Joint for Z i have the problem that the difference to zero position is quite high as the position change might be 100 mm
so here i'm at a point where i don't figure out what to do, and either where to find out or whom to ask for help.
what i currently try to do is
Joint_num].index_enable = index_search_active; at the PK_PEAxisState_axReadyToArmEncoder status
and at the follwoing status
PK_PEAxisState_axHOMINGARMENCODER i basically reuse the actions as were done in homing.c at "HOME_INDEX_SEARCH_WAIT"
if (H[joint_num].index_enable == index_search_armed) {
/* yes, stop motion */
joint->free_tp.enable = 0;
// joint->free_tp.pos_cmd = joint->free_tp.curr_pos; // set to zero
joint->free_tp.pos_cmd = 0; // set to zero
/* Pokeys resets encoder position to zeros */
H[joint_num].index_enable = index_search_armed;
H[joint_num].homing = 1;
H[joint_num].home_state = HOME_SET_INDEX_POSITION;
}
but it always stops at about that step and some part triggers "do_cancel_homing"
the only message that i could see on my last version was
"emc/task/taskintf.cc 976: Error on joint 3, command number 139"
(until now a similar message was together with a FOLLOWING_ERROR for that joint)
Is there someone who could tell me where to check, or whom to ask. I'm not sure if this thread is the right place to ask about that topic.
BR
Dominik