- Reduced poll rate of EL737

- Removed unneeded hardware limit reading code from EL734
This commit is contained in:
2023-02-16 14:29:05 +01:00
parent 9b9072b83b
commit 3c9932dc18
2 changed files with 17 additions and 1 deletions

View File

@ -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_);

View File

@ -566,7 +566,7 @@ static void el737Thread(void *param)
*/
runEvents(priv);
if(priv->counting == 1){
timeout = .1;
timeout = .2;
}
} else {
/*