status returns busy when motor controller still continues M.Z.
This commit is contained in:
18
el734hp.c
18
el734hp.c
@ -146,7 +146,7 @@ static int EL734Run(void *pData,float fValue){
|
|||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
static int decodeMSR(pEL734Driv self, int msr){
|
static int decodeMSR(pEL734Driv self, int msr){
|
||||||
if(msr == 0){
|
if (msr == 0){
|
||||||
/*
|
/*
|
||||||
we are done: check ored_msr for troubles
|
we are done: check ored_msr for troubles
|
||||||
*/
|
*/
|
||||||
@ -162,7 +162,7 @@ static int decodeMSR(pEL734Driv self, int msr){
|
|||||||
self->errorCode = RUNFAULT;
|
self->errorCode = RUNFAULT;
|
||||||
return HWPosFault;
|
return HWPosFault;
|
||||||
} else if(self->oredMsr & 0x200){
|
} else if(self->oredMsr & 0x200){
|
||||||
self->errorCode = RUNFAULT;
|
self->errorCode = POSFAULT;
|
||||||
return HWPosFault;
|
return HWPosFault;
|
||||||
} else if(self->oredMsr & 0x1000){
|
} else if(self->oredMsr & 0x1000){
|
||||||
self->errorCode = BADCUSHION;
|
self->errorCode = BADCUSHION;
|
||||||
@ -179,11 +179,18 @@ static int decodeMSR(pEL734Driv self, int msr){
|
|||||||
} else if(self->oredMsr & 0x400){
|
} else if(self->oredMsr & 0x400){
|
||||||
self->errorCode = POSFAULT;
|
self->errorCode = POSFAULT;
|
||||||
return HWFault;
|
return HWFault;
|
||||||
}
|
} else {
|
||||||
|
self->errorCode = BADUNKNOWN;
|
||||||
|
return HWFault; /* should not happen */
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
we are still tugging along ............
|
we are still tugging along ............
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
return HWBusy;
|
||||||
|
/* inserted above line and commented out lines below M.Zolliker Sep 2004
|
||||||
|
we do not stop when a minor error message occurs, but treat these with oredMsr
|
||||||
if(msr & 0x10){
|
if(msr & 0x10){
|
||||||
self->errorCode = LOWLIM;
|
self->errorCode = LOWLIM;
|
||||||
return HWFault;
|
return HWFault;
|
||||||
@ -193,8 +200,8 @@ static int decodeMSR(pEL734Driv self, int msr){
|
|||||||
} else if(msr & 0x80){
|
} else if(msr & 0x80){
|
||||||
self->errorCode = RUNFAULT;
|
self->errorCode = RUNFAULT;
|
||||||
return HWPosFault;
|
return HWPosFault;
|
||||||
} else if(self->oredMsr & 0x200){
|
} else if(msr & 0x200){
|
||||||
self->errorCode = RUNFAULT;
|
self->errorCode = POSFAULT;
|
||||||
return HWPosFault;
|
return HWPosFault;
|
||||||
} else if(msr & 0x1000){
|
} else if(msr & 0x1000){
|
||||||
self->errorCode = BADCUSHION;
|
self->errorCode = BADCUSHION;
|
||||||
@ -214,6 +221,7 @@ static int decodeMSR(pEL734Driv self, int msr){
|
|||||||
} else {
|
} else {
|
||||||
return HWBusy;
|
return HWBusy;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
Reference in New Issue
Block a user