Fixed endless loop when communication times out and added
diagnostics.
This commit is contained in:
@@ -161,7 +161,15 @@ asynStatus turboPmacAxis::init() {
|
||||
axisNo_, axisNo_, axisNo_, axisNo_, axisNo_);
|
||||
status = pC_->writeRead(axisNo_, command, response, 6);
|
||||
if (status != asynSuccess) {
|
||||
return status;
|
||||
asynPrint(
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nCould not communicate "
|
||||
"with controller during IOC initialization. Check if you used "
|
||||
"\"pmacAsynIPPortConfigure\" instead of the standard "
|
||||
"\"drvAsynIPPortConfigure\" function in the .cmd file in order to "
|
||||
"create the port driver.\nTerminating IOC.\n",
|
||||
pC_->portName, axisNo(), __PRETTY_FUNCTION__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
nvals = sscanf(response, "%d %lf %lf %lf %lf %d", &axStatus, &motorPos,
|
||||
&motorVmax, &motorVelocity, &motorAccel, &acoDelay);
|
||||
|
||||
Reference in New Issue
Block a user