From ca5f16f6631c85630c7ede1844926f687f099341 Mon Sep 17 00:00:00 2001 From: kmpeters Date: Mon, 10 Jun 2013 20:22:42 +0000 Subject: [PATCH] Added status PV to hexapod support --- motorApp/Db/HXP_extra.db | 9 +++++++++ motorApp/NewportSrc/HXPDriver.cpp | 3 ++- motorApp/NewportSrc/HXPDriver.h | 5 +++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/motorApp/Db/HXP_extra.db b/motorApp/Db/HXP_extra.db index 076bcc87..d9d273e9 100644 --- a/motorApp/Db/HXP_extra.db +++ b/motorApp/Db/HXP_extra.db @@ -9,3 +9,12 @@ grecord(mbbo,"$(P)$(R)CS") { field(VAL, "0") field(PINI, "YES") } + +grecord(ai,"$(P)$(R)STATUS") { + field(DESC,"HXP Group Status") + field(DTYP, "asynInt32") + field(PINI, "1") + field(PREC,"0") + field(SCAN, "I/O Intr") + field(INP,"@asyn($(PORT),$(CHAN))HXP_STATUS") +} diff --git a/motorApp/NewportSrc/HXPDriver.cpp b/motorApp/NewportSrc/HXPDriver.cpp index c13817b5..65df832c 100644 --- a/motorApp/NewportSrc/HXPDriver.cpp +++ b/motorApp/NewportSrc/HXPDriver.cpp @@ -56,6 +56,7 @@ HXPController::HXPController(const char *portName, const char *IPAddress, int IP IPPort_ = IPPort; createParam(HXPMoveCoordSysString, asynParamInt32, &HXPMoveCoordSys_); + createParam(HXPStatusString, asynParamInt32, &HXPStatus_); // This socket is used for polling by the controller and all axes pollSocket_ = HXPTCP_ConnectToServer((char *)IPAddress, IPPort, HXP_POLL_TIMEOUT); @@ -336,7 +337,7 @@ asynStatus HXPAxis::poll(bool *moving) "%s:%s: [%s,%d]: %s axisStatus=%d\n", driverName, functionName, pC_->portName, axisNo_, positionerName_, axisStatus_); /* Set the status */ - //setIntegerParam(pC_->HXPStatus_, axisStatus_); + setIntegerParam(pC_->HXPStatus_, axisStatus_); /* If the group is not moving then the axis is not moving */ if ((axisStatus_ < 43) || (axisStatus_ > 48)) diff --git a/motorApp/NewportSrc/HXPDriver.h b/motorApp/NewportSrc/HXPDriver.h index fac1d817..9f253d85 100644 --- a/motorApp/NewportSrc/HXPDriver.h +++ b/motorApp/NewportSrc/HXPDriver.h @@ -13,6 +13,7 @@ USAGE... Motor driver support for the Newport Hexapod controller. // drvInfo strings for extra parameters that the HXP controller supports #define HXPMoveCoordSysString "HXP_MOVE_COORD_SYS" +#define HXPStatusString "HXP_STATUS" class HXPAxis : public asynMotorAxis { @@ -52,7 +53,8 @@ public: protected: #define FIRST_HXP_PARAM HXPMoveCoordSys_ int HXPMoveCoordSys_; - #define LAST_HXP_PARAM HXPMoveCoordSys_ + int HXPStatus_; + #define LAST_HXP_PARAM HXPStatus_ #define NUM_HXP_PARAMS ((int) (&LAST_HXP_PARAM - &FIRST_HXP_PARAM + 1)) @@ -64,7 +66,6 @@ private: //int moveSocket_; char firmwareVersion_[100]; char *axisNames_; - int HXPStatus_; int noDisableError_; friend class HXPAxis;