Updated sinqMotor to 1.3.0
This commit is contained in:
Submodule sinqMotor updated: 55a9fe6f3e...1910eda0b1
@@ -265,6 +265,11 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
// Was the axis idle during the previous poll?
|
||||
int previousStatusDone = 1;
|
||||
|
||||
if (axisNo() == 1) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR, "START POLL: at %lli\n",
|
||||
timeInMilliseconds());
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
|
||||
if (pTurboPmacA_->needInit) {
|
||||
@@ -378,6 +383,15 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
// Store the axis status
|
||||
pTurboPmacA_->axisStatus = axStatus;
|
||||
|
||||
// if (axStatus == -3 || axStatus == -5) {
|
||||
if (axisNo() == 1) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"POLL: Axis status %i at %lli\n", axStatus,
|
||||
timeInMilliseconds());
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
// Update the enablement PV
|
||||
setAxisParamChecked(this, motorEnableRBV,
|
||||
(axStatus != -3 && axStatus != -5));
|
||||
@@ -1115,6 +1129,9 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
}
|
||||
}
|
||||
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR, "Sending enable %i at %lli\n",
|
||||
on, timeInMilliseconds());
|
||||
|
||||
// Enable / disable the axis if it is not moving
|
||||
snprintf(command, sizeof(command), "M%2.2d14=%d", axisNo_, on);
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
@@ -1134,7 +1151,7 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
while (time(NULL) < startTime + timeout_enable_disable) {
|
||||
|
||||
// Read the axis status
|
||||
usleep(100000);
|
||||
// usleep(100000);
|
||||
status = pC_->writeRead(axisNo_, command, response, 1);
|
||||
if (status != asynSuccess) {
|
||||
return status;
|
||||
@@ -1145,13 +1162,20 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
__PRETTY_FUNCTION__, __LINE__);
|
||||
}
|
||||
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Axis status %i at %lli\n", pTurboPmacA_->axisStatus,
|
||||
timeInMilliseconds());
|
||||
|
||||
if ((pTurboPmacA_->axisStatus != -3) == on) {
|
||||
bool moving = false;
|
||||
// Perform a poll to update the parameter library
|
||||
poll(&moving);
|
||||
forcedPoll(&moving);
|
||||
|
||||
int enabled = 0;
|
||||
getAxisParamChecked(this, motorEnableRBV, &enabled);
|
||||
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Finished enable %i at %lli\n", on, timeInMilliseconds());
|
||||
"Finished enable %i at %lli, value motorEnableRBV = %i\n",
|
||||
on, timeInMilliseconds(), enabled);
|
||||
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user