diff --git a/motorApp/NewportSrc/drvESP300.cc b/motorApp/NewportSrc/drvESP300.cc index ff3f8d9a..9adce4e1 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.10 $ +Version: $Revision: 1.11 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:33:20 $ +Last Modified: $Date: 2004-07-28 20:05:41 $ */ /* @@ -40,6 +40,7 @@ Last Modified: $Date: 2004-07-16 19:33:20 $ * .03 10-28-03 rls initialize "drive_resolution". * .04 02-03-04 rls Eliminate erroneous "Motor motion timeout ERROR". * .05 07/09/04 rls removed unused Setup() argument. + * .06 07/28/04 rls "epicsExport" debug variable. */ @@ -67,6 +68,7 @@ Last Modified: $Date: 2004-07-16 19:33:20 $ #ifdef DEBUG volatile int drvESP300debug = 0; #define Debug(l, f, args...) { if(l<=drvESP300debug) printf(f,## args); } + epicsExportAddress(int, drvESP300debug); #else #define Debug(l, f, args...) #endif @@ -551,7 +553,7 @@ static int motor_init() char buff[BUFF_SIZE]; int total_axis = 0; int status; - bool success_rtn; + asynStatus success_rtn; initialized = true; /* Indicate that driver is initialized. */ @@ -573,7 +575,7 @@ static int motor_init() success_rtn = pasynSyncIO->connect(cntrl->asyn_port, cntrl->asyn_address, &cntrl->pasynUser); - if (success_rtn == true) + if (success_rtn == asynSuccess) { /* Send a message to the board, see if it exists */ /* flush any junk at input port - should not be any data available */ @@ -584,7 +586,7 @@ static int motor_init() /* Return value is length of response string */ } - if (success_rtn == true && status > 0) + if (success_rtn == asynSuccess && status > 0) { brdptr->localaddr = (char *) NULL; brdptr->motor_in_motion = 0; diff --git a/motorApp/NewportSrc/drvMM3000.cc b/motorApp/NewportSrc/drvMM3000.cc index 7a73f9c5..0e49a16b 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.9 $ +Version: $Revision: 1.10 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:33:20 $ +Last Modified: $Date: 2004-07-28 20:05:42 $ */ /* @@ -54,6 +54,7 @@ Last Modified: $Date: 2004-07-16 19:33:20 $ * an error message and retries. * .09 02/03/04 rls - Eliminate erroneous "Motor motion timeout ERROR". * .10 07/09/04 rls - removed unused Setup() argument. + * .11 07/28/04 rls - "epicsExport" debug variable. * */ @@ -95,6 +96,7 @@ Last Modified: $Date: 2004-07-16 19:33:20 $ #ifdef DEBUG volatile int drvMM3000debug = 0; #define Debug(l, f, args...) { if(l<=drvMM3000debug) printf(f,## args); } + epicsExportAddress(int, drvMM3000debug); #else #define Debug(l, f, args...) #endif @@ -597,7 +599,7 @@ STATIC int motor_init() char *tok_save, *bufptr; int total_axis = 0; int status; - bool success_rtn; + asynStatus success_rtn; initialized = true; /* Indicate that driver is initialized. */ @@ -620,7 +622,7 @@ STATIC int motor_init() /* Initialize communications channel */ success_rtn = pasynSyncIO->connect(cntrl->asyn_port, cntrl->asyn_address, &cntrl->pasynUser); - if (success_rtn == true) + if (success_rtn == asynSuccess) { /* Send a message to the board, see if it exists */ /* flush any junk at input port - should not be any data available */ @@ -631,14 +633,14 @@ STATIC int motor_init() /* Return value is length of response string */ } - if (success_rtn == true && status > 0) + if (success_rtn == asynSuccess && status > 0) { brdptr->localaddr = (char *) NULL; brdptr->motor_in_motion = 0; send_mess(card_index, STOP_ALL, (char) NULL); /* Stop all motors */ send_mess(card_index, GET_IDENT, (char) NULL); /* Read controller ID string */ recv_mess(card_index, buff, 1); - strncpy(brdptr->ident, &buff[0], 50); /* Skip "VE" */ + strncpy(brdptr->ident, &buff[0], MAX_IDENT_LEN); /* Skip "VE" */ send_mess(card_index, "RC", (char) NULL); recv_mess(card_index, buff, 1); diff --git a/motorApp/NewportSrc/drvMM4000.cc b/motorApp/NewportSrc/drvMM4000.cc index 82bb591b..e44c2137 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.9 $ +Version: $Revision: 1.10 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:33:21 $ +Last Modified: $Date: 2004-07-28 20:05:42 $ */ /* @@ -53,6 +53,7 @@ Last Modified: $Date: 2004-07-16 19:33:21 $ * 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". * .10 07/09/04 rls removed unused Setup() argument. + * .11 07/28/04 rls "epicsExport" debug variable. */ @@ -91,6 +92,7 @@ Last Modified: $Date: 2004-07-16 19:33:21 $ #ifdef DEBUG volatile int drvMM4000debug = 0; #define Debug(l, f, args...) { if(l<=drvMM4000debug) printf(f,## args); } + epicsExportAddress(int, drvMM4000debug); #else #define Debug(l, f, args...) #endif @@ -620,7 +622,7 @@ static int motor_init() char *tok_save, *pos_ptr; int total_axis = 0; int status, model_num, digits; - int success_rtn; + asynStatus success_rtn; initialized = true; /* Indicate that driver is initialized. */ diff --git a/motorApp/NewportSrc/drvPM500.cc b/motorApp/NewportSrc/drvPM500.cc index 8c5c20e7..b9704893 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.8 $ +Version: $Revision: 1.9 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:33:21 $ +Last Modified: $Date: 2004-07-28 20:05:42 $ */ /* Device Driver Support routines for PM500 motor controller */ @@ -41,6 +41,7 @@ Last Modified: $Date: 2004-07-16 19:33:21 $ * .04 05-23-03 rls Converted to R3.14.x. * .05 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". * .06 07/09/04 rls removed unused Setup() argument. + * .07 07/28/04 rls "epicsExport" debug variable. */ @@ -81,6 +82,7 @@ Last Modified: $Date: 2004-07-16 19:33:21 $ #ifdef DEBUG volatile int drvPM500debug = 0; #define Debug(l, f, args...) { if(l<=drvPM500debug) printf(f,## args); } + epicsExportAddress(int, drvPM500debug); #else #define Debug(l, f, args...) #endif @@ -505,7 +507,7 @@ static int motor_init() char buff[BUFF_SIZE]; int total_axis = 0; int status, digits; - bool success_rtn; + asynStatus success_rtn; initialized = true; /* Indicate that driver is initialized. */ @@ -527,7 +529,7 @@ static int motor_init() success_rtn = pasynSyncIO->connect(cntrl->asyn_port, cntrl->asyn_address, &cntrl->pasynUser); - if (success_rtn == true) + if (success_rtn == asynSuccess) { /* flush any junk at input port - should not be any data available */ pasynSyncIO->flush(cntrl->pasynUser); @@ -564,7 +566,7 @@ static int motor_init() /* Return value is length of response string */ } - if (success_rtn == true && status > 0) + if (success_rtn == asynSuccess && status > 0) { brdptr->localaddr = (char *) NULL; brdptr->motor_in_motion = 0;