- Fixes to el734hp.c for handling of emergency stop
- Added waiting 5 sec after driving A6 to tas code
This commit is contained in:
24
tasinit.c
24
tasinit.c
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user