Added a driver for the phytron MCC-2 motor controller. It now works against the
simulation.
This commit is contained in:
56
sinqEPICSApp/src/PhytronDriver.h
Normal file
56
sinqEPICSApp/src/PhytronDriver.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
FILENAME... PhytronDriver.h
|
||||
USAGE... Motor driver support for the Phytron MCC-2 motor controller.
|
||||
|
||||
Mark Koennecke
|
||||
September 2016
|
||||
|
||||
*/
|
||||
|
||||
#include "asynMotorController.h"
|
||||
#include "asynMotorAxis.h"
|
||||
|
||||
#define COMLEN 80
|
||||
|
||||
class PhytronAxis : public asynMotorAxis
|
||||
{
|
||||
public:
|
||||
/* These are the methods we override from the base class */
|
||||
PhytronAxis(class PhytronController *pC, int axis, int enc);
|
||||
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:
|
||||
char phytronChar;
|
||||
PhytronController *pC_; /**< Pointer to the asynMotorController to which this axis belongs.
|
||||
* Abbreviated because it is used very frequently */
|
||||
double position;
|
||||
int homing;
|
||||
time_t next_poll;
|
||||
int encoder;
|
||||
|
||||
friend class PhytronController;
|
||||
};
|
||||
|
||||
class PhytronController : public asynMotorController {
|
||||
public:
|
||||
PhytronController(const char *portName, const char *PhytronPortName, int encX, int encY);
|
||||
|
||||
void report(FILE *fp, int level);
|
||||
PhytronAxis* getAxis(asynUser *pasynUser);
|
||||
PhytronAxis* getAxis(int axisNo);
|
||||
|
||||
friend class PhytronAxis;
|
||||
private:
|
||||
asynUser *pasynUserController_;
|
||||
|
||||
asynStatus transactController(char command[COMLEN], char reply[COMLEN]);
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user