From 991e06934c2bf899f52644d5c1dc1a30e53a369e Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Tue, 3 Feb 2004 19:53:04 +0000 Subject: [PATCH] Eliminate erroneous "Motor motion timeout ERROR". --- motorApp/AcsSrc/drvMCB4B.cc | 6 +++++- motorApp/ImsSrc/drvIM483PL.cc | 10 +++++++--- motorApp/ImsSrc/drvIM483SM.cc | 10 +++++++--- motorApp/ImsSrc/drvMDrive.cc | 10 +++++++--- motorApp/MclennanSrc/drvPM304.cc | 6 +++++- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/motorApp/AcsSrc/drvMCB4B.cc b/motorApp/AcsSrc/drvMCB4B.cc index 01ec75c6..60ba4f63 100644 --- a/motorApp/AcsSrc/drvMCB4B.cc +++ b/motorApp/AcsSrc/drvMCB4B.cc @@ -10,6 +10,7 @@ * .01 02-24-2002 mlr initialized from drvPM304.c * .02 07-03-2002 rls replaced RA_OVERTRAVEL with RA_PLUS_LS and RA_MINUS_LS * .03 05-23-2003 rls Converted to R3.14.x. + * .04 02-03-2004 rls Eliminate erroneous "Motor motion timeout ERROR". */ @@ -229,7 +230,10 @@ STATIC int set_status(int card, int signal) motorData = atoi(&response[5]); if (motorData == motor_info->position) - motor_info->no_motion_count++; + { + if (nodeptr != 0) /* Increment counter only if motor is moving. */ + motor_info->no_motion_count++; + } else { status.Bits.RA_DIRECTION = (motorData >= motor_info->position) ? 1 : 0; diff --git a/motorApp/ImsSrc/drvIM483PL.cc b/motorApp/ImsSrc/drvIM483PL.cc index d624f516..f828548e 100644 --- a/motorApp/ImsSrc/drvIM483PL.cc +++ b/motorApp/ImsSrc/drvIM483PL.cc @@ -3,9 +3,9 @@ FILENAME... drvIM483PL.cc USAGE... Motor record driver level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 1.5 $ +Version: $Revision: 1.6 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:39:28 $ +Last Modified: $Date: 2004-02-03 19:51:51 $ */ /***************************************************************** @@ -33,6 +33,7 @@ of this distribution. * Removed support for "ASCII record separator (IS2) = /x1E" * from send_mess(). * .04 03/07/03 rls R3.14 conversion. + * .05 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". */ /* @@ -289,7 +290,10 @@ STATIC int set_status(int card, int signal) motorData = atof(&buff[5]); if (motorData == motor_info->position) - motor_info->no_motion_count++; + { + if (nodeptr != 0) /* Increment counter only if motor is moving. */ + motor_info->no_motion_count++; + } else { epicsInt32 newposition; diff --git a/motorApp/ImsSrc/drvIM483SM.cc b/motorApp/ImsSrc/drvIM483SM.cc index a7a8c439..b9aba1e9 100644 --- a/motorApp/ImsSrc/drvIM483SM.cc +++ b/motorApp/ImsSrc/drvIM483SM.cc @@ -3,9 +3,9 @@ FILENAME... drvIM483SM.cc USAGE... Motor record driver level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 1.6 $ +Version: $Revision: 1.7 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:39:30 $ +Last Modified: $Date: 2004-02-03 19:51:50 $ */ /***************************************************************** @@ -32,6 +32,7 @@ of this distribution. * Removed support for "ASCII record separator (IS2) = /x1E" * from send_mess(). * .04 03/07/03 rls R3.14 conversion. + * .05 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". */ /* @@ -288,7 +289,10 @@ STATIC int set_status(int card, int signal) motorData = atof(&buff[5]); if (motorData == motor_info->position) - motor_info->no_motion_count++; + { + if (nodeptr != 0) /* Increment counter only if motor is moving. */ + motor_info->no_motion_count++; + } else { epicsInt32 newposition; diff --git a/motorApp/ImsSrc/drvMDrive.cc b/motorApp/ImsSrc/drvMDrive.cc index be49232a..e39bde9b 100644 --- a/motorApp/ImsSrc/drvMDrive.cc +++ b/motorApp/ImsSrc/drvMDrive.cc @@ -3,9 +3,9 @@ FILENAME... drvMDrive.cc USAGE... Motor record driver level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 1.7 $ +Version: $Revision: 1.8 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:39:31 $ +Last Modified: $Date: 2004-02-03 19:51:50 $ */ /* @@ -36,6 +36,7 @@ Last Modified: $Date: 2003-12-12 21:39:31 $ * Modification Log: * ----------------- * .01 03/21/03 rls copied from drvIM483PL.c + * .02 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". */ /* @@ -312,7 +313,10 @@ STATIC int set_status(int card, int signal) motorData = atof(buff); if (motorData == motor_info->position) - motor_info->no_motion_count++; + { + if (nodeptr != 0) /* Increment counter only if motor is moving. */ + motor_info->no_motion_count++; + } else { epicsInt32 newposition; diff --git a/motorApp/MclennanSrc/drvPM304.cc b/motorApp/MclennanSrc/drvPM304.cc index db6d1532..dc70eb37 100644 --- a/motorApp/MclennanSrc/drvPM304.cc +++ b/motorApp/MclennanSrc/drvPM304.cc @@ -24,6 +24,7 @@ * .07 02-11-2003 mlr Added support for PM600 model. Added send_recv_mess which * simplifies and cleans up. * .08 03/27/03 rls R3.14 conversion. + * .09 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". */ @@ -287,7 +288,10 @@ STATIC int set_status(int card, int signal) Debug(2, "set_status, position query, card %d, response=%s\n", card, response); if (motorData == motor_info->position) - motor_info->no_motion_count++; + { + if (nodeptr != 0) /* Increment counter only if motor is moving. */ + motor_info->no_motion_count++; + } else { status.Bits.RA_DIRECTION = (motorData >= motor_info->position) ? 1 : 0;