9 Commits
1.1.1 ... 1.2.4

Author SHA1 Message Date
49c8ff5497 Fixed README formatting
Some checks failed
Test And Build / Lint (push) Failing after 4s
Test And Build / Build (push) Successful in 14s
2025-12-23 12:14:39 +01:00
761c691a86 Updated sinqMotor to fix segfault 2025-12-23 12:08:33 +01:00
aa5f2f0315 Updated turboPmac and removed C++ only flag
Some checks failed
Test And Build / Lint (push) Failing after 4s
Test And Build / Build (push) Successful in 16s
2025-08-22 15:35:49 +02:00
82c6710d2b Updated sinqMotor to fix bug in forcedPoll regarding watchdog
Some checks failed
Test And Build / Lint (push) Failing after 4s
Test And Build / Build (push) Successful in 14s
2025-08-14 17:23:45 +02:00
ab596ded48 Lift and angle axis now move simultaneously
Some checks failed
Test And Build / Lint (push) Failing after 3s
Test And Build / Build (push) Successful in 15s
Fixed a bug which caused the axes not to move in parallel, but after
each other.
2025-08-14 08:05:35 +02:00
bfd565aabd Hide visibility of classes
All checks were successful
Test And Build / Lint (push) Successful in 3s
Test And Build / Build (push) Successful in 15s
2025-08-12 09:20:25 +02:00
0005775c9d Updated turboPmac to 1.4.0 2025-08-12 09:18:37 +02:00
e5f9e33c66 Test to hide visibility 2025-08-12 08:09:36 +02:00
46b839cc66 Removed symbol visibility for turboPmac 2025-08-11 16:48:18 +02:00
10 changed files with 176 additions and 81 deletions

View File

@@ -42,4 +42,4 @@ DBDS += turboPmac/sinqMotor/src/sinqMotor.dbd
DBDS += turboPmac/src/turboPmac.dbd
DBDS += src/detectorTower.dbd
USR_CFLAGS += -Wall -Wextra -Weffc++ -Wunused-result -Wextra -Werror # -Wpedantic // Does not work because EPICS macros trigger warnings
USR_CFLAGS += -Wall -Wextra -Wunused-result -Wextra -Werror -fvisibility=hidden # -Wpedantic // Does not work because EPICS macros trigger warnings

138
README.md
View File

@@ -1,62 +1,107 @@
# detectorTower
## <span style="color:red">Please read the documentation of sinqMotor first: https://git.psi.ch/sinq-epics-modules/sinqmotor</span>
## <span style="color:red">Please read the documentation of sinqMotor first:https://git.psi.ch/sinq-epics-modules/sinqmotor</span>
## Overview
![Coordinate systems](images/CoordinateSystems.svg)
This is a driver for the detector tower which is based on the Turbo PMAC driver (https://gitea.psi.ch/lin-epics-modules/turboPmac). It consists of the following four objects:
- `detectorTowerController`: This is an expanded variant of `turboPmacController` provided by the Turbo PMAC library linked above.It is needed to operate a `detectorTowerAngleAxis`, but it can also be used to operate a "normal" `turboPmacAxis`.
- `detectorTowerAngleAxis`: This is a virtual axis which controls multiple physical motors ($x$ and $z$) in order to provide a combined movement. Moving it results in a rotation of the entire beam around the support axis position ($\alpha$).
- `detectorTowerLiftAxis`: This is a virtual axis which controls multiple physical motors in order to provide a combined movement. Moving it results in a vertical lift ($z_{lift}$).
- `detectorTowerSupportAxis`: This is an axis at the rotation center of the beam which is part of the combined movements. Its origin can be shifted manually for small adjustments, resulting in a corresponding movement. Other than that, it is not meant to move on its own, hence setting a new value to the `VAL` field of the motor record won't cause it to move.
This is a driver for the detector tower which is based on the Turbo PMAC driver
(https://gitea.psi.ch/lin-epics-modules/turboPmac). It consists of the following
four objects:
- `detectorTowerController`: This is an extended variant of `turboPmacController`
provided by the Turbo PMAC library linked above.It is needed to operate a
`detectorTowerAngleAxis`, but it can also be used to operate a "normal" `turboPmacAxis`.
- `detectorTowerAngleAxis`: This is a virtual axis which controls multiple
physical motors ($x$ and $z$) in order to provide a combined movement. Moving it
results in a rotation of the entire beam around the support axis position ($\alpha$).
- `detectorTowerLiftAxis`: This is a virtual axis which controls multiple
physical motors in order to provide a combined movement. Moving it results in a
vertical lift ($z_{lift}$).
- `detectorTowerSupportAxis`: This is an axis at the rotation center of the beam
which is part of the combined movements. Its origin can be shifted manually for
small adjustments, resulting in a corresponding movement. Other than that, it is
not meant to move on its own, hence setting a new value to the `VAL` field of
the motor record won't cause it to move.
## User guide
The centerpiece of this driver is the `detectorTowerAngleAxis`, which controls the angle of the detector flight tube. It is supported by two secondary axes, `detectorTowerLiftAxis` and `detectorTowerSupportAxis`. All three axes are created by a single IOC shell command `detectorTowerAxis` (see [Usage in IOC shell](#usage-in-ioc-shell)). All three axes use absolute encoders and therefore cannot perform a reference / home drive.
The centerpiece of this driver is the `detectorTowerAngleAxis`, which controls
the angle of the detector flight tube. It is supported by two secondary axes,
`detectorTowerLiftAxis` and `detectorTowerSupportAxis`. All three axes are
created by a single IOC shell command `detectorTowerAxis` (see
[Usage in IOC shell](#usage-in-ioc-shell)). All three axes use absolute encoders
and therefore cannot perform a reference / home drive.
The first two axes can be moved independently from each other or together as a combined movement by issuing both move orders within a certain time span. This time span can be configured via the IOC shell function `setDeferredMovementWait` and defaults to 100 ms. This allows the user to start a combined movement e.g. via caput:
The first two axes can be moved independently from each other or together as a
combined movement by issuing both move orders within a certain time span. This
time span can be configured via the IOC shell function `setDeferredMovementWait`
and defaults to 100 ms. This allows the user to start a combined movement e.g.
via caput:
```
```bash
caput $(ControllerPV):angle 2 & $(ControllerPV):caput lift 10
```
which moves the angle to 2 degree and shifts the entire beam vertically by 10 mm. When using the axis from NICOS, using the `maw` or `move` command with multiple devices has the same effect:
which moves the angle to 2 degree and shifts the entire beam vertically by 10 mm.
When using the axis from NICOS, using the `maw` or `move` command with multiple
devices has the same effect:
```
```bash
move("angle", 2, "lift", 10)
```
If one axis is already moving, no new move command can be issued until the movement is finished. The `detectorTowerSupportAxis` cannot be moved directly.
If one axis is already moving, no new move command can be issued until the
movement is finished. The `detectorTowerSupportAxis` cannot be moved directly.
It is possible to shift the origin of all three axes (and therefore also moving the `detectorTowerSupportAxis`) for small adjustments. The current origin position in the axis unit (degree for `detectorTowerAngleAxis`, mm for `detectorTowerLiftAxis` and encoder steps for `detectorTowerSupportAxis`) can be read from the PV `$(INSTR)$(M):Origin`. The origin can be shifted by the amount of axis units written to `$(INSTR)$(M):AdjustOrigin`. Since this is a relative movement, writing "10" two times to `$(INSTR)$(M):AdjustOrigin` shifts the origin by 20 axis units. Therefore, the limits are only there to prevent too large shifts during a single write (since the origin can be shifted to any position by writing to `$(INSTR)$(M):AdjustOrigin` repeatedly).
It is possible to shift the origin of all three axes (and therefore also moving
the `detectorTowerSupportAxis`) for small adjustments. The current origin
position in the axis unit (degree for `detectorTowerAngleAxis`, mm for
`detectorTowerLiftAxis` and encoder steps for `detectorTowerSupportAxis`) can be
read from the PV `$(INSTR)$(M):Origin`. The origin can be shifted by the amount
of axis units written to `$(INSTR)$(M):AdjustOrigin`. Since this is a relative
movement, writing "10" two times to `$(INSTR)$(M):AdjustOrigin` shifts the
origin by 20 axis units. Therefore, the limits are only there to prevent too
large shifts during a single write (since the origin can be shifted to any
position by writing to `$(INSTR)$(M):AdjustOrigin` repeatedly).
The detector tower can be moved into a so-called "changer position" by writing "1" to the PV `$(INSTR)$(M):ChangeState`. This causes the entire tower to move vertically down. When it is in the changer position, the axes cannot be moved at all. In order to go back to the "working state" where the axes can be moved again, write "0" to `$(INSTR)$(M):ChangeState`. The current state of the axis can be read out from `$(INSTR)$(M):ChangingStateRBV`. In case starting a change movement succeeds, `$(INSTR)$(M):ChangeStateRBV` changes its value accordingly, otherwise it stays at its current value.
The detector tower can be moved into a so-called "changer position" by writing
"1" to the PV `$(INSTR)$(M):ChangeState`. This causes the entire tower to move
vertically down. When it is in the changer position, the axes cannot be moved at
all. In order to go back to the "working state" where the axes can be moved
again, write "0" to `$(INSTR)$(M):ChangeState`. The current state of the axis
can be read out from `$(INSTR)$(M):ChangingStateRBV`. In case starting a change
movement succeeds, `$(INSTR)$(M):ChangeStateRBV` changes its value accordingly,
otherwise it stays at its current value.
The utilities provided in the `utils` folder in `turboPmac/utils` work with this driver as well.
The utilities provided in the `utils` folder in `turboPmac/utils` work with this
driver as well.
### Usage in IOC shell
detectorTower exports the following IOC shell functions:
- `detectorTowerController`: Create a new controller object.
- `detectorTowerAxis`: Create a `detectorTowerAngleAxis`, a `detectorTowerLiftAxis` and a `detectorTowerSupportAxis` object and link them to each other
- `detectorTowerAxis`: Create a `detectorTowerAngleAxis`, a `detectorTowerLiftAxis`
and a `detectorTowerSupportAxis` object and link them to each other
The constructor function for `detectorTowerAxis` has the following syntax:
```
```bash
detectorTowerAngleAxis("$(NAME)",1, 2, 3)
```
with 1 being the axis number / index of the `detectorTowerAngleAxis`, 2 being the `detectorTowerLiftAxis` and 3 being the `detectorTowerSupportAxis`. These axes are parametrized in the same way as any "normal" axes via a substitution file (see corresponding section below).
with 1 being the axis number / index of the `detectorTowerAngleAxis`, 2 being
the `detectorTowerLiftAxis` and 3 being the `detectorTowerSupportAxis`. These
axes are parametrized in the same way as any "normal" axes via a substitution
file (see corresponding section below).
"Normal" `turboPmacAxis` may be used together with this controller:
```
```bash
# Define the name of the controller and the corresponding port
epicsEnvSet("NAME","mcu")
epicsEnvSet("ASYN_PORT","p$(NAME)")
# Create the TCP/IP socket used to talk with the controller. The socket can be adressed from within the IOC shell via the port name
# Create the TCP/IP socket used to talk with the controller. The socket can beadressed from within the IOC shell via the port name
drvAsynIPPortConfigure("$(ASYN_PORT)","172.28.101.24:1025")
# Create the controller object with the defined name and connect it to the socket via the port name.
@@ -91,13 +136,17 @@ dbLoadRecords("$(sinqMotor_DB)/asynRecord.db","P=$(INSTR)$(NAME),PORT=$(ASYN_POR
### Substitution file
From the perspective of EPICS, the main detector flight tube axis and the auxiliary axes are independent axes and therefore each axis needs its own parametrization in the substitution file. If additional axes are used in the axis, they are parametrized as usual:
```
From the perspective of EPICS, the main detector flight tube axis and the
auxiliary axes are independent axes and therefore each axis needs its own
parametrization in the substitution file. If additional axes are used in the
axis, they are parametrized as usual:
```bash
detectorTowerAngleAxis("$(NAME)",1, 2, 3);
turboPmacAxis("$(NAME)",4);
turboPmacAxis("$(NAME)",5);
```
```
```bash
file "$(SINQDBPATH)"
{
pattern
@@ -110,22 +159,53 @@ pattern
}
```
Note that the speed of the detector tower axes 1, 2 and 3 cannot be set. Setting `CANSETSPEED` to 1 does not change this behaviour.
Note that the speed of the detector tower axes 1, 2 and 3 cannot be set. Setting
`CANSETSPEED` to 1 does not change this behaviour.
## Developer guide
### Code architecture
The code is designed around the `detectorTowerAngleAxis`, which controls the angle of the beam guide and acts as a "master" axis which contains pointers to its attached `detectorTowerLiftAxis` and `detectorTowerSupportAxis`. All three axes are polled at once via the function `detectorTowerController::pollDetectorAxes`, which is called from the individual `poll` functions of the axes (the `doPoll` mechanism from `sinqMotor` is not used). To avoid polling the axes multiple times during one controller cycle, the function `detectorTowerController::pollDetectorAxes` is only executed for the axis with the smallest index. Since this axis is polled first, the other two axes are therefore already up-to-date when they execute their own poll function. If one of the axes is moving, all three axes are marked as moving. The same is true for errors.
The code is designed around the `detectorTowerAngleAxis`, which controls the
angle of the beam guide and acts as a "master" axis which contains pointers to
its attached `detectorTowerLiftAxis` and `detectorTowerSupportAxis`. All three
axes are polled at once via the function `detectorTowerController::pollDetectorAxes`,
which is called from the individual `poll` functions of the axes (the `doPoll`
mechanism from `sinqMotor` is not used). To avoid polling the axes multiple
times during one controller cycle, the function `detectorTowerController::pollDetectorAxes`
is only executed for the axis with the smallest index. Since this axis is polled
first, the other two axes are therefore already up-to-date when they execute
their own poll function. If one of the axes is moving, all three axes are marked
as moving. The same is true for errors.
In order to save on movement time, movement commands to auxiliary axes and the `detectorTowerAngleAxis` are collected and then send as a single resulting movement command to the MCU. In order to do so, a "collector" thread is running which checks if a movement request has been send to one of the axes. If that is the case, it waits for `detectorTowerAngleAxis->deferredMovementWait_` seconds and checks if commands for other axes are given as well. Then, it calls `detectorTowerAngleAxis::startCombinedMove` which combines all commands to a single request which is sent to the MCU. `detectorTowerAngleAxis->deferredMovementWait_` can be set with the IOC shell function `setDeferredMovementWait` and defaults to 100 ms.
In order to save on movement time, movement commands to auxiliary axes and the
`detectorTowerAngleAxis` are collected and then send as a single resulting
movement command to the MCU. In order to do so, a "collector" thread is running
which checks if a movement request has been send to one of the axes. If that is
the case, it waits for `detectorTowerAngleAxis->deferredMovementWait_` seconds
and checks if commands for other axes are given as well. Then, it calls
`detectorTowerAngleAxis::startCombinedMove` which combines all commands to a
single request which is sent to the MCU.
`detectorTowerAngleAxis->deferredMovementWait_` can be set with the IOC shell
function `setDeferredMovementWait` and defaults to 100 ms.
The `detectorTowerController` is a thin wrapper around a `turboPmacController` which overwrites the `readInt32`, `writeInt32` and `writeFloat64` methods in order to support the additional PVs defined in `db/detectorTower.db`. Any calls to these two methods not concerning the aforementioned PVs are directly forwarded to `turboPmacController::readInt32` / `turboPmacController::writeInt32`.
The `detectorTowerController` is a thin wrapper around a `turboPmacController`
which overwrites the `readInt32`, `writeInt32` and `writeFloat64` methods in
order to support the additional PVs defined in `db/detectorTower.db`. Any calls
to these two methods not concerning the aforementioned PVs are directly
forwarded to `turboPmacController::readInt32` / `turboPmacController::writeInt32`.
### Versioning
Please see the documentation for the module sinqMotor: https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md.
Please see the documentation for the module sinqMotor:
https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md.
### How to build it
This driver can be compiled and installed by running `make install` from the same directory where the Makefile is located. However, since it uses the git submodule turboPmac, make sure that the correct version of the submodule repository is checked out AND the change is commited (`git status` shows no non-committed changes). Please see the section "Usage as static dependency" in https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md for more details.
This driver can be compiled and installed by running `make install` from the
same directory where the Makefile is located. However, since it uses the git
submodule turboPmac, make sure that the correct version of the submodule
repository is checked out AND the change is commited (`git status` shows no
non-committed changes). Please see the section "Usage as static dependency" in
https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md for more
details.

View File

@@ -34,17 +34,16 @@ static void deferredMovementCollectorLoop(void *drvPvt) {
detectorTowerAngleAxis *axis = (detectorTowerAngleAxis *)drvPvt;
while (1) {
if (axis->receivedTarget_) {
// Wait for 100 ms and then start the movement with the information
// available
axis->startingDeferredMovement_ = true;
// Wait for the time span defined in deferredMovementWait_ and then
// start the movement with the information available
epicsThreadSleep(axis->deferredMovementWait_);
axis->startCombinedMove();
// After the movement command has been send, reset the flag
axis->receivedTarget_ = false;
}
// Limit this loop to an idle frequency of 1 kHz
epicsThreadSleep(0.001);
// Limit this loop to an idle frequency of 10 kHz
epicsThreadSleep(0.01);
}
}
@@ -76,11 +75,10 @@ detectorTowerAngleAxis::detectorTowerAngleAxis(detectorTowerController *pC,
}
// Initialize all member variables
// Assumed to be not ready by default, this is overwritten in the next poll
error_ = 0;
waitingForStart_ = false;
receivedTarget_ = false;
startingDeferredMovement_ = false;
deferredMovementWait_ = 0.1; // seconds
deferredMovementWait_ = 0.5; // seconds
// Will be populated in the init() method
beamRadius_ = 0.0;
@@ -199,7 +197,7 @@ asynStatus detectorTowerAngleAxis::doMove(double position, int relative,
// started to the defined target position.
setTargetPosition(position * motorRecResolution);
receivedTarget_ = true;
waitingForStart_ = true;
return asynSuccess;
}
@@ -237,7 +235,6 @@ asynStatus detectorTowerAngleAxis::startCombinedMove() {
setAxisParamChecked(this, motorStatusProblem, true);
callParamCallbacks();
startingDeferredMovement_ = false;
return asynError;
}
@@ -293,9 +290,9 @@ asynStatus detectorTowerAngleAxis::stop(double acceleration) {
}
// Reset the deferred movement flags
startingDeferredMovement_ = false;
deferredMovementWait_ = false;
receivedTarget_ = false;
waitingForStart_ = false;
liftAxis()->waitingForStart_ = false;
return status;
}
@@ -422,8 +419,9 @@ asynStatus detectorTowerAngleAxis::doReset() {
getAxisParamChecked(this, positionStateRBV, &positionState);
// Reset the deferred movement flags
startingDeferredMovement_ = false;
deferredMovementWait_ = false;
receivedTarget_ = false;
waitingForStart_ = false;
liftAxis()->waitingForStart_ = false;
/*
Check which action should be performed:
@@ -552,11 +550,12 @@ static void configDetectorTowerCreateAxisCallFunc(const iocshArgBuf *args) {
// =============================================================================
/**
* @brief Set the setDeferredMovementWait (FFI implementation)
* @brief Set the setDeferredMovementWait time (FFI implementation)
*
* @param portName Name of the controller
* @param axisNo Axis number
* @param scaleMovTimeout Scaling factor (in seconds)
* @param deferredMovementWait Time (in seconds) the driver waits to collect
* all movement commands from the different axes
* @return asynStatus
*/
asynStatus setDeferredMovementWait(const char *portName, int axisNo,

View File

@@ -3,7 +3,7 @@
#include "detectorTowerController.h"
#include "turboPmacAxis.h"
class detectorTowerAngleAxis : public turboPmacAxis {
class HIDDEN detectorTowerAngleAxis : public turboPmacAxis {
public:
/**
* @brief Construct a new detectorTowerAngleAxis
@@ -136,15 +136,15 @@ class detectorTowerAngleAxis : public turboPmacAxis {
*/
detectorTowerSupportAxis *supportAxis() { return supportAxis_; }
/**
* @brief Return a pointer to the axis controller
*/
virtual detectorTowerController *pController() override { return pC_; };
// If true, either this axis or one of the detectorTowerLiftAxis
// attached to it received a movement command.
bool receivedTarget_;
// If set to true, the virtual axis is about to start a deferred movement
// (but is currently still collecting movement commands from its component
// axes)
bool startingDeferredMovement_;
/*
The collector cycle waits until this time in seconds has passed before
starting a deferred movement
@@ -157,10 +157,9 @@ class detectorTowerAngleAxis : public turboPmacAxis {
*/
int error_;
/**
* @brief Return a pointer to the axis controller
*/
virtual detectorTowerController *pController() override { return pC_; };
// True, if this axis has received a move command and the driver is
// currently starting a deferred movement.
bool waitingForStart_;
protected:
detectorTowerController *pC_;

View File

@@ -418,15 +418,14 @@ asynStatus detectorTowerController::pollDetectorAxes(
// Check if the tower is moving
if (notInPosition == 1 || positionState > 2) {
// By now, the controller has actually started the movement
angleAxis->startingDeferredMovement_ = false;
*moving = true;
// Since the tower is now moving, the axis by definition do not wait for
// movement start anymore.
liftAxis->waitingForStart_ = false;
angleAxis->waitingForStart_ = false;
} else {
if (angleAxis->startingDeferredMovement_) {
*moving = true;
} else {
*moving = false;
}
*moving = false;
}
// Calculate the lift position /w consideration of the angle
@@ -809,14 +808,26 @@ asynStatus detectorTowerController::pollDetectorAxes(
setAxisParamChecked(liftAxis, motorEnableRBV, true);
setAxisParamChecked(supportAxis, motorEnableRBV, true);
// Are the axes currently moving?
setAxisParamChecked(angleAxis, motorStatusMoving, *moving);
setAxisParamChecked(liftAxis, motorStatusMoving, *moving);
setAxisParamChecked(supportAxis, motorStatusMoving, *moving);
// If the axis is starting a movement, mark it as moving. Otherwise use the
// moving parameter.
if (angleAxis->waitingForStart_) {
setAxisParamChecked(angleAxis, motorStatusMoving, true);
setAxisParamChecked(angleAxis, motorStatusDone, false);
} else {
setAxisParamChecked(angleAxis, motorStatusMoving, *moving);
setAxisParamChecked(angleAxis, motorStatusDone, !(*moving));
}
// Is the axis movement done?
setAxisParamChecked(angleAxis, motorStatusDone, !(*moving));
setAxisParamChecked(liftAxis, motorStatusDone, !(*moving));
if (liftAxis->waitingForStart_) {
setAxisParamChecked(liftAxis, motorStatusMoving, true);
setAxisParamChecked(liftAxis, motorStatusDone, false);
} else {
setAxisParamChecked(liftAxis, motorStatusMoving, *moving);
setAxisParamChecked(liftAxis, motorStatusDone, !(*moving));
}
// Support axis status is solely deduced from system movement state
setAxisParamChecked(supportAxis, motorStatusMoving, *moving);
setAxisParamChecked(supportAxis, motorStatusDone, !(*moving));
// In which direction are the axes currently moving?

View File

@@ -13,11 +13,11 @@
// 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 HIDDEN detectorTowerAngleAxis;
class HIDDEN detectorTowerLiftAxis;
class HIDDEN detectorTowerSupportAxis;
class detectorTowerController : public turboPmacController {
class HIDDEN detectorTowerController : public turboPmacController {
public:
/**

View File

@@ -70,6 +70,9 @@ detectorTowerLiftAxis::detectorTowerLiftAxis(detectorTowerController *pC,
angleAxis_ = angleAxis;
angleAxis->liftAxis_ = this;
// Initialize the flag to false
waitingForStart_ = false;
}
detectorTowerLiftAxis::~detectorTowerLiftAxis(void) {
@@ -157,7 +160,6 @@ asynStatus detectorTowerLiftAxis::doMove(double position, int relative,
double min_velocity,
double max_velocity,
double acceleration) {
double motorRecResolution = 0.0;
getAxisParamChecked(this, motorRecResolution, &motorRecResolution);
@@ -166,7 +168,7 @@ asynStatus detectorTowerLiftAxis::doMove(double position, int relative,
// defined target position.
setTargetPosition(position * motorRecResolution);
angleAxis_->receivedTarget_ = true;
waitingForStart_ = true;
return asynSuccess;
}
@@ -222,4 +224,4 @@ asynStatus detectorTowerLiftAxis::adjustOrigin(double newOrigin) {
}
return status;
}
}

View File

@@ -3,7 +3,7 @@
#include "detectorTowerController.h"
#include "turboPmacAxis.h"
class detectorTowerLiftAxis : public turboPmacAxis {
class HIDDEN detectorTowerLiftAxis : public turboPmacAxis {
public:
/**
* @brief Construct a new detectorTowerAngleAxis
@@ -110,6 +110,10 @@ class detectorTowerLiftAxis : public turboPmacAxis {
*/
virtual detectorTowerController *pController() override { return pC_; };
// True, if this axis has received a move command and the driver is
// currently starting a deferred movement.
bool waitingForStart_;
protected:
detectorTowerController *pC_;
detectorTowerAngleAxis *angleAxis_;

View File

@@ -7,7 +7,7 @@
* @brief Passive axis which is mostly controlled indirectly by the hardware
*
*/
class detectorTowerSupportAxis : public turboPmacAxis {
class HIDDEN detectorTowerSupportAxis : public turboPmacAxis {
public:
/**
* @brief Construct a new detectorTowerSupportAxis