From 3398caa6b772b38b616d57fe6676475763780f4e Mon Sep 17 00:00:00 2001 From: koennecke Date: Fri, 27 May 2005 11:58:59 +0000 Subject: [PATCH] - Switched to NAPI-3.0 with XML support - Fixed exeman to write files by default into the first directory in batchpath - Fixed a bug in nxdict which prevented it from handling attributes containing :/ properly - Removed junk files - Fixed a bug in hklscan.c which made it dump core - Added XML support to nxscript.c - Added support for writing NeXus-XML data files to tasub - Fixed a bug with initializing the motor controller after manula mode - Added support to drive the first choppers phase --- docho.c | 19 +++++++++++++++++++ el734hp.c | 2 ++ 2 files changed, 21 insertions(+) diff --git a/docho.c b/docho.c index 1bd3b43..3321dd1 100644 --- a/docho.c +++ b/docho.c @@ -373,6 +373,10 @@ static void SplitChopperReply(pCodri self, char *prefix, char *pBueffel) { sprintf(pCommand,"nphas 2 %s",pValue); } + else if(strcmp(parname,"chopper1.nphas") == 0) + { + sprintf(pCommand,"nphas 1 %s",pValue); + } else if(strcmp(parname,"chopper2.ratio") == 0) { sprintf(pCommand,"ratio 2 %s",pValue); @@ -570,6 +574,21 @@ static void SplitChopperReply(pCodri self, char *prefix, char *pBueffel) return HWIdle; } } + if(strcmp(parname,"chopper1.nphas") == 0) + { + iRet = StringDictGet(pPriv->pPar,"chopper1.dphas",pVal1,19); + sscanf(pVal1,"%f",&fDelta); + if(fDelta < 0.) + fDelta = - fDelta; + if(fDelta > 0.3) + { + return HWBusy; + } + else + { + return HWIdle; + } + } /* ratio */ if(strcmp(parname,"chopper2.ratio") == 0) diff --git a/el734hp.c b/el734hp.c index ea2cd4f..9f46999 100644 --- a/el734hp.c +++ b/el734hp.c @@ -420,6 +420,8 @@ static int EL734Fix(void *pData, int iCode, float fValue){ case BADLOC: snprintf(pCommand,49,"RMT 1\r"); transactEL734(self->controller,pCommand,strlen(pCommand),pReply,79); + snprintf(pCommand,49,"ECHO 0\r"); + transactEL734(self->controller,pCommand,strlen(pCommand),pReply,79); return MOTREDO; case NOTCONNECTED: initRS232(self->controller);