Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21a73717a5 | |||
| 2cbb4f9028 |
1
Makefile
1
Makefile
@@ -23,6 +23,7 @@ SOURCES += src/masterMacsController.cpp
|
||||
# Store the record files
|
||||
TEMPLATES += sinqMotor/db/asynRecord.db
|
||||
TEMPLATES += sinqMotor/db/sinqMotor.db
|
||||
TEMPLATES += db/masterMacs.db
|
||||
|
||||
# This file registers the motor-specific functions in the IOC shell.
|
||||
DBDS += sinqMotor/src/sinqMotor.dbd
|
||||
|
||||
Submodule sinqMotor updated: 8689c79f19...7a0de4e9d9
@@ -357,7 +357,10 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
||||
|
||||
if (timedOut) {
|
||||
setAxisParamChecked(this, motorMessageText,
|
||||
"Timed out while waiting for a handshake");
|
||||
"Timed out while waiting for a handshake. "
|
||||
"Please call the support.");
|
||||
|
||||
poll_status = asynError;
|
||||
}
|
||||
|
||||
pC_->read(axisNo_, 86, response);
|
||||
@@ -377,14 +380,10 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
||||
pMasterMacsA_->waitForHandshake = false;
|
||||
pMasterMacsA_->targetReachedUninitialized = false;
|
||||
} else {
|
||||
// Still waiting for the handshake - try again in the next busy
|
||||
// poll. This is already part of the movement procedure.
|
||||
*moving = true;
|
||||
|
||||
setAxisParamChecked(this, motorStatusMoving, *moving);
|
||||
setAxisParamChecked(this, motorStatusDone, !(*moving));
|
||||
|
||||
return asynSuccess;
|
||||
return poll_status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,6 +402,9 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
||||
return rw_status;
|
||||
}
|
||||
|
||||
// If we wait for a handshake, but the motor was moving in its last poll
|
||||
// cycle and has reached its target, it is not moving. Otherwise it is
|
||||
// considered moving, even if we're still waiting for the handshake.
|
||||
if (pMasterMacsA_->targetReachedUninitialized) {
|
||||
*moving = false;
|
||||
} else {
|
||||
@@ -679,7 +681,6 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
||||
if (pl_status != asynSuccess) {
|
||||
return pl_status;
|
||||
}
|
||||
|
||||
return poll_status;
|
||||
}
|
||||
|
||||
@@ -805,8 +806,8 @@ asynStatus masterMacsAxis::doReset() {
|
||||
|
||||
asynStatus status = asynSuccess;
|
||||
|
||||
// Reset the controller ("node reset")
|
||||
status = pC_->write(axisNo_, 16, "");
|
||||
// Reset any errors
|
||||
status = pC_->write(axisNo_, 17, "");
|
||||
if (status != asynSuccess) {
|
||||
setAxisParamChecked(this, motorStatusProblem, true);
|
||||
}
|
||||
@@ -822,9 +823,9 @@ asynStatus masterMacsAxis::nodeReset() {
|
||||
|
||||
asynStatus status = asynSuccess;
|
||||
|
||||
// Reset any errors in the controller. Since the node reset results in a
|
||||
// Reset the controller ("node reset"). Since the node reset results in a
|
||||
// power cycle, we use the corresponding timeout.
|
||||
status = pC_->write(axisNo_, 17, "", PowerCycleTimeout);
|
||||
status = pC_->write(axisNo_, 16, "", PowerCycleTimeout);
|
||||
if (status != asynSuccess) {
|
||||
setAxisParamChecked(this, motorStatusProblem, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user