From 7fe47da7595dc6712752fb84c2362bd38c4a7d04 Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Wed, 8 Nov 2000 20:26:53 +0000 Subject: [PATCH] - Error introduced when item #14 under V4.2 was implemented. - Error occurred if the STOP field was activated when the motor was not moving. Motor would become "stuck" until MIP field cleared. - V4.3 item #1 in README file. Modified do_work() logic. --- motorApp/MotorSrc/motorRecord.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/motorApp/MotorSrc/motorRecord.c b/motorApp/MotorSrc/motorRecord.c index 0af25678..6c3f760c 100644 --- a/motorApp/MotorSrc/motorRecord.c +++ b/motorApp/MotorSrc/motorRecord.c @@ -2,9 +2,9 @@ FILENAME... motorRecord.c USAGE... Record Support Routines for the Motor record. -Version: $Revision: 1.7 $ +Version: $Revision: 1.8 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2000-09-05 22:06:50 $ +Last Modified: $Date: 2000-11-08 20:26:53 $ */ /* @@ -115,7 +115,7 @@ Last Modified: $Date: 2000-09-05 22:06:50 $ * when the user "hammers" on the jog request. */ -#define VERSION 4.2 +#define VERSION 4.3 #include #include @@ -1382,13 +1382,23 @@ STATIC long do_work(motorRecord * pmr) mmap_field mmap_bits; /*** Process Stop button. ***/ - if (pmr->stop && (pmr->mip != MIP_STOP)) + if (pmr->stop != 0) { - /* Stop motor. */ - pmr->pp = TRUE; - pmr->jogf = pmr->jogr = 0; pmr->stop = 0; - goto stop_all; + if (pmr->mip == MIP_DONE || pmr->mip == MIP_STOP) + { + /* Send message (just in case), but don't put MIP in STOP state. */ + INIT_MSG(); + WRITE_MSG(STOP_AXIS, NULL); + SEND_MSG(); + } + else + { + /* Stop motor. */ + pmr->pp = TRUE; + pmr->jogf = pmr->jogr = 0; + goto stop_all; + } } /*** Process Stop/Pause/Go_Pause/Go switch. ***