- Fixes to el734hp.c for handling of emergency stop

- Added waiting 5 sec after driving A6 to tas code
This commit is contained in:
koennecke
2005-03-16 07:59:56 +00:00
parent ed3c13e47c
commit 7bf31b710b
4 changed files with 135 additions and 17 deletions

View File

@ -298,7 +298,18 @@ static int RecalcAction(SConnection *pCon, SicsInterp *pSics, void *pData,
return TASUpdate(self,pCon);
}
/*--------------------------------------------------------------------------
when A6 has been drive Bertrand wants to wait for some seconds in order
to allow for the analyzer shielding to settle down. This is done
through this callback function
---------------------------------------------------------------------------*/
static int A6WaitCallback(int iEvent, void *pEventData, void *pUserData)
{
if(iEvent == MOTEND)
{
SicsWait(5);
}
}
/*-----------------------------------------------------------------------
A function for killing the TAS data structure is needed
-------------------------------------------------------------------------*/
@ -321,6 +332,7 @@ int TASFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
char pBueffel[132];
pSicsVariable pVar = NULL;
CommandList *pCom = NULL;
pMotor pMot = NULL;
/* check arguments*/
if(argc < 2)
@ -395,6 +407,16 @@ int TASFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
RegisterCallback(pVar->pCall,VALUECHANGE,TimerCallback,pNew,NULL);
}
/*
Install the wait callback for A6
*/
pMot = FindMotor(pSics,"a6");
if(pMot != NULL)
{
RegisterCallback(pMot->pCall,MOTEND,A6WaitCallback,NULL,NULL);
}
/*
initialize SRO value
*/