|
|
@ -18,21 +18,23 @@
|
|
|
|
#ifndef pmacAxis_H
|
|
|
|
#ifndef pmacAxis_H
|
|
|
|
#define pmacAxis_H
|
|
|
|
#define pmacAxis_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "SINQController.h"
|
|
|
|
|
|
|
|
#include "SINQAxis.h"
|
|
|
|
#include "SINQAxis.h"
|
|
|
|
|
|
|
|
#include "SINQController.h"
|
|
|
|
|
|
|
|
|
|
|
|
class pmacController;
|
|
|
|
class pmacController;
|
|
|
|
class SeleneController;
|
|
|
|
class SeleneController;
|
|
|
|
|
|
|
|
|
|
|
|
class pmacAxis : public SINQAxis
|
|
|
|
class pmacAxis : public SINQAxis {
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
/* These are the methods we override from the base class */
|
|
|
|
/* These are the methods we override from the base class */
|
|
|
|
pmacAxis(pmacController *pController, int axisNo, bool enable = true);
|
|
|
|
pmacAxis(pmacController *pController, int axisNo, bool enable = true);
|
|
|
|
virtual ~pmacAxis();
|
|
|
|
virtual ~pmacAxis();
|
|
|
|
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration);
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards);
|
|
|
|
asynStatus moveVelocity(double min_velocity, double max_velocity,
|
|
|
|
|
|
|
|
double acceleration);
|
|
|
|
|
|
|
|
asynStatus home(double min_velocity, double max_velocity,
|
|
|
|
|
|
|
|
double acceleration, int forwards);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus setPosition(double position);
|
|
|
|
asynStatus setPosition(double position);
|
|
|
@ -71,13 +73,14 @@ protected:
|
|
|
|
friend class pmacV3Controller;
|
|
|
|
friend class pmacV3Controller;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/*--------------------------------------------------------------------------------------------*/
|
|
|
|
/*--------------------------------------------------------------------------------------------*/
|
|
|
|
class SeleneAxis : public pmacAxis
|
|
|
|
class SeleneAxis : public pmacAxis {
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
SeleneAxis(SeleneController *pController, int axisNo, double limitTarget);
|
|
|
|
SeleneAxis(SeleneController *pController, int axisNo, double limitTarget);
|
|
|
|
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
asynStatus setPosition(double position);
|
|
|
|
asynStatus setPosition(double position);
|
|
|
|
asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards);
|
|
|
|
asynStatus home(double min_velocity, double max_velocity,
|
|
|
|
|
|
|
|
double acceleration, int forwards);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
protected:
|
|
|
|
friend class SeleneController;
|
|
|
|
friend class SeleneController;
|
|
|
@ -86,18 +89,20 @@ class SeleneAxis : public pmacAxis
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
double limitTarget;
|
|
|
|
double limitTarget;
|
|
|
|
asynStatus getSeleneAxisInitialStatus(void);
|
|
|
|
asynStatus getSeleneAxisInitialStatus(void);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
Yet another special set of motors for the Selene Guide at AMOR. Each segment can be lifted or tilted. This is
|
|
|
|
Yet another special set of motors for the Selene Guide at AMOR. Each segment
|
|
|
|
two motors. One acts as a slave and only writes a new target, the other also sets a new target and sends the
|
|
|
|
can be lifted or tilted. This is two motors. One acts as a slave and only
|
|
|
|
actual movement command. Both motors are coordianted in the motor controller in order to avoid tension on
|
|
|
|
writes a new target, the other also sets a new target and sends the actual
|
|
|
|
the guide elements. This gaves rise to the function code LIFTSLAVE and LIFTMASTER.
|
|
|
|
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
|
|
|
|
In another mode the whole guide can be lifted or tilted. Then motor 1 and 6
|
|
|
|
sends the drive command. This causes all 6 motors to drive synchronously to their new targets. This is
|
|
|
|
get new values and one of them sends the drive command. This causes all 6
|
|
|
|
implemented through the LIFTSEGMENT function code.
|
|
|
|
motors to drive synchronously to their new targets. This is implemented
|
|
|
|
|
|
|
|
through the LIFTSEGMENT function code.
|
|
|
|
|
|
|
|
|
|
|
|
Mark Koennecke, February 2020
|
|
|
|
Mark Koennecke, February 2020
|
|
|
|
|
|
|
|
|
|
|
@ -106,13 +111,21 @@ class SeleneAxis : public pmacAxis
|
|
|
|
Michele Brambilla, February 2020
|
|
|
|
Michele Brambilla, February 2020
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class LiftAxis : public pmacAxis
|
|
|
|
class LiftAxis : public pmacAxis {
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
LiftAxis(pmacController *pController, int axisNo) : pmacAxis((pmacController *)pController,axisNo) {};
|
|
|
|
/*
|
|
|
|
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
|
|
|
|
The default constructor of LiftAxis just forwards to the pmacAxis
|
|
|
|
|
|
|
|
constructor, which has an optional argument "autoenable" with the default
|
|
|
|
|
|
|
|
value "true". However, we want that argument to be false, hence we provide
|
|
|
|
|
|
|
|
an explicit constructor.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
LiftAxis(pmacController *pController, int axisNo)
|
|
|
|
|
|
|
|
: pmacAxis((pmacController *)pController, axisNo, false) {};
|
|
|
|
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
int waitStart;
|
|
|
|
int waitStart;
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -125,12 +138,12 @@ class LiftAxis : public pmacAxis
|
|
|
|
|
|
|
|
|
|
|
|
class pmacV3Axis : public pmacAxis {
|
|
|
|
class pmacV3Axis : public pmacAxis {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
pmacV3Axis(pmacController *pController, int axisNo);
|
|
|
|
pmacV3Axis(pmacController *pController, int axisNo);
|
|
|
|
|
|
|
|
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
protected:
|
|
|
|
int IsEnable;
|
|
|
|
int IsEnable;
|
|
|
|
double Speed;
|
|
|
|
double Speed;
|
|
|
@ -142,22 +155,20 @@ public:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------------------------*/
|
|
|
|
/*----------------------------------------------------------------------------------------------*/
|
|
|
|
class pmacHRPTAxis : public pmacV3Axis
|
|
|
|
class pmacHRPTAxis : public pmacV3Axis {
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
pmacHRPTAxis(pmacController *pController, int axisNo) : pmacV3Axis(pController,axisNo) {};
|
|
|
|
pmacHRPTAxis(pmacController *pController, int axisNo)
|
|
|
|
|
|
|
|
: pmacV3Axis(pController, axisNo) {};
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Override getAxisStatus in order to read the special parameter indicating a
|
|
|
|
* Override getAxisStatus in order to read the special parameter indicating
|
|
|
|
* slit blade crash at HRPT
|
|
|
|
* a slit blade crash at HRPT
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
asynStatus getAxisStatus(bool *moving);
|
|
|
|
asynStatus getAxisStatus(bool *moving);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
protected:
|
|
|
|
friend class pmacController;
|
|
|
|
friend class pmacController;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Special motors for the AMOR detector movement. The whole
|
|
|
|
* Special motors for the AMOR detector movement. The whole
|
|
|
|
* command set is different but on a pmac controller. This implements
|
|
|
|
* command set is different but on a pmac controller. This implements
|
|
|
@ -178,8 +189,10 @@ public:
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration);
|
|
|
|
asynStatus moveVelocity(double min_velocity, double max_velocity,
|
|
|
|
asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards);
|
|
|
|
double acceleration);
|
|
|
|
|
|
|
|
asynStatus home(double min_velocity, double max_velocity,
|
|
|
|
|
|
|
|
double acceleration, int forwards);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus setPosition(double position);
|
|
|
|
asynStatus setPosition(double position);
|
|
|
|
|
|
|
|
|
|
|
@ -191,11 +204,11 @@ protected:
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------------------------*/
|
|
|
|
/*----------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GirderAxis : public pmacV3Axis {
|
|
|
|
class GirderAxis : public pmacV3Axis {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
GirderAxis(pmacController *pController, int axisNo);
|
|
|
|
GirderAxis(pmacController *pController, int axisNo);
|
|
|
|
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
|
|
|
|
asynStatus move(double position, int relative, double min_velocity,
|
|
|
|
|
|
|
|
double max_velocity, double acceleration);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus stop(double acceleration);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
asynStatus poll(bool *moving);
|
|
|
|
|
|
|
|
|
|
|
|