Updated sinqMotor to new 1.6.0
This commit is contained in:
@@ -190,9 +190,7 @@ asynStatus masterMacsAxis::init() {
|
|||||||
double motVelocity = 0.0;
|
double motVelocity = 0.0;
|
||||||
double motVmax = 0.0;
|
double motVmax = 0.0;
|
||||||
double motAccel = 0.0;
|
double motAccel = 0.0;
|
||||||
int motMode = 0;
|
|
||||||
int dynamicLimits = 0;
|
int dynamicLimits = 0;
|
||||||
int motCanSetMode = 0;
|
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
@@ -306,37 +304,6 @@ asynStatus masterMacsAxis::init() {
|
|||||||
}
|
}
|
||||||
pMasterMacsA_->dynamicLimits = bool(dynamicLimits);
|
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__);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the readback value from the controller is 3, it is in velocity mode,
|
|
||||||
// which sinqMotor encodes as a 1. Otherwise, it is in position mode.
|
|
||||||
setAxisParamChecked(this, motorMode, motMode == 3);
|
|
||||||
|
|
||||||
// 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__);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the readback value from the controller is 3, the motor supports both
|
|
||||||
// velocity and position mode, otherwise just one of them (the one read out
|
|
||||||
// with motMode).
|
|
||||||
setAxisParamChecked(this, motorCanSetMode, motCanSetMode == 3);
|
|
||||||
|
|
||||||
status = readEncoderType();
|
status = readEncoderType();
|
||||||
if (status != asynSuccess) {
|
if (status != asynSuccess) {
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user