Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
26754e608d |
@ -100,20 +100,13 @@ asynStatus sinqAxis::poll(bool *moving) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The poll function is just a wrapper around doPoll and
|
/*
|
||||||
// handles mainly the callParamCallbacks() function. This wrapper is used
|
At the beginning of the poll, it is assumed that the axis has no status
|
||||||
// to make sure callParamCallbacks() is called in case of a premature
|
problems and therefore all error indicators are reset. This does not affect
|
||||||
// return.
|
the PVs until callParamCallbacks has been called!
|
||||||
poll_status = doPoll(moving);
|
|
||||||
|
|
||||||
// Check and update the watchdog
|
The motorStatusProblem_ field changes the motor record fields SEVR and STAT.
|
||||||
if (checkMovTimeoutWatchdog(*moving) != asynSuccess) {
|
*/
|
||||||
return asynError;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the poll status is ok, reset the error indicators in the parameter
|
|
||||||
// library
|
|
||||||
if (poll_status == asynSuccess) {
|
|
||||||
pl_status = setIntegerParam(pC_->motorStatusProblem_, false);
|
pl_status = setIntegerParam(pC_->motorStatusProblem_, false);
|
||||||
if (pl_status != asynSuccess) {
|
if (pl_status != asynSuccess) {
|
||||||
pC_->paramLibAccessFailed(pl_status, "motorStatusProblem_",
|
pC_->paramLibAccessFailed(pl_status, "motorStatusProblem_",
|
||||||
@ -124,12 +117,31 @@ asynStatus sinqAxis::poll(bool *moving) {
|
|||||||
pC_->paramLibAccessFailed(pl_status, "motorStatusCommsError_",
|
pC_->paramLibAccessFailed(pl_status, "motorStatusCommsError_",
|
||||||
__PRETTY_FUNCTION__, __LINE__);
|
__PRETTY_FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
pl_status = setStringParam(pC_->motorMessageText_, "");
|
pl_status = setStringParam(pC_->motorMessageText_, "");
|
||||||
if (pl_status != asynSuccess) {
|
if (pl_status != asynSuccess) {
|
||||||
return pC_->paramLibAccessFailed(pl_status, "motorMessageText_",
|
return pC_->paramLibAccessFailed(pl_status, "motorMessageText_",
|
||||||
__PRETTY_FUNCTION__, __LINE__);
|
__PRETTY_FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The poll function is just a wrapper around doPoll and
|
||||||
|
// handles mainly the callParamCallbacks() function. This wrapper is used
|
||||||
|
// to make sure callParamCallbacks() is called in case of a premature
|
||||||
|
// return.
|
||||||
|
poll_status = doPoll(moving);
|
||||||
|
|
||||||
|
// The poll did not succeed: Something went wrong and the motor has a status
|
||||||
|
// problem.
|
||||||
|
if (poll_status != asynSuccess) {
|
||||||
|
pl_status = setIntegerParam(pC_->motorStatusProblem_, true);
|
||||||
|
if (pl_status != asynSuccess) {
|
||||||
|
pC_->paramLibAccessFailed(pl_status, "motorStatusProblem_",
|
||||||
|
__PRETTY_FUNCTION__, __LINE__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check and update the watchdog
|
||||||
|
if (checkMovTimeoutWatchdog(*moving) != asynSuccess) {
|
||||||
|
return asynError;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl_status != asynSuccess) {
|
if (pl_status != asynSuccess) {
|
||||||
@ -490,8 +502,9 @@ asynStatus sinqAxis::checkMovTimeoutWatchdog(bool moving) {
|
|||||||
// Check the watchdog
|
// Check the watchdog
|
||||||
asynPrint(pC_->pasynUserSelf, ASYN_TRACE_ERROR,
|
asynPrint(pC_->pasynUserSelf, ASYN_TRACE_ERROR,
|
||||||
"%s => line %d:\nAxis %d exceeded the expected arrival time "
|
"%s => line %d:\nAxis %d exceeded the expected arrival time "
|
||||||
"(%ld).\n",
|
"%ld (current time is %ld).\n",
|
||||||
__PRETTY_FUNCTION__, __LINE__, axisNo_, expectedArrivalTime_);
|
__PRETTY_FUNCTION__, __LINE__, axisNo_, expectedArrivalTime_,
|
||||||
|
time(NULL));
|
||||||
|
|
||||||
pl_status = setStringParam(
|
pl_status = setStringParam(
|
||||||
pC_->motorMessageText_,
|
pC_->motorMessageText_,
|
||||||
|
Reference in New Issue
Block a user