Updated turboPmac version
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#include "detectorTowerAngleAxis.h"
|
||||
#include "detectorTowerController.h"
|
||||
#include "detectorTowerLiftAxis.h"
|
||||
#include "detectorTowerSupportAxis.h"
|
||||
#include "turboPmacController.h"
|
||||
#include <epicsExport.h>
|
||||
#include <errlog.h>
|
||||
@ -172,7 +174,7 @@ asynStatus detectorTowerAngleAxis::poll(bool *moving) {
|
||||
if (axisNo() < liftAxis()->axisNo() && axisNo() < supportAxis()->axisNo()) {
|
||||
status = pC_->pollDetectorAxes(moving, this, liftAxis(), supportAxis());
|
||||
} else {
|
||||
getAxisParamChecked(this, motorStatusMoving, &moving);
|
||||
getAxisParamChecked(this, motorStatusMoving, moving);
|
||||
}
|
||||
setWasMoving(*moving);
|
||||
return status;
|
||||
@ -204,10 +206,7 @@ asynStatus detectorTowerAngleAxis::doMove(double position, int relative,
|
||||
asynStatus detectorTowerAngleAxis::startCombinedMove() {
|
||||
|
||||
// Status of read-write-operations of ASCII commands to the controller
|
||||
asynStatus rwStatus = asynSuccess;
|
||||
|
||||
// Status of parameter library operations
|
||||
asynStatus plStatus = asynSuccess;
|
||||
asynStatus status = asynSuccess;
|
||||
|
||||
char command[pC_->MAXBUF_] = {0};
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
@ -252,12 +251,12 @@ asynStatus detectorTowerAngleAxis::startCombinedMove() {
|
||||
pC_->lock();
|
||||
|
||||
// We don't expect an answer
|
||||
rwStatus = pC_->writeRead(axisNo_, command, response, 0);
|
||||
status = pC_->writeRead(axisNo_, command, response, 0);
|
||||
|
||||
// Free the controller again
|
||||
pC_->unlock();
|
||||
|
||||
if (rwStatus != asynSuccess) {
|
||||
if (status != asynSuccess) {
|
||||
asynPrint(
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nStarting movement to "
|
||||
@ -268,24 +267,21 @@ asynStatus detectorTowerAngleAxis::startCombinedMove() {
|
||||
callParamCallbacks();
|
||||
}
|
||||
|
||||
return rwStatus;
|
||||
return status;
|
||||
}
|
||||
|
||||
asynStatus detectorTowerAngleAxis::stop(double acceleration) {
|
||||
|
||||
// Status of read-write-operations of ASCII commands to the controller
|
||||
asynStatus rwStatus = asynSuccess;
|
||||
|
||||
// Status of parameter library operations
|
||||
asynStatus plStatus = asynSuccess;
|
||||
asynStatus status = asynSuccess;
|
||||
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
|
||||
// =========================================================================
|
||||
|
||||
rwStatus = pC_->writeRead(axisNo_, "P350=8", response, 0);
|
||||
status = pC_->writeRead(axisNo_, "P350=8", response, 0);
|
||||
|
||||
if (rwStatus != asynSuccess) {
|
||||
if (status != asynSuccess) {
|
||||
asynPrint(
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nStopping the movement "
|
||||
@ -300,7 +296,7 @@ asynStatus detectorTowerAngleAxis::stop(double acceleration) {
|
||||
startingDeferredMovement_ = false;
|
||||
deferredMovementWait_ = false;
|
||||
|
||||
return rwStatus;
|
||||
return status;
|
||||
}
|
||||
|
||||
// The detector tower axis uses absolute encoders
|
||||
@ -315,16 +311,16 @@ detectorTowerAngleAxis::toggleWorkingChangerState(bool toChangingPosition) {
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
|
||||
// Status of read-write-operations of ASCII commands to the controller
|
||||
asynStatus rwStatus = asynSuccess;
|
||||
asynStatus status = asynSuccess;
|
||||
|
||||
bool moving = false;
|
||||
int positionState = 0;
|
||||
|
||||
// =========================================================================
|
||||
|
||||
rwStatus = poll(&moving);
|
||||
if (rwStatus != asynSuccess) {
|
||||
return rwStatus;
|
||||
status = poll(&moving);
|
||||
if (status != asynSuccess) {
|
||||
return status;
|
||||
}
|
||||
|
||||
getAxisParamChecked(this, positionStateRBV, &positionState);
|
||||
@ -365,9 +361,9 @@ detectorTowerAngleAxis::toggleWorkingChangerState(bool toChangingPosition) {
|
||||
|
||||
// Move the axis into changer or working position
|
||||
if (toChangingPosition) {
|
||||
rwStatus = pC_->writeRead(axisNo_, "P350=2", response, 0);
|
||||
status = pC_->writeRead(axisNo_, "P350=2", response, 0);
|
||||
} else {
|
||||
rwStatus = pC_->writeRead(axisNo_, "P350=3", response, 0);
|
||||
status = pC_->writeRead(axisNo_, "P350=3", response, 0);
|
||||
}
|
||||
|
||||
setAxisParamChecked(this, changeStateRBV, toChangingPosition);
|
||||
@ -421,7 +417,6 @@ asynStatus detectorTowerAngleAxis::adjustOrigin(double newOrigin) {
|
||||
asynStatus detectorTowerAngleAxis::doReset() {
|
||||
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
asynStatus plStatus = asynSuccess;
|
||||
int positionState = 0;
|
||||
|
||||
getAxisParamChecked(this, positionStateRBV, &positionState);
|
||||
|
@ -2,13 +2,6 @@
|
||||
#define detectorTowerAngleAxis_H
|
||||
#include "detectorTowerController.h"
|
||||
#include "turboPmacAxis.h"
|
||||
#include <errlog.h>
|
||||
|
||||
// Forward declaration of the controller class to resolve the cyclic dependency
|
||||
// between the controller and the axis .h-file. See
|
||||
// https://en.cppreference.com/w/cpp/language/class.
|
||||
class detectorTowerLiftAxis;
|
||||
class detectorTowerSupportAxis;
|
||||
|
||||
class detectorTowerAngleAxis : public turboPmacAxis {
|
||||
public:
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "detectorTowerController.h"
|
||||
#include "detectorTowerAngleAxis.h"
|
||||
#include "turboPmacController.h"
|
||||
#include "detectorTowerLiftAxis.h"
|
||||
#include "detectorTowerSupportAxis.h"
|
||||
#include <epicsExport.h>
|
||||
#include <errlog.h>
|
||||
#include <iocsh.h>
|
||||
|
@ -8,11 +8,15 @@
|
||||
|
||||
#ifndef detectorTowerController_H
|
||||
#define detectorTowerController_H
|
||||
#include "detectorTowerAngleAxis.h"
|
||||
#include "detectorTowerLiftAxis.h"
|
||||
#include "detectorTowerSupportAxis.h"
|
||||
#include "turboPmacController.h"
|
||||
|
||||
// Forward declaration of the axis classes to resolve the cyclic dependency
|
||||
// between the controller and the axis .h-file. See
|
||||
// https://en.cppreference.com/w/cpp/language/class.
|
||||
class detectorTowerAngleAxis;
|
||||
class detectorTowerLiftAxis;
|
||||
class detectorTowerSupportAxis;
|
||||
|
||||
class detectorTowerController : public turboPmacController {
|
||||
|
||||
public:
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "detectorTowerLiftAxis.h"
|
||||
#include "detectorTowerAngleAxis.h"
|
||||
#include "detectorTowerController.h"
|
||||
#include "detectorTowerSupportAxis.h"
|
||||
#include "turboPmacController.h"
|
||||
#include <epicsExport.h>
|
||||
#include <errlog.h>
|
||||
@ -138,7 +139,7 @@ asynStatus detectorTowerLiftAxis::poll(bool *moving) {
|
||||
status = pC_->pollDetectorAxes(moving, angleAxis(), this,
|
||||
angleAxis()->supportAxis());
|
||||
} else {
|
||||
getAxisParamChecked(this, motorStatusMoving, &moving);
|
||||
getAxisParamChecked(this, motorStatusMoving, moving);
|
||||
}
|
||||
setWasMoving(*moving);
|
||||
return status;
|
||||
|
@ -3,11 +3,6 @@
|
||||
#include "detectorTowerController.h"
|
||||
#include "turboPmacAxis.h"
|
||||
|
||||
// Forward declaration of the controller class to resolve the cyclic dependency
|
||||
// between the controller and the axis .h-file. See
|
||||
// https://en.cppreference.com/w/cpp/language/class.
|
||||
class detectorTowerAngleAxis;
|
||||
|
||||
class detectorTowerLiftAxis : public turboPmacAxis {
|
||||
public:
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "detectorTowerSupportAxis.h"
|
||||
#include "detectorTowerAngleAxis.h"
|
||||
#include "detectorTowerController.h"
|
||||
#include "detectorTowerLiftAxis.h"
|
||||
#include "turboPmacController.h"
|
||||
#include <epicsExport.h>
|
||||
#include <errlog.h>
|
||||
@ -138,7 +139,7 @@ asynStatus detectorTowerSupportAxis::poll(bool *moving) {
|
||||
status = pC_->pollDetectorAxes(moving, angleAxis(),
|
||||
angleAxis()->liftAxis(), this);
|
||||
} else {
|
||||
getAxisParamChecked(this, motorStatusMoving, &moving);
|
||||
getAxisParamChecked(this, motorStatusMoving, moving);
|
||||
}
|
||||
setWasMoving(*moving);
|
||||
return status;
|
||||
|
@ -3,11 +3,6 @@
|
||||
#include "detectorTowerController.h"
|
||||
#include "turboPmacAxis.h"
|
||||
|
||||
// Forward declaration of the controller class to resolve the cyclic dependency
|
||||
// between the controller and the axis .h-file. See
|
||||
// https://en.cppreference.com/w/cpp/language/class.
|
||||
class detectorTowerAngleAxis;
|
||||
|
||||
/**
|
||||
* @brief Passive axis which is mostly controlled indirectly by the hardware
|
||||
*
|
||||
|
Submodule turboPmac updated: 1703542770...f423002d23
Reference in New Issue
Block a user