Multiple fixes for MVP2001 driver

This commit is contained in:
kmpeters
2011-03-18 19:39:24 +00:00
parent 4c988187b8
commit 3ef4b54215
2 changed files with 11 additions and 7 deletions
+7 -5
View File
@@ -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 */
+4 -2
View File
@@ -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;