Add a set PV for the SeleneMotor

- make the number of extra parameters in SINQController configurable
    - add database entry for the motor set field
    - add the new function "setMotorPosition_" to the Selene controller
    - execute Qx59=<pos> to set the new position
This commit is contained in:
michele-brambilla
2020-02-17 11:10:02 +01:00
parent 3b7133ecfe
commit c4fe45c0cb
8 changed files with 411 additions and 27 deletions

View File

@@ -10,6 +10,9 @@
* Modified to use the MsgTxt field for SINQ
*
* Mark Koennecke, January 2019
*
* EXtended with special motor axis for the Selene
* guide, Mark Koennecke, February 2020
********************************************/
#ifndef pmacAxis_H
@@ -19,6 +22,7 @@
#include "SINQAxis.h"
class pmacController;
class SeleneController;
class pmacAxis : public SINQAxis
{
@@ -76,4 +80,49 @@ class pmacHRPTAxis : public pmacAxis
};
class SeleneAxis : public pmacAxis
{
public:
SeleneAxis(SeleneController *pController, int axisNo, double limitTarget) : pmacAxis((pmacController *)pController,axisNo)
{
this->limitTarget = limitTarget;
};
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
asynStatus setPosition(double position);
asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards);
protected:
friend class SeleneController;
friend class pmacController;
private:
double limitTarget;
};
/*
Yet another special set of motors for the Selene Guide at AMOR. Each segment can be lifted or tilted. This is
two motors. One acts as a slave and only writes a new target, the other also sets a new target and sends the
actual movement command. Both motors are coordianted in the motor controller in order to avoid tension on
the guide elements. This gaves rise to the function code LIFTSLAVE and LIFTMASTER.
In another mode the whole guide can be lifted or tilted. Then motor 1 and 6 get new values and one of them
sends the drive command. This causes all 6 motors to drive synchronously to their new targets. This is
implemented through the LIFTSEGMENT function code.
Mark Koennecke, February 2020
*/
class LiftAxis : public pmacAxis
{
public:
LiftAxis(pmacController *pController, int axisNo) : pmacAxis((pmacController *)pController,axisNo) {};
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
asynStatus poll(bool *moving);
asynStatus stop(double acceleration);
private:
int waitStart;
};
#endif /* pmacAxis_H */