Added PVs for error reset and status problem reporting and fixed a bug

in msgPrintControl
This commit is contained in:
2025-03-10 14:28:24 +01:00
parent ca7bede4b7
commit bed245b010
8 changed files with 90 additions and 16 deletions

View File

@@ -109,6 +109,16 @@ sinqController::sinqController(const char *portName,
exit(-1);
}
status = createParam("MOTOR_RESET", asynParamInt32, &motorReset_);
if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"Controller \"%s\" => %s, line %d:\nFATAL ERROR (creating a "
"parameter failed with %s).\nTerminating IOC",
portName, __PRETTY_FUNCTION__, __LINE__,
stringifyAsynStatus(status));
exit(-1);
}
status = createParam("MOTOR_ENABLE_RBV", asynParamInt32, &motorEnableRBV_);
if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
@@ -293,6 +303,8 @@ asynStatus sinqController::writeInt32(asynUser *pasynUser, epicsInt32 value) {
// Handle custom PVs
if (function == motorEnable_) {
return axis->enable(value != 0);
} else if (function == motorReset_) {
return axis->reset();
} else if (function == motorForceStop_) {
return axis->stop(0.0);
} else {