Hi Dan,

please check:

in YOURMACHINE.INI under [JOINT_0/1/2/3] add
AUTOHOMEING_SERVOSYSTEM =  1
to enable AUTOHOMING per joint.

In inijoint.cc the homing parameters are parsed, with
jointIniFile->Find(&is_autohoming_servo, "AUTOHOMEING_SERVOSYSTEM", jointString);

If found and value = 1, the local bool variable is set is_autohoming_servo true, otherwise false.

Then emcJointSetHomingParams() is called.
It passes each homing parameter as an argument, so I had to add a further argument "is_autohoming_servo" to emcJointSetHomingParams arguments list in the prototype, found in  emc.hh

What emcJointSetHomingParams() basicly does, is setting the parameters of the datastructures representing
each joint to the values given in the ini file.
Beside other parameters there is a integer called "flags" that holds binary variables.
In motion.h the decimal values of these Flags are defined.

/* flags for homing */
#define HOME_IGNORE_LIMITS            1
#define HOME_USE_INDEX                2
#define HOME_IS_SHARED                4
#define HOME_UNLOCK_FIRST             8
#define HOME_ABSOLUTE_ENCODER        16
#define HOME_NO_REHOME               32
#define HOME_NO_FINAL_MOVE           64
#define HOME_INDEX_NO_ENCODER_RESET 128
#define HOME_AUTOHOMING_SERVO       256  <<-- added

I added a new value for  the autohoming option "HOME_AUTOHOMING_SERVO" bit 8 (2^8 = 256)
Of course it is important that this bit position is unique.
If new flags have been added since I added this, the next free bit position must be used.

Within control.c the term (joint->flag & HOME_AUTOHOMING_SERVO) just checks if this bit is set.

up to here this depends on nothing else and printf should work if ini file is set accordingly (=>  AUTOHOMEING_SERVOSYSTEM  =1 is found in JOINT section).

pls check
(beware, i'm the grandmaster of messing up variable names. You will find __AUTOHOMEING__ and __AUTOHOMING___)

cheers

Rainer




_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to