diff --git a/sinqEPICSApp/src/EL734Driver.cpp b/sinqEPICSApp/src/EL734Driver.cpp index 476cddb..aa9eb3e 100644 --- a/sinqEPICSApp/src/EL734Driver.cpp +++ b/sinqEPICSApp/src/EL734Driver.cpp @@ -231,6 +231,7 @@ EL734Axis::EL734Axis(EL734Controller *pC, int axisNo) if(count >= 2){ pC_->setDoubleParam(axisNo_,pC_->motorLowLimit_,low); pC_->setDoubleParam(axisNo_,pC_->motorHighLimit_,high); + callParamCallbacks(); } else { errlogPrintf("Bad response - %s - requesting limits at axis %d", reply, axisNo_); } @@ -267,6 +268,8 @@ asynStatus EL734Axis::move(double position, int relative, double minVelocity, do // status = sendAccelAndVelocity(acceleration, maxVelocity); + errlogPrintf("minVelocity = %f, maxVelocity = %f\n", minVelocity, maxVelocity); + if (relative) { position += this->position; } @@ -377,6 +380,7 @@ asynStatus EL734Axis::setClosedLoop(bool closedLoop) asynStatus EL734Axis::poll(bool *moving) { int msr, count; + float low, high; asynStatus comStatus = asynSuccess; char command[COMLEN], reply[COMLEN], errTxt[256]; @@ -386,6 +390,18 @@ asynStatus EL734Axis::poll(bool *moving) return asynSuccess; } + // read hardware limits + sprintf(command,"H %d",axisNo_); + comStatus = pC_->transactController(axisNo_,command,reply); + if(comStatus == asynSuccess){ + count = sscanf(reply,"%f %f",&low, &high); + if(count >= 2){ + pC_->setDoubleParam(axisNo_,pC_->motorLowLimit_,low); + pC_->setDoubleParam(axisNo_,pC_->motorHighLimit_,high); + callParamCallbacks(); + } + } + // Read the current motor position setIntegerParam(pC_->motorStatusProblem_,false); sprintf(command,"u %d", axisNo_); diff --git a/sinqEPICSApp/src/devScalerEL737.c b/sinqEPICSApp/src/devScalerEL737.c index 41be81c..4724db2 100644 --- a/sinqEPICSApp/src/devScalerEL737.c +++ b/sinqEPICSApp/src/devScalerEL737.c @@ -566,7 +566,7 @@ static void el737Thread(void *param) */ runEvents(priv); if(priv->counting == 1){ - timeout = .1; + timeout = .2; } } else { /*