Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
f745af48fe | |||
0fd312b672 | |||
c15e513b2e | |||
6f9b890374 | |||
fbbe8c4553 | |||
675819741b | |||
eb3826ec35 |
@ -189,7 +189,7 @@ asynStatus detectorTowerAngleAxis::poll(bool *moving) {
|
|||||||
__LINE__);
|
__LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wasMoving_ = *moving;
|
setWasMoving(*moving);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ asynStatus detectorTowerAngleAxis::doMove(double position, int relative,
|
|||||||
|
|
||||||
// Signal to the deferredMovementCollectorLoop that a movement should be
|
// Signal to the deferredMovementCollectorLoop that a movement should be
|
||||||
// started to the defined target position.
|
// started to the defined target position.
|
||||||
targetPosition_ = position * motorRecResolution;
|
setTargetPosition(position * motorRecResolution);
|
||||||
receivedTarget_ = true;
|
receivedTarget_ = true;
|
||||||
|
|
||||||
return asynSuccess;
|
return asynSuccess;
|
||||||
@ -282,7 +282,7 @@ asynStatus detectorTowerAngleAxis::startCombinedMove() {
|
|||||||
// Set the target positions for beam tilt, detector tilt offset and lift
|
// Set the target positions for beam tilt, detector tilt offset and lift
|
||||||
// offset
|
// offset
|
||||||
snprintf(command, sizeof(command), "Q451=%lf Q454=%lf P350=1",
|
snprintf(command, sizeof(command), "Q451=%lf Q454=%lf P350=1",
|
||||||
targetPosition_, liftAxis_->targetPosition_);
|
targetPosition(), liftAxis_->targetPosition());
|
||||||
|
|
||||||
// Lock the access to the controller since this function runs in another
|
// Lock the access to the controller since this function runs in another
|
||||||
// thread than the poll method.
|
// thread than the poll method.
|
||||||
@ -343,6 +343,10 @@ asynStatus detectorTowerAngleAxis::stop(double acceleration) {
|
|||||||
return asynError;
|
return asynError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the deferred movement flags
|
||||||
|
startingDeferredMovement_ = false;
|
||||||
|
deferredMovementWait_ = false;
|
||||||
|
|
||||||
return rwStatus;
|
return rwStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,6 +530,10 @@ asynStatus detectorTowerAngleAxis::doReset() {
|
|||||||
__PRETTY_FUNCTION__, __LINE__);
|
__PRETTY_FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the deferred movement flags
|
||||||
|
startingDeferredMovement_ = false;
|
||||||
|
deferredMovementWait_ = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check which action should be performed:
|
Check which action should be performed:
|
||||||
- If error_ == 10 or 11 (FTZ motor error): P352 = 3 (Recover FTZ)
|
- If error_ == 10 or 11 (FTZ motor error): P352 = 3 (Recover FTZ)
|
||||||
|
@ -106,11 +106,13 @@ detectorTowerController::detectorTowerController(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detectorTowerController::~detectorTowerController() {}
|
||||||
|
|
||||||
asynStatus detectorTowerController::readInt32(asynUser *pasynUser,
|
asynStatus detectorTowerController::readInt32(asynUser *pasynUser,
|
||||||
epicsInt32 *value) {
|
epicsInt32 *value) {
|
||||||
|
|
||||||
// The detector axes cannot be disabled
|
// The detector axes cannot be disabled
|
||||||
if (pasynUser->reason == motorCanDisable_) {
|
if (pasynUser->reason == motorCanDisable()) {
|
||||||
detectorTowerAngleAxis *aAxis = getDetectorTowerAngleAxis(pasynUser);
|
detectorTowerAngleAxis *aAxis = getDetectorTowerAngleAxis(pasynUser);
|
||||||
if (aAxis != nullptr) {
|
if (aAxis != nullptr) {
|
||||||
*value = 0;
|
*value = 0;
|
||||||
|
@ -35,6 +35,8 @@ class detectorTowerController : public turboPmacController {
|
|||||||
int numAxes, double movingPollPeriod,
|
int numAxes, double movingPollPeriod,
|
||||||
double idlePollPeriod, double comTimeout);
|
double idlePollPeriod, double comTimeout);
|
||||||
|
|
||||||
|
virtual ~detectorTowerController();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Overloaded function of turboPmacController
|
* @brief Overloaded function of turboPmacController
|
||||||
*
|
*
|
||||||
|
@ -154,7 +154,7 @@ asynStatus detectorTowerLiftAxis::poll(bool *moving) {
|
|||||||
__LINE__);
|
__LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wasMoving_ = *moving;
|
setWasMoving(*moving);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ asynStatus detectorTowerLiftAxis::doMove(double position, int relative,
|
|||||||
// Signal to the deferredMovementCollectorLoop (of the
|
// Signal to the deferredMovementCollectorLoop (of the
|
||||||
// detectorTowerAngleAxis) that a movement should be started to the
|
// detectorTowerAngleAxis) that a movement should be started to the
|
||||||
// defined target position.
|
// defined target position.
|
||||||
targetPosition_ = position * motorRecResolution;
|
setTargetPosition(position * motorRecResolution);
|
||||||
angleAxis_->receivedTarget_ = true;
|
angleAxis_->receivedTarget_ = true;
|
||||||
|
|
||||||
return asynSuccess;
|
return asynSuccess;
|
||||||
@ -192,37 +192,8 @@ asynStatus detectorTowerLiftAxis::doMove(double position, int relative,
|
|||||||
asynStatus detectorTowerLiftAxis::reset() { return angleAxis()->reset(); };
|
asynStatus detectorTowerLiftAxis::reset() { return angleAxis()->reset(); };
|
||||||
|
|
||||||
asynStatus detectorTowerLiftAxis::stop(double acceleration) {
|
asynStatus detectorTowerLiftAxis::stop(double acceleration) {
|
||||||
|
return angleAxis()->stop(acceleration);
|
||||||
// Status of read-write-operations of ASCII commands to the controller
|
};
|
||||||
asynStatus rwStatus = asynSuccess;
|
|
||||||
|
|
||||||
// Status of parameter library operations
|
|
||||||
asynStatus plStatus = asynSuccess;
|
|
||||||
|
|
||||||
char response[pC_->MAXBUF_] = {0};
|
|
||||||
|
|
||||||
// =========================================================================
|
|
||||||
|
|
||||||
rwStatus = pC_->writeRead(axisNo_, "P350=8", response, 0);
|
|
||||||
|
|
||||||
if (rwStatus != asynSuccess) {
|
|
||||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nStopping "
|
|
||||||
"the movement "
|
|
||||||
"failed.\n",
|
|
||||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
|
||||||
|
|
||||||
plStatus = setIntegerParam(pC_->motorStatusProblem(), true);
|
|
||||||
if (plStatus != asynSuccess) {
|
|
||||||
return pC_->paramLibAccessFailed(plStatus, "motorStatusProblem_",
|
|
||||||
axisNo_, __PRETTY_FUNCTION__,
|
|
||||||
__LINE__);
|
|
||||||
}
|
|
||||||
return asynError;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rwStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
asynStatus detectorTowerLiftAxis::readEncoderType() {
|
asynStatus detectorTowerLiftAxis::readEncoderType() {
|
||||||
return angleAxis()->readEncoderType();
|
return angleAxis()->readEncoderType();
|
||||||
|
@ -19,10 +19,6 @@ class detectorTowerLiftAxis : public turboPmacAxis {
|
|||||||
detectorTowerLiftAxis(detectorTowerController *pController, int axisNo,
|
detectorTowerLiftAxis(detectorTowerController *pController, int axisNo,
|
||||||
detectorTowerAngleAxis *angleAxis);
|
detectorTowerAngleAxis *angleAxis);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Destroy the turboPmacAxis
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
virtual ~detectorTowerLiftAxis();
|
virtual ~detectorTowerLiftAxis();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,7 +155,7 @@ asynStatus detectorTowerSupportAxis::poll(bool *moving) {
|
|||||||
__LINE__);
|
__LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wasMoving_ = *moving;
|
setWasMoving(*moving);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,10 +24,6 @@ class detectorTowerSupportAxis : public turboPmacAxis {
|
|||||||
detectorTowerSupportAxis(detectorTowerController *pController, int axisNo,
|
detectorTowerSupportAxis(detectorTowerController *pController, int axisNo,
|
||||||
detectorTowerAngleAxis *angleAxis);
|
detectorTowerAngleAxis *angleAxis);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Destroy the detectorTowerSupportAxis
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
virtual ~detectorTowerSupportAxis();
|
virtual ~detectorTowerSupportAxis();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Submodule turboPmac updated: a11d10cb6c...4bc3388bc6
Reference in New Issue
Block a user