forked from epics_driver_modules/motorBase
handle controller version with STA command end-of-string bug (1.5.4)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
NewFocus PicoMotor Controller (87xx)
|
||||
===================================
|
||||
|
||||
|
||||
This motorRecord driver supports the NewFocus 8750 and 8752
|
||||
PicoMotor Network Controllers.
|
||||
8750 - RS232 @ 19200Baud (8data, No Parity, 1stop)
|
||||
@@ -57,8 +58,10 @@ Other Info
|
||||
===================================
|
||||
Test Versions:
|
||||
VER<cmnd>
|
||||
8750 - Version 1.0.13
|
||||
8750 - Version 1.0.13
|
||||
8752 - Version 1.5.0, 1.6.0
|
||||
8752 - Version 1.5.4 (NO '>' on STA command - use '/n' for input EOS)
|
||||
|
||||
|
||||
Detect driver types
|
||||
DRT Driver Type (8752 Only)
|
||||
|
||||
@@ -318,8 +318,10 @@ STATIC int set_status(int card, int signal)
|
||||
sprintf(buff, READ_STATUS, driverID);
|
||||
pStr = cntrl->status_string[driverID];
|
||||
/* STATUS command does not return a prompt - bug? */
|
||||
// recvRtn = send_recv_mess(card, buff, pStr, NL_EOS);
|
||||
recvRtn = send_recv_mess(card, buff, pStr, NULL);
|
||||
if (cntrl->changeEOS)
|
||||
recvRtn = send_recv_mess(card, buff, pStr, NL_EOS);
|
||||
else
|
||||
recvRtn = send_recv_mess(card, buff, pStr, NULL);
|
||||
CHECKRTN;
|
||||
Debug(2, "set_status(): Status_string=%s\n", pStr);
|
||||
if (sscanf(pStr, "A%d=0x%x",&recvDriver, &recvStatus) == 2)
|
||||
@@ -889,7 +891,10 @@ STATIC int motor_init()
|
||||
return(ERROR);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Check for 'STA\n' version = 1.5.4
|
||||
* because this version requires a NL input EOS on the STA command */
|
||||
cntrl->changeEOS = (*(bufptr + strlen(VER_STR) + 2) == '4') ? true : false;
|
||||
|
||||
total_axis = 0;
|
||||
driverIndex = 0;
|
||||
|
||||
@@ -110,6 +110,8 @@ struct PMNCcontroller
|
||||
char chan_select_string[PMNC87xx_NUM_DRIVERS+1][25];
|
||||
|
||||
PMNC_model pmnc; /* Controller Type */
|
||||
bool changeEOS; /* Flag for controller version that does not terminate the
|
||||
* STA command correctly */
|
||||
struct PMD_axis axisDef[MAX_AXIS]; /* Axis definition - New Focus Driver Model and Number */
|
||||
long last_position[MAX_AXIS]; /* Track last incremtal position to noMotion status */
|
||||
int total_drivers; /* Count number of drivers connected to controller */
|
||||
|
||||
Reference in New Issue
Block a user