Compare commits
1 Commits
velocity_m
...
homeerror
| Author | SHA1 | Date | |
|---|---|---|---|
| 238a47f38e |
2
Makefile
2
Makefile
@@ -9,6 +9,8 @@ ARCH_FILTER=RHEL%
|
|||||||
# Specify the version of asynMotor we want to build against
|
# Specify the version of asynMotor we want to build against
|
||||||
motorBase_VERSION=7.2.2
|
motorBase_VERSION=7.2.2
|
||||||
|
|
||||||
|
LIBVERSION=homeerror
|
||||||
|
|
||||||
# These headers allow to depend on this library for derived drivers.
|
# These headers allow to depend on this library for derived drivers.
|
||||||
HEADERS += src/masterMacsAxis.h
|
HEADERS += src/masterMacsAxis.h
|
||||||
HEADERS += src/masterMacsController.h
|
HEADERS += src/masterMacsController.h
|
||||||
|
|||||||
@@ -629,42 +629,51 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Either the software limits or the end switches of the controller
|
If the motor is homing or has been homed, ignore limit switch errors.
|
||||||
have been hit. Since the EPICS limits are derived from the software
|
*/
|
||||||
limits and are a little bit smaller, these error cases can only
|
int homing = 0;
|
||||||
happen if either the axis has an incremental encoder which is not
|
int homed = 0;
|
||||||
properly homed or if a bug occured.
|
getAxisParamChecked(this, motorStatusHome, &homing);
|
||||||
*/
|
getAxisParamChecked(this, motorStatusHomed, &homed);
|
||||||
if (positiveLimitSwitch() || negativeLimitSwitch() ||
|
if (homing || homed) {
|
||||||
positiveSoftwareLimit() || negativeSoftwareLimit()) {
|
/*
|
||||||
|
Either the software limits or the end switches of the controller
|
||||||
|
have been hit. Since the EPICS limits are derived from the software
|
||||||
|
limits and are a little bit smaller, these error cases can only
|
||||||
|
happen if either the axis has an incremental encoder which is not
|
||||||
|
properly homed or if a bug occured.
|
||||||
|
*/
|
||||||
|
if (positiveLimitSwitch() || negativeLimitSwitch() ||
|
||||||
|
positiveSoftwareLimit() || negativeSoftwareLimit()) {
|
||||||
|
|
||||||
// Distinction for developers
|
// Distinction for developers
|
||||||
if (positiveLimitSwitch()) {
|
if (positiveLimitSwitch()) {
|
||||||
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
||||||
"Positive limit switch.");
|
"Positive limit switch.");
|
||||||
}
|
}
|
||||||
if (negativeLimitSwitch()) {
|
if (negativeLimitSwitch()) {
|
||||||
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
||||||
"Negative limit switch.");
|
"Negative limit switch.");
|
||||||
}
|
}
|
||||||
if (positiveSoftwareLimit()) {
|
if (positiveSoftwareLimit()) {
|
||||||
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
||||||
"Positive software limit.");
|
"Positive software limit.");
|
||||||
}
|
}
|
||||||
if (negativeSoftwareLimit()) {
|
if (negativeSoftwareLimit()) {
|
||||||
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
appendErrorMessage(shellMessage, sizeof(shellMessage),
|
||||||
"Negative software limit.");
|
"Negative software limit.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generic error message for user
|
// Generic error message for user
|
||||||
appendErrorMessage(
|
appendErrorMessage(
|
||||||
errorMessage, sizeof(errorMessage),
|
errorMessage, sizeof(errorMessage),
|
||||||
"Software limits or end switch hit. Try homing the motor, "
|
"Software limits or end switch hit. Try homing the motor, "
|
||||||
"moving in the opposite direction or check the SPS for "
|
"moving in the opposite direction or check the SPS for "
|
||||||
"errors (if available). Otherwise please call the "
|
"errors (if available). Otherwise please call the "
|
||||||
"support.");
|
"support.");
|
||||||
|
|
||||||
poll_status = asynError;
|
poll_status = asynError;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overCurrent()) {
|
if (overCurrent()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user