diff --git a/tecsdriv.c b/tecsdriv.c index 1887e14..7c00943 100644 --- a/tecsdriv.c +++ b/tecsdriv.c @@ -114,8 +114,11 @@ self->fTarget = atof(result); iRet=CocGet(pMe->pData,"tlimit",result); /* get parameter */ if (iRet<0) goto Error; - fVal = atof(result); - iRet = EVCSetPar(self, "upperlimit", fVal,pCon); + iRet = EVCGetPar(self, "upperlimit", &fVal); + if (abs(fVal - atof(result)) > 1.0e-4 * abs(fVal)) { + fVal = atof(result); + iRet = EVCSetPar(self, "upperlimit", fVal,pCon); + } iRet = EVControlWrapper(pCon,pSics,pData,argc,argv); if (iRet != 0) { iRet=CocGet(pMe->pData,"status",result); /* show status */