tasdrive now only monitors motors which are driving.

Fixes SICS-568 Because tasdrive now stops calling status checking on a
motor which has terminated for any reason.
SICS-570: The correct motor names are now reported by tasdrive.
SICS-575: Use ANSTO motor names when reporting limit violations.
This commit is contained in:
Ferdi Franceschini
2013-04-28 16:28:02 +10:00
parent a6cfbe8b7f
commit 50a2545f97
3 changed files with 82 additions and 37 deletions

View File

@ -304,6 +304,7 @@ int TasUBFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
"ef", "kf",
"en"
};
char *defltMot[] = {"a1", "a2", "mcv", "mch", "a3", "a4", "sgu", "sgl", "a5", "a6", "acv", "ach"};
if (argc < 2) {
SCWrite(pCon, "ERROR: need name to install tasUB", eError);
@ -319,6 +320,7 @@ int TasUBFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
SCWrite(pCon, "ERROR: out of memory creating tasUB", eError);
return 0;
}
memset(pNew->busy, 0, 12 * sizeof(int));
/*
assign motors
@ -339,6 +341,10 @@ int TasUBFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
pNew->motors[9] = TasFindMotor(pSics, "a6");
pNew->motors[10] = TasFindMotor(pSics, "acv");
pNew->motors[11] = TasFindMotor(pSics, "ach");
for (i=0; i < 12; i++) {
strcpy(pNew->motname[i], defltMot[i]);
}
} else {
/*
* user defined names
@ -355,6 +361,9 @@ int TasUBFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
pNew->motors[9] = TasFindMotor(pSics, argv[11]);
pNew->motors[10] = TasFindMotor(pSics, argv[12]);
pNew->motors[11] = TasFindMotor(pSics, argv[13]);
for (i=0; i < 12; i++) {
strcpy(pNew->motname[i], argv[i+2]);
}
}
/*
curvature motors may be missing, anything else is a serious problem