59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
/*
|
|
FILENAME... EL734Driver.h
|
|
USAGE... Motor driver support for the PSI EL734 controller.
|
|
|
|
Mark Koennecke
|
|
February 2013
|
|
|
|
*/
|
|
|
|
#include "SINQController.h"
|
|
#include "SINQAxis.h"
|
|
|
|
#define MAX_EL734_AXES 12
|
|
#define COMLEN 80
|
|
|
|
class EL734Axis : public SINQAxis
|
|
{
|
|
public:
|
|
/* These are the methods we override from the base class */
|
|
EL734Axis(class EL734Controller *pC, int axis);
|
|
void report(FILE *fp, int level);
|
|
asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration);
|
|
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 poll(bool *moving);
|
|
asynStatus setPosition(double position);
|
|
asynStatus setClosedLoop(bool closedLoop);
|
|
|
|
private:
|
|
EL734Controller *pC_; /**< Pointer to the asynMotorController to which this axis belongs.
|
|
* Abbreviated because it is used very frequently */
|
|
int oredMSR;
|
|
double position;
|
|
int homing;
|
|
time_t next_poll;
|
|
int errorReported;
|
|
|
|
friend class EL734Controller;
|
|
};
|
|
|
|
class EL734Controller : public SINQController {
|
|
public:
|
|
EL734Controller(const char *portName, const char *EL734PortName, int numAxes);
|
|
|
|
void report(FILE *fp, int level);
|
|
EL734Axis* getAxis(asynUser *pasynUser);
|
|
EL734Axis* getAxis(int axisNo);
|
|
|
|
friend class EL734Axis;
|
|
private:
|
|
asynUser *pasynUserController_;
|
|
|
|
asynStatus transactController(int axis, char command[COMLEN], char reply[COMLEN]);
|
|
|
|
void switchRemote();
|
|
|
|
};
|