Closed mark0n closed 9 years ago
Hi Martin,
The setStringParam problem is my fault. I've been developing against a newer version of the motor module. The R6-8 (and R6-8-1, which is only a bug fix version) are too old for this driver. I've been told R6-9 should be out soon. The change required is to asynMotorAxis.h and .cpp:
[mkp@bl99-dassrv1 MotorSrc]$ git diff 7519318a947a94cfe4afece0ea6bfcbeda2b42ad fc0d5679a8f9eb92c411c97f8a182e6ecf4a9301
diff --git a/motorApp/MotorSrc/asynMotorAxis.cpp b/motorApp/MotorSrc/asynMotorAxis.cpp
index f83bf20..eacf63e 100644
--- a/motorApp/MotorSrc/asynMotorAxis.cpp
+++ b/motorApp/MotorSrc/asynMotorAxis.cpp
@@ -282,6 +282,16 @@ asynStatus asynMotorAxis::setDoubleParam(int function, double value)
return pC_->setDoubleParam(axisNo_, function, value);
}
+/**
+ * Sets the value for a string for this axis in the parameter library.
+ * \param[in] function The function (parameter) number
+ * \param[in] value Value to set */
+asynStatus asynMotorAxis::setStringParam(int function, const char *value)
+{
+ // Call the base class method
+ return pC_->setStringParam(axisNo_, function, value);
+}
+
/** Calls the callbacks for any parameters that have changed for this axis in the parameter library.
diff --git a/motorApp/MotorSrc/asynMotorAxis.h b/motorApp/MotorSrc/asynMotorAxis.h
index 4b22e85..7cc2c62 100644
--- a/motorApp/MotorSrc/asynMotorAxis.h
+++ b/motorApp/MotorSrc/asynMotorAxis.h
@@ -25,6 +25,7 @@ class epicsShareFunc asynMotorAxis {
virtual asynStatus setIntegerParam(int index, int value);
virtual asynStatus setDoubleParam(int index, double value);
+ virtual asynStatus setStringParam(int index, const char *value);
virtual void report(FILE *fp, int details);
virtual asynStatus callParamCallbacks();
motor R6-9 will also contain a bug fix to asyn motor device support. Doing a set position was failing in some cases, due to the encoder ratio not always being set properly.
I also see some 'set but not used' warnings in the above printout. I've fixed those. I suspect you saw a few similar warnings from a lot of the motor support module?
Are you able to apply the patch to asynMotorAxis? If not, I can modify this driver to work with motor 6-8.
I'm running into problems compiling the code:
Note that
setIntegerParam
works because it got inherited from classasynMotorAxis
. I don't know ifp6kAxis
also (or instead?) needs to inherit fromasynPortDriver
...