Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce23d261be | |||
| 89740d3956 |
+1
-1
Submodule sinqMotor updated: 95bc899114...f971101976
+16
-3
@@ -788,9 +788,22 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
||||
}
|
||||
}
|
||||
|
||||
// Update the enable PV
|
||||
setAxisParamChecked(this, motorEnableRBV,
|
||||
readyToBeSwitchedOn() && switchedOn());
|
||||
/*
|
||||
If the motor just got enabled, we need to initialize it, because some
|
||||
parameters like the limits on the motor controllers are lost during a power
|
||||
cycle and are rewritten from the masterMacs "meta-controller" when enabling.
|
||||
*/
|
||||
int wasEnabled = 0;
|
||||
int isEnabled = readyToBeSwitchedOn() && switchedOn();
|
||||
|
||||
getAxisParamChecked(this, motorEnableRBV, &wasEnabled);
|
||||
if (isEnabled && !wasEnabled) {
|
||||
rwStatus = init();
|
||||
if (rwStatus != asynSuccess) {
|
||||
return rwStatus;
|
||||
}
|
||||
}
|
||||
setAxisParamChecked(this, motorEnableRBV, isEnabled);
|
||||
|
||||
if (*moving) {
|
||||
// If the axis is moving, evaluate the movement direction
|
||||
|
||||
Reference in New Issue
Block a user