diff --git a/motorApp/AMCISrc/ANF2Driver.cpp b/motorApp/AMCISrc/ANF2Driver.cpp index acfba4d4..d3ab4d0c 100644 --- a/motorApp/AMCISrc/ANF2Driver.cpp +++ b/motorApp/AMCISrc/ANF2Driver.cpp @@ -67,7 +67,6 @@ ANF2Controller::ANF2Controller(const char *portName, const char *ANF2InPortName, status = pasynInt32SyncIO->connect(ANF2InPortName, i+j*AXIS_REG_OFFSET, &pasynUserInReg_[j][i], NULL); } for (i=0; iconnect(ANF2OutPortName, i+j*AXIS_REG_OFFSET, &pasynUserOutReg_[j][i], NULL); // Maybe send the outputs with Array calls in the future //status = pasynInt32ArraySyncIO->connect(ANF2OutPortName, i, &pasynUserOutArrayReg_[j][i], NULL); } @@ -164,7 +163,7 @@ void ANF2Controller::report(FILE *fp, int level) for (j=0; jpasynUserSelf, ASYN_TRACEIO_DRIVER,"writeReg16: writing %d to register %d\n", output, axisReg); - status = pasynInt32SyncIO->write(pasynUserOutReg_[axisNo][axisReg], output, timeout); - //status = pasynInt32ArraySyncIO->write(pasynUserOutArrayReg_[axisNo][axisReg], &output, 1, timeout); - epicsThreadSleep(0.01); - - return status ; -} - // This could be useful in the future, but it isn't needed yet /*asynStatus ANF2Controller::writeReg32Array(int axisNo, int axisReg, epicsInt32* output, int nElements, double timeout) { @@ -265,43 +251,6 @@ asynStatus ANF2Controller::writeReg16(int axisNo, int axisReg, int output, doubl return status ; }*/ -asynStatus ANF2Controller::writeReg32(int axisNo, int axisReg, int output, double timeout) -{ -//.. break 32-bit integer into 2 pieces -//.. write the pieces into ANF2 registers - - asynStatus status; - - int lower,upper; - - // This is the way the ANG1 driver does it, and the code doesn't appear to work - /*float fnum; - - fnum = (output / 1000.0); - upper = (int)fnum; - fnum = fnum - upper; - fnum = NINT(fnum * 1000); - lower = (int)fnum;*/ - - upper = (output >> 16) & 0x0000FFFF; - lower = output & 0x0000FFFF; - - printf("upper = 0x%x\t= %i\n", upper, upper); - printf("lower = 0x%x\t= %i\n", lower, lower); - - // writeReg16(piece1 ie MSW ... - status = writeReg16(axisNo, axisReg, upper, DEFAULT_CONTROLLER_TIMEOUT); - - // writeReg16(piece2 ie LSW ... - axisReg++; - status = writeReg16(axisNo, axisReg, lower, DEFAULT_CONTROLLER_TIMEOUT); - - // No breaking up the output value required when writing an array - maybe do this in the future - //status = pasynInt32ArraySyncIO->write(pasynUserOutArrayReg_[axisNo][axisReg], &output, 2, timeout); - - return status ; -} - asynStatus ANF2Controller::readReg16(int axisNo, int axisReg, epicsInt32 *input, double timeout) { asynStatus status; diff --git a/motorApp/AMCISrc/ANF2Driver.h b/motorApp/AMCISrc/ANF2Driver.h index 8bf2b6b7..01fc9398 100644 --- a/motorApp/AMCISrc/ANF2Driver.h +++ b/motorApp/AMCISrc/ANF2Driver.h @@ -102,7 +102,6 @@ public: ANF2Axis* getAxis(asynUser *pasynUser); ANF2Axis* getAxis(int axisNo); asynUser *pasynUserInReg_[MAX_MODULES*MAX_AXES_PER_MODULE][MAX_INPUT_REGS]; - asynUser *pasynUserOutReg_[MAX_MODULES*MAX_AXES_PER_MODULE][MAX_OUTPUT_REGS]; //asynUser *pasynUserOutArrayReg_[MAX_MODULES*MAX_AXES_PER_MODULE][MAX_OUTPUT_REGS]; /* These are the methods that we override from asynMotorDriver */