diff --git a/motorApp/MotorSrc/drvMotorAsyn.c b/motorApp/MotorSrc/drvMotorAsyn.c index 184c6787..505a4141 100644 --- a/motorApp/MotorSrc/drvMotorAsyn.c +++ b/motorApp/MotorSrc/drvMotorAsyn.c @@ -19,9 +19,9 @@ * of this distribution. * ************************************************************************ * - * Version: $Revision: 1.20 $ - * Modified by: $Author: peterd $ - * Last Modified: $Date: 2008-05-20 15:39:58 $ + * Version: $Revision: 1.21 $ + * Modified by: $Author: mp49 $ + * Last Modified: $Date: 2008-11-14 14:27:41 $ * * Original Author: Peter Denison * Current Author: Peter Denison @@ -102,6 +102,7 @@ static motorCommandStruct motorCommands[] = { {motorStatusGainSupport, "STATUS_GAINSUPPORT"}, {motorStatusCommsError, "STATUS_COMMSERROR"}, {motorStatusLowLimit, "STATUS_LOWLIMIT"}, + {motorStatusHomed, "STATUS_HOMED"}, }; typedef enum{typeInt32, typeFloat64, typeFloat64Array} dataType; @@ -799,7 +800,7 @@ static void intCallback(void *axisPvt, unsigned int nChanged, correct */ for (i = 0; i < nChanged; i++) { if (changed[i] >= motorAxisDirection && - changed[i] <= motorAxisLowHardLimit) { + changed[i] <= motorAxisHomed) { bit_num = changed[i] - motorAxisDirection; changedmask |= (1 << bit_num); (*pPvt->drvset->getInteger)(pAxis->axis, changed[i], &ivalue); diff --git a/motorApp/MotorSrc/drvMotorAsyn.h b/motorApp/MotorSrc/drvMotorAsyn.h index 0bec1090..e4b5e7e5 100644 --- a/motorApp/MotorSrc/drvMotorAsyn.h +++ b/motorApp/MotorSrc/drvMotorAsyn.h @@ -40,7 +40,7 @@ typedef enum { motorStatusSlip, motorStatusPowerOn, motorStatusFollowingError, motorStatusHome, motorStatusHasEncoder, motorStatusProblem, motorStatusMoving, motorStatusGainSupport, motorStatusCommsError, - motorStatusLowLimit, motorStatusLast + motorStatusLowLimit, motorStatusHomed, motorStatusLast } motorCommand; #endif diff --git a/motorApp/MotorSrc/motor.h b/motorApp/MotorSrc/motor.h index 348519c6..401cd918 100644 --- a/motorApp/MotorSrc/motor.h +++ b/motorApp/MotorSrc/motor.h @@ -3,9 +3,9 @@ FILENAME... motor.h USAGE... Definitions and structures common to all levels of motorRecord support (i.e., record, device and driver). -Version: $Revision: 1.18 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2006-06-02 21:19:09 $ +Version: $Revision: 1.19 $ +Modified By: $Author: mp49 $ +Last Modified: $Date: 2008-11-14 14:27:40 $ */ /* @@ -141,7 +141,8 @@ typedef union struct { #ifdef MSB_First - unsigned int na :18;/* N/A bits */ + unsigned int na :17;/* N/A bits */ + unsigned int RA_HOMED :1; /* Axis has been homed.*/ unsigned int RA_MINUS_LS :1; /* minus limit switch has been hit */ unsigned int CNTRL_COMM_ERR :1; /* Controller communication error. */ unsigned int GAIN_SUPPORT :1; /* Motor supports closed-loop position control. */ @@ -171,7 +172,8 @@ typedef union unsigned int GAIN_SUPPORT :1; /* Motor supports closed-loop position control. */ unsigned int CNTRL_COMM_ERR :1; /* Controller communication error. */ unsigned int RA_MINUS_LS :1; /* minus limit switch has been hit */ - unsigned int na :18;/* N/A bits */ + unsigned int RA_HOMED :1; /* Axis has been homed.*/ + unsigned int na :17;/* N/A bits */ #endif } Bits; } msta_field; diff --git a/motorApp/MotorSrc/motor_interface.h b/motorApp/MotorSrc/motor_interface.h index 6bf03c50..8f4172ac 100644 --- a/motorApp/MotorSrc/motor_interface.h +++ b/motorApp/MotorSrc/motor_interface.h @@ -325,6 +325,7 @@ typedef enum motorAxisHasClosedLoop, /**< Motor supports closed-loop position control. */ motorAxisCommError, /**< Controller communication error. */ motorAxisLowHardLimit, /**< minus limit switch has been hit */ + motorAxisHomed, /**< Motor has been homed.*/ motorAxisDeferMoves, /**< Moves are not executed immediately, but are deferred until this parameter is set to zero */ motorAxisLastParam } motorAxisParam_t; @@ -519,6 +520,7 @@ typedef int (*motorAxisSetIntegerFunc)( AXIS_HDL pAxis, motorAxisParam_t, int ) */ #ifdef DEFINE_MOTOR_PROTOTYPES + /* XXXX Change the motorAxisParam_t to int */ static int motorAxisSetInteger( AXIS_HDL pAxis, motorAxisParam_t function, int value ); #endif @@ -670,7 +672,7 @@ typedef int (*motorAxisProfileMoveFunc)( AXIS_HDL pAxis, int npoints, double pos The motion along the profile will not start until triggered. If the relative parameter is zero (i.e. the positions indicated are - absolute), then the controller should immediately move the the + absolute), then the controller should immediately move to the first position and stop awaiting the trigger. The trigger parameter defines when to initiate the motion along