Fully-featured version of the masterMACS driver
This commit is contained in:
@@ -70,7 +70,7 @@ class masterMacsAxis : public sinqAxis {
|
||||
double max_velocity, double acceleration);
|
||||
|
||||
/**
|
||||
* @brief Implementation of the `atFirstPoll` function from sinqAxis.
|
||||
* @brief Readout of some values from the controller at IOC startup
|
||||
*
|
||||
* The following steps are performed:
|
||||
* - Read out the motor status, motor position, velocity and acceleration
|
||||
@@ -79,7 +79,7 @@ class masterMacsAxis : public sinqAxis {
|
||||
*
|
||||
* @return asynStatus
|
||||
*/
|
||||
asynStatus atFirstPoll();
|
||||
asynStatus init();
|
||||
|
||||
/**
|
||||
* @brief Enable / disable the axis.
|
||||
@@ -100,9 +100,10 @@ class masterMacsAxis : public sinqAxis {
|
||||
protected:
|
||||
masterMacsController *pC_;
|
||||
double lastSetSpeed_;
|
||||
bool waitForHandshake_;
|
||||
time_t timeAtHandshake_;
|
||||
|
||||
asynStatus readConfig();
|
||||
bool initial_poll_;
|
||||
|
||||
/*
|
||||
The axis status and axis error of MasterMACS are given as an integer from
|
||||
@@ -134,10 +135,7 @@ class masterMacsAxis : public sinqAxis {
|
||||
*/
|
||||
bool switchedOn() { return axisStatus_[1]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisStatus_
|
||||
*/
|
||||
bool enabled() { return axisStatus_[2]; }
|
||||
// Bit 2 is unused
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisStatus_
|
||||
@@ -162,12 +160,9 @@ class masterMacsAxis : public sinqAxis {
|
||||
/**
|
||||
* @brief Read the property from axisStatus_
|
||||
*/
|
||||
bool newMoveCommandWhileMoving() { return axisStatus_[7]; }
|
||||
bool warning() { return axisStatus_[7]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisStatus_
|
||||
*/
|
||||
bool isMoving() { return axisStatus_[8]; }
|
||||
// Bit 8 is unused
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisStatus_
|
||||
@@ -209,6 +204,76 @@ class masterMacsAxis : public sinqAxis {
|
||||
boolean.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool shortCircuit() { return axisError_[1]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool encoderError() { return axisError_[2]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool followingError() { return axisError_[3]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool communicationError() { return axisError_[4]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool feedbackError() { return axisError_[5]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool positiveLimitSwitch() { return axisError_[6]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool negativeLimitSwitch() { return axisError_[7]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool positiveSoftwareLimit() { return axisError_[8]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool negativeSoftwareLimit() { return axisError_[9]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool overCurrent() { return axisError_[10]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool overTemperature() { return axisError_[11]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool overVoltage() { return axisError_[12]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool underVoltage() { return axisError_[13]; }
|
||||
|
||||
/**
|
||||
* @brief Read the property from axisError_
|
||||
*/
|
||||
bool stoFault() { return axisError_[15]; }
|
||||
|
||||
private:
|
||||
friend class masterMacsController;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user