From be44621cfd20f38536bc837f730de74f6ba0cab8 Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Tue, 3 Feb 2004 20:00:00 +0000 Subject: [PATCH] Eliminate erroneous "Motor motion timeout ERROR". --- motorApp/NewportSrc/drvESP300.cc | 12 ++++++++---- motorApp/NewportSrc/drvMM3000.cc | 11 ++++++++--- motorApp/NewportSrc/drvMM4000.cc | 10 +++++++--- motorApp/NewportSrc/drvPM500.cc | 10 +++++++--- motorApp/PiSrc/drvPIC844.cc | 10 +++++++--- 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/motorApp/NewportSrc/drvESP300.cc b/motorApp/NewportSrc/drvESP300.cc index a564ffdc..63e9bde5 100644 --- a/motorApp/NewportSrc/drvESP300.cc +++ b/motorApp/NewportSrc/drvESP300.cc @@ -2,9 +2,9 @@ FILENAME... drvESP300.cc USAGE... Motor record driver level support for Newport ESP300. -Version: $Revision: 1.6 $ +Version: $Revision: 1.7 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:40:23 $ +Last Modified: $Date: 2004-02-03 19:59:22 $ */ /* @@ -37,7 +37,8 @@ Last Modified: $Date: 2003-12-12 21:40:23 $ * ----------------- * .01 02-19-03 rls copied from drvMM3000 * .02 05-23-03 rls Converted to R3.14.x. - * .03 10-28-03 initialize "drive_resolution". + * .03 10-28-03 rls initialize "drive_resolution". + * .04 02-03-04 rls Eliminate erroneous "Motor motion timeout ERROR". */ @@ -259,7 +260,10 @@ static int set_status(int card, int signal) motorData = atof(inbuff) / cntrl->drive_resolution[signal]; 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/NewportSrc/drvMM3000.cc b/motorApp/NewportSrc/drvMM3000.cc index bdaea9bf..e7359bca 100644 --- a/motorApp/NewportSrc/drvMM3000.cc +++ b/motorApp/NewportSrc/drvMM3000.cc @@ -2,9 +2,9 @@ FILENAME... drvMM3000.cc USAGE... Motor record driver level support for Newport MM3000. -Version: $Revision: 1.6 $ +Version: $Revision: 1.7 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:40:24 $ +Last Modified: $Date: 2004-02-03 19:59:21 $ */ /* @@ -52,6 +52,8 @@ Last Modified: $Date: 2003-12-12 21:40:24 $ * .07 05-22-03 rls - Converted to R3.14.2. * .08 10/23/03 rls - recv_mess() eats the controller error response, outputs * an error message and retries. + * .09 02/03/04 rls - Eliminate erroneous "Motor motion timeout ERROR". + * */ #include @@ -345,7 +347,10 @@ STATIC int set_status(int card, int signal) motorData = atof(cptr); 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 { motor_info->position = (epicsInt32) motorData; diff --git a/motorApp/NewportSrc/drvMM4000.cc b/motorApp/NewportSrc/drvMM4000.cc index 79f8e4cc..5368a0c1 100644 --- a/motorApp/NewportSrc/drvMM4000.cc +++ b/motorApp/NewportSrc/drvMM4000.cc @@ -2,9 +2,9 @@ FILENAME... drvMM4000.cc USAGE... Motor record driver level support for Newport MM4000. -Version: $Revision: 1.5 $ +Version: $Revision: 1.6 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:40:26 $ +Last Modified: $Date: 2004-02-03 19:59:21 $ */ /* @@ -51,6 +51,7 @@ Last Modified: $Date: 2003-12-12 21:40:26 $ * non-zero. This is required to work around a bug in the firmware * (versions 2.40 and 2.44) that the motor is reported as done moving * on the first poll after a move is begun with the motor power off. + * .09 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". */ @@ -423,7 +424,10 @@ STATIC int set_status(int card, int signal) motorData = atof(p+3) / cntrl->drive_resolution[signal]; 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 { motor_info->position = NINT(motorData); diff --git a/motorApp/NewportSrc/drvPM500.cc b/motorApp/NewportSrc/drvPM500.cc index d2018718..8b9e8915 100644 --- a/motorApp/NewportSrc/drvPM500.cc +++ b/motorApp/NewportSrc/drvPM500.cc @@ -2,9 +2,9 @@ FILENAME... drvPM500.cc USAGE... Motor record driver level support for Newport PM500. -Version: $Revision: 1.5 $ +Version: $Revision: 1.6 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-12-12 21:40:27 $ +Last Modified: $Date: 2004-02-03 19:59:21 $ */ /* Device Driver Support routines for PM500 motor controller */ @@ -39,6 +39,7 @@ Last Modified: $Date: 2003-12-12 21:40:27 $ * .02 06-02-00 rls integrated into standard motor record * .03 10/02/01 rls allow one retry after a communication error. * .04 05-23-03 rls Converted to R3.14.x. + * .05 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". */ @@ -306,7 +307,10 @@ STATIC int set_status(int card, int signal) */ 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 { motor_info->position = NINT(motorData); diff --git a/motorApp/PiSrc/drvPIC844.cc b/motorApp/PiSrc/drvPIC844.cc index c2517f01..75855a0d 100644 --- a/motorApp/PiSrc/drvPIC844.cc +++ b/motorApp/PiSrc/drvPIC844.cc @@ -3,9 +3,9 @@ FILENAME... drvPIC844.cc USAGE... Motor record driver level support for Physik Instrumente (PI) GmbH & Co. C-844 motor controller. -Version: $Revision: 1.2 $ +Version: $Revision: 1.3 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-01-13 21:01:38 $ +Last Modified: $Date: 2004-02-03 20:00:00 $ */ /* @@ -36,6 +36,7 @@ Last Modified: $Date: 2004-01-13 21:01:38 $ * Modification Log: * ----------------- * .01 12/17/03 rls - copied from drvIM483PL.cc + * .02 02/03/04 rls - Eliminate erroneous "Motor motion timeout ERROR". */ /* @@ -297,7 +298,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;