From 648602f1973abf864e84ddb9f9add7e7e9e3105d Mon Sep 17 00:00:00 2001 From: MarkRivers Date: Tue, 5 Apr 2011 02:02:45 +0000 Subject: [PATCH] Remove global variables for setPosSleepTime and doSetPosition; now variables in XPSController class, can be set by iocsh calls; added XPS-specific profile parameters --- motorApp/NewportSrc/XPSController.h | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/motorApp/NewportSrc/XPSController.h b/motorApp/NewportSrc/XPSController.h index 6503d3d3..e64104d9 100644 --- a/motorApp/NewportSrc/XPSController.h +++ b/motorApp/NewportSrc/XPSController.h @@ -11,11 +11,17 @@ USAGE... Newport XPS EPICS asyn motor device driver #include "XPSAxis.h" #define XPS_MAX_AXES 8 +#define TCP_TIMEOUT 2.0 // drvInfo strings for extra parameters that the XPS controller supports -#define XPSMinJerkString "XPS_MIN_JERK" -#define XPSMaxJerkString "XPS_MAX_JERK" -#define XPSStatusString "XPS_STATUS" +#define XPSMinJerkString "XPS_MIN_JERK" +#define XPSMaxJerkString "XPS_MAX_JERK" +#define XPSProfileMaxVelocityString "XPS_PROFILE_MAX_VELOCITY" +#define XPSProfileMaxAccelerationString "XPS_PROFILE_MAX_ACCELERATION" +#define XPSProfileMinPositionString "XPS_PROFILE_MIN_POSITION" +#define XPSProfileMaxPositionString "XPS_PROFILE_MAX_POSITION" +#define XPSTrajectoryFileString "XPS_TRAJECTORY_FILE" +#define XPSStatusString "XPS_STATUS" class XPSController : public asynMotorController { @@ -39,17 +45,30 @@ class XPSController : public asynMotorController { /* Deferred moves functions.*/ asynStatus processDeferredMoves(); asynStatus processDeferredMovesInGroup(char * groupName); + asynStatus enableSetPosition(int enable); + asynStatus setPositionSettlingTime(double sleepTime); protected: XPSAxis **pAxes_; /**< Array of pointers to axis objects */ - int XPSMinJerk_; #define FIRST_XPS_PARAM XPSMinJerk_ + int XPSMinJerk_; int XPSMaxJerk_; + int XPSProfileMaxVelocity_; + int XPSProfileMaxAcceleration_; + int XPSProfileMinPosition_; + int XPSProfileMaxPosition_; + int XPSTrajectoryFile_; int XPSStatus_; #define LAST_XPS_PARAM XPSStatus_ private: + int enableSetPosition_; /**< This is controlled via the XPSEnableSetPosition function (available via the IOC shell). */ + + /** Parameter to control the sleep time used when setting position. + * A function called XPSSetPositionSettlingTime(XPS, int) (millisec parameter) + * is available in the IOC shell to control this. */ + double setPositionSettlingTime_; char *IPAddress_; int IPPort_; char *ftpUsername_;