Hi there.
I am running the DS402 Drive Homing sample code on RSI website, converted to C++. Everything is going according to plan except one little thing which I am not able to understand. Following is what is happening.
Setup:
Homing Method = 27
Speed to Search for Switch = 5 rpm
Speed to zero = 5 rpm
Homing acceleration = 4 rpss
Status word value before homing starts = 16951 or 4237 in HEX
Status word value once homing is triggered and the motor settles = 54839 or D637
Status word value after the drive is switched back to CSP mode = 49776 or C338
Homing is happening successfully and motor comes to rest after it is complete. However I am still getting this error message. “Homing Sample App Failed with Exit Code: -1”
I am noticing that the code is not going in the following loops in the example code.
// 4. EVALUATE HOMING SUCCESS
if ((statusWordValue & STATUS_WORD_HOMING_ATTAINED_BIT) == 1)
{
std::cout << "Axis homed" << std::endl;
}
else if ((statusWordValue & STATUS_WORD_HOMING_ERROR_BIT) == 1)
{
std::cout << "Error Occured during homing." << std::endl;
}
What could be the reason for it? Are there any drawbacks if the homing attained bit is not registering that the homing is indeed successful?