Fixed limitswitch errors during homing

This commit is contained in:
2026-02-12 11:35:21 +01:00
parent dbb4e92171
commit b81e7926d1
2 changed files with 1 additions and 25 deletions

View File

@@ -190,9 +190,7 @@ asynStatus masterMacsAxis::init() {
double motVelocity = 0.0;
double motVmax = 0.0;
double motAccel = 0.0;
int motMode = 0;
int dynamicLimits = 0;
int motCanSetMode = 0;
// =========================================================================
@@ -306,28 +304,6 @@ asynStatus masterMacsAxis::init() {
}
pMasterMacsA_->dynamicLimits = bool(dynamicLimits);
// Check the current motor mode
status = pC_->read(axisNo_, 07, response);
if (status != asynSuccess) {
return status;
}
nvals = sscanf(response, "%d", &motMode);
if (nvals != 1) {
return pC_->couldNotParseResponse("R07", response, axisNo_,
__PRETTY_FUNCTION__, __LINE__);
}
// Check if the motor can switch its mode
status = pC_->read(axisNo_, 31, response);
if (status != asynSuccess) {
return status;
}
nvals = sscanf(response, "%d", &motCanSetMode);
if (nvals != 1) {
return pC_->couldNotParseResponse("R31", response, axisNo_,
__PRETTY_FUNCTION__, __LINE__);
}
status = readEncoderType();
if (status != asynSuccess) {
return status;