diff --git a/motorApp/MicroMoSrc/devMVP2001.cc b/motorApp/MicroMoSrc/devMVP2001.cc index 68d64ffc..43cc4de8 100644 --- a/motorApp/MicroMoSrc/devMVP2001.cc +++ b/motorApp/MicroMoSrc/devMVP2001.cc @@ -84,6 +84,8 @@ Last Modified: $Date: 2008-06-06 17:16:51 $ * current limit is out of range) from 500mA to 100mA. * .06 02/13/04 rls port to R3.14.x * .07 06/06/08 rls Bug fix initializing driver twice. + * .08 03/18/11 kmp Corrected the MVP2001_table structure; only the "GO" + * command causes the motor to move. * */ @@ -126,15 +128,15 @@ extern "C"{epicsExportAddress(dset, devMVP2001);} /* WARNING! this must match "motor_cmnd" in motor.h */ static msg_types MVP2001_table[] = { - MOTION, /* MOVE_ABS */ - MOTION, /* MOVE_REL */ - MOTION, /* HOME_FOR */ - MOTION, /* HOME_REV */ + IMMEDIATE, /* MOVE_ABS */ + IMMEDIATE, /* MOVE_REL */ + IMMEDIATE, /* HOME_FOR */ + IMMEDIATE, /* HOME_REV */ IMMEDIATE, /* LOAD_POS */ IMMEDIATE, /* SET_VEL_BASE */ IMMEDIATE, /* SET_VELOCITY */ IMMEDIATE, /* SET_ACCEL */ - IMMEDIATE, /* GO */ + MOTION, /* GO */ IMMEDIATE, /* SET_ENC_RATIO */ INFO, /* GET_INFO */ MOVE_TERM, /* STOP_AXIS */ diff --git a/motorApp/MicroMoSrc/drvMVP2001.cc b/motorApp/MicroMoSrc/drvMVP2001.cc index 1e28d538..1315138d 100644 --- a/motorApp/MicroMoSrc/drvMVP2001.cc +++ b/motorApp/MicroMoSrc/drvMVP2001.cc @@ -86,6 +86,8 @@ Last Modified: $Date: 2009-09-08 18:26:32 $ * .09 06/06/08 rls - Bug fix setting RA_DONE based on inMotion. * .10 06/09/08 rls - Controller workaround for comm. errors; delay after * each messages received for 0.1 second. + * .11 03/18/11 kmp Set status.Bits.EA_POSITION properly in set_status() so + * the torque enable/disable button is accurate. */ /* @@ -395,8 +397,8 @@ static int set_status(int card, int signal) /* The MVP2001 doesn't have a home feature */ status.Bits.RA_HOME = 0; - /* !!! Assume no closed-looped control!!! */ - status.Bits.EA_POSITION = 0; + /* Set the enable-torque PV properly */ + status.Bits.EA_POSITION = (mstat.Bits.NOT_power == false) ? 1 : 0; /* encoder status */ status.Bits.EA_SLIP = 0;